From: ebiederm@xmission.com (Eric W. Biederman)
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: David Howells <dhowells@redhat.com>,
Miklos Szeredi <miklos@szeredi.hu>,
Al Viro <viro@zeniv.linux.org.uk>,
Linux-Fsdevel <linux-fsdevel@vger.kernel.org>,
Kernel Mailing List <linux-kernel@vger.kernel.org>,
Bruce Fields <bfields@fieldses.org>,
Christoph Hellwig <hch@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
Zach Brown <zab@redhat.com>, Jan Kara <jack@suse.cz>,
Andy Lutomirski <luto@amacapital.net>,
"mszeredi\@suse.cz" <mszeredi@suse.cz>
Subject: Re: [PATCH 00/13] cross rename v4
Date: Thu, 13 Feb 2014 12:17:37 -0800 [thread overview]
Message-ID: <87r47622e6.fsf@xmission.com> (raw)
In-Reply-To: <CA+55aFyT9_XSFQwv82Qwv5US7QMOvW8RhbsxOa8B2mm3MChWLA@mail.gmail.com> (Linus Torvalds's message of "Thu, 13 Feb 2014 11:32:31 -0800")
Linus Torvalds <torvalds@linux-foundation.org> writes:
> On Thu, Feb 13, 2014 at 11:02 AM, David Howells <dhowells@redhat.com> 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.
I see two interesting questions.
- How do I backup and restore my top layer of my union mount/filesystem?
- How do I use union mounts without in a container?
Backup and restore argues that mknod be able to create these things, and
unlink be able to remove them. rename shrug.
I expect whiteouts on a filesystem will all belong to some inode with
i_nlink == 0, and likely is not even represented on disk.
Using union mounts in a container effectively boils down to letting
non-root users create these things, so unless applications handle these
very badly I don't know why we should restrict their creation to
root. Quotas restrict the size of directories and the number of inodes
you can have, and the number of directory blocks you can have, which
handles everything except applications that misbehave in the face of the
unknown.
Eric
next prev parent reply other threads:[~2014-02-13 20:17 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-07 16:48 [PATCH 00/13] cross rename v4 Miklos Szeredi
2014-02-07 16:48 ` [PATCH 01/13] vfs: add d_is_dir() Miklos Szeredi
2014-02-07 17:36 ` J. Bruce Fields
2014-02-07 19:30 ` David Howells
2014-02-07 16:49 ` [PATCH 02/13] vfs: rename: move d_move() up Miklos Szeredi
2014-02-07 16:49 ` [PATCH 03/13] vfs: rename: use common code for dir and non-dir Miklos Szeredi
2014-02-07 16:49 ` [PATCH 04/13] vfs: add renameat2 syscall Miklos Szeredi
2014-02-07 16:49 ` [PATCH 05/13] vfs: add RENAME_NOREPLACE flag Miklos Szeredi
2014-02-07 16:49 ` [PATCH 06/13] security: add flags to rename hooks Miklos Szeredi
2014-02-07 16:49 ` [PATCH 07/13] vfs: lock_two_nondirectories: allow directory args Miklos Szeredi
2014-02-07 21:16 ` J. Bruce Fields
2014-02-11 15:32 ` Miklos Szeredi
2014-02-07 16:49 ` [PATCH 08/13] vfs: add cross-rename Miklos Szeredi
2014-02-07 22:40 ` J. Bruce Fields
2014-02-11 15:55 ` Miklos Szeredi
2014-02-07 16:49 ` [PATCH 09/13] ext4: rename: create ext4_renament structure for local vars Miklos Szeredi
2014-02-07 16:49 ` [PATCH 10/13] ext4: rename: move EMLINK check up Miklos Szeredi
2014-02-07 16:49 ` [PATCH 11/13] ext4: rename: split out helper functions Miklos Szeredi
2014-02-07 16:49 ` [PATCH 12/13] ext4: add cross rename support Miklos Szeredi
2014-02-11 21:23 ` Jan Kara
2014-02-07 16:49 ` [PATCH 13/13] vfs: merge rename2 into rename Miklos Szeredi
2014-02-07 22:46 ` [PATCH 00/13] cross rename v4 J. Bruce Fields
2014-02-11 15:57 ` Miklos Szeredi
2014-02-13 19:32 ` J. Bruce Fields
2014-02-10 10:51 ` Dave Chinner
2014-02-11 16:01 ` Miklos Szeredi
2014-02-12 17:18 ` Miklos Szeredi
2014-02-17 8:19 ` Dave Chinner
2014-02-17 18:04 ` Theodore Ts'o
2014-03-19 13:57 ` xfstest for renameat2 system call (was: [PATCH 00/13] cross rename v4) Miklos Szeredi
2014-04-08 1:23 ` Dave Chinner
2014-02-13 15:54 ` [PATCH 00/13] cross rename v4 David Howells
2014-02-13 16:25 ` Miklos Szeredi
2014-02-13 16:42 ` David Howells
2014-02-13 17:28 ` Miklos Szeredi
2014-02-13 18:21 ` Andy Lutomirski
2014-02-13 18:29 ` Linus Torvalds
2014-02-13 18:56 ` Miklos Szeredi
2014-02-13 19:20 ` Linus Torvalds
2014-02-13 19:02 ` David Howells
2014-02-13 19:32 ` Linus Torvalds
2014-02-13 20:17 ` Eric W. Biederman [this message]
2014-02-13 20:28 ` Miklos Szeredi
2014-02-24 17:12 ` Miklos Szeredi
2014-02-24 17:49 ` Linus Torvalds
2014-02-25 4:07 ` J. R. Okajima
2014-02-26 15:15 ` Jan Kara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r47622e6.fsf@xmission.com \
--to=ebiederm@xmission.com \
--cc=akpm@linux-foundation.org \
--cc=bfields@fieldses.org \
--cc=dhowells@redhat.com \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=miklos@szeredi.hu \
--cc=mszeredi@suse.cz \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
--cc=zab@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.