Commit e3b9f7e6 authored by Trond Myklebust's avatar Trond Myklebust

NFS/pNFS: Support commit arrays in nfs_clear_pnfs_ds_commit_verifiers()

Add support for scanning the full list of per-layout segment commit
arrays to nfs_clear_pnfs_ds_commit_verifiers().
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent 1f28476d
...@@ -517,13 +517,26 @@ int nfs_filemap_write_and_wait_range(struct address_space *mapping, ...@@ -517,13 +517,26 @@ int nfs_filemap_write_and_wait_range(struct address_space *mapping,
loff_t lstart, loff_t lend); loff_t lstart, loff_t lend);
#ifdef CONFIG_NFS_V4_1 #ifdef CONFIG_NFS_V4_1
static inline void
pnfs_bucket_clear_pnfs_ds_commit_verifiers(struct pnfs_commit_bucket *buckets,
unsigned int nbuckets)
{
unsigned int i;
for (i = 0; i < nbuckets; i++)
buckets[i].direct_verf.committed = NFS_INVALID_STABLE_HOW;
}
static inline static inline
void nfs_clear_pnfs_ds_commit_verifiers(struct pnfs_ds_commit_info *cinfo) void nfs_clear_pnfs_ds_commit_verifiers(struct pnfs_ds_commit_info *cinfo)
{ {
int i; struct pnfs_commit_array *array;
pnfs_bucket_clear_pnfs_ds_commit_verifiers(cinfo->buckets,
cinfo->nbuckets);
for (i = 0; i < cinfo->nbuckets; i++) list_for_each_entry(array, &cinfo->commits, cinfo_list)
cinfo->buckets[i].direct_verf.committed = NFS_INVALID_STABLE_HOW; pnfs_bucket_clear_pnfs_ds_commit_verifiers(array->buckets,
array->nbuckets);
} }
#else #else
static inline static inline
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment