From 9b3aced5e2a9e57b40cc70deb3efb44a9033c4ad Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Sun, 15 Dec 2024 08:57:33 +1000 Subject: [PATCH] nfsv4: add parsing of nfs_dev to v4. Signed-off-by: Ronnie Sahlberg --- lib/nfs_v4.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/nfs_v4.c b/lib/nfs_v4.c index 0f697f6c..9790ed6a 100644 --- a/lib/nfs_v4.c +++ b/lib/nfs_v4.c @@ -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) | @@ -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);