-------- Original Message --------
Subject: Re: [RFC] odd thing in btrfs_file_aio_write()
From: Al Viro <v...@zeniv.linux.org.uk>
To: Qu Wenruo <quwen...@cn.fujitsu.com>
Date: 2014年04月14日 10:48
On Mon, Apr 14, 2014 at 10:35:08AM +0800, Qu Wenruo wrote:
Oh, that's my fault, I forgot that iov can be chained.

I should use 'pos + count' instead.
BTW, will there be any difference if 10Mb write starts one byte before EOF?
This will not be a problem, since btrfs will not update the inode size until the data is written.
So this behavior will not cause empty gap.
IOW, is that if (start_pos > i_size_read(inode)) { in there correct
these days?  And what'll happen if we hit e.g. an unmapped page in the
middle of the data being written?  That will result in short write, but
will it truncate what's left of that dummy range?
I'm very sorry for my poor that I could not understand the question well.
Would you please explain what does the "unmapped page" means?

Did you mean two noncontinuous iovecs?
If you did mean that, it seems that I should expand the end_pos to the end of the iovec...

Thanks,
Qu
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to