pNFS: Add a helper to allocate the array of buckets

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
Trond Myklebust
2020-03-18 17:22:47 -04:00
parent 19573c939a
commit d7242c4641
3 changed files with 46 additions and 3 deletions

View File

@@ -1270,10 +1270,19 @@ struct pnfs_commit_bucket {
struct nfs_writeverf direct_verf;
};
struct pnfs_commit_array {
struct list_head cinfo_list;
struct list_head lseg_list;
struct pnfs_layout_segment *lseg;
struct rcu_head rcu;
unsigned int nbuckets;
struct pnfs_commit_bucket buckets[];
};
struct pnfs_ds_commit_info {
int nwritten;
int ncommitting;
int nbuckets;
unsigned int nwritten;
unsigned int ncommitting;
unsigned int nbuckets;
struct pnfs_commit_bucket *buckets;
};