summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2020-03-19 19:31:00 -0400
committerTrond Myklebust <trond.myklebust@hammerspace.com>2020-03-27 16:34:34 -0400
commit0cb1f6df8a63b51f276f94d94957d7a7ca757667 (patch)
tree558f05b84675af536fb595173b14bfed640c3d30 /fs/nfs
parentfce9ed0302180336b60a1e14fcda8dc887fd5070 (diff)
downloadlinux-0cb1f6df8a63b51f276f94d94957d7a7ca757667.tar.bz2
pNFS: Support per-layout segment commits in pnfs_generic_commit_pagelist()
Add support for scanning the full list of per-layout segment commit arrays to pnfs_generic_commit_pagelist(). Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/pnfs_nfs.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/fs/nfs/pnfs_nfs.c b/fs/nfs/pnfs_nfs.c
index f16bd6d0e830..f895a28b1e26 100644
--- a/fs/nfs/pnfs_nfs.c
+++ b/fs/nfs/pnfs_nfs.c
@@ -322,6 +322,20 @@ out_error:
return nreq;
}
+static unsigned int
+pnfs_alloc_ds_commits_list(struct list_head *list,
+ struct pnfs_ds_commit_info *fl_cinfo,
+ struct nfs_commit_info *cinfo)
+{
+ struct pnfs_commit_array *array;
+ unsigned int ret = 0;
+
+ list_for_each_entry(array, &fl_cinfo->commits, cinfo_list)
+ ret += pnfs_bucket_alloc_ds_commits(list, array->buckets,
+ array->nbuckets, cinfo);
+ return ret;
+}
+
/* This follows nfs_commit_list pretty closely */
int
pnfs_generic_commit_pagelist(struct inode *inode, struct list_head *mds_pages,
@@ -345,6 +359,8 @@ pnfs_generic_commit_pagelist(struct inode *inode, struct list_head *mds_pages,
nreq += pnfs_bucket_alloc_ds_commits(&list, fl_cinfo->buckets,
fl_cinfo->nbuckets, cinfo);
+
+ nreq += pnfs_alloc_ds_commits_list(&list, fl_cinfo, cinfo);
if (nreq == 0)
goto out;