All of lore.kernel.org
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Lukas Czerner <lczerner@redhat.com>
Cc: linux-ext4@vger.kernel.org, Frank Mayhar <fmayhar@google.com>
Subject: Re: [PATCH] ext4: Make fsync to sync parent dir in no-journal for real this time
Date: Thu, 2 Apr 2015 23:45:38 -0400	[thread overview]
Message-ID: <20150403034538.GD10991@thunk.org> (raw)
In-Reply-To: <1424697396-17248-1-git-send-email-lczerner@redhat.com>

On Mon, Feb 23, 2015 at 02:16:36PM +0100, Lukas Czerner wrote:
> Previously commit 14ece1028b3ed53ffec1b1213ffc6acaf79ad77c added a
> support for for syncing parent directory of newly created inodes to make
> sure that the inode is not lost after a power failure in no-journal
> mode.
> 
> However this does not work in majority of cases, namely:
>  - if the directory has inline data
>  - if the directory is already indexed
>  - if the directory already has at least one block and:
> 	- the new entry fits into it
> 	- or we've successfully converted it to indexed
> 
> So in those cases we might lose the inode entirely even after fsync in
> the no-journal mode. This also includes ext2 default mode obviously.
> 
> I've noticed this while running xfstest generic/321 and even though the
> test should fail (we need to run fsck after a crash in no-journal mode)
> I could not find a newly created entries even when if it was fsynced
> before.
> 
> Fix this by adjusting the ext4_add_entry() successful exit paths to set
> the inode EXT4_STATE_NEWENTRY so that fsync has the chance to fsync the
> parent directory as well.
> 
> Signed-off-by: Lukas Czerner <lczerner@redhat.com>
> Cc: Frank Mayhar <fmayhar@google.com>

Thanks, applied.

						- Ted

  parent reply	other threads:[~2015-04-03  3:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-23 13:16 [PATCH] ext4: Make fsync to sync parent dir in no-journal for real this time Lukas Czerner
2015-03-10 18:29 ` Jan Kara
2015-04-03  3:45 ` Theodore Ts'o [this message]
2015-04-03 15:16 ` [PATCH -v2] ext4: make " 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=20150403034538.GD10991@thunk.org \
    --to=tytso@mit.edu \
    --cc=fmayhar@google.com \
    --cc=lczerner@redhat.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.