From: Ted Ts'o <tytso@mit.edu>
To: Andrea Arcangeli <aarcange@redhat.com>
Cc: linux-ext4@vger.kernel.org, Jan Kara <jack@suse.cz>
Subject: Re: [PATCH 1/2] ext4: avoid hangs in ext4_da_should_update_i_disksize()
Date: Tue, 13 Dec 2011 21:44:35 -0500 [thread overview]
Message-ID: <20111214024435.GB6276@thunk.org> (raw)
In-Reply-To: <1323656828-24465-2-git-send-email-aarcange@redhat.com>
On Mon, Dec 12, 2011 at 03:27:07AM +0100, Andrea Arcangeli wrote:
> If the pte mapping in generic_perform_write() is unmapped between
> iov_iter_fault_in_readable() and iov_iter_copy_from_user_atomic(), the
> "copied" parameter to ->end_write can be zero. ext4 couldn't cope with
> it with delayed allocations enabled. This skips the i_disksize
> enlargement logic if copied is zero and no new data was appeneded to
> the inode.
...
>
> This is 100% reproducible with some autonuma development code tuned in
> a very aggressive manner (not normal way even for knumad) which does
> "exotic" changes to the ptes. It wouldn't normally trigger but I don't
> see why it can't happen normally if the page is added to swap cache in
> between the two faults leading to "copied" being zero (which then
> hangs in ext4). So it should be fixed. Especially possible with lumpy
> reclaim (albeit disabled if compaction is enabled) as that would
> ignore the young bits in the ptes.
>
> Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Thanks, applied.
- Ted
next prev parent reply other threads:[~2011-12-14 2:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-12 2:27 ext4_da_write_end() and copied == 0 Andrea Arcangeli
2011-12-12 2:27 ` [PATCH 1/2] ext4: avoid hangs in ext4_da_should_update_i_disksize() Andrea Arcangeli
2011-12-12 3:28 ` Yongqiang Yang
2011-12-12 16:57 ` Andrea Arcangeli
2011-12-13 1:05 ` Yongqiang Yang
2011-12-12 20:27 ` Jan Kara
2011-12-14 2:44 ` Ted Ts'o [this message]
2011-12-12 2:27 ` [PATCH 2/2] ext4: ext4_discard_partial_page_buffers_no_lock() wrong parameters Andrea Arcangeli
2011-12-12 3:17 ` Yongqiang Yang
2011-12-12 16:55 ` Andrea Arcangeli
2011-12-12 20:07 ` Allison Henderson
2011-12-13 0:40 ` Andrea Arcangeli
2011-12-13 1:16 ` Yongqiang Yang
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=20111214024435.GB6276@thunk.org \
--to=tytso@mit.edu \
--cc=aarcange@redhat.com \
--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.