Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756495Ab2FTSL3 (ORCPT ); Wed, 20 Jun 2012 14:11:29 -0400 Received: from smtp207.alice.it ([82.57.200.103]:44518 "EHLO smtp207.alice.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753210Ab2FTSL2 (ORCPT ); Wed, 20 Jun 2012 14:11:28 -0400 Message-ID: <4FE2125A.5080806@libero.it> Date: Wed, 20 Jun 2012 20:11:38 +0200 From: Goffredo Baroncelli Reply-To: kreijack@inwind.it User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120418 Icedove/11.0 MIME-Version: 1.0 To: Calvin Walton CC: Alexander Block , kreijack@inwind.it, linux-btrfs@vger.kernel.org, dave@jikos.cz, hch@infradead.org, linux-fsdevel@vger.kernel.org, chris.mason@fusionio.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Allow cross subvolume reflinks (2nd attempt) References: <1340188512-5761-1-git-send-email-ablock84@googlemail.com> <4FE205CF.9020509@libero.it> <1340215644.6961.12.camel@cwalton-XPS-8300> In-Reply-To: <1340215644.6961.12.camel@cwalton-XPS-8300> X-Enigmail-Version: 1.4.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1990 Lines: 45 On 06/20/2012 08:07 PM, Calvin Walton wrote: > On Wed, 2012-06-20 at 19:27 +0200, Alexander Block wrote: >> On Wed, Jun 20, 2012 at 7:18 PM, Goffredo Baroncelli wrote: >>> Hi Alexander, >>> >>> On 06/20/2012 12:35 PM, Alexander Block wrote: >>>> The patch also does proper vfs mount checks, so cross mount >>>> point reflinks are not possible with this patch. It only allows cross >>>> reflinks between two subvolumes which are in the same mount point. >>> >>> Thanks for working on that. What happens if two subvolumes of the same >>> filesystem are mounted on two different places ? >>> >>> I usually do: >>> mount -o subvol=__active /dev/sdX / >>> mount -o subvol=. /dev/sdX /var/btrfs >>> >>> So two different subvolumes of the same filesystem (the one on /dev/sdX) >>> are mounted on two different places. >>> >>> Is it possible to do >>> cp --reflink /tmp/foo /var/btrfs/tmp/foo2 >> This will fail with -EXDEV. The patch explicitly forbids reflinks crossing vfs >> mount boundaries. > > Which means that if I want to do a reflink copy between two separately > mounted subvolumes, I will have to go and do a third mount with a common > subvolume above those two, then do the reflink operation within this > extra mount? This seems slightly impractical. > > Is it any extra code to enable doing cross-mount reflinks? Why was the > decision made not to allow them? > > Is there some particular opposition to supporting cross-mount operations > on multiple mounts of the same filesystem in general? (I'd love to have > rename() work across bind mounts, for example...) Yes please, could someone explain the reason behind this decision ? May be there are valid reasons, I am asking only to know which ones ? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/