All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Chris Mason <clm@fb.com>, <linux-btrfs@vger.kernel.org>,
	<linux-fsdevel@vger.kernel.org>
Subject: Re: [RFC] odd thing in btrfs_file_aio_write()
Date: Mon, 14 Apr 2014 11:36:53 +0800	[thread overview]
Message-ID: <534B57D5.9070901@cn.fujitsu.com> (raw)
In-Reply-To: <20140414024830.GR18016@ZenIV.linux.org.uk>


-------- Original Message --------
Subject: Re: [RFC] odd thing in btrfs_file_aio_write()
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Qu Wenruo <quwenruo@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

WARNING: multiple messages have this Message-ID (diff)
From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Chris Mason <clm@fb.com>, <linux-btrfs@vger.kernel.org>,
	<linux-fsdevel@vger.kernel.org>
Subject: Re: [RFC] odd thing in btrfs_file_aio_write()
Date: Mon, 14 Apr 2014 11:36:53 +0800	[thread overview]
Message-ID: <534B57D5.9070901@cn.fujitsu.com> (raw)
In-Reply-To: <20140414024830.GR18016@ZenIV.linux.org.uk>


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

  reply	other threads:[~2014-04-14  3:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-14  0:26 [RFC] odd thing in btrfs_file_aio_write() Al Viro
2014-04-14  2:35 ` Qu Wenruo
2014-04-14  2:35   ` Qu Wenruo
2014-04-14  2:48   ` Al Viro
2014-04-14  3:36     ` Qu Wenruo [this message]
2014-04-14  3:36       ` Qu Wenruo
2014-04-14  5:08       ` Al Viro
2014-04-14  7:21         ` Qu Wenruo
2014-04-14  7:21           ` Qu Wenruo

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=534B57D5.9070901@cn.fujitsu.com \
    --to=quwenruo@cn.fujitsu.com \
    --cc=clm@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    /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.