linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daeho Jeong <daeho.jeong@samsung.com>
To: Jan Kara <jack@suse.cz>
Cc: "tytso@mit.edu" <tytso@mit.edu>,
	"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>,
	정대호 <daeho.jeong@samsung.com>
Subject: Re: [PATCH 2/3] ext4: remove incorrect check for inode journal mode in ext4_writepages()
Date: Tue, 01 Dec 2015 04:50:58 +0000 (GMT)	[thread overview]
Message-ID: <1763434694.90931448945457404.JavaMail.weblogic@epmlwas04c> (raw)

> Actually what you do only hides the real problem - that ext4_writepages()
> in non-journalled mode can be still running for an inode which is already
> switched to journalled mode. In theory if we manage to dirty some pages
> after the switch, non-journalled writepages *can* see them an try to write
> them back which will break spectacularly. So to fix this we need something
> like a writeback barrier for the inode - make sure all ext4_writepages()
> calls have completed before switching aops. Now I'd hate to grow struct
> ext4_inode_info only for this extra rare case so we could probably
> implement the barrier on per-filesystem basis - a fs-wide per-cpu rw
> semaphore acquired for reading while ext4_writepages() runs and acquired
> for writing when we switch aops for some inode.

Yes, there is another issue that newly dirtied pages after the switch can be
shown in ext4_writepages() in non-journalled mode. I overlooked that point.
According to your comment, I will modify this patch.

Thank you, again.

             reply	other threads:[~2015-12-01  4:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-01  4:50 Daeho Jeong [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-11-18  1:34 [PATCH 1/3] ext4: handle unwritten or delalloc buffers before enabling per-file data journaling Daeho Jeong
2015-11-18  1:34 ` [PATCH 2/3] ext4: remove incorrect check for inode journal mode in ext4_writepages() Daeho Jeong
2015-11-30 14:08   ` Jan Kara

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=1763434694.90931448945457404.JavaMail.weblogic@epmlwas04c \
    --to=daeho.jeong@samsung.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 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).