diff options
author | Weston Andros Adamson <dros@primarydata.com> | 2014-09-05 18:20:21 -0400 |
---|---|---|
committer | Tom Haynes <loghyr@primarydata.com> | 2015-02-03 14:06:45 -0500 |
commit | b57ff1303a2d4d1484c7a82bd80a3e014d6cdf5e (patch) | |
tree | da3d760d94a39ecbf89e4ea5b0ed5e5017f26fde /fs/nfs/pnfs.h | |
parent | 6cccbb6f52dceec5f4faed8846ac05ae830640e6 (diff) |
pnfs: pass ds_commit_idx through the commit path
Pass ds_commit_idx through the nfs commit path. It's used to select
the commit bucket when using pnfs and is ignored when not using pnfs.
Several functions had to be changed: nfs_retry_commit,
nfs_mark_request_commit, pnfs_mark_request_commit and the pnfs layout
driver .mark_request_commit functions.
Signed-off-by: Tom Haynes <loghyr@primarydata.com>
Diffstat (limited to 'fs/nfs/pnfs.h')
-rw-r--r-- | fs/nfs/pnfs.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h index 59c831efb5de..a0ab81cc9cf3 100644 --- a/fs/nfs/pnfs.h +++ b/fs/nfs/pnfs.h | |||
@@ -137,7 +137,8 @@ struct pnfs_layoutdriver_type { | |||
137 | struct pnfs_ds_commit_info *(*get_ds_info) (struct inode *inode); | 137 | struct pnfs_ds_commit_info *(*get_ds_info) (struct inode *inode); |
138 | void (*mark_request_commit) (struct nfs_page *req, | 138 | void (*mark_request_commit) (struct nfs_page *req, |
139 | struct pnfs_layout_segment *lseg, | 139 | struct pnfs_layout_segment *lseg, |
140 | struct nfs_commit_info *cinfo); | 140 | struct nfs_commit_info *cinfo, |
141 | u32 ds_commit_idx); | ||
141 | void (*clear_request_commit) (struct nfs_page *req, | 142 | void (*clear_request_commit) (struct nfs_page *req, |
142 | struct nfs_commit_info *cinfo); | 143 | struct nfs_commit_info *cinfo); |
143 | int (*scan_commit_lists) (struct nfs_commit_info *cinfo, | 144 | int (*scan_commit_lists) (struct nfs_commit_info *cinfo, |
@@ -389,14 +390,14 @@ pnfs_generic_mark_devid_invalid(struct nfs4_deviceid_node *node) | |||
389 | 390 | ||
390 | static inline bool | 391 | static inline bool |
391 | pnfs_mark_request_commit(struct nfs_page *req, struct pnfs_layout_segment *lseg, | 392 | pnfs_mark_request_commit(struct nfs_page *req, struct pnfs_layout_segment *lseg, |
392 | struct nfs_commit_info *cinfo) | 393 | struct nfs_commit_info *cinfo, u32 ds_commit_idx) |
393 | { | 394 | { |
394 | struct inode *inode = req->wb_context->dentry->d_inode; | 395 | struct inode *inode = req->wb_context->dentry->d_inode; |
395 | struct pnfs_layoutdriver_type *ld = NFS_SERVER(inode)->pnfs_curr_ld; | 396 | struct pnfs_layoutdriver_type *ld = NFS_SERVER(inode)->pnfs_curr_ld; |
396 | 397 | ||
397 | if (lseg == NULL || ld->mark_request_commit == NULL) | 398 | if (lseg == NULL || ld->mark_request_commit == NULL) |
398 | return false; | 399 | return false; |
399 | ld->mark_request_commit(req, lseg, cinfo); | 400 | ld->mark_request_commit(req, lseg, cinfo, ds_commit_idx); |
400 | return true; | 401 | return true; |
401 | } | 402 | } |
402 | 403 | ||
@@ -574,7 +575,7 @@ pnfs_get_ds_info(struct inode *inode) | |||
574 | 575 | ||
575 | static inline bool | 576 | static inline bool |
576 | pnfs_mark_request_commit(struct nfs_page *req, struct pnfs_layout_segment *lseg, | 577 | pnfs_mark_request_commit(struct nfs_page *req, struct pnfs_layout_segment *lseg, |
577 | struct nfs_commit_info *cinfo) | 578 | struct nfs_commit_info *cinfo, u32 ds_commit_idx) |
578 | { | 579 | { |
579 | return false; | 580 | return false; |
580 | } | 581 | } |