From patchwork Thu Jan 31 17:19:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Simmons X-Patchwork-Id: 10791021 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 8289291E for ; Thu, 31 Jan 2019 17:20:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6C9AA31520 for ; Thu, 31 Jan 2019 17:20:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6132E31652; Thu, 31 Jan 2019 17:20:31 +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 AD6D531520 for ; Thu, 31 Jan 2019 17:20:29 +0000 (UTC) Received: from pdx1-mailman02.dreamhost.com (localhost [IPv6:::1]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id 8DE6F21FFC4; Thu, 31 Jan 2019 09:19:59 -0800 (PST) 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 D614321FDA6 for ; Thu, 31 Jan 2019 09:19:40 -0800 (PST) Received: from star.ccs.ornl.gov (star.ccs.ornl.gov [160.91.202.134]) by smtp3.ccs.ornl.gov (Postfix) with ESMTP id E65EF5E0; Thu, 31 Jan 2019 12:19:35 -0500 (EST) Received: by star.ccs.ornl.gov (Postfix, from userid 2004) id E42B3469; Thu, 31 Jan 2019 12:19:35 -0500 (EST) From: James Simmons To: Andreas Dilger , Oleg Drokin , NeilBrown Date: Thu, 31 Jan 2019 12:19:13 -0500 Message-Id: <1548955170-13456-10-git-send-email-jsimmons@infradead.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1548955170-13456-1-git-send-email-jsimmons@infradead.org> References: <1548955170-13456-1-git-send-email-jsimmons@infradead.org> Subject: [lustre-devel] [PATCH 09/26] lustre: cleanup white spaces in fid and fld layer 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 The lustre code is very messy and difficult to read. Remove excess white space and properly align data structures so they are easy on the eyes. Signed-off-by: James Simmons --- drivers/staging/lustre/lustre/fid/fid_request.c | 10 +++++----- drivers/staging/lustre/lustre/fid/lproc_fid.c | 2 +- drivers/staging/lustre/lustre/fld/fld_cache.c | 14 +++++++------- drivers/staging/lustre/lustre/fld/fld_internal.h | 24 ++++++++++++------------ drivers/staging/lustre/lustre/fld/fld_request.c | 8 ++++---- 5 files changed, 29 insertions(+), 29 deletions(-) diff --git a/drivers/staging/lustre/lustre/fid/fid_request.c b/drivers/staging/lustre/lustre/fid/fid_request.c index 3f79f22..45dd275 100644 --- a/drivers/staging/lustre/lustre/fid/fid_request.c +++ b/drivers/staging/lustre/lustre/fid/fid_request.c @@ -55,12 +55,12 @@ static int seq_client_rpc(struct lu_client_seq *seq, struct lu_seq_range *output, u32 opc, const char *opcname) { - struct obd_export *exp = seq->lcs_exp; + struct obd_export *exp = seq->lcs_exp; struct ptlrpc_request *req; - struct lu_seq_range *out, *in; - u32 *op; - unsigned int debug_mask; - int rc; + struct lu_seq_range *out, *in; + u32 *op; + unsigned int debug_mask; + int rc; LASSERT(exp && !IS_ERR(exp)); req = ptlrpc_request_alloc_pack(class_exp2cliimp(exp), &RQF_SEQ_QUERY, diff --git a/drivers/staging/lustre/lustre/fid/lproc_fid.c b/drivers/staging/lustre/lustre/fid/lproc_fid.c index d583778..d7d23b4 100644 --- a/drivers/staging/lustre/lustre/fid/lproc_fid.c +++ b/drivers/staging/lustre/lustre/fid/lproc_fid.c @@ -143,7 +143,7 @@ size_t count, loff_t *off) { struct lu_client_seq *seq; - u64 max; + u64 max; int rc, val; seq = ((struct seq_file *)file->private_data)->private; diff --git a/drivers/staging/lustre/lustre/fld/fld_cache.c b/drivers/staging/lustre/lustre/fld/fld_cache.c index 749d33b..b4baa53 100644 --- a/drivers/staging/lustre/lustre/fld/fld_cache.c +++ b/drivers/staging/lustre/lustre/fld/fld_cache.c @@ -255,8 +255,8 @@ static void fld_cache_punch_hole(struct fld_cache *cache, struct fld_cache_entry *f_new) { const struct lu_seq_range *range = &f_new->fce_range; - const u64 new_start = range->lsr_start; - const u64 new_end = range->lsr_end; + const u64 new_start = range->lsr_start; + const u64 new_end = range->lsr_end; struct fld_cache_entry *fldt; fldt = kzalloc(sizeof(*fldt), GFP_ATOMIC); @@ -294,8 +294,8 @@ static void fld_cache_overlap_handle(struct fld_cache *cache, struct fld_cache_entry *f_new) { const struct lu_seq_range *range = &f_new->fce_range; - const u64 new_start = range->lsr_start; - const u64 new_end = range->lsr_end; + const u64 new_start = range->lsr_start; + const u64 new_end = range->lsr_end; const u32 mdt = range->lsr_index; /* this is overlap case, these case are checking overlapping with @@ -381,8 +381,8 @@ static int fld_cache_insert_nolock(struct fld_cache *cache, struct fld_cache_entry *n; struct list_head *head; struct list_head *prev = NULL; - const u64 new_start = f_new->fce_range.lsr_start; - const u64 new_end = f_new->fce_range.lsr_end; + const u64 new_start = f_new->fce_range.lsr_start; + const u64 new_end = f_new->fce_range.lsr_end; u32 new_flags = f_new->fce_range.lsr_flags; /* @@ -425,7 +425,7 @@ static int fld_cache_insert_nolock(struct fld_cache *cache, int fld_cache_insert(struct fld_cache *cache, const struct lu_seq_range *range) { - struct fld_cache_entry *flde; + struct fld_cache_entry *flde; int rc; flde = fld_cache_entry_create(range); diff --git a/drivers/staging/lustre/lustre/fld/fld_internal.h b/drivers/staging/lustre/lustre/fld/fld_internal.h index 66a0fb6..76666a4 100644 --- a/drivers/staging/lustre/lustre/fld/fld_internal.h +++ b/drivers/staging/lustre/lustre/fld/fld_internal.h @@ -75,10 +75,10 @@ struct lu_fld_hash { }; struct fld_cache_entry { - struct list_head fce_lru; - struct list_head fce_list; + struct list_head fce_lru; + struct list_head fce_list; /** fld cache entries are sorted on range->lsr_start field. */ - struct lu_seq_range fce_range; + struct lu_seq_range fce_range; }; struct fld_cache { @@ -86,29 +86,29 @@ struct fld_cache { * Cache guard, protects fci_hash mostly because others immutable after * init is finished. */ - rwlock_t fci_lock; + rwlock_t fci_lock; /** Cache shrink threshold */ - int fci_threshold; + int fci_threshold; /** Preferred number of cached entries */ - int fci_cache_size; + int fci_cache_size; /** Current number of cached entries. Protected by \a fci_lock */ - int fci_cache_count; + int fci_cache_count; /** LRU list fld entries. */ - struct list_head fci_lru; + struct list_head fci_lru; /** sorted fld entries. */ - struct list_head fci_entries_head; + struct list_head fci_entries_head; /** Cache statistics. */ - struct fld_stats fci_stat; + struct fld_stats fci_stat; /** Cache name used for debug and messages. */ - char fci_name[LUSTRE_MDT_MAXNAMELEN]; - unsigned int fci_no_shrink:1; + char fci_name[LUSTRE_MDT_MAXNAMELEN]; + unsigned int fci_no_shrink:1; }; enum { diff --git a/drivers/staging/lustre/lustre/fld/fld_request.c b/drivers/staging/lustre/lustre/fld/fld_request.c index 8a915b9..248fffa 100644 --- a/drivers/staging/lustre/lustre/fld/fld_request.c +++ b/drivers/staging/lustre/lustre/fld/fld_request.c @@ -307,10 +307,10 @@ int fld_client_rpc(struct obd_export *exp, struct ptlrpc_request **reqp) { struct ptlrpc_request *req = NULL; - struct lu_seq_range *prange; - u32 *op; - int rc = 0; - struct obd_import *imp; + struct lu_seq_range *prange; + u32 *op; + int rc = 0; + struct obd_import *imp; LASSERT(exp);