From patchwork Fri Jan 26 18:11:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Whitney X-Patchwork-Id: 866513 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-ext4-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="C3zClHyX"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zSn5z6zTRz9s75 for ; Sat, 27 Jan 2018 05:11:19 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752136AbeAZSLR (ORCPT ); Fri, 26 Jan 2018 13:11:17 -0500 Received: from mail-qt0-f194.google.com ([209.85.216.194]:41636 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751677AbeAZSLQ (ORCPT ); Fri, 26 Jan 2018 13:11:16 -0500 Received: by mail-qt0-f194.google.com with SMTP id i1so3433209qtj.8 for ; Fri, 26 Jan 2018 10:11:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=wdFht/rmmq82kzH/soPnK56FxK8g/Crn2MaTr8qVDqE=; b=C3zClHyXPh0hmuoPDk0UJV2BAIQtHbdHha4WEISJJU0Jlum1IA0eFU2ZfIY2sOsWEX GmAzxZoIYZ87HQoiURUSwK+6EEWBfAXNK6iWjqJTkx8/lTsdsB1Lv1UT13IWT8BSvFYl EBtFbZQKVDMHsaPMm8zZkZmMv3DGPnwcI84gd66YGApGHahsL1Nckm6LlYGUgCcrydkb tUOjZnomRCOPSym7ey9UPy4NZwOTt73Ep9712is4tBH0+DsbRp9XIfhOxzRKhUDit9/C gy/3ya9/hi3mTN+VaREX5ZfL9R+OAzWp7txnl5gVaVdcBV2sx6WqL/nooFhYfAjXWKCw PCQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=wdFht/rmmq82kzH/soPnK56FxK8g/Crn2MaTr8qVDqE=; b=TN/PZ+Yar1Xv6mI56U7+3ovFA9B3RJ0I0FhhhsQx/UcQdHYPgBjWGsqyJ5QGTugJbo 4KtpuTuXX2KLYykO8q0lizMG5CnZprjsqlLb+brde+wz23t1dkWSGI47QyrwcvUe+Zho fjq2d0Vr4fm0KAsH/hCt3G4u/7/OITfNvm29nEdY1GhgLyuqE/fdhHEYbUgBP29yML1C v6U7Ed+X0Zbx3cC6a1RV8ULeFDTD79gfv5oqdiqONsK+nprcwdIfVSVZLrveoyHttPFu bndbGiyISat2ngToWj0AFuf+5m6yVa2HkL27WkGLVUw/0VKcXDmJTJrvpKGaXqXrg2cW c6NA== X-Gm-Message-State: AKwxyteve1PwBfzjD0kb6FwuwpAoGgmlKEx7inA04tE0Ew1inZ1svwpl 3Hx0KlPXV6kRjL8XuOfLNKfE9w== X-Google-Smtp-Source: AH8x226uscRYtCufq8FOECM46Lypu1n9GnoXLaXnyub9JoIn9hLXWfYdbgvbcl2WoUdzx+YuOqfw2Q== X-Received: by 10.200.41.123 with SMTP id z56mr24028807qtz.189.1516990274070; Fri, 26 Jan 2018 10:11:14 -0800 (PST) Received: from localhost.localdomain (c-73-60-226-25.hsd1.nh.comcast.net. [73.60.226.25]) by smtp.gmail.com with ESMTPSA id c50sm5977968qtk.35.2018.01.26.10.11.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jan 2018 10:11:12 -0800 (PST) Date: Fri, 26 Jan 2018 13:11:10 -0500 From: Eric Whitney To: linux-ext4@vger.kernel.org Cc: tytso@mit.edu Subject: [PATCH] ext4: modify cluster macro parameter names for consistency Message-ID: <20180126181110.5wypja267n6azgtj@localhost.localdomain> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Not all the parameter names used to refer to ext4_sb_info structs in the cluster-related macro definitions are consistent. Some use the name "s" rather than "sbi" when operating on a component of an ext4_sb_info struct. Use of the latter helps comprehensibility, since the name "sbi" is commonly used for instances of ext4_sb_info in ext4. Signed-off-by: Eric Whitney --- fs/ext4/ext4.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 3241475a1733..7705d7f36ccb 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -279,15 +279,15 @@ struct ext4_io_submit { #define EXT4_NUM_B2C(sbi, blks) (((blks) + (sbi)->s_cluster_ratio - 1) >> \ (sbi)->s_cluster_bits) /* Mask out the low bits to get the starting block of the cluster */ -#define EXT4_PBLK_CMASK(s, pblk) ((pblk) & \ - ~((ext4_fsblk_t) (s)->s_cluster_ratio - 1)) -#define EXT4_LBLK_CMASK(s, lblk) ((lblk) & \ - ~((ext4_lblk_t) (s)->s_cluster_ratio - 1)) +#define EXT4_PBLK_CMASK(sbi, pblk) ((pblk) & \ + ~((ext4_fsblk_t)(sbi)->s_cluster_ratio - 1)) +#define EXT4_LBLK_CMASK(sbi, lblk) ((lblk) & \ + ~((ext4_lblk_t) (sbi)->s_cluster_ratio - 1)) /* Get the cluster offset */ -#define EXT4_PBLK_COFF(s, pblk) ((pblk) & \ - ((ext4_fsblk_t) (s)->s_cluster_ratio - 1)) -#define EXT4_LBLK_COFF(s, lblk) ((lblk) & \ - ((ext4_lblk_t) (s)->s_cluster_ratio - 1)) +#define EXT4_PBLK_COFF(sbi, pblk) ((pblk) & \ + ((ext4_fsblk_t) (sbi)->s_cluster_ratio - 1)) +#define EXT4_LBLK_COFF(sbi, lblk) ((lblk) & \ + ((ext4_lblk_t) (sbi)->s_cluster_ratio - 1)) /* * Structure of a blocks group descriptor