On Sat, Jul 23, 2011 at 10:02 AM, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote: > > I don't like how mode_t and umode_t are mixed up as well... > > Why is the latter per-architecture, BTW? I think it's some crazy legacy reason, due to simply the differences between what shows up in 'struct stat' and what we've saved. It probably made sense at the time it was introduced. It's now an unholy mess, probably partly because the "obvious name" (mode_t) doesn't match the obvious size (traditional 16-bit mode, which is umode_t). It would be nice if we (a) got rid of umode_t entirely (b) changed 'mode_t' to the 16-bit traditional unix mode (c) made the users who now use 'mode_t' use the actual size they want, since if they actually depend on the higher bits, it shouldn't be called mode_t. but we'll never do it, because it's such a pain. So practically speaking, we'd probably be better off just getting rid of 'umode_t' and replacing all users with u16. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html