Commit d8c0b0a9 authored by Jinshan Xiong's avatar Jinshan Xiong Committed by Greg Kroah-Hartman

staging: lustre: llite: Change readdir BRW metrics

To simplify the code, change the metrics from bytes to pages.
Signed-off-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Signed-off-by: default avatarJinshan Xiong <jinshan.xiong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5034
Reviewed-on: http://review.whamcloud.com/10275Reviewed-by: default avatarwangdi <di.wang@intel.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 297e908f
...@@ -148,7 +148,7 @@ static int ll_dir_filler(void *_hash, struct page *page0) ...@@ -148,7 +148,7 @@ static int ll_dir_filler(void *_hash, struct page *page0)
struct page **page_pool; struct page **page_pool;
struct page *page; struct page *page;
struct lu_dirpage *dp; struct lu_dirpage *dp;
int max_pages = ll_i2sbi(inode)->ll_md_brw_size >> PAGE_SHIFT; int max_pages = ll_i2sbi(inode)->ll_md_brw_pages;
int nrdpgs = 0; /* number of pages read actually */ int nrdpgs = 0; /* number of pages read actually */
int npages; int npages;
int i; int i;
......
...@@ -474,7 +474,7 @@ struct ll_sb_info { ...@@ -474,7 +474,7 @@ struct ll_sb_info {
unsigned int ll_namelen; unsigned int ll_namelen;
struct file_operations *ll_fop; struct file_operations *ll_fop;
unsigned int ll_md_brw_size; /* used by readdir */ unsigned int ll_md_brw_pages; /* readdir pages per RPC */
struct lu_site *ll_site; struct lu_site *ll_site;
struct cl_device *ll_cl; struct cl_device *ll_cl;
......
...@@ -319,9 +319,9 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, ...@@ -319,9 +319,9 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt,
sbi->ll_flags |= LL_SBI_64BIT_HASH; sbi->ll_flags |= LL_SBI_64BIT_HASH;
if (data->ocd_connect_flags & OBD_CONNECT_BRW_SIZE) if (data->ocd_connect_flags & OBD_CONNECT_BRW_SIZE)
sbi->ll_md_brw_size = data->ocd_brw_size; sbi->ll_md_brw_pages = data->ocd_brw_size >> PAGE_SHIFT;
else else
sbi->ll_md_brw_size = PAGE_SIZE; sbi->ll_md_brw_pages = 1;
if (data->ocd_connect_flags & OBD_CONNECT_LAYOUTLOCK) if (data->ocd_connect_flags & OBD_CONNECT_LAYOUTLOCK)
sbi->ll_flags |= LL_SBI_LAYOUT_LOCK; sbi->ll_flags |= LL_SBI_LAYOUT_LOCK;
......
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