]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Windows: lock protected fields must be 32-bit
authorJeffrey Altman <jaltman@your-file-system.com>
Mon, 16 May 2011 01:56:17 +0000 (21:56 -0400)
committerJeffrey Altman <jaltman@openafs.org>
Wed, 18 May 2011 17:58:50 +0000 (10:58 -0700)
It is not safe to protect two 16-bit fields in a structure
with different locks.  Switch to using 32-bit fields.

Increment the cm-memmap version number since the data structure
sizes changed and the cache file must be invalidated.

Change-Id: If363654c4d0dd8efd225c9ff19b99bb4f4b7b70e
Reviewed-on: http://gerrit.openafs.org/4675
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
src/WINNT/afsd/cm_buf.h
src/WINNT/afsd/cm_memmap.h
src/WINNT/afsd/cm_volume.h

index 670cb9497aa60b8d4acea25fc07e4215e4d54a63..13d2381c485383f916ffb5c22a44230ed5aa856a 100644 (file)
@@ -62,8 +62,8 @@ typedef struct cm_buf {
     afs_uint32 dirtyCounter;   /* bumped at each dirty->clean transition */
     osi_hyper_t offset;                /* offset */
     cm_fid_t fid;              /* file ID */
-    afs_uint16 flags;          /* flags we're using - mx */
-    afs_uint16 qFlags;         /* queue/hash state flags - buf_globalLock */
+    afs_uint32 flags;          /* flags we're using - mx */
+    afs_uint32 qFlags;         /* queue/hash state flags - buf_globalLock */
     char *datap;               /* data in this buffer */
     afs_uint32 error;          /* last error code, if CM_BUF_ERROR is set */
     cm_user_t *userp;          /* user who wrote to the buffer last */
index 7df034167b72e957e25875d81d8dc6ca373c4fa4..a4b57b2d2e4311ea2e8b07a351ff998b3fe4315e 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef CM_MEMMAP_H
 #define CM_MEMMAP_H 1
 
-#define CM_CONFIG_DATA_VERSION  14
+#define CM_CONFIG_DATA_VERSION  15
 #define CM_CONFIG_DATA_MAGIC            ('A' | 'F'<<8 | 'S'<<16 | CM_CONFIG_DATA_VERSION<<24)
 
 typedef struct cm_config_data {
index 9d21ac9ef4695adfacec396549fdc3da84453820..6b5a97c5faeed81a2e75ba890d70ce5b815883d1 100644 (file)
@@ -24,8 +24,8 @@ typedef struct cm_vol_state {
     struct cm_fid dotdotFid;           /* parent of volume root */
     cm_serverRef_t *serversp;           /* by cm_serverLock */
     enum volstatus  state;              /* by rw */
-    afs_uint16      flags;              /* by rw */
-    afs_uint16      qflags;             /* by cm_volumeLock */
+    afs_uint32      flags;              /* by rw */
+    afs_uint32      qflags;             /* by cm_volumeLock */
 } cm_vol_state_t;
 
 /* RWVOL, ROVOL, BACKVOL are defined in cm.h */