Make namei convertROtoRW'd volumes usable
authorAndrew Deason <adeason@sinenomine.net>
Wed, 7 Oct 2009 17:14:11 +0000 (12:14 -0500)
committerDerrick Brashear <shadow|account-1000005@unknown>
Wed, 7 Oct 2009 19:31:18 +0000 (12:31 -0700)
commit906403c6d770026fd9da606ea468e47ee911f896
treecb8e43175a3ed96f44f0a10ba2245eaa5273ad1e
parente3d1eaf0ca6bfddede5aba1d1fc3f1e25cdb259e
Make namei convertROtoRW'd volumes usable

Right now, if you convertROtoRW a volume on namei, the converted volume
appears to need a salvage before it is usable, and the header of the old
(now empty) RO volume is kept around. Fix this:

 -- Set inUse = 0 on the converted volume, so the fileserver will be
    able to attach the volume when we give it back

 -- Unlink the RO header file, instead of trying to unlink the
    VI_VOLINFO file twice

 -- Log the actual error code (errno) in the error message for the last
    unlink

Reviewed-on: http://gerrit.openafs.org/591
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/vol/namei_ops.c