Re: [PATCH] fs: ufs: Remove switch statement from ufs_set_de_type function

From: Phillip Potter
Date: Thu Oct 18 2018 - 06:19:55 EST


On Thu, Oct 18, 2018 at 12:33:05AM +0100, Al Viro wrote:
> They are. BSD folks had (sanely, IMO) put the 'type' bits of st_mode
> into directory entry verbatim. Again, "symbolic constant" != "can be
> expected to change"... If, e.g., some port decides to change S_IFIFO,
> they'll have no end of fun accessing ext*, xfs, ufs, etc. since that
> value is stored in the on-disk inode and in effect pinned down by
> that.
>
> All S_... constants are universal and going to remain unchanged on
> any Unices.

Dear Al,

Shall I resubmit without the compile-time checks in the latest patch then?

Regards,
Phil