Subject: Re: bin/3166: ls -lW /dir/whiteout fails, but ls -lW /dir shows the whiteout
To: Todd Vierling <tv@pobox.com>
From: Marc Horowitz <marc@cygnus.com>
List: netbsd-bugs
Date: 01/31/1997 20:15:38
Todd Vierling <tv@pobox.com> writes:
>> The problem with this is that whiteouts *don't* exist when accessed
>> directly; you only see them when listing its parent directory with
>> getdirentries(). If you try to stat() a whiteout, the file doesn't
>> exist--that's the purpose of whiteouts (to keep the files from existing in
>> the upper layer!).
>>
>> You could supposedly churn through the getdirentries() list when -W is
>> specified and the file returns not found, but that's one hell of a bit of
>> work for one file.
You could; I think this would be a little less confusing. Or (and I
admit this is a poor excuse for a new syscall), we could have a wstat,
analagous to lstat, which can see whiteouts.
Another option which doesn't multiply syscalls is to implement stat,
lstat, and wstat (and maybe fstat, too) in libc, and have them all use
one syscall which tells the kernel which function to execute based on
an extra argument.
Of course, at this point, I'm spewing and should just submit patches
if I expect anything useful to happen :-)
Marc