From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zeniv.linux.org.uk ([195.92.253.2]:47443 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751490AbcCTSWx (ORCPT ); Sun, 20 Mar 2016 14:22:53 -0400 Date: Sun, 20 Mar 2016 18:22:51 +0000 From: Al Viro To: Jordi Pujol Palomer Cc: Linux-Fsdevel Subject: Re: [PATCH] fs/namei.c: Hard link and rename should check same device instead of same mount Message-ID: <20160320182251.GB17997@ZenIV.linux.org.uk> References: <20160316140514.778db799@localdomain> <20160316142516.GK17997@ZenIV.linux.org.uk> <20160320190625.5e4ef31f@localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160320190625.5e4ef31f@localdomain> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sun, Mar 20, 2016 at 07:06:25PM +0100, Jordi Pujol Palomer wrote: > Therefore we can develop a new option for binding to let the superuser > choose what is needed for every mount-bind, example: > > mount --bind -o boundary $DIR $DIR > > mount --bind -o noboundary $DIR1 $DIR2 > > and allow remount also, > > mount -o remount,boundary $DIR > > mount -o remount,noboundary $DIR > > That seems feasible, ... until you consider the fun of moving subtrees between different mounts. IMO it's a bloody bad idea; semantics would be hard to define, not to mention that things that used to be on the same fs might eventually get moved to different ones, and for those there's obviously no way to do link(2) or rename(2) at all. What are you actually trying to achieve? There might be saner ways to do it...