From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:13657 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728184AbeIUU5P (ORCPT ); Fri, 21 Sep 2018 16:57:15 -0400 From: David Howells In-Reply-To: <20180920151214.15484-6-mszeredi@redhat.com> References: <20180920151214.15484-6-mszeredi@redhat.com> <20180920151214.15484-1-mszeredi@redhat.com> To: Miklos Szeredi Cc: dhowells@redhat.com, Al Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 5/6] fsmount: do not use legacy MS_ flags MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <17156.1537542475.1@warthog.procyon.org.uk> Date: Fri, 21 Sep 2018 16:07:55 +0100 Message-ID: <17157.1537542475@warthog.procyon.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Miklos Szeredi wrote: > What happens if we introduce new flags for fsmount(2) and are already out > of flags for mount(2)? I see a big mess that way. > > So let's instead start a clean new set, to be used in the new API. If we must. But let's not call them just M_* please. Let's call them MOUNT_ATTR_* or something. > The MS_RELATIME flag was accepted but ignored. Simply leave this out of > the new set, since "relatime" is the default. Can we make RELATIME, STRICTATIME and NOATIME an enum rather than individual flags? #define MOUNT_ATTR_RDONLY 0x01 #define MOUNT_ATTR_NOSUID 0x02 #define MOUNT_ATTR_NODEV 0x04 #define MOUNT_ATTR_NOEXEC 0x08 #define MOUNT_ATTR_RELATIME 0x00 #define MOUNT_ATTR_NOATIME 0x10 #define MOUNT_ATTR_STRICTATIME 0x20 #define MOUNT_ATTR_ATIME_MASK 0x30 #define MOUNT_ATTR_NODIRATIME 0x40 We can also use these for a mount_setattr() syscall: mount_setattr(int dfd, const char *path, unsigned int atflags, unsigned int attr_values, unsigned int attr_mask); where atflags can potentially include AT_RECURSIVE. David