define for nfs4stateid.other constant

This commit is contained in:
Olga Kornievskaia 2011-03-18 10:44:59 -04:00 committed by unknown
parent 49f141680a
commit b6d6767341
6 changed files with 7 additions and 5 deletions

View file

@ -177,7 +177,7 @@ static unsigned int WINAPI _handle_cb_recall(void *args)
print_hexbuf(3, (unsigned char *)"_handle_cb_recall: fh ",
cb_args->args->fh.fh, cb_args->args->fh.len);
print_hexbuf(3, (unsigned char *)"_handle_cb_recall: stateid ",
cb_args->args->stateid.other, 12);
cb_args->args->stateid.other, NFS4_STATEID_OTHER);
ZeroMemory(&path_fh, sizeof(nfs41_path_fh));
memcpy(&path_fh.fh, &cb_args->args->fh, sizeof(nfs41_fh));
path_fh.fh.superblock = NULL;

View file

@ -34,7 +34,7 @@
static bool_t common_stateid(XDR *xdr, stateid4 *stateid)
{
return xdr_u_int32_t(xdr, &stateid->seqid)
&& xdr_opaque(xdr, (char*)stateid->other, 12);
&& xdr_opaque(xdr, (char*)stateid->other, NFS4_STATEID_OTHER);
}
static bool_t common_fh(XDR *xdr, nfs41_fh *fh)

View file

@ -32,6 +32,7 @@
#define NFS4_VERIFIER_SIZE 8
#define NFS4_OPAQUE_LIMIT 1024
#define NFS4_SESSIONID_SIZE 16
#define NFS4_STATEID_OTHER 12
#define NFS41_MAX_FILEIO_SIZE (1024 * 1024)
#define NFS41_MAX_SERVER_CACHE 1024

View file

@ -128,7 +128,7 @@ typedef struct __nfsace4 {
typedef struct __stateid4 {
uint32_t seqid;
unsigned char other[12];
unsigned char other[NFS4_STATEID_OTHER];
} stateid4;
typedef struct __fattr4 {

View file

@ -139,7 +139,7 @@ static bool_t xdr_stateid4(
if (!xdr_u_int32_t(xdr, &si->seqid))
return FALSE;
return xdr_opaque(xdr, (char *)si->other, 12);
return xdr_opaque(xdr, (char *)si->other, NFS4_STATEID_OTHER);
}
/* fattr4 */

View file

@ -239,7 +239,8 @@ static enum pnfs_status layout_update_stateid(
if (state->stateid.seqid == 0) {
/* save a new layout stateid */
memcpy(&state->stateid, stateid, sizeof(stateid4));
} else if (memcmp(&state->stateid.other, stateid->other, 12) == 0) {
} else if (memcmp(&state->stateid.other, stateid->other,
NFS4_STATEID_OTHER) == 0) {
/* update an existing layout stateid */
state->stateid.seqid = stateid->seqid;
} else {