From patchwork Mon Jul 22 01:52:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Simmons X-Patchwork-Id: 11051377 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 457D91398 for ; Mon, 22 Jul 2019 01:52:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3118E1FF28 for ; Mon, 22 Jul 2019 01:52:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 25991284F0; Mon, 22 Jul 2019 01:52:37 +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 B55041FF28 for ; Mon, 22 Jul 2019 01:52:36 +0000 (UTC) Received: from pdx1-mailman02.dreamhost.com (localhost [IPv6:::1]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id B03E921FA6F; Sun, 21 Jul 2019 18:52:32 -0700 (PDT) X-Original-To: lustre-devel@lists.lustre.org Delivered-To: lustre-devel-lustre.org@pdx1-mailman02.dreamhost.com Received: from smtp4.ccs.ornl.gov (smtp4.ccs.ornl.gov [160.91.203.40]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id 70D3821FA13 for ; Sun, 21 Jul 2019 18:52:23 -0700 (PDT) Received: from star.ccs.ornl.gov (star.ccs.ornl.gov [160.91.202.134]) by smtp4.ccs.ornl.gov (Postfix) with ESMTP id 3C0151005F9E; Sun, 21 Jul 2019 21:52:20 -0400 (EDT) Received: by star.ccs.ornl.gov (Postfix, from userid 2004) id 2ED031FA; Sun, 21 Jul 2019 21:52:20 -0400 (EDT) From: James Simmons To: Andreas Dilger , Oleg Drokin , NeilBrown , Shaun Tancheff , Arshad Hussain Date: Sun, 21 Jul 2019 21:52:12 -0400 Message-Id: <1563760338-806-6-git-send-email-jsimmons@infradead.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1563760338-806-1-git-send-email-jsimmons@infradead.org> References: <1563760338-806-1-git-send-email-jsimmons@infradead.org> Subject: [lustre-devel] [PATCH 05/11] lustre: lmv: checkpatch cleanup 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: Lustre Development List MIME-Version: 1.0 Errors-To: lustre-devel-bounces@lists.lustre.org Sender: "lustre-devel" X-Virus-Scanned: ClamAV using ClamSMTP Many checkpatch errors exist in the lmv layer. This address a good chuck of them. Other are left since future patches will cleanup those areas. Others will need more code rework so this patch handles the simple cases. This is a good step forward toward proper kernel code style compliance. Signed-off-by: James Simmons --- fs/lustre/lmv/lmv_intent.c | 9 ++++++--- fs/lustre/lmv/lmv_obd.c | 22 ++++++++++++++-------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/fs/lustre/lmv/lmv_intent.c b/fs/lustre/lmv/lmv_intent.c index 8892426..818bb72 100644 --- a/fs/lustre/lmv/lmv_intent.c +++ b/fs/lustre/lmv/lmv_intent.c @@ -222,7 +222,8 @@ int lmv_revalidate_slaves(struct obd_export *exp, &RMF_MDT_BODY); if (!body) { if (it.it_lock_mode && lockh) { - ldlm_lock_decref(lockh, it.it_lock_mode); + ldlm_lock_decref(lockh, + it.it_lock_mode); it.it_lock_mode = 0; } @@ -309,7 +310,8 @@ static int lmv_intent_open(struct obd_export *exp, struct md_op_data *op_data, return rc; } - CDEBUG(D_INODE, "OPEN_INTENT with fid1=" DFID ", fid2=" DFID ", name='%s' -> mds #%u\n", + CDEBUG(D_INODE, + "OPEN_INTENT with fid1=" DFID ", fid2=" DFID ", name='%s' -> mds #%u\n", PFID(&op_data->op_fid1), PFID(&op_data->op_fid2), op_data->op_name, tgt->ltd_idx); @@ -387,7 +389,8 @@ static int lmv_intent_lookup(struct obd_export *exp, if (!fid_is_sane(&op_data->op_fid2)) fid_zero(&op_data->op_fid2); - CDEBUG(D_INODE, "LOOKUP_INTENT with fid1=" DFID ", fid2=" DFID ", name='%s' -> mds #%u lsm=%p lsm_magic=%x\n", + CDEBUG(D_INODE, + "LOOKUP_INTENT with fid1=" DFID ", fid2=" DFID ", name='%s' -> mds #%u lsm=%p lsm_magic=%x\n", PFID(&op_data->op_fid1), PFID(&op_data->op_fid2), op_data->op_name ? op_data->op_name : "", tgt->ltd_idx, lsm, !lsm ? -1 : lsm->lsm_md_magic); diff --git a/fs/lustre/lmv/lmv_obd.c b/fs/lustre/lmv/lmv_obd.c index 64ebaf3..1c43022 100644 --- a/fs/lustre/lmv/lmv_obd.c +++ b/fs/lustre/lmv/lmv_obd.c @@ -1630,7 +1630,8 @@ static int lmv_create(struct obd_export *exp, struct md_op_data *op_data, if (rc == 0) { if (!*request) return rc; - CDEBUG(D_INODE, "Created - " DFID "\n", PFID(&op_data->op_fid2)); + CDEBUG(D_INODE, "Created - " DFID "\n", + PFID(&op_data->op_fid2)); } return rc; } @@ -1749,8 +1750,8 @@ static int lmv_early_cancel(struct obd_export *exp, struct lmv_tgt_desc *tgt, } /* - * llite passes fid of an target inode in op_data->op_fid1 and id of directory in - * op_data->op_fid2 + * llite passes fid of an target inode in op_data->op_fid1 and id of + * directory in op_data->op_fid2 */ static int lmv_link(struct obd_export *exp, struct md_op_data *op_data, struct ptlrpc_request **request) @@ -1823,7 +1824,8 @@ static int lmv_rename(struct obd_export *exp, struct md_op_data *op_data, op_data->op_cap = current_cap(); if (op_data->op_cli_flags & CLI_MIGRATE) { - LASSERTF(fid_is_sane(&op_data->op_fid3), "invalid FID " DFID "\n", + LASSERTF(fid_is_sane(&op_data->op_fid3), + "invalid FID " DFID "\n", PFID(&op_data->op_fid3)); if (op_data->op_mea1) { @@ -2302,8 +2304,10 @@ static int lmv_read_page(struct obd_export *exp, struct md_op_data *op_data, struct lmv_obd *lmv = &obd->u.lmv; struct lmv_tgt_desc *tgt; - if (unlikely(lsm)) - return lmv_read_striped_page(exp, op_data, cb_op, offset, ppage); + if (unlikely(lsm)) { + return lmv_read_striped_page(exp, op_data, cb_op, + offset, ppage); + } tgt = lmv_find_target(lmv, &op_data->op_fid1); if (IS_ERR(tgt)) @@ -2647,7 +2651,8 @@ static int lmv_unpack_md_v1(struct obd_export *exp, struct lmv_stripe_md *lsm, if (cplen >= sizeof(lsm->lsm_md_pool_name)) return -E2BIG; - CDEBUG(D_INFO, "unpack lsm count %d, master %d hash_type %d layout_version %d\n", + CDEBUG(D_INFO, + "unpack lsm count %d, master %d hash_type %d layout_version %d\n", lsm->lsm_md_stripe_count, lsm->lsm_md_master_mdt_index, lsm->lsm_md_hash_type, lsm->lsm_md_layout_version); @@ -3016,7 +3021,8 @@ static int lmv_merge_attr(struct obd_export *exp, for (i = 0; i < lsm->lsm_md_stripe_count; i++) { struct inode *inode = lsm->lsm_md_oinfo[i].lmo_root; - CDEBUG(D_INFO, "" DFID " size %llu, blocks %llu nlink %u, atime %lld ctime %lld, mtime %lld.\n", + CDEBUG(D_INFO, + "" DFID " size %llu, blocks %llu nlink %u, atime %lld ctime %lld, mtime %lld.\n", PFID(&lsm->lsm_md_oinfo[i].lmo_fid), i_size_read(inode), (unsigned long long)inode->i_blocks, inode->i_nlink, inode->i_atime.tv_sec,