Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp400764pxb; Tue, 3 Nov 2020 02:36:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJx/TmR4L6DeRiw3kQnNWAlnmzVN6TctIoEWHhC2nCzkyBqa6SMScvdPhNKMr1W0Irg5LRrw X-Received: by 2002:a17:906:1fc9:: with SMTP id e9mr12808607ejt.319.1604399794080; Tue, 03 Nov 2020 02:36:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604399794; cv=none; d=google.com; s=arc-20160816; b=lo50OzPIocSdKPKc9VHtHLNB9ddPV1s+80E5YBTWFezXxn8hveN2jBljuUOkTQyEDx DfsZ4gAn9Vn9UHIRtMuvAinc+LxTXCXuAWaNEgZylDyjApQ2n0jvEPAJHwK5DgTRoZtF i1Kgiu0OOYKZuwpbT0DLaD1Rq95UT4pc8m2K/e2oWlDuL9IUh4PUW7FhOCCF3oMQ7gPM RFjA1wKfnD8WsPOpTmCMgav/qS0mVkq5p8vPbWqLM3MwwHby76I63h9etrvrQ2RRlU/p gcoNqBfYpeTMqmVymMt37cRfWSGjlOLT3ZULe9Hfkh4a77P3u5cwYo83LkDwA61XqqI2 2DQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=nAxFxvExcPZzcgagTF0ZYyxgpzCcYspe+F6KhOGsdrw=; b=kU+ifYxnbl6AoPWChxF5k3Ct8Xu340Va9HeOqx6FlkAOcrjIaYkkMWBy+FxqJ0HSCV n653TDbcB28yyTocdoSL7RrCINI3TheSI10Xz6lYfQnOzflSEJn550+EcYuoZ6T2rNJY 1nrn+8ybe8ZoOFm1qpoCpaTQzJYw6fCPC4Y7LC1i3fD293HPMe7orduflzOd7sllz6tB bJZzC84Ejn4zwVRt9NWAvx2RQNOXuwSm9rpWWEnuGAQJP5u30tnxQ8RUWmPlWV60bCon fGBlMBtDSiF5m2Q2Y9JXHis1PwoPSsxd6do4xKBdg9q0nNsAuFSHg+cWEWIp/mho99AK EpQw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 89si11981199edy.301.2020.11.03.02.36.02; Tue, 03 Nov 2020 02:36:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728532AbgKCKeH (ORCPT + 99 others); Tue, 3 Nov 2020 05:34:07 -0500 Received: from mx2.suse.de ([195.135.220.15]:37028 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728439AbgKCKeA (ORCPT ); Tue, 3 Nov 2020 05:34:00 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 8182EACC6; Tue, 3 Nov 2020 10:33:59 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 374861E12FB; Tue, 3 Nov 2020 11:33:59 +0100 (CET) Date: Tue, 3 Nov 2020 11:33:59 +0100 From: Jan Kara To: Harshad Shirwadkar Cc: linux-ext4@vger.kernel.org, tytso@mit.edu, jack@suse.cz Subject: Re: [PATCH 01/10] ext4: describe fast_commit feature flags Message-ID: <20201103103359.GD3440@quack2.suse.cz> References: <20201031200518.4178786-1-harshadshirwadkar@gmail.com> <20201031200518.4178786-2-harshadshirwadkar@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201031200518.4178786-2-harshadshirwadkar@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Sat 31-10-20 13:05:09, Harshad Shirwadkar wrote: > Fast commit feature has flags in the file system as well in JBD2. The > meaning of fast commit feature flags can get confusing. Update docs > and code to add more documentation about it. > > Suggested-by: Jan Kara > Signed-off-by: Harshad Shirwadkar Looks good to me. Thanks! You can add: Reviewed-by: Jan Kara Honza > --- > Documentation/filesystems/ext4/journal.rst | 6 ++++++ > Documentation/filesystems/ext4/super.rst | 7 +++++++ > fs/ext4/ext4.h | 7 +++++++ > 3 files changed, 20 insertions(+) > > diff --git a/Documentation/filesystems/ext4/journal.rst b/Documentation/filesystems/ext4/journal.rst > index 805a1e9ea3a5..849d5b119eb8 100644 > --- a/Documentation/filesystems/ext4/journal.rst > +++ b/Documentation/filesystems/ext4/journal.rst > @@ -256,6 +256,10 @@ which is 1024 bytes long: > - s\_padding2 > - > * - 0x54 > + - \_\_be32 > + - s\_num\_fc\_blocks > + - Number of fast commit blocks in the journal. > + * - 0x58 > - \_\_u32 > - s\_padding[42] > - > @@ -310,6 +314,8 @@ The journal incompat features are any combination of the following: > - This journal uses v3 of the checksum on-disk format. This is the same as > v2, but the journal block tag size is fixed regardless of the size of > block numbers. (JBD2\_FEATURE\_INCOMPAT\_CSUM\_V3) > + * - 0x20 > + - Journal has fast commit blocks. (JBD2\_FEATURE\_INCOMPAT\_FAST\_COMMIT) > > .. _jbd2_checksum_type: > > diff --git a/Documentation/filesystems/ext4/super.rst b/Documentation/filesystems/ext4/super.rst > index 93e55d7c1d40..2eb1ab20498d 100644 > --- a/Documentation/filesystems/ext4/super.rst > +++ b/Documentation/filesystems/ext4/super.rst > @@ -596,6 +596,13 @@ following: > - Sparse Super Block, v2. If this flag is set, the SB field s\_backup\_bgs > points to the two block groups that contain backup superblocks > (COMPAT\_SPARSE\_SUPER2). > + * - 0x400 > + - Fast commits supported. Although fast commits blocks are > + backward incompatible, fast commit blocks are not always > + present in the journal. If fast commit blocks are present in > + the journal, JBD2 incompat feature > + (JBD2\_FEATURE\_INCOMPAT\_FAST\_COMMIT) gets > + set (COMPAT\_FAST\_COMMIT). > > .. _super_incompat: > > diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h > index 2337e443fa30..12673f9ec880 100644 > --- a/fs/ext4/ext4.h > +++ b/fs/ext4/ext4.h > @@ -1875,6 +1875,13 @@ static inline bool ext4_verity_in_progress(struct inode *inode) > #define EXT4_FEATURE_COMPAT_RESIZE_INODE 0x0010 > #define EXT4_FEATURE_COMPAT_DIR_INDEX 0x0020 > #define EXT4_FEATURE_COMPAT_SPARSE_SUPER2 0x0200 > +/* > + * The reason why "FAST_COMMIT" is a compat feature is that, FS becomes > + * incompatible only if fast commit blocks are present in the FS. Since we > + * clear the journal (and thus the fast commit blocks), we don't mark FS as > + * incompatible. We also have a JBD2 incompat feature, which gets set when > + * there are fast commit blocks present in the journal. > + */ > #define EXT4_FEATURE_COMPAT_FAST_COMMIT 0x0400 > #define EXT4_FEATURE_COMPAT_STABLE_INODES 0x0800 > > -- > 2.29.1.341.ge80a0c044ae-goog > -- Jan Kara SUSE Labs, CR