All of lore.kernel.org
 help / color / mirror / Atom feed
From: harshad shirwadkar <harshadshirwadkar@gmail.com>
To: Jan Kara <jack@suse.cz>
Cc: Ext4 Developers List <linux-ext4@vger.kernel.org>,
	"Theodore Y. Ts'o" <tytso@mit.edu>
Subject: Re: [PATCH v10 2/9] ext4: add fast_commit feature and handling for extended mount options
Date: Mon, 26 Oct 2020 09:40:15 -0700	[thread overview]
Message-ID: <CAD+ocbyw2ZuohtkaVXGBG7kKeRj7k+5faYDm4c3t1_c_pSva5w@mail.gmail.com> (raw)
In-Reply-To: <20201022130908.GD24163@quack2.suse.cz>

Will do, thanks!

On Thu, Oct 22, 2020 at 6:09 AM Jan Kara <jack@suse.cz> wrote:
>
> On Wed 21-10-20 10:31:48, harshad shirwadkar wrote:
> > On Wed, Oct 21, 2020 at 9:18 AM Jan Kara <jack@suse.cz> wrote:
> > >
> > > On Thu 15-10-20 13:37:54, Harshad Shirwadkar wrote:
> > > > We are running out of mount option bits. Add handling for using
> > > > s_mount_opt2. Add ext4 and jbd2 fast commit feature flag and also add
> > > > ability to turn off the fast commit feature in Ext4.
> > > >
> > > > Signed-off-by: Harshad Shirwadkar <harshadshirwadkar@gmail.com>
> > > > ---
> > > >  fs/ext4/ext4.h       |  4 ++++
> > > >  fs/ext4/super.c      | 27 ++++++++++++++++++++++-----
> > > >  include/linux/jbd2.h |  5 ++++-
> > > >  3 files changed, 30 insertions(+), 6 deletions(-)
> > > >
> > > > diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
> > > > index 1879531a119f..02d7dc378505 100644
> > > > --- a/fs/ext4/ext4.h
> > > > +++ b/fs/ext4/ext4.h
> > > > @@ -1213,6 +1213,8 @@ struct ext4_inode_info {
> > > >  #define EXT4_MOUNT2_EXPLICIT_JOURNAL_CHECKSUM        0x00000008 /* User explicitly
> > > >                                               specified journal checksum */
> > > >
> > > > +#define EXT4_MOUNT2_JOURNAL_FAST_COMMIT      0x00000010 /* Journal fast commit */
> > > > +
> > > >  #define clear_opt(sb, opt)           EXT4_SB(sb)->s_mount_opt &= \
> > > >                                               ~EXT4_MOUNT_##opt
> > > >  #define set_opt(sb, opt)             EXT4_SB(sb)->s_mount_opt |= \
> > > > @@ -1813,6 +1815,7 @@ 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
> > > > +#define EXT4_FEATURE_COMPAT_FAST_COMMIT              0x0400
> > > >  #define EXT4_FEATURE_COMPAT_STABLE_INODES    0x0800
> > >
> > > Is fast commit really a compat feature? IMO if there are fast commits
> > > stored in the journal, the filesystem is actually incompatible with the
> > > old kernels because data we guranteed to be permanenly stored may be
> > > invisible for the old kernel (since it won't replay fastcommit
> > > transactions).
> > >
> > > ...
> > >
> > > Oh, now I see that the journal FAST_COMMIT is actually incompat. So what's
> > > the point of compat ext4 feature with incompat JBD2 feature?
> > So having fast commits enabled on an ext4 file system doesn't
> > immediately make it incompatible with the older kernels. FS becomes
> > incompatible only if there are fast commits blocks that are stored in
> > the journal. So, one of the tricks that this patchset does is on a
> > clean unmount, since it's guaranteed that there are no fast commit
> > blocks in journal, we clear out the JBD2 incompat flag and preserve
> > the compat flag in ext4. So, we can think of ext4 compat flag as "FS
> > will try fast commits when possible" while jbd2 incompat flag as
> > "There are fast commits blocks present in the journal". Does that make
> > sense?
>
> Yes, understood. That's clever. Thanks for explanation! But please add the
> above justification to the description of EXT4_FEATURE_COMPAT_FAST_COMMIT
> feature or somewhere around that.
>
>                                                                 Honza
> --
> Jan Kara <jack@suse.com>
> SUSE Labs, CR

  reply	other threads:[~2020-10-26 16:40 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-15 20:37 [PATCH v10 0/9] Add fast commits in Ext4 file system Harshad Shirwadkar
2020-10-15 20:37 ` [PATCH v10 1/9] doc: update ext4 and journalling docs to include fast commit feature Harshad Shirwadkar
2020-10-21 16:04   ` Jan Kara
2020-10-21 17:25     ` harshad shirwadkar
2020-10-22 13:06       ` Jan Kara
2020-10-15 20:37 ` [PATCH v10 2/9] ext4: add fast_commit feature and handling for extended mount options Harshad Shirwadkar
2020-10-21 16:18   ` Jan Kara
2020-10-21 17:31     ` harshad shirwadkar
2020-10-22 13:09       ` Jan Kara
2020-10-26 16:40         ` harshad shirwadkar [this message]
2020-10-15 20:37 ` [PATCH v10 3/9] ext4 / jbd2: add fast commit initialization Harshad Shirwadkar
2020-10-21 20:00   ` Jan Kara
2020-10-29 23:28     ` harshad shirwadkar
2020-10-30 15:40       ` Jan Kara
2020-10-15 20:37 ` [PATCH v10 4/9] jbd2: add fast commit machinery Harshad Shirwadkar
2020-10-22 10:16   ` Jan Kara
2020-10-23 17:17     ` harshad shirwadkar
2020-10-26  9:03       ` Jan Kara
2020-10-26 16:34         ` harshad shirwadkar
2020-10-15 20:37 ` [PATCH v10 5/9] ext4: main fast-commit commit path Harshad Shirwadkar
2020-10-23 10:30   ` Jan Kara
2020-10-26 20:55     ` harshad shirwadkar
2020-10-27 14:29       ` Jan Kara
2020-10-27 17:38         ` harshad shirwadkar
2020-10-30 15:28           ` Jan Kara
2020-10-30 16:45             ` harshad shirwadkar
2020-11-03 10:04               ` Jan Kara
2020-11-03 18:31                 ` harshad shirwadkar
2020-10-27 18:45         ` Theodore Y. Ts'o
2020-10-15 20:37 ` [PATCH v10 6/9] jbd2: fast commit recovery path Harshad Shirwadkar
2020-10-15 20:37 ` [PATCH v10 7/9] ext4: " Harshad Shirwadkar
2020-10-15 20:38 ` [PATCH v10 8/9] ext4: add a mount opt to forcefully turn fast commits on Harshad Shirwadkar
2020-10-15 20:38 ` [PATCH v10 9/9] ext4: add fast commit stats in procfs Harshad Shirwadkar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAD+ocbyw2ZuohtkaVXGBG7kKeRj7k+5faYDm4c3t1_c_pSva5w@mail.gmail.com \
    --to=harshadshirwadkar@gmail.com \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.