From: "Theodore Ts'o" <tytso@mit.edu>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: harshad shirwadkar <harshadshirwadkar@gmail.com>,
Leah Rumancik <leah.rumancik@gmail.com>,
Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH 2/2] ext4: add ioctl EXT4_FLUSH_JOURNAL
Date: Tue, 30 Mar 2021 13:15:08 -0400 [thread overview]
Message-ID: <YGNcnJpqUqrwbMAH@mit.edu> (raw)
In-Reply-To: <20210330163223.GD22091@magnolia>
On Tue, Mar 30, 2021 at 09:32:23AM -0700, Darrick J. Wong wrote:
> Why not make discarding the journal part of FITRIM then?
Unfortunately, the fstrim_range structure doesn't have a place for a
flags field, and FITRIM works by specifying a range of LBA's:
struct fstrim_range {
__u64 start;
__u64 len;
__u64 minlen;
};
I suppose we could do something where some combination of start/len
means "also checkpoint and discard the journal", but that seems rather
kludgy.
> It occurred to me overnight that another way to look at this ioctl
> proposal is that it checkpoints the filesystem and has a flag to discard
> the journal blocks too. Given that we're now only two days away from
> my traditional bootfs[1] drum-banging day, and there's real user
> demand[2] for bootloaders to be able to force a journal checkpoint,
How about if we have an ioctl which is "checkpoint journal", which can
be file system independent (e.g., defined in include/uapi/linux/fs.h)
which takes a u32 flags field, where we define a flag bit to mean
"also discard the unused part of the journal after the checkpoint"?
It seems that would also solve your bootfs() use case.
- Ted
next prev parent reply other threads:[~2021-03-30 17:15 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-25 18:12 [PATCH 1/2] ext4: wipe filename upon file deletion Leah Rumancik
2021-03-25 18:12 ` [PATCH 2/2] ext4: add ioctl EXT4_FLUSH_JOURNAL Leah Rumancik
2021-03-26 1:21 ` Darrick J. Wong
2021-03-29 15:06 ` Leah Rumancik
2021-03-29 22:10 ` harshad shirwadkar
2021-03-30 16:32 ` Darrick J. Wong
2021-03-30 17:15 ` Theodore Ts'o [this message]
2021-03-30 17:18 ` Darrick J. Wong
2021-03-30 17:17 ` Darrick J. Wong
2021-03-30 18:14 ` Leah Rumancik
2021-03-26 0:05 ` [PATCH 1/2] ext4: wipe filename upon file deletion Darrick J. Wong
2021-03-26 23:05 ` Andreas Dilger
2021-03-27 1:43 ` harshad shirwadkar
2021-03-27 2:08 ` Darrick J. Wong
2021-03-29 16:06 ` Leah Rumancik
2021-03-29 19:05 ` Andreas Dilger
2021-03-30 1:07 ` Theodore Ts'o
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=YGNcnJpqUqrwbMAH@mit.edu \
--to=tytso@mit.edu \
--cc=djwong@kernel.org \
--cc=harshadshirwadkar@gmail.com \
--cc=leah.rumancik@gmail.com \
--cc=linux-ext4@vger.kernel.org \
/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.