Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752045AbaBMU2w (ORCPT ); Thu, 13 Feb 2014 15:28:52 -0500 Received: from mail-qc0-f175.google.com ([209.85.216.175]:55036 "EHLO mail-qc0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751277AbaBMU2v (ORCPT ); Thu, 13 Feb 2014 15:28:51 -0500 MIME-Version: 1.0 X-Originating-IP: [86.59.245.170] In-Reply-To: References: <1391791751-2533-1-git-send-email-miklos@szeredi.hu> <19258.1392306854@warthog.procyon.org.uk> <20140213162534.GB4026@tucsk.piliscsaba.szeredi.hu> <20106.1392309770@warthog.procyon.org.uk> <16729.1392318161@warthog.procyon.org.uk> Date: Thu, 13 Feb 2014 21:28:50 +0100 Message-ID: Subject: Re: [PATCH 00/13] cross rename v4 From: Miklos Szeredi To: Linus Torvalds Cc: David Howells , Al Viro , Linux-Fsdevel , Kernel Mailing List , Bruce Fields , Christoph Hellwig , Andrew Morton , Zach Brown , Jan Kara , Andy Lutomirski , "mszeredi@suse.cz" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 13, 2014 at 8:32 PM, Linus Torvalds wrote: > On Thu, Feb 13, 2014 at 11:02 AM, David Howells wrote: >> >> Whilst that does seem reasonable, what about all the other software that >> iterates over a directory? Some of that is surely not going to know about >> DT_WHT. > > So? > > Remeber: whiteout entries do not exist "normally". No normal apps > should care or see them, since the whole and only point of them is > when they are part of a union mount (in which case they are not > visible). > > So the "how do you see whiteouts" is really only about the raw > filesystem mount when *not* in the normal place. > > IOW, it's not like these guys are going to show up in users home > directories etc. It's more like a special device node than a file - we > need to care about some basic system management interfaces, not about > "random apps". So "coreutils" is the primary user, although I guess a > few IT people would prefer for things like Nautilus etc random file > managers to be able to show them nicely too. But if they show up as an > icon with a question mark on them or whatever, that's really not a big > deal either. > > Sure, maybe they'll look odd in some graphical file chooser *if* > somebody makes them show up, but I think creation of a whiteout - if > we allow it at all outside of the union mount itself - should be a > root-only thing (the same way mknod is) so quite frankly, it falls > under "filesystem corruption makes my directory listings look odd - > cry me a river". > > (I do think we should allow creation - but for root only - for > management and testing purposes, but I really think it's a secondary > issue, and I do think we should literally use "mknod()" - either with > a new S_IFWHT or even just making use of existing S_IFCHR just so you > could use the user-space "mknod" to create it with some magic > major/minor combination. And IMO the magic S_IFCHR is a lot better in many respects than a new filetype, since now all backup tools automatically work. And I think that's a lot more important than looking like a nice new design. Sure, if S_IFWHT was there from the start, it would be wonderful. But as it stands, it's a lot more difficult to add support for such a thing to userspace than adding a hack, using the existing intefaces, to the kernel. Thanks, Miklos > > Linus -- 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/