]> git.michaelhowe.org Git - packages/o/openafs.git/commit
namei: Do not remove n_voldir1
authorAndrew Deason <adeason@sinenomine.net>
Thu, 9 Sep 2010 19:10:01 +0000 (14:10 -0500)
committerDerrick Brashear <shadow@dementia.org>
Tue, 8 Feb 2011 21:55:01 +0000 (13:55 -0800)
commitefd3fa3808499ede8c19ba3ede7bd67524538da1
tree1bed2053b329f136deb194c6768f82119e1849cf
parentd3cdeb9e78bec864e9939c5ad6f2d5e9086fbfa4
namei: Do not remove n_voldir1

When removing data directories in namei_RemoveDataDirectories, do not
remove the n_voldir1 directory (directory X in /vicepa/AFSIDat/X).
Removing this directory can race against the creation of an entirely
unrelated volume, causing the create op to fail (since it tries to
create a directory in a directory that no longer exists).

We don't currently have the necessary locking to make this safe, and
since the overhead of n_voldir1 existing is pretty negligible, just
leave it there. Also add some comments briefly justifying this.

Note that other similar races probably exist for directories under
n_voldir1, but they would only be between volumes in the same VG, and
so are much less likely to occur.

(cherry picked from commit f2df207274c65b4fa8c24419150e9084a4d17fca)
Reviewed-on: http://gerrit.openafs.org/2727
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Change-Id: I2df4b73dd5125da0a2de52c3011ba167dc036a8b
Reviewed-on: http://gerrit.openafs.org/3907
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/vol/namei_ops.c