From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:52126 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726264AbeHXSBl (ORCPT ); Fri, 24 Aug 2018 14:01:41 -0400 From: David Howells In-Reply-To: <20180824141810.GA20975@veci.piliscsaba.redhat.com> References: <20180824141810.GA20975@veci.piliscsaba.redhat.com> <20180823223145.GK6515@ZenIV.linux.org.uk> <24340.1535069316@warthog.procyon.org.uk> <20180824003105.GL6515@ZenIV.linux.org.uk> <184842E4-9368-463D-9131-D9A5F686C319@amacapital.net> <20180824031311.GM6515@ZenIV.linux.org.uk> <20180824060532.GG16817@thunk.org> <362.1535103931@warthog.procyon.org.uk> To: Miklos Szeredi Cc: dhowells@redhat.com, "Theodore Y. Ts'o" , Andy Lutomirski , Al Viro , Linus Torvalds , Linux FS Devel , Linux API Subject: Re: [git pull] new mount API MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <9316.1535120804.1@warthog.procyon.org.uk> Date: Fri, 24 Aug 2018 15:26:44 +0100 Message-ID: <9317.1535120804@warthog.procyon.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Miklos Szeredi 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