Skip to content

Commit

Permalink
nfsv4: add parsing of nfs_dev to v4.
Browse files Browse the repository at this point in the history
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
  • Loading branch information
sahlberg committed Dec 14, 2024
1 parent 46cf506 commit 9b3aced
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/nfs_v4.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ struct nfs4_cb_data {
static uint32_t standard_attributes[2] = {
(1 << FATTR4_TYPE |
1 << FATTR4_SIZE |
1 << FATTR4_FSID |
1 << FATTR4_FILEID),
(1 << (FATTR4_MODE - 32) |
1 << (FATTR4_NUMLINKS - 32) |
Expand Down Expand Up @@ -487,6 +488,11 @@ nfs_parse_attributes(struct nfs_context *nfs, struct nfs4_cb_data *data,
st->nfs_size = nfs_pntoh64((uint32_t *)(void *)buf);
buf += 8;
len -= 8;
/* FSID */
CHECK_GETATTR_BUF_SPACE(len, 16);
st->nfs_dev = ((uint64_t *)buf)[0] ^ ((uint64_t *)buf)[1];
buf += 16;
len -= 16;
/* Inode */
CHECK_GETATTR_BUF_SPACE(len, 8);
st->nfs_ino = nfs_pntoh64((uint32_t *)(void *)buf);
Expand Down

0 comments on commit 9b3aced

Please sign in to comment.