diff options
| author | John L. Hammond <[email protected]> | 2016-09-18 16:38:00 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2016-09-19 09:44:03 +0200 |
| commit | 3cbbf5eddbf69dffae0e1eba63f2f3eb7fe9f1a1 (patch) | |
| tree | 424fdbfba212bff8e474589a70c47c1063dddfad | |
| parent | 930f60e659478b300d06e699cc45f31adb07ed25 (diff) | |
staging: lustre: obd: cleanup struct md_op_data and uses
Make the following changes in or around struct md_op_data:
* rename enum op_cli_flags to enum md_cli_flags.
* Change to type of the op_flags member from __u32 to enum
md_op_flags.
* Remove the used but never set member op_npages.
* Remove the set but never used member op_stripe_offset (an alias for
op_ioepoch).
* Remove the op_max_pages alias for op_valid and add a op_max_pages
member.
Signed-off-by: John L. Hammond <[email protected]>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675
Reviewed-on: http://review.whamcloud.com/11734
Reviewed-by: Bob Glossman <[email protected]>
Reviewed-by: James Simmons <[email protected]>
Reviewed-by: Dmitry Eremin <[email protected]>
Reviewed-by: Oleg Drokin <[email protected]>
Signed-off-by: James Simmons <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
| -rw-r--r-- | drivers/staging/lustre/lustre/include/obd.h | 23 | ||||
| -rw-r--r-- | drivers/staging/lustre/lustre/mdc/mdc_request.c | 3 |
2 files changed, 11 insertions, 15 deletions
diff --git a/drivers/staging/lustre/lustre/include/obd.h b/drivers/staging/lustre/lustre/include/obd.h index 8a7c8037d5b1..2d25e40b5912 100644 --- a/drivers/staging/lustre/lustre/include/obd.h +++ b/drivers/staging/lustre/lustre/include/obd.h @@ -736,6 +736,14 @@ static inline int it_to_lock_mode(struct lookup_intent *it) return -EINVAL; } +enum md_cli_flags { + CLI_SET_MEA = BIT(0), + CLI_RM_ENTRY = BIT(1), + CLI_HASH64 = BIT(2), + CLI_API32 = BIT(3), + CLI_MIGRATE = BIT(4), +}; + struct md_op_data { struct lu_fid op_fid1; /* operation fid1 (usually parent) */ struct lu_fid op_fid2; /* operation fid2 (usually child) */ @@ -773,35 +781,24 @@ struct md_op_data { __u64 op_offset; /* Used by readdir */ - __u32 op_npages; + __u32 op_max_pages; /* used to transfer info between the stacks of MD client * see enum op_cli_flags */ - __u32 op_cli_flags; + enum md_cli_flags op_cli_flags; /* File object data version for HSM release, on client */ __u64 op_data_version; struct lustre_handle op_lease_handle; }; -#define op_stripe_offset op_ioepoch -#define op_max_pages op_valid - struct md_callback { int (*md_blocking_ast)(struct ldlm_lock *lock, struct ldlm_lock_desc *desc, void *data, int flag); }; -enum op_cli_flags { - CLI_SET_MEA = 1 << 0, - CLI_RM_ENTRY = 1 << 1, - CLI_HASH64 = BIT(2), - CLI_API32 = BIT(3), - CLI_MIGRATE = BIT(4), -}; - struct md_enqueue_info; /* metadata stat-ahead */ diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c index e622b7ae1481..1721925345fa 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_request.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c @@ -1264,8 +1264,7 @@ static int mdc_read_page_remote(void *data, struct page *page0) lu_pgs >>= LU_PAGE_SHIFT; LASSERT(!(req->rq_bulk->bd_nob_transferred & ~LU_PAGE_MASK)); - CDEBUG(D_INODE, "read %d(%d)/%d pages\n", rd_pgs, lu_pgs, - op_data->op_npages); + CDEBUG(D_INODE, "read %d(%d) pages\n", rd_pgs, lu_pgs); mdc_adjust_dirpages(page_pool, rd_pgs, lu_pgs); |