From patchwork Tue Sep 26 09:56:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Konstantin Komarov X-Patchwork-Id: 144922 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp1969218vqu; Tue, 26 Sep 2023 07:44:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHDFY/CattNp8ErQv5pN8zIKRlhfQxlZ4vZ71gOrwaMSF7MXqVYIaEXlpUUOm2bchOzZAlK X-Received: by 2002:a17:902:d48f:b0:1c3:6d97:e89e with SMTP id c15-20020a170902d48f00b001c36d97e89emr11486764plg.58.1695739499296; Tue, 26 Sep 2023 07:44:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695739499; cv=none; d=google.com; s=arc-20160816; b=j1yKAiSi16/iUhX2K0o4xdmZI6n5lxvFvFEd0wOErmUZxND3cAwvqdTjqBvNQDapbv k/zIiF0nzAJQMpTyN8Mep45z3HsajcRwAzPz+Y0fIym/7o0hTh2GbMFTuOFHlXC8tVq7 O8ez95VVKSCqvoY3rzYkYWhyTz37mrcOvZnPus/CRhZmpb2RK9Wo8ftZfu+X4RRRPTwg I1PHwpucCfK6vVZ13eJvntJEUmu5eOsUNq0KECk1wsZOqqk0FtLrEfnfzYnSau65HtP6 0ArYKcL7/V3V0pHa+30RrFhPoVqwlJ4B+tK+SeBVUVE9PfryN1hcp/byxGo7xPC/6J26 gPjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=M2FK5gsLtmNBcSaysRw/Y++y3lLBnCCRyRI6dXE7TkE=; fh=P7I85FIabZcM8ojWdeG8ABpTZepe/Xtte9jKWDfUHBM=; b=tpWowWpakhLJ5lG5mCUZJzrvpdJ8dwcITRQ8NQdsWIs0vQrEz89YpDAV2sJK4sUt3H yNacYPaWIvcHJ+Xb1f9vEGPtZS0Q7e5yVM+q2pAX0lz/+RiJXM8ZSnkP22QyKSgTF4uq 9xBTTZxpafdA1MgFyBcgAtTagIph2eiWmcy7Js1e6DCg4bFvixF2Tmlm/CHZUVSdHKpJ k1peLJ+iqlxoKYk1Okb2xHVbejlCwFzQA1+NDO1943rAz+WncIbcnrRNnjbdwaXLplxG MqsS0GXnqwxKMFUVsHhWVt173tYDrZdgZCLiilXmxwRfqY/jMIGZBwi8M0vWT5MYTizP VqOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paragon-software.com header.s=mail header.b=XHUt8KfY; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=paragon-software.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id a5-20020a170902ecc500b001c60ec1e662si6506656plh.29.2023.09.26.07.44.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 07:44:59 -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=@paragon-software.com header.s=mail header.b=XHUt8KfY; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=paragon-software.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 8677A80DF24A; Tue, 26 Sep 2023 02:56:52 -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 S234303AbjIZJ4v (ORCPT + 27 others); Tue, 26 Sep 2023 05:56:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234133AbjIZJ4q (ORCPT ); Tue, 26 Sep 2023 05:56:46 -0400 Received: from relayaws-01.paragon-software.com (relayaws-01.paragon-software.com [35.157.23.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E31CBBE; Tue, 26 Sep 2023 02:56:39 -0700 (PDT) Received: from dlg2.mail.paragon-software.com (vdlg-exch-02.paragon-software.com [172.30.1.105]) by relayaws-01.paragon-software.com (Postfix) with ESMTPS id BC5B521BC; Tue, 26 Sep 2023 09:50:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paragon-software.com; s=mail; t=1695721847; bh=M2FK5gsLtmNBcSaysRw/Y++y3lLBnCCRyRI6dXE7TkE=; h=Date:Subject:From:To:CC:References:In-Reply-To; b=XHUt8KfYdRnPQjP75T3mvqKkT0lKFp8HuLuslcCVkw0uxFL6JlAkifzksCkkJ+n6b fGCHjdm03L0Nyu6du7YjamOBFvCO3Xq2r9hGvMnVe3dtDl+oQDaQN6PD6h+sPHeEtO +153iHrxH+T8LNfgdd1PmaaaOziZj5/1Qrq1wvtA= Received: from [172.16.192.129] (192.168.211.137) by vdlg-exch-02.paragon-software.com (172.30.1.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Tue, 26 Sep 2023 12:56:37 +0300 Message-ID: <0b667ec4-8223-407b-9303-94b70dfa5101@paragon-software.com> Date: Tue, 26 Sep 2023 12:56:37 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH 5/8] fs/ntfs3: Add more info into /proc/fs/ntfs3//volinfo Content-Language: en-US From: Konstantin Komarovc To: CC: , References: <7c217d7d-6ee4-4603-b5f1-ebe7b68cf430@paragon-software.com> In-Reply-To: <7c217d7d-6ee4-4603-b5f1-ebe7b68cf430@paragon-software.com> X-Originating-IP: [192.168.211.137] X-ClientProxiedBy: vdlg-exch-02.paragon-software.com (172.30.1.105) To vdlg-exch-02.paragon-software.com (172.30.1.105) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,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]); Tue, 26 Sep 2023 02:56:52 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778111741355991366 X-GMAIL-MSGID: 1778111741355991366 Signed-off-by: Konstantin Komarov ---  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 f9a214367113..5811da7e9d45 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;  }