vol: return VNOVNODE if vnode is not allocated
authorJeffrey Altman <jaltman@your-file-system.com>
Mon, 13 May 2013 10:45:34 +0000 (06:45 -0400)
committerDerrick Brashear <shadow@your-file-system.com>
Tue, 28 May 2013 15:39:36 +0000 (08:39 -0700)
If a request for a vnode fails because the vnode is not allocated
within the volume, the error returned to the client should be VNOVNODE to
indicate that the requested FID does not exist and not VIO indicating a
transient disk i/o error or other transient internal inconsistency.

Change-Id: I2f875593d4a49b7ca8ed26a2f147a1c3c9109a6d
Reviewed-on: http://gerrit.openafs.org/9902
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

src/vol/vnode.c

index 82d851c..6983e8d 100644 (file)
@@ -979,7 +979,7 @@ VnLoad(Error * ec, Volume * vp, Vnode * vnp,
            if (LogLevel >= 5)
                Log("VnLoad: Couldn't read vnode %u, volume %" AFS_VOLID_FMT " (%s); read %d bytes, errno %d\n",
                    Vn_id(vnp), afs_printable_VolumeId_lu(V_id(vp)), V_name(vp), (int)nBytes, errno);
-           *ec = VIO;
+           *ec = VNOVNODE;
            dosalv = 0;
        }
        goto error_encountered_nolock;