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: I867b4b85b4fd9fe0083ad9d0559311f1c287513f
Reviewed-on: http://gerrit.openafs.org/4660
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
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 */
#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 {
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 */