OpenAFS CVS Commit: openafs/src/WINNT/afsd by jaltman
cvs@GRAND.CENTRAL.ORG
cvs@GRAND.CENTRAL.ORG
Sat, 03 Jun 2006 13:57:13 EDT
Update of /cvs/openafs/src/WINNT/afsd
In directory GRAND.CENTRAL.ORG:/home/jaltman/openafs/cvs-1-4/src/WINNT/afsd
Modified Files:
Tag: openafs-stable-1_4_x
cm_conn.c cm_ioctl.c cm_scache.c cm_scache.h cm_utils.c
cm_vnodeops.c
Log Message:
DELTA STABLE14-windows-scache-recycle-20060603
AUTHOR jaltman@secure-endpoints.com
A deadlock was detected when performing "fs flushall" if the file
server reports VNOVNODE. The scp->createBufferLock is already
held by the current thread and there is no mechanism to propagate
the knowledge. Therefore, an alternate mechanism for clearing the
cache must be developed. A new function cm_RecycleSCache(scp,flags)
has been extracted from cm_GetNewSCache(). This function performs
the task of recycling an cm_scache_t object. When called from
cm_GetNewSCache() with no flags the expectation is that there are
no associated buffers that are queued to be read or written. When
called from cm_Analyze() with the CM_SCACHE_RECYCLEFLAG_DESTROY_BUFFERS
flag, any queued buffers will be de-queued and marked as if the operations
were performed so the data can be discarded.
This patch also addresses the following issues:
* CM_ERROR codes were logged as "unknown" by cm_Analyze.
* In response to VNOVNODE, the parent is only discarded if the current
cm_scache_t is not a directory.
* In the Ioctl FlushFile and FlushVolume functions, there were no
checks to protect against flushing the Freelance SCache entries.
* In FlushFile, the wrong cm_scache_t object was being released.
* In cm_GetNewSCache, do not allow Freelance SCache entries to be
recycled. Choose a new entry if cm_RecycleSCache fails.
--- DELTA config for openafs-stable-1_4_x follows ---
STABLE14-windows-scache-recycle-20060603 openafs/src/WINNT/afsd/cm_conn.c 1.25.2.20 1.25.2.21
STABLE14-windows-scache-recycle-20060603 openafs/src/WINNT/afsd/cm_ioctl.c 1.33.2.27 1.33.2.28
STABLE14-windows-scache-recycle-20060603 openafs/src/WINNT/afsd/cm_scache.c 1.14.2.18 1.14.2.19
STABLE14-windows-scache-recycle-20060603 openafs/src/WINNT/afsd/cm_scache.h 1.4.2.12 1.4.2.13
STABLE14-windows-scache-recycle-20060603 openafs/src/WINNT/afsd/cm_utils.c 1.5.14.6 1.5.14.7
STABLE14-windows-scache-recycle-20060603 openafs/src/WINNT/afsd/cm_vnodeops.c 1.19.2.38 1.19.2.39