Bug 1242385 - [ACL]: Fuse mount with option acl is successful but is not shown in mount output
Summary: [ACL]: Fuse mount with option acl is successful but is not shown in mount output
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: fuse
Version: rhgs-3.1
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: ---
Assignee: Ravishankar N
QA Contact: storage-qa-internal@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-13 08:59 UTC by Rahul Hinduja
Modified: 2019-12-16 04:48 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-30 13:03:08 UTC
Embargoed:


Attachments (Terms of Use)

Description Rahul Hinduja 2015-07-13 08:59:28 UTC
Description of problem:
=======================

ACL specifies the access rights allowed, denied. Mounting the volume with glusterfs option acl is successful, but when a user issues a mount command it is not shown in the output. If it is not shown in the mount options, not sure how the user will be educated to use this feature of acls at all for fuse mount. 

Mounting volume with NFS options acl is listed correctly in the mount output as:

[root@wingo scripts]# mkdir /mnt/slave /mnt/slave_nfs
[root@wingo scripts]# mount -t glusterfs -o acl 10.70.46.101:/slave /mnt/slave
[root@wingo scripts]#
[root@wingo scripts]# mount -t nfs -o acl,vers=3 10.70.46.101:/slave /mnt/slave_nfs 
[root@wingo scripts]# 

[root@wingo slave]# mount | grep slave
10.70.46.101:/slave on /mnt/slave type fuse.glusterfs (rw,allow_other,max_read=131072)
10.70.46.101:/slave on /mnt/slave_nfs type nfs (rw,acl,vers=3,addr=10.70.46.101)
[root@wingo slave]# 




Version-Release number of selected component (if applicable):
=============================================================

glusterfs-3.7.1-7.el6rhs.x86_64


How reproducible:
=================

Always


Steps to Reproduce:
===================
1. Mount the volume (FUSE and NFS) wit options -o acl
2. Issue mount command

Comment 3 Nithya Balachandran 2016-06-08 05:15:21 UTC
Assigning this to Ravi as this is a Fuse issue.

Comment 9 Niels de Vos 2016-06-20 12:20:59 UTC
ACLs are not enabled by default in the GlusterFS FUSE client. Mounting with "-o acl" adds the required option to the command line for the glusterfs executable that does the mount.

I suspect that there is an issue with the show_options() function pointer in the "struct super_operations fuse_super_operations" of fs/fuse/inode.c, or maybe in the function that calls it. The "acl" option is a standard one, so it would be handled in the upper layer. I think the "acl" option is the default for many filesystems, and defaults are not displayed in the /proc/mounts option.

Userspace processes can not communicate with the kernel part and pass mount options that need to be shown in the /proc/mounts file. Some fuse/userspace specific option will be missing.

We could check if mounting with "-o noacl" gets added to /proc/mounts. If that is the case, we can add that as a default option to the /sbin/mount.glusterfs shell script.

Comment 10 Ravishankar N 2016-06-20 15:54:18 UTC
(In reply to Niels de Vos from comment #9)
> ACLs are not enabled by default in the GlusterFS FUSE client. Mounting with
> "-o acl" adds the required option to the command line for the glusterfs
> executable that does the mount.

Yes, of course.

> 
> I suspect that there is an issue with the show_options() function pointer in
> the "struct super_operations fuse_super_operations" of fs/fuse/inode.c, or
> maybe in the function that calls it. The "acl" option is a standard one, so
> it would be handled in the upper layer. I think the "acl" option is the
> default for many filesystems, and defaults are not displayed in the
> /proc/mounts option.

No, the acl option by itself is not standard (Please see comment #7). It has to be present in the match_table_t tokens (fs/fuse/inode.c for fuse) array defined in each file system. What is standard though is the MS_POSIXACL flag (include/uapi/linux/fs.h) which *could* be passed as a valid argument to mount (2) (in spite of it not described as a valid flag in the man page.) 

The filesystems that do support an acl mount option (say ext4) use it to set/reset this flag in the superblock structure.

Others like XFS use compile time config options to set/reset the flag. 

For FUSE, it seems to be unconditionally enabled and hence my argument in the last couple of lines in comment #7. Also see https://sourceforge.net/p/fuse/mailman/message/30733588/


Note You need to log in before you can comment on or make changes to this bug.