From: Theodore Ts'o <tytso@mit.edu>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH 02/14] undo-io: write out index block after every write
Date: Sat, 16 May 2015 20:18:45 -0400 [thread overview]
Message-ID: <20150517001845.GA4489@thunk.org> (raw)
In-Reply-To: <20150514002121.10785.38168.stgit@birch.djwong.org>
On Wed, May 13, 2015 at 05:21:21PM -0700, Darrick J. Wong wrote:
> Write out the undo file's index block after writing a block to the
> undo file. This ensures that we always have a consistent undo file
> in the page cache, even if the program crashes. When we fill up a
> key block in the undo file, we'll call fsync to force the whole
> thing to storage; this should happen about every 256 blocks given
> the usual 4K block size.
>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Applied, but I'm not sure calling fsync every 256 blocks is worth it
at all; when mke2fs is writing a 128M journal, it's going to be
writing 32,768 blocks. If we call fsync every 256 blocks, then we'll
be calling it 128 times during the course of the mke2fs, and this
doesn't count any of the other blocks overwritten by mke2fs.
The fsync() is only going to help in case of power failure --- and if
we only calling it every 256 blocks, we're going to lose data in
anyway.
This patch doesn't appear to change how often we call fsync(2), so
I'll take this, but I think we should seriously think about only
calling fync() if we're closing the undo file.
- Ted
next prev parent reply other threads:[~2015-05-17 0:18 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-14 0:21 [PATCH 00/14] e2fsprogs May 2015 patchbomb Darrick J. Wong
2015-05-14 0:21 ` [PATCH 01/14] misc: fix Coverity bugs Darrick J. Wong
2015-05-16 22:36 ` Theodore Ts'o
2015-05-14 0:21 ` [PATCH 02/14] undo-io: write out index block after every write Darrick J. Wong
2015-05-17 0:18 ` Theodore Ts'o [this message]
2015-05-14 0:21 ` [PATCH 03/14] misc: fix undo file setup Darrick J. Wong
2015-05-17 0:20 ` Theodore Ts'o
2015-05-14 0:21 ` [PATCH 04/14] filefrag: fix broken extent emulation and uninitialized variables Darrick J. Wong
2015-05-17 0:26 ` Theodore Ts'o
2015-05-14 0:21 ` [PATCH 05/14] e2fsck: fix buffer overrun in revoke block scanning Darrick J. Wong
2015-05-14 19:37 ` [PATCH v2 " Darrick J. Wong
2015-05-17 0:50 ` Theodore Ts'o
2015-05-14 0:21 ` [PATCH 06/14] e2fsck: convert block-mapped files to extents on bigalloc fs Darrick J. Wong
2015-05-17 0:51 ` Theodore Ts'o
2015-05-14 0:21 ` [PATCH 07/14] libext2fs: support allocating uninit blocks in bmap2() Darrick J. Wong
2015-05-17 0:54 ` Theodore Ts'o
2015-05-14 0:22 ` [PATCH 08/14] libext2fs: find/alloc a range of empty blocks Darrick J. Wong
2015-05-17 1:02 ` Theodore Ts'o
2015-05-14 0:22 ` [PATCH 09/14] libext2fs: add new hooks to support large allocations Darrick J. Wong
2015-06-11 0:08 ` Theodore Ts'o
2015-05-14 0:22 ` [PATCH 10/14] libext2fs: implement fallocate Darrick J. Wong
2015-06-11 0:09 ` Theodore Ts'o
2015-05-14 0:22 ` [PATCH 11/14] libext2fs: use fallocate for creating journals and hugefiles Darrick J. Wong
2015-05-17 3:39 ` Theodore Ts'o
2015-05-18 19:24 ` Darrick J. Wong
2015-05-18 21:18 ` [PATCH v2 " Darrick J. Wong
2015-06-11 0:12 ` Theodore Ts'o
2015-05-14 0:22 ` [PATCH 12/14] debugfs: implement fallocate Darrick J. Wong
2015-06-11 0:12 ` Theodore Ts'o
2015-05-14 0:22 ` [PATCH 13/14] tests: test debugfs punch command Darrick J. Wong
2015-06-11 0:13 ` Theodore Ts'o
2015-05-18 21:17 ` [PATCH 15/14] libext2fs: remove unnecessary undo file flush calls Darrick J. Wong
2015-06-11 0:13 ` Theodore Ts'o
2015-06-05 1:38 ` [PATCH 16/14] libext2fs: require the inline data xattr on all inline data files Darrick J. Wong
2015-06-11 0:15 ` Theodore Ts'o
2015-07-23 21:12 ` Darrick J. Wong
[not found] ` <20150514002240.10785.35238.stgit@birch.djwong.org>
2015-06-11 0:13 ` [PATCH 14/14] misc: add fuse2fs, a FUSE server for e2fsprogs (v4.3) Theodore Ts'o
2015-06-15 18:37 ` Darrick J. Wong
2015-06-15 19:21 ` 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=20150517001845.GA4489@thunk.org \
--to=tytso@mit.edu \
--cc=darrick.wong@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).