See the comments in the patch. Given that the problem is not going away any time soon the least we can do is lessen the impact. readdir calls this over 180k times during buildkernel.
- Group Reviewers
- rS356830: vfs: provide F_ISUNIONSTACK as a kludge for libc
Unit Tests Skipped
In principle this is buggy. While we never clear ->mnt_vfc, it can race enough that it points to a filesystem module which is now being unloaded. This can be fixed by providing a dummy "unallocated vfc" to be set in mount destroy.
return (false); instead of goto
Some variant of this text must appear in fcntl(2) and not in the comment.
Since you are tweaking this part, add a MNTK_UNION_FS flag and check for it instead of doing strcmp.
This would also remove any vague reasoning behind vfs_busy() usefulness.
this can't be bool as the routine returns -1/0/1
ok, this was simply copied from the original
I don't think this should be "advertised". The comment in the header says to not use it.
you mean literally a dedicated flag just for unionfs? so the check would be mnt_flag & (MNT_UNION | MNT_UNION_FS)?
I think for the case of fstatfs failure more reasonable behavior is to treat the directory as not having union(fs) property. This note holds both for old and new code.
|189 ↗||(On Diff #66872)|
lag ? Did you mean 'flag' ?.
I think it is better to remove braces, and say '...part of a union stack, either the "union" ...' .
|190 ↗||(On Diff #66872)|
Start the new sentence from a new line.