From: Al Viro <viro@ZenIV.linux.org.uk>
To: Christoph Hellwig <hch@lst.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH] vfs: move ACL cache lookup into generic code
Date: Sat, 23 Jul 2011 18:02:16 +0100 [thread overview]
Message-ID: <20110723170216.GI24703@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20110723153200.GF24703@ZenIV.linux.org.uk>
On Sat, Jul 23, 2011 at 04:32:00PM +0100, Al Viro wrote:
> On Sat, Jul 23, 2011 at 04:50:37PM +0200, Christoph Hellwig wrote:
> > On Sat, Jul 23, 2011 at 08:47:22AM +0100, Al Viro wrote:
> > > Anyway, that'll have to wait for tomorrow; I'm going down right now. This
> > > stuff (plus Tim's "mount lock scalability for internal mounts" patch) is
> > > in #untested in usual place. Comments/testing/etc. are welcome...
> >
> > Can't be just pass &inode->i_mode to posix_acl_create for those filesystems
> > that simply write directly into i_mode, instead of keeping it in a local
> > variable?
>
> umode_t vs. mode_t...
We have some really stunning misuses of mode_t, BTW:
static mode_t
find_smbios_instance_string(struct pci_dev *pdev, char *buf,
enum smbios_attr_enum attribute)
{
...
return scnprintf(buf, PAGE_SIZE,
"%d\n",
...
return scnprintf(buf, PAGE_SIZE,
"%s\n",
dmi->name);
...
return strlen(dmi->name);
...
return 0;
}
i.e. that one is misspelled size_t (drivers/pci/pci-label.c). I don't
like how mode_t and umode_t are mixed up as well...
Why is the latter per-architecture, BTW? It's unsigned short everywhere
and we'd already got some clowns exposing it in userland ABI (see
include/trace/events/ext4.h). Is there any good reason for separate
mode_t and umode_t kernel-side? We use mode_t in some syscall declarations
(not all, BTW - mknod() uses unsigned int), but inside the kernel we
almost immediately lose upper bits on conversions anyway...
And things like ->mkdir() are declare as passing int, treat it as mode_t and
end up storing it in umode_t... I haven't found any obvious places where
that kind of stuff could cause problems, but that was just a casual look.
umode_t is *old* - it's been introduced in 0.95, back when a bunch of
->i_... got typedefed types. I never looked into its history and that's
way before my time...
next prev parent reply other threads:[~2011-07-23 17:02 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-22 17:37 VFS pathname walking cleanups (i_op and ACL access) Linus Torvalds
2011-07-22 17:37 ` [PATCH 1/2] VFS: Cut down inode->i_op->xyz accesses in path walking Linus Torvalds
2011-07-22 17:47 ` Christoph Hellwig
2011-07-22 23:40 ` Al Viro
2011-07-22 23:54 ` Linus Torvalds
2011-07-23 3:55 ` [PATCH] " Linus Torvalds
2011-07-23 13:35 ` Christoph Hellwig
2011-07-23 14:46 ` Al Viro
2011-07-23 14:51 ` Christoph Hellwig
2011-07-23 15:45 ` Linus Torvalds
[not found] ` <alpine.LFD.2.02.1107251852220.13796@i5.linux-foundation.org>
2011-07-26 3:05 ` Al Viro
2011-07-26 3:23 ` Linus Torvalds
2011-07-26 18:41 ` Al Viro
2011-07-26 18:45 ` Linus Torvalds
2011-08-07 6:06 ` Linus Torvalds
2011-08-07 6:51 ` Al Viro
2011-08-07 23:43 ` Linus Torvalds
2011-07-22 17:40 ` VFS pathname walking cleanups (i_op and ACL access) Christoph Hellwig
2011-07-22 17:45 ` [PATCH 2/2] vfs: move ACL cache lookup into generic code Linus Torvalds
2011-07-22 17:50 ` Christoph Hellwig
2011-07-22 17:54 ` Linus Torvalds
2011-07-23 2:34 ` [PATCH] " Linus Torvalds
2011-07-23 3:29 ` Al Viro
2011-07-23 3:42 ` Linus Torvalds
2011-07-23 4:31 ` Al Viro
2011-07-23 6:06 ` Al Viro
2011-07-25 8:15 ` Aneesh Kumar K.V
2011-07-25 8:16 ` Aneesh Kumar K.V
2011-07-23 7:47 ` Al Viro
2011-07-23 14:50 ` Christoph Hellwig
2011-07-23 15:32 ` Al Viro
2011-07-23 17:02 ` Al Viro [this message]
2011-07-23 17:31 ` Linus Torvalds
2011-07-23 18:20 ` Al Viro
2011-07-23 18:29 ` Linus Torvalds
2011-07-23 21:53 ` Al Viro
2011-07-23 22:38 ` Al Viro
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=20110723170216.GI24703@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=hch@lst.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).