NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/44383: an endless stream of whiteout and opaque dir problems pours forth
>Number: 44383
>Category: kern
>Synopsis: an endless stream of whiteout and opaque dir problems pours
>forth
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jan 13 10:55:01 +0000 2011
>Originator: Antti Kantee
>Release:
>Organization:
>Environment:
>Description:
Assume the following directories (including the obvious implications):
/ro
/ro/dir
/ro/dir/file
/rw
mount_union -b /ro /rw maps /ro into /rw and makes the tree writable.
Then assume we do rmdir(/rw/dir). The operation should either
fail or make /rw seem empty. Maybe it should fail, but at least
with our current implementation it succeeds. Since the operation
succeeds, stat(/rw/dir) should fail without a question. It doesn't.
Even if dir/file does NOT exist, rmdir(dir) succeeds and stat still
succeeds afterwards.
Also, a future mkdir(/rw/dir) should *not* expose the contents of
/ro again, i.e. create an opaque directory. Currently mkdir fails
with the kind of expected EEXIST.
tests/fs/vfs/t_union whiteout attempts to test the these issues
but fails miserably in a variety of ways.
It's probably easy to toy more elementary cases into the test.
Even though unionfs has its inherent problems, the semantics
for a r/o lower layer are generally well-defined and should be
expected to work even for fs namespace management.
(I don't claim to understand how the upper layer will remain
generally usable with all the whiteouts accumulating over
time, but that's another PR)
>How-To-Repeat:
run the test. if a problem accidentally gets fixed, change the
test a little to expose another problem.
>Fix:
define union semantics with test cases. fix. iterate.
Home |
Main Index |
Thread Index |
Old Index