From patchwork Sun Oct 14 18:58:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Simmons X-Patchwork-Id: 10640849 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3BEF61508 for ; Sun, 14 Oct 2018 18:59:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E293B2951D for ; Sun, 14 Oct 2018 18:59:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D6E3129542; Sun, 14 Oct 2018 18:59:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from pdx1-mailman02.dreamhost.com (pdx1-mailman02.dreamhost.com [64.90.62.194]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 74DC92951D for ; Sun, 14 Oct 2018 18:59:36 +0000 (UTC) Received: from pdx1-mailman02.dreamhost.com (localhost [IPv6:::1]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id 26EF04C3B0F; Sun, 14 Oct 2018 11:59:05 -0700 (PDT) X-Original-To: lustre-devel@lists.lustre.org Delivered-To: lustre-devel-lustre.org@pdx1-mailman02.dreamhost.com Received: from smtp3.ccs.ornl.gov (smtp3.ccs.ornl.gov [160.91.203.39]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id 3EF2621F89A for ; Sun, 14 Oct 2018 11:58:28 -0700 (PDT) Received: from star.ccs.ornl.gov (star.ccs.ornl.gov [160.91.202.134]) by smtp3.ccs.ornl.gov (Postfix) with ESMTP id 606B3225D; Sun, 14 Oct 2018 14:58:21 -0400 (EDT) Received: by star.ccs.ornl.gov (Postfix, from userid 2004) id 5DF3F2AD; Sun, 14 Oct 2018 14:58:21 -0400 (EDT) From: James Simmons To: Andreas Dilger , Oleg Drokin , NeilBrown Date: Sun, 14 Oct 2018 14:58:11 -0400 Message-Id: <1539543498-29105-22-git-send-email-jsimmons@infradead.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1539543498-29105-1-git-send-email-jsimmons@infradead.org> References: <1539543498-29105-1-git-send-email-jsimmons@infradead.org> Subject: [lustre-devel] [PATCH 21/28] lustre: llite: enhance vvp_dev data structure naming X-BeenThere: lustre-devel@lists.lustre.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "For discussing Lustre software development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: James Simmons , Lustre Development List MIME-Version: 1.0 Errors-To: lustre-devel-bounces@lists.lustre.org Sender: "lustre-devel" X-Virus-Scanned: ClamAV using ClamSMTP The new code that added struct seq_private to the vvp_dev.c code has very generic naming which doesn't fit the lustre / kernel style. See http://wiki.lustre.org/Lustre_Coding_Style_Guidelines for the naming conventions. Rename the struct seq_private and it fields. Signed-off-by: James Simmons WC-bug-id: https://jira.whamcloud.com/browse/LU-8066 Reviewed-on: https://review.whamcloud.com/33009 Reviewed-by: Andreas Dilger Reviewed-by: John L. Hammond Signed-off-by: James Simmons --- drivers/staging/lustre/lustre/llite/vvp_dev.c | 54 ++++++++++++++------------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/vvp_dev.c b/drivers/staging/lustre/lustre/llite/vvp_dev.c index 31dc3c0..8cc981b 100644 --- a/drivers/staging/lustre/lustre/llite/vvp_dev.c +++ b/drivers/staging/lustre/lustre/llite/vvp_dev.c @@ -391,11 +391,11 @@ struct vvp_pgcache_id { struct lu_object_header *vpi_obj; }; -struct seq_private { - struct ll_sb_info *sbi; - struct lu_env *env; - u16 refcheck; - struct cl_object *clob; +struct vvp_seq_private { + struct ll_sb_info *vsp_sbi; + struct lu_env *vsp_env; + u16 vsp_refcheck; + struct cl_object *vsp_clob; }; static void vvp_pgcache_id_unpack(loff_t pos, struct vvp_pgcache_id *id) @@ -542,52 +542,54 @@ static void vvp_pgcache_page_show(const struct lu_env *env, static int vvp_pgcache_show(struct seq_file *f, void *v) { - struct seq_private *priv = f->private; + struct vvp_seq_private *priv = f->private; struct page *vmpage = v; struct cl_page *page; seq_printf(f, "%8lx@" DFID ": ", vmpage->index, - PFID(lu_object_fid(&priv->clob->co_lu))); + PFID(lu_object_fid(&priv->vsp_clob->co_lu))); lock_page(vmpage); - page = cl_vmpage_page(vmpage, priv->clob); + page = cl_vmpage_page(vmpage, priv->vsp_clob); unlock_page(vmpage); put_page(vmpage); if (page) { - vvp_pgcache_page_show(priv->env, f, page); - cl_page_put(priv->env, page); + vvp_pgcache_page_show(priv->vsp_env, f, page); + cl_page_put(priv->vsp_env, page); } else { seq_puts(f, "missing\n"); } - lu_object_ref_del(&priv->clob->co_lu, "dump", current); - cl_object_put(priv->env, priv->clob); + lu_object_ref_del(&priv->vsp_clob->co_lu, "dump", current); + cl_object_put(priv->vsp_env, priv->vsp_clob); return 0; } static void *vvp_pgcache_start(struct seq_file *f, loff_t *pos) { - struct seq_private *priv = f->private; + struct vvp_seq_private *priv = f->private; struct page *ret; - if (priv->sbi->ll_site->ls_obj_hash->hs_cur_bits > + if (priv->vsp_sbi->ll_site->ls_obj_hash->hs_cur_bits > 64 - PGC_OBJ_SHIFT) ret = ERR_PTR(-EFBIG); else - ret = vvp_pgcache_find(priv->env, &priv->sbi->ll_cl->cd_lu_dev, - &priv->clob, pos); + ret = vvp_pgcache_find(priv->vsp_env, + &priv->vsp_sbi->ll_cl->cd_lu_dev, + &priv->vsp_clob, pos); return ret; } static void *vvp_pgcache_next(struct seq_file *f, void *v, loff_t *pos) { - struct seq_private *priv = f->private; + struct vvp_seq_private *priv = f->private; struct page *ret; *pos += 1; - ret = vvp_pgcache_find(priv->env, &priv->sbi->ll_cl->cd_lu_dev, - &priv->clob, pos); + ret = vvp_pgcache_find(priv->vsp_env, + &priv->vsp_sbi->ll_cl->cd_lu_dev, + &priv->vsp_clob, pos); return ret; } @@ -605,16 +607,16 @@ static void vvp_pgcache_stop(struct seq_file *f, void *v) static int vvp_dump_pgcache_seq_open(struct inode *inode, struct file *filp) { - struct seq_private *priv; + struct vvp_seq_private *priv; priv = __seq_open_private(filp, &vvp_pgcache_ops, sizeof(*priv)); if (!priv) return -ENOMEM; - priv->sbi = inode->i_private; - priv->env = cl_env_get(&priv->refcheck); - if (IS_ERR(priv->env)) { - int err = PTR_ERR(priv->env); + priv->vsp_sbi = inode->i_private; + priv->vsp_env = cl_env_get(&priv->vsp_refcheck); + if (IS_ERR(priv->vsp_env)) { + int err = PTR_ERR(priv->vsp_env); seq_release_private(inode, filp); return err; @@ -625,9 +627,9 @@ static int vvp_dump_pgcache_seq_open(struct inode *inode, struct file *filp) static int vvp_dump_pgcache_seq_release(struct inode *inode, struct file *file) { struct seq_file *seq = file->private_data; - struct seq_private *priv = seq->private; + struct vvp_seq_private *priv = seq->private; - cl_env_put(priv->env, &priv->refcheck); + cl_env_put(priv->vsp_env, &priv->vsp_refcheck); return seq_release_private(inode, file); }