Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1480370

Re: [GIT PULL] overlayfs fix for 4.8-rc5

From Linus Torvalds <torvalds@linux-foundation.org>
Newsgroups linux.kernel
Subject Re: [GIT PULL] overlayfs fix for 4.8-rc5
Date 2016-09-09 23:50 +0200
Message-ID <sfBQl-8gK-7@gated-at.bofh.it> (permalink)
References <sfzOy-71n-19@gated-at.bofh.it> <sfA7U-77R-23@gated-at.bofh.it> <sfAhA-7rj-25@gated-at.bofh.it> <sfAKB-7F8-9@gated-at.bofh.it> <sfBnj-87x-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Sep 9, 2016 at 2:18 PM, Miklos Szeredi <miklos@szeredi.hu> wrote:
>
> Okay, so how do we do this correctly?  The desired end result is
> clear:  FOOBAR xattr doesn't exist on the directory.  This "doesn't
> exist" is a negative result, so the only way to check it is to check
> for errors.  Either with removexattr() or getxattr() this will get us
> into the same trap: that there are multiple errors that have this
> meaning.
>
> Same thing with ENOENT: checking for non-existence can be difficult,
> because ENAMETOOLONG is actually a special form of ENOENT.

Yeah, ENOENT, ENAMETOOLONG, ERANGE, EINVAL can all be different
versions of "this doesn't exist" - perhaps because such a name
*cannot* exist on the filesystem.

> I just don't see the "right" soltion here, and while I agree that the
> current one is ugly, it should actually work. We won't get ERANGE,
> because the posix acl xattrs have short names that'll fit in all
> filesystems and 9p isn't even a valid fs for the upper layer of an
> overlay.

So maybe the right thing to do is to just document it, and have a
comment that shows that the code at least knows about these things and
that it doesn't matter in practice.

The "just check for two errors without any comments about why those
particular two errors are different from all the *other* errors" is
what I really objected to.

            Linus

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[GIT PULL] overlayfs fix for 4.8-rc5 Miklos Szeredi <miklos@szeredi.hu> - 2016-09-09 21:40 +0200
  Re: [GIT PULL] overlayfs fix for 4.8-rc5 Linus Torvalds <torvalds@linux-foundation.org> - 2016-09-09 22:00 +0200
    Re: [GIT PULL] overlayfs fix for 4.8-rc5 Miklos Szeredi <miklos@szeredi.hu> - 2016-09-09 22:10 +0200
      Re: [GIT PULL] overlayfs fix for 4.8-rc5 Linus Torvalds <torvalds@linux-foundation.org> - 2016-09-09 22:40 +0200
        Re: [GIT PULL] overlayfs fix for 4.8-rc5 Miklos Szeredi <miklos@szeredi.hu> - 2016-09-09 23:20 +0200
          Re: [GIT PULL] overlayfs fix for 4.8-rc5 Linus Torvalds <torvalds@linux-foundation.org> - 2016-09-09 23:50 +0200

csiph-web