aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/filelayout/filelayout.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2020-03-19 13:36:36 -0400
committerTrond Myklebust <trond.myklebust@hammerspace.com>2020-03-27 16:34:34 -0400
commitc21e7168848d4ff4158120dbd4464f0d5cfb1456 (patch)
tree57f6b908524be9d5c7769e60bff7b8794390b5e2 /fs/nfs/filelayout/filelayout.c
parentpNFS: Add a helper to allocate the array of buckets (diff)
downloadlinux-dev-c21e7168848d4ff4158120dbd4464f0d5cfb1456.tar.xz
linux-dev-c21e7168848d4ff4158120dbd4464f0d5cfb1456.zip
NFSv4/pnfs: Support a list of commit arrays in struct pnfs_ds_commit_info
When we have multiple layout segments with different lists of mirrored data, we need to track the commits on a per layout segment basis. This patch adds a list to support this tracking in struct pnfs_ds_commit_info. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs/filelayout/filelayout.c')
-rw-r--r--fs/nfs/filelayout/filelayout.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/nfs/filelayout/filelayout.c b/fs/nfs/filelayout/filelayout.c
index bd234394a87c..b051d5d320ba 100644
--- a/fs/nfs/filelayout/filelayout.c
+++ b/fs/nfs/filelayout/filelayout.c
@@ -1140,7 +1140,10 @@ filelayout_alloc_layout_hdr(struct inode *inode, gfp_t gfp_flags)
struct nfs4_filelayout *flo;
flo = kzalloc(sizeof(*flo), gfp_flags);
- return flo != NULL ? &flo->generic_hdr : NULL;
+ if (flo == NULL)
+ return NULL;
+ pnfs_init_ds_commit_info(&flo->commit_info);
+ return &flo->generic_hdr;
}
static void