[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: stampede hd0*

From: Roland McGrath
Subject: Re: stampede hd0*
Date: Thu, 3 Jan 2002 20:49:45 -0500 (EST)

> Ah, but I know what they are intended to be!  :)

Fortunately you have yet to be hit by that bus, or even move to Japan.
Nonetheless, improving the comments to clarify these things would be nice.

> file-chmod.c already takes steps to preserve IFMT and ISPARE, while
> preventing the user from modifying them, with the line:
>     mode |= (np->dn_stat.st_mode & (S_IFMT | S_ISPARE));
> A better patch than yours, IMO, is to a S_ITRANS to that, so that it
> parallels the first line of the function exactly.

That was the obvious change and the reason I did different was so as not to
affect either way the bit's presence in the argument to
diskfs_validate_mode_change.  It makes no difference to the only existing
implementation of that function (ext2fs), but I was being gratuitously
conservative.  I've checked in the change you suggested.

I am concerned about the handling of S_ITRANS bits in other places.  I have
not checked thoroughly, but I suspect more inconsistencies.
e.g. diskfs_create_node calls do not mask out the S_ITRANS bits and so they
can wind up in dn_stat.st_mode when diskfs_read_node was never called.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]