]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: lustre: llite: set op_max_pages
authorwang di <di.wang@intel.com>
Tue, 16 Aug 2016 20:19:28 +0000 (16:19 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Aug 2016 13:57:39 +0000 (15:57 +0200)
Cache the maximum allowed pages supported by the llite
layer. This value will be used in the mdc and lmv layer.

Signed-off-by: wang di <di.wang@intel.com>
Reviewed-on: http://review.whamcloud.com/7043
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/dir.c
drivers/staging/lustre/lustre/llite/llite_nfs.c
drivers/staging/lustre/lustre/llite/statahead.c

index 9c7fa8f2b9543edb063c99470b560dbd875320a8..ed090155eb56c083b9c4fc4dd045960048d97078 100644 (file)
@@ -649,6 +649,7 @@ static int ll_readdir(struct file *filp, struct dir_context *ctx)
                        }
                }
        }
+       op_data->op_max_pages = sbi->ll_md_brw_pages;
        ctx->pos = pos;
        rc = ll_dir_read(inode, &pos, op_data, ctx);
        pos = ctx->pos;
index 2b652407c239a510aec7199d24bcc86ee60629a7..1e156dcf77c217820625a7c090ae8b3488e01979 100644 (file)
@@ -276,6 +276,7 @@ static int ll_get_name(struct dentry *dentry, char *name,
                goto out;
        }
 
+       op_data->op_max_pages = ll_i2sbi(dir)->ll_md_brw_pages;
        inode_lock(dir);
        rc = ll_dir_read(dir, &pos, op_data, &lgd.ctx);
        inode_unlock(dir);
index 46b8fafa4efd8cbfb2d0c2b0438badb43711a476..454c33e67da5aae1f1541d43a43519122371a989 100644 (file)
@@ -1052,6 +1052,8 @@ static int ll_statahead_thread(void *arg)
        if (IS_ERR(op_data))
                return PTR_ERR(op_data);
 
+       op_data->op_max_pages = ll_i2sbi(dir)->ll_md_brw_pages;
+
        if (sbi->ll_flags & LL_SBI_AGL_ENABLED)
                ll_start_agl(parent, sai);
 
@@ -1355,6 +1357,10 @@ static int is_first_dirent(struct inode *dir, struct dentry *dentry)
                                     LUSTRE_OPC_ANY, dir);
        if (IS_ERR(op_data))
                return PTR_ERR(op_data);
+       /**
+        * FIXME choose the start offset of the readdir
+        */
+       op_data->op_max_pages = ll_i2sbi(dir)->ll_md_brw_pages;
 
        ll_dir_chain_init(&chain);
        page = ll_get_dir_page(dir, op_data, pos, &chain);