-------- Original Message --------
Subject: Re: [RFC] odd thing in btrfs_file_aio_write()
From: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
To: Qu Wenruo <quwenruo@xxxxxxxxxxxxxx>
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-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html