From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org ([198.137.202.9]:50653 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753919AbbKQPM3 (ORCPT ); Tue, 17 Nov 2015 10:12:29 -0500 Date: Tue, 17 Nov 2015 07:12:26 -0800 From: Christoph Hellwig To: "Darrick J. Wong" Cc: xfs@oss.sgi.com, linux-fsdevel@vger.kernel.org Subject: Re: clone ioctl return values Message-ID: <20151117151226.GA12860@infradead.org> References: <20151116120431.GA2860@infradead.org> <20151117002822.GA32467@birch.djwong.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151117002822.GA32467@birch.djwong.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Nov 16, 2015 at 04:28:22PM -0800, Darrick J. Wong wrote: > > -XFS_IOC_CLONE_RANGE: Invalid argument > > +reflink: Invalid argument > > Try reflink past EOF > > -XFS_IOC_CLONE_RANGE: Invalid argument > > +reflink: Invalid argument > > Try to reflink a dir > > -XFS_IOC_CLONE_RANGE: Is a directory > > +reflink: Is a directory > > > Try to reflink a device > > -XFS_IOC_CLONE_RANGE: Invalid argument > > +/mnt/test/test-157/dev1: No such device or address > > Huh. How did you get -ENODEV here? I ran this on 4.3 and got -EINVAL. Turns out this is because my system doesn't have the ramdisk driver built into the kernel, so opening your block device with major 8, minor 0 already fails. Might be better to create a char device with major 1, minor 3 (dev null) as that should always be present.