Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2422129rdh; Sun, 29 Oct 2023 15:55:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFZSKcKmQWZEdsTZ2p/vEbFHbig4VhOTzIFNVhT5I4pzAzYVlASMAGK5S+nsiwgNLN/1uUq X-Received: by 2002:a17:90a:28f:b0:280:1d67:16a6 with SMTP id w15-20020a17090a028f00b002801d6716a6mr4861787pja.34.1698620121687; Sun, 29 Oct 2023 15:55:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698620121; cv=none; d=google.com; s=arc-20160816; b=XOXKCpE6CYRIvUvIvDhELz+qbmJyuabiemVZEjavINkfhLR5OjsgsSPRF6bG/LgCe6 YxyEvYSmjy2a68X/hrEGTSzBXMWTDdO6M8ZXH3/1OXT9xiUakJiBV8FximO96vCTWpMs f+mHY8ulRb4sHLrIuNAKyH51MgGFMNQy1s9NKJZbj9Vt4k7+ipi+aeA/Am3y1zws5BDS 4uig5HsyCvSzuDWGiRM8ZwA8mtkabmkH4Iwq1/zOCDrKqHb0QQ5+jFX7hLXe3uCnCMA3 fJDJFrbuWh1aJV21/wDQ9AX0/AwQ400CeMEa8oclaRCdEKkBaiGKgPH+VZrtKS3ggm8t qx+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=jN5Lu2KkkxLoCe1wsD/BqJie26b2+RkR8i8N0zx+nio=; fh=IVcZYgopwke+Bc9cmwdOT5yAIhnLPNAsBqE9TuY8J+c=; b=LqYQo0mg1Zka6tKctHbZj096SywbWHFY6wyG+QwzEj1oARZb8mwNTiKi7tXM26s6IT 2bvWNgsOlBczBO6QpQ/P1+q6Ze0hLUOsssXUFjwAJq+IVSaZ72IGp6QrqjjsaSSOJXUc GpZCQPSQ0gnszRRo9M1S+mBd0oMo5+94yKPny3A7KsIFIUpFJv4sXf3xgIiFMVLFWEXi 77sKjUha2wsMSKtgZyZG6j6QQBcZuT2Bh2CUVZMgb5d9ZoPXx44gHgT/KP9/NEqiMp2s 1HnlckeOnh+6d0CfqmZ4wP0gb4awINFVNB8LOYh8AySCzjz2L2lPVY3D7W5pT1UA9vxl 1/NQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SsWyzZq+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id w4-20020a17090aaf8400b0027995cf4342si4026330pjq.55.2023.10.29.15.55.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Oct 2023 15:55:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SsWyzZq+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id D6C7A80ACB48; Sun, 29 Oct 2023 15:55:20 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231321AbjJ2WzQ (ORCPT + 99 others); Sun, 29 Oct 2023 18:55:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230451AbjJ2WzA (ORCPT ); Sun, 29 Oct 2023 18:55:00 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AEEBC1; Sun, 29 Oct 2023 15:54:57 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ED797C433C7; Sun, 29 Oct 2023 22:54:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698620097; bh=8/W2tMtUn0iLmvzcTTSUm1YwlPPgP6dMcQenQMiVERQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SsWyzZq+PRxhc93gpLn9UpkylFVGVd0IAXqaGOOTksBDNXw1SZVGcijwrhm0UTd+J gbShrwqFaOKpS73nU1xGfuOohOR00xp9EkCNQpWikEYWrlcmNHCfvhRB449pFvtIfS pQwHl3eEqxVBkRp6iGbw9KfVJH7ECSnqsW7NswD4g94Z63YqBS2kNHzHeaFL8gerlw N7czYeO6EVXzWb6f7o6GihoYaVgQYqsvSJTq5jMihaSnNUDAcylsbb0G0BFE44kDsj CMd8ntPFZ6OFWeW6PcX79UagTvO/SBZ5AMsGSe5e+gtx6Z8rsMS3H/b1Dc95sjGxRw dLmLu0ZxoZYJw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Konstantin Komarov , Sasha Levin , ntfs3@lists.linux.dev Subject: [PATCH AUTOSEL 6.5 09/52] fs/ntfs3: Add more info into /proc/fs/ntfs3//volinfo Date: Sun, 29 Oct 2023 18:52:56 -0400 Message-ID: <20231029225441.789781-9-sashal@kernel.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231029225441.789781-1-sashal@kernel.org> References: <20231029225441.789781-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.5.9 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 29 Oct 2023 15:55:21 -0700 (PDT) From: Konstantin Komarov [ Upstream commit d27e202b9ac416e52093edf8789614d93dbd6231 ] Signed-off-by: Konstantin Komarov Signed-off-by: Sasha Levin --- fs/ntfs3/super.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c index 98545060580ac..055c3764af26e 100644 --- a/fs/ntfs3/super.c +++ b/fs/ntfs3/super.c @@ -453,15 +453,23 @@ static struct proc_dir_entry *proc_info_root; * ntfs3.1 * cluster size * number of clusters + * total number of mft records + * number of used mft records ~= number of files + folders + * real state of ntfs "dirty"/"clean" + * current state of ntfs "dirty"/"clean" */ static int ntfs3_volinfo(struct seq_file *m, void *o) { struct super_block *sb = m->private; struct ntfs_sb_info *sbi = sb->s_fs_info; - seq_printf(m, "ntfs%d.%d\n%u\n%zu\n", sbi->volume.major_ver, - sbi->volume.minor_ver, sbi->cluster_size, - sbi->used.bitmap.nbits); + seq_printf(m, "ntfs%d.%d\n%u\n%zu\n\%zu\n%zu\n%s\n%s\n", + sbi->volume.major_ver, sbi->volume.minor_ver, + sbi->cluster_size, sbi->used.bitmap.nbits, + sbi->mft.bitmap.nbits, + sbi->mft.bitmap.nbits - wnd_zeroes(&sbi->mft.bitmap), + sbi->volume.real_dirty ? "dirty" : "clean", + (sbi->volume.flags & VOLUME_FLAG_DIRTY) ? "dirty" : "clean"); return 0; } -- 2.42.0