OpenAFS CVS Commit: openafs/src/WINNT/afsd by jaltman

cvs@GRAND.CENTRAL.ORG cvs@GRAND.CENTRAL.ORG
Tue, 18 Sep 2007 12:59:24 EDT


Update of /cvs/openafs/src/WINNT/afsd
In directory GRAND.CENTRAL.ORG:/home/jaltman/openafs/cvs-1-5/src/WINNT/afsd

Modified Files:
      Tag: openafs-devel-1_5_x
	cm_buf.c cm_dcache.c smb.c smb3.c 
Log Message:
DELTA DEVEL15-windows-vnovnode-while-file-in-use-20070918
AUTHOR jaltman@secure-endpoints.com

Discovered another case where VNOVNODE errors were not being handled.
If there are dirty buffers and a VNOVNODE error is received while
writing the buffer, the buffer would be left in the dirty buffers queue.
This caused a couple problems:
(1) any attempt to flush the file, volume, or cache would fail because
    there were unflushed dirty buffers that could not be flushed.
(2) shutdown of the service would hang because the buffers could not
    be flushed.

In addition, while a VNOVNODE error would result in the cm_scache_t
being marked CM_SCACHEFLAG_DELETED, this state was not being checked
at the SMB layer.  As a result, if a smb_fid_t was allocated and it
referenced the deleted cm_scache_t, the SMB operations would continue
to be processed and report success even if the actual file or directory
no longer existed.

We now clear the dirty state on buffers which cannot be written due to
VNOVNODE errors.  We also check the cm_scache_t for deletion prior to
use whenever a smb_fid_t is looked up.  If the cm_scache_t is deleted,
the smb_fid_t is closed and the error CM_ERROR_NOSUCHFILE is returned
for files or CM_ERROR_NOSUCHPATH for directories.


--- DELTA config for openafs-devel-1_5_x follows ---
DEVEL15-windows-vnovnode-while-file-in-use-20070918 openafs/src/WINNT/afsd/cm_buf.c 1.31.2.19 1.31.2.20
DEVEL15-windows-vnovnode-while-file-in-use-20070918 openafs/src/WINNT/afsd/cm_dcache.c 1.30.2.18 1.30.2.19
DEVEL15-windows-vnovnode-while-file-in-use-20070918 openafs/src/WINNT/afsd/smb.c 1.118.2.42 1.118.2.43
DEVEL15-windows-vnovnode-while-file-in-use-20070918 openafs/src/WINNT/afsd/smb3.c 1.95.2.44 1.95.2.45