From: Ted Ts'o <tytso@mit.edu>
To: Eric Sandeen <sandeen@redhat.com>
Cc: ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH] ext4: serialize unaligned asynchronous DIO
Date: Thu, 13 Jan 2011 23:15:14 -0500 [thread overview]
Message-ID: <20110114041514.GI31800@thunk.org> (raw)
In-Reply-To: <4D2F7B52.1040209@redhat.com>
On Thu, Jan 13, 2011 at 04:23:14PM -0600, Eric Sandeen wrote:
> Mingming suggested that perhaps we can track outstanding
> conversions, and wait on that instead so that non-sparse
> files won't be affected, but I've had trouble making that
> work so far, and would like to get the corruption hole
> plugged ASAP. Perhaps adding a prink_once() warning of
> the perf degradation on this path would be useful?
Yeah, I think a printk_once(), or maybe better yet, a warning
ext4_msg() ratelimited to once a day, is the way to go. I'd print the
inode number and process name that did the offending async DIO, so it
can help out the system administrator.
I've looked over the rest of the patch, and it seems good. Just one
question:
> +static int
> +ext4_unaligned_aio(struct inode *inode, const struct iovec *iov,
> + unsigned long nr_segs, loff_t pos)
> +{
> + struct super_block *sb = inode->i_sb;
> + int blockmask = sb->s_blocksize - 1;
> + size_t count = iov_length(iov, nr_segs);
> + loff_t final_size = pos + count;
> +
> + if (pos >= inode->i_size)
> + return 0;
Why is it ok if the write is extended the file? Are you depending on
some other lock (i_data_sem, perhaps?) to serialize the write in that
case? If so, could you please add a comment to that effect?
- Ted
next prev parent reply other threads:[~2011-01-14 4:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-13 22:23 [PATCH] ext4: serialize unaligned asynchronous DIO Eric Sandeen
2011-01-14 4:15 ` Ted Ts'o [this message]
2011-01-14 4:41 ` Eric Sandeen
2011-01-14 17:28 ` [PATCH V2] " Eric Sandeen
2011-01-18 16:23 ` Eric Sandeen
2011-01-21 16:00 ` Eric Sandeen
2011-01-21 18:26 ` [PATCH V3 RESEND 2] " Eric Sandeen
2011-01-21 23:27 ` Ted Ts'o
2011-02-07 2:33 ` Ted Ts'o
2011-02-07 15:59 ` Ted Ts'o
2011-02-07 17:58 ` Eric Sandeen
2011-02-07 22:18 ` Mingming Cao
2012-02-23 13:23 ` backport "ext4: serialize unaligned asynchronous DIO" to 2.6.32 Philipp Hahn
2012-02-23 15:15 ` Eric Sandeen
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=20110114041514.GI31800@thunk.org \
--to=tytso@mit.edu \
--cc=linux-ext4@vger.kernel.org \
--cc=sandeen@redhat.com \
/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.