]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DAFS: Allow LEAVE_OFF for DELETED volumes
authorAndrew Deason <adeason@sinenomine.net>
Wed, 2 Mar 2011 21:02:40 +0000 (15:02 -0600)
committerDerrick Brashear <shadow@dementia.org>
Tue, 8 Mar 2011 12:15:31 +0000 (04:15 -0800)
When a volume is VOL_STATE_DELETED, it effectively does not exist to
other programs over FSSYNC. So, do not prevent someone from issuing a
FSYNC_VOL_LEAVE_OFF for a VOL_STATE_DELETED volume.

Reviewed-on: http://gerrit.openafs.org/4119
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit ddf5ae4f746f2b5e522e10cfcacb6225499e7956)

Change-Id: I840930e144260036e2c96d83134a79dee3c9d083
Reviewed-on: http://gerrit.openafs.org/4165
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/vol/fssync-server.c

index 51e995258d71c0aa1772620839f3f5dfd90e770d..08774e8610062566daecd6efc25ea5bce92bedcb 100644 (file)
@@ -728,7 +728,7 @@ FSYNC_com_VolOn(FSSYNC_VolOp_command * vcom, SYNC_response * res)
     if (vcom->hdr->command == FSYNC_VOL_LEAVE_OFF) {
        /* nothing much to do if we're leaving the volume offline */
 #ifdef AFS_DEMAND_ATTACH_FS
-       if (vp) {
+       if (vp && V_attachState(vp) != VOL_STATE_DELETED) {
            if (FSYNC_partMatch(vcom, vp, 1)) {
                if ((V_attachState(vp) == VOL_STATE_UNATTACHED) ||
                    (V_attachState(vp) == VOL_STATE_PREATTACHED)) {