From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:43056 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932083AbbKQSnV (ORCPT ); Tue, 17 Nov 2015 13:43:21 -0500 Date: Tue, 17 Nov 2015 13:42:28 -0500 From: Chris Mason To: Christoph Hellwig CC: "Darrick J. Wong" , , Subject: Re: clone ioctl return values Message-ID: <20151117184228.GG17545@ret.masoncoding.com> References: <20151116120431.GA2860@infradead.org> <20151117002822.GA32467@birch.djwong.org> <20151117105433.GA18093@infradead.org> <20151117135745.GF17545@ret.masoncoding.com> <20151117152251.GA5392@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20151117152251.GA5392@infradead.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Nov 17, 2015 at 07:22:52AM -0800, Christoph Hellwig wrote: > On Tue, Nov 17, 2015 at 08:57:45AM -0500, Chris Mason wrote: > > > > Errrgh, the golden output of this test reflects the changes to the input > > > > checking in Anna/Peng's copy_file_range/clone_file_range patches. > > > > > > > > So, I guess the question is, should I reset the golden output to whatever > > > > btrfs spits out before that patchset, and we'll consider the alterations > > > > to be bugs/regressions/whatever that ought to be fixed in their patches? > > > > > > Some bits in btrfs don't seem kosher. But it would be good to > > > explicitly send patches for btrfs to adopt to what might make more > > > sense, and then follow it in the other implementations. > > > > Btrfs does check for directories, but we should really be checking for > > regular files too. In the end, we only copy extents that would > > correspond with regular files, so we're sneaking by. > > Yes, I saw that. So so far I'd suggest something like the following > for btrfs: > > - return EBADFD for missing read/wite permissions Why not -EPERM? I don't have strong feelings about picking errnos, as long as we're consistent, I'm not worried. > - return EINVAL for wrong non-directory file types as the > source fd Ack. -chris