Re: [PATCH 2/2] add f_flags to struct statfs(64)

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

 



On 2010-06-26, at 03:35, Christoph Hellwig wrote:
> We copy the flag values from glibc, and add a new ST_VALID flag to
> denote that f_flags is implemented.

Adding ST_VALID is only of marginal use, IMHO.  If we are worried about this field being filled with garbage, then a single bit still has a 50% chance of being set.

When there was a transition to binary flags in the mount(2) API, we had a full 16-bit magic value (0xC0ED0000, IIRC) in the high bits to verify the validity of the low 16-bit flags.  Then, a couple years later, when all of the tools and kernels were handling the binary flags properly the 16-bit magic was removed and we could use the full 32-bit value.

I would advocate at least an 8-bit magic value, if there is a concern about this field not always being 0-filled on older kernels, or not using any ST_VALID flag at all, if it was always zero-filled in the past.

Cheers, Andreas





--
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


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux