From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Whitehouse Date: Tue, 27 Oct 2015 11:18:15 +0000 Subject: [Cluster-devel] [GFS2 PATCH] gfs2: allow userspace to set GFS2_DIF_SYSTEM using FS_RESERVED_FL In-Reply-To: <1445638867-30814-1-git-send-email-adas@redhat.com> References: <1445638867-30814-1-git-send-email-adas@redhat.com> Message-ID: <562F5D77.8080402@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, I'm not sure that is a good idea, since it is possible that someone else might find a use for that flag. Can we not simply set the GFS2_DIF_SYSTEM flag on any inode that is created via the metafs? That would resolve the issue without having to have a new interface I think, Steve. On 23/10/15 23:21, Abhi Das wrote: > Repurpose the existing VFS FS_RESERVED_FL flag to set GFS2_DIF_SYSTEM > using the FS_IOC_SETFLAGS ioctl. > > Resolves: rhbz#1272086 > Signed-off-by: Abhi Das > --- > fs/gfs2/file.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c > index 71cd138..ead0d0a 100644 > --- a/fs/gfs2/file.c > +++ b/fs/gfs2/file.c > @@ -137,6 +137,7 @@ static const u32 fsflags_to_gfs2[32] = { > [12] = GFS2_DIF_EXHASH, > [14] = GFS2_DIF_INHERIT_JDATA, > [17] = GFS2_DIF_TOPDIR, > + [31] = GFS2_DIF_SYSTEM, > }; > > static const u32 gfs2_to_fsflags[32] = { > @@ -147,6 +148,7 @@ static const u32 gfs2_to_fsflags[32] = { > [gfs2fl_ExHash] = FS_INDEX_FL, > [gfs2fl_TopLevel] = FS_TOPDIR_FL, > [gfs2fl_InheritJdata] = FS_JOURNAL_DATA_FL, > + [gfs2fl_System] = FS_RESERVED_FL, > }; > > static int gfs2_get_flags(struct file *filp, u32 __user *ptr)