All of lore.kernel.org
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Jan Kara <jack@suse.cz>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH 1/5] ext4: Always use ext4_bio_write_page() for writeout
Date: Thu, 17 Jan 2013 13:31:37 -0500	[thread overview]
Message-ID: <20130117183137.GC29972@thunk.org> (raw)
In-Reply-To: <1357148744-4895-2-git-send-email-jack@suse.cz>

On Wed, Jan 02, 2013 at 06:45:40PM +0100, Jan Kara wrote:
> Currently we sometimes used block_write_full_page() and sometimes
> ext4_bio_write_page() for writeback (depending on mount options and call
> path). Let's always use ext4_bio_write_page() to simplify things a bit.
> 
> Signed-off-by: Jan Kara <jack@suse.cz>

I left in block_write_full_page() deliberately because it was
page_io.c was very tricky to get right.  When you make changes, if you
aren't careful, you can end up dereferencing a data structure after
it's been freed, which sometimes doesn't become visible until you do
some very serious stress testing.  (We had one case where it only
showed up if you were using xfstests in a VM with the memory cranked
down to a ridiculously low amount of memory.)  So having a way to
disable the page_io.c code path was useful in trying to debug things.

Fortunately, we haven't had a bug in that part of the ext4 code base
in quite a while, so maybe it's time for us to get rid of this
alternate code path.

> @@ -2885,11 +2849,6 @@ static void ext4_invalidatepage(struct page *page, unsigned long offset)
>  	trace_ext4_invalidatepage(page, offset);
>  
>  	/*
> -	 * free any io_end structure allocated for buffers to be discarded
> -	 */
> -	if (ext4_should_dioread_nolock(page->mapping->host))
> -		ext4_invalidatepage_free_endio(page, offset);

What does this have to with always using ext4_bio_write_page()?  It
looks like this was a change that leaked from one of your follow-on
commits?

There was other removals of other functions, such as
ext4_set_bh_endio(), which I think should be broken out into another
commit.

					- Ted

  parent reply	other threads:[~2013-01-17 18:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-02 17:45 [PATCH 0/5] ext4: Several simplifications Jan Kara
2013-01-02 17:45 ` [PATCH 1/5] ext4: Always use ext4_bio_write_page() for writeout Jan Kara
2013-01-03 14:18   ` Jan Kara
2013-01-04  7:18   ` Zheng Liu
2013-01-17 18:31   ` Theodore Ts'o [this message]
2013-01-17 21:30     ` Jan Kara
2013-01-02 17:45 ` [PATCH 2/5] ext4: Use redirty_page_for_writepage() in ext4_bio_write_page() Jan Kara
2013-01-04  7:20   ` Zheng Liu
2013-01-17 18:35   ` Theodore Ts'o
2013-01-17 21:24     ` Jan Kara
2013-01-02 17:45 ` [PATCH 3/5] ext4: Remove bogus wait for unwritten extents in ext4_ind_direct_IO Jan Kara
2013-01-04  7:24   ` Zheng Liu
2013-01-17 21:58     ` Theodore Ts'o
2013-01-17 23:02       ` Jan Kara
2013-01-18  2:15         ` Zheng Liu
2013-01-02 17:45 ` [PATCH 4/5] ext4: Disable merging of uninitialized extents Jan Kara
2013-01-04  7:25   ` Zheng Liu
2013-01-02 17:45 ` [PATCH 5/5] ext4: Remove unnecessary wait for extent conversion in ext4_fallocate() Jan Kara
2013-01-04  7:26   ` Zheng Liu

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=20130117183137.GC29972@thunk.org \
    --to=tytso@mit.edu \
    --cc=jack@suse.cz \
    --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.