Re: [git pull] new mount API

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

 



Miklos Szeredi <miklos@xxxxxxxxxx> wrote:

> +/* Mount flags passed to fsmount(2) */
> +#define M_NOSUID	0x01
> +#define M_NODEV		0x02
> +#define M_NOEXEC	0x04
> +#define M_NOATIME	0x08
> +#define M_NODIRATIME	0x10
> +#define M_STRICTATIME	0x20
> +#define M_RDONLY	0x40

If we're going to do this, I would suggest a longer prefix than just 'M' and
renumber them to put *_RDONLY first.

> +	BUILD_BUG_ON(M_NOSUID != MNT_NOSUID || M_NODEV != MNT_NODEV ||
> +		     M_NOEXEC != MNT_NOEXEC || M_NOATIME != MNT_NOATIME ||
> +		     M_NODIRATIME != MNT_NODIRATIME ||
> +		     M_STRICTATIME != MNT_RELATIME || M_RDONLY != MNT_READONLY);

Please don't, please do:

	if (ms_flags & M_RDONLY)
		mnt_flags |= MNT_READONLY;

Yes, and at some point I'd also like to compress the numbering on the SB_*
constants and break the identity as Christoph suggested.

David



[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