From patchwork Thu Mar 8 05:53:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyson Nottingham X-Patchwork-Id: 882969 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; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="UoBPwgH9"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zxfq73tjnz9sXk for ; Thu, 8 Mar 2018 16:54:43 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966140AbeCHFyG (ORCPT ); Thu, 8 Mar 2018 00:54:06 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:41349 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965857AbeCHFyD (ORCPT ); Thu, 8 Mar 2018 00:54:03 -0500 Received: by mail-pf0-f195.google.com with SMTP id f80so1960572pfa.8 for ; Wed, 07 Mar 2018 21:54:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=+Y+GmUVxGWEDNFIvsEMLWTHZI3YsYUZUDPdxSI0t7bA=; b=UoBPwgH9wXKYycg+W9QzTSlDUFdeAiIriDhNhM1h2l9p/7TBXTGunbDy791T6zq8G3 8Hkz2b9PsDlYw/7eKCp0QwoDpFbw9NBRXVQxZPagQaLRhgvupsQvYT0uubdD/Pv73ps6 Za5rwnscKUv/KGzibih/PYupuCsr04nqTS/5hK2DpoBk9j4wb9oMtoS6+e6/AJOO9IEj 7m4ATxZMJfZI/AXmfIYl53cUC4Nef0XGNQbPotAX1wriG0fvGnDKZ2o2g6jUEQupI24j VOI5TVrazVKeh2YUPuuGMt6zcQiZ7CUHZXop8Y1Ng8QFY4OhO9wBjnDZQ039ylLJbjjF yWVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=+Y+GmUVxGWEDNFIvsEMLWTHZI3YsYUZUDPdxSI0t7bA=; b=JuRlS7S33D8ni1kdvprgHb9Qks+kzy9evuHlKCJ2logyFNA9FmnVXPseC3KxZLbm5k V7+b/eQ4Nmo6SFZZqk0dB8FKgMCDPXInjwrbZw1avTjglyXxDWRv5emfZ0uxUy+tLsdb PLvPHg89aSQgWjGOlGA9ZI/Zp+sLqXI2BXheX4AMsVts+NhxeC11+QqLHYcewlWAwRAy ZEsT1HapOgCP5waYWVHxgtszXmNY/UfZ/ob86i4PofQFzSN3HrZJuHnHSHlufNZzmZN6 1VNCk8C1vJVRUy7RV/anKoZoDntYpg+X53CTepgZN+GIVHkYLEzSXyx+wtMYXdd2qdPv sZtA== X-Gm-Message-State: APf1xPD2XDEZLeZw4ew7IdbU3O0cU6/F4NRj3tJlHO2B0vIBehZREAyb 53Ie0MSDLFvWngkbL+vSdB8NKRxe3ik= X-Google-Smtp-Source: AG47ELunmGQdg2clS9+Kckry+MXvs9T6GpVZ/PM2DgUY+3OdEpd3PP6LWYpKMZ0NRp08TquFpq00EA== X-Received: by 10.98.55.7 with SMTP id e7mr25380486pfa.112.1520488441996; Wed, 07 Mar 2018 21:54:01 -0800 (PST) Received: from localhost.localdomain (c-73-11-197-250.hsd1.wa.comcast.net. [73.11.197.250]) by smtp.gmail.com with ESMTPSA id f11sm14894158pfa.112.2018.03.07.21.54.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Mar 2018 21:54:00 -0800 (PST) From: Tyson Nottingham To: linux-ext4@vger.kernel.org Cc: tytso@mit.edu, adilger.kernel@dilger.ca, Tyson Nottingham Subject: [PATCH 2/3] ext4: omit init_itable=n in procfs when disabled Date: Wed, 7 Mar 2018 21:53:37 -0800 Message-Id: <1cd4af3c4ebf5c6253f52834041697f5a7657153.1520480776.git.tgnottingham@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Don't show init_itable=n in /proc/fs/ext4//options when filesystem is mounted with noinit_itable. Signed-off-by: Tyson Nottingham --- Before: $ sudo mount -o loop=$(losetup -f) image.ext4 mnt $ mount | grep image /home/tgnottingham/image.ext4 on /home/tgnottingham/mnt type ext4 (rw,relatime,data=ordered) $ grep init /proc/fs/ext4/loop0/options init_itable=10 $ sudo mount -o loop=$(losetup -f),noinit_itable image.ext4 mnt $ mount | grep image /home/tgnottingham/image.ext4 on /home/tgnottingham/mnt type ext4 (rw,relatime,noinit_itable,data=ordered) $ grep init /proc/fs/ext4/loop0/options noinit_itable init_itable=10 ^ Superfluous init_itable=10. After: $ sudo mount -o loop=$(losetup -f) image.ext4 mnt $ mount -l | grep image /home/tgnottingham/image.ext4 on /home/tgnottingham/mnt type ext4 (rw,relatime,data=ordered) $ grep init /proc/fs/ext4/loop0/options init_itable=10 $ sudo mount -o loop=$(losetup -f),noinit_itable image.ext4 mnt $ mount -l | grep image /home/tgnottingham/image.ext4 on /home/tgnottingham/mnt type ext4 (rw,relatime,noinit_itable,data=ordered) $ grep init /proc/fs/ext4/loop0/options noinit_itable --- fs/ext4/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 6b07fa2..7437ed0 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -2081,7 +2081,7 @@ static int _ext4_show_options(struct seq_file *seq, struct super_block *sb, SEQ_OPTS_PRINT("inode_readahead_blks=%u", sbi->s_inode_readahead_blks); - if (nodefs || (test_opt(sb, INIT_INODE_TABLE) && + if (test_opt(sb, INIT_INODE_TABLE) && (nodefs || (sbi->s_li_wait_mult != EXT4_DEF_LI_WAIT_MULT))) SEQ_OPTS_PRINT("init_itable=%u", sbi->s_li_wait_mult); if (nodefs || sbi->s_max_dir_size_kb)