From: Olga Kornievskaia <aglo@umich.edu>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: linux-man@vger.kernel.org, Christoph Hellwig <hch@infradead.org>,
Trond Myklebust <Trond.Myklebust@primarydata.com>,
linux-nfs <linux-nfs@vger.kernel.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
Olga Kornievskaia <kolga@netapp.com>
Subject: Re: [RFC v1 01/19] Don't copy beyond the end of the file
Date: Tue, 7 Mar 2017 09:18:14 -0500 [thread overview]
Message-ID: <CAN-5tyGvneN1WFgxmcr0Kx13EZRf-EhJb-EaQp_-+O5i+-0OXA@mail.gmail.com> (raw)
In-Reply-To: <20170306192301.GB2294@fieldses.org>
On Mon, Mar 6, 2017 at 2:23 PM, J. Bruce Fields <bfields@fieldses.org> wrote:
> On Mon, Mar 06, 2017 at 11:27:23AM -0500, Olga Kornievskaia wrote:
>> I don’t see copy_file_range() specifying that 0 means end of the file.
>
> Is there a reason that copy_file_range shouldn't be like read? (From
> read(2): "On success, the number of bytes read is returned (zero
> indicates end of file)".
The only thing I can think of is the fact that copy_file_range() does
write too. And return 0 from the write is not expected/allowed (except
when input count was 0)?
> I haven't checked, but suspect that's already true of the
> implementations we have.
>
> Also, from copy_file_range():
>
> EINVAL Requested range extends beyond the end of the source
> file; or the flags argument is not 0.
>
> Some filesystems do this, some don't; I think the man page should make
> it clear that this behavior is not required.
>
> --b.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-03-07 14:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170302160123.30375-1-kolga@netapp.com>
[not found] ` <20170302160123.30375-2-kolga@netapp.com>
[not found] ` <20170302162221.GA6854@infradead.org>
[not found] ` <20170303204747.GE13877@fieldses.org>
[not found] ` <4B2A2E86-AFC8-49EA-9D53-7A53AD824CF1@netapp.com>
[not found] ` <20170303213230.GF13877@fieldses.org>
[not found] ` <B3F80DA0-B4F8-4628-88C5-E5C047620F17@netapp.com>
[not found] ` <20170304021008.GB21609@fieldses.org>
[not found] ` <924FF7A2-27CD-4848-BD61-748758C2533F@netapp.com>
2017-03-06 19:23 ` [RFC v1 01/19] Don't copy beyond the end of the file J. Bruce Fields
2017-03-07 14:18 ` Olga Kornievskaia [this message]
[not found] ` <20170307234051.GA29977@infradead.org>
[not found] ` <20170308170521.GA1020@fieldses.org>
[not found] ` <20170308172549.GA32011@infradead.org>
[not found] ` <7FDA8E80-3C62-48BB-9E2B-195B4BA340C0@netapp.com>
2017-03-08 19:53 ` [RFC v1 01/19] fs: " J. Bruce Fields
2017-03-08 20:00 ` Olga Kornievskaia
2017-03-08 20:18 ` J. Bruce Fields
2017-03-08 20:18 ` Trond Myklebust
2017-03-08 20:32 ` bfields
2017-03-08 20:49 ` Trond Myklebust
2017-03-09 15:29 ` bfields
2017-03-09 15:35 ` hch
2017-03-09 16:16 ` bfields
2017-03-09 16:17 ` hch
2017-03-09 17:28 ` Olga Kornievskaia
2017-03-09 18:40 ` bfields
2017-03-09 21:55 ` hch
2017-03-09 17:35 ` Olga Kornievskaia
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=CAN-5tyGvneN1WFgxmcr0Kx13EZRf-EhJb-EaQp_-+O5i+-0OXA@mail.gmail.com \
--to=aglo@umich.edu \
--cc=Trond.Myklebust@primarydata.com \
--cc=bfields@fieldses.org \
--cc=hch@infradead.org \
--cc=kolga@netapp.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-man@vger.kernel.org \
--cc=linux-nfs@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).