Mount option trap for users
RFC PATCH 1/1 Mount option trap for users
Hello,
OCFS2 mount option 'acl' is a small trap for users. When xattr feature
is not enabled and 'acl' mount option is specified, it is just silently cleared during mount. IMHO that's not a good behavior - when admin requests ACLs and we are not able to provide them, we should just fail the mount. The trap is even more dangerous because the mount command is not aware that we've cleared the 'acl' mount option and thus it records in /etc/mtab that the filesystem is mounted with 'acl' mount option. So the output of mount command looks as if ACLs were really in use. The only way to find out they are not is to look into /proc/mounts or to try to get/set some ACL.
Attached patch makes the mount fail if 'acl' mount option is specified
but xattr feature is disabled.
Honza
Signature · 9 lines
Jan Kara <[email protected]> SUSE Labs, CR -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-ocfs2-Fail-the-mount-when-acl-mount-option-is-spe.patch Type: text/x-patch Size: 2512 bytes Desc: not available Url : http://oss.oracle.com/pipermail/ocfs2-devel/attachments/20090914/bef0a2a5/attachment.bin
RFC PATCH 1/1 Mount option trap for users
Quoted 4 lines · Jan Kara
OCFS2 mount option 'acl' is a small trap for users. When xattr feature
is not enabled and 'acl' mount option is specified, it is just silently cleared during mount. IMHO that's not a good behavior - when admin requests ACLs and we are not able to provide them, we should just fail the mount.
See
http://www.mail-archive.com/ocfs2-devel at oss.oracle.com/msg03836.html for previous discussion.
Joel
Signature · 9 lines
Life's Little Instruction Book #450 "Don't be afraid to say, 'I need help.'" Joel Becker Principal Software Developer Oracle E-mail: joel.becker at oracle.com Phone: (650) 506-8127
RFC PATCH 1/1 Mount option trap for users
Quoted 9 lines · Joel Becker
Quoted 4 lines · Jan Kara
OCFS2 mount option 'acl' is a small trap for users. When xattr feature
is not enabled and 'acl' mount option is specified, it is just silently cleared during mount. IMHO that's not a good behavior - when admin requests ACLs and we are not able to provide them, we should just fail the mount.See
http://www.mail-archive.com/ocfs2-devel at oss.oracle.com/msg03836.html for previous discussion.
Thanks for the pointer. I didn't know about this discussion. Actually,
this is a bit different situation because you won't so easily disable the feature on the filesystem as opposed to just booting a kernel without ACL support.
Also filesystems like ext3/ext4/reiserfs just silently enable the XATTR
feature when you use is for the first time and the kernel supports it (for these filesystems XATTRs are implemented as COMPAT features). OCFS2 will fail the syscall (and it cannot really silently enable the feature because it is an INCOMPAT one) so that's a difference anyway... So I still think my change makes sence.
Honza
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR
RFC PATCH 1/1 Mount option trap for users
Quoted 10 lines · Jan Kara
Quoted 9 lines · Joel Becker
Quoted 4 lines · Jan Kara
OCFS2 mount option 'acl' is a small trap for users. When xattr feature
is not enabled and 'acl' mount option is specified, it is just silently cleared during mount. IMHO that's not a good behavior - when admin requests ACLs and we are not able to provide them, we should just fail the mount.See
http://www.mail-archive.com/ocfs2-devel at oss.oracle.com/msg03836.html for previous discussion.
Quoted 10 lines
Thanks for the pointer. I didn't know about this discussion. Actually,
this is a bit different situation because you won't so easily disable the feature on the filesystem as opposed to just booting a kernel without ACL support.
Also filesystems like ext3/ext4/reiserfs just silently enable the XATTR
feature when you use is for the first time and the kernel supports it (for these filesystems XATTRs are implemented as COMPAT features). OCFS2 will fail the syscall (and it cannot really silently enable the feature because it is an INCOMPAT one) so that's a difference anyway... So I still think my change makes sence.
Another thing to consider is which scenario is more likely - a user compiling their kernel without acl support (because really, all major distros have this turned on), or a user mounts an existing (nor newly created with the wrong mkfs options) ocfs2 file system with '-oacl' that doesn't have acl turned on in the feature flags.
Regarding other file systems, I really wish we could do it their way, but as Jan points out we can't magically enable acls like they can and we definitely can't assume they're always on. So really, today's behavior is *NOT* like those file systems in the first place - instead of magically enabling the feature, we silently ignore the acl flag.
--Mark
--
Mark Fasheh
RFC PATCH 1/1 Mount option trap for users
Quoted 28 lines · Mark Fasheh
Quoted 10 lines · Jan Kara
Quoted 9 lines · Joel Becker
Quoted 4 lines · Jan Kara
OCFS2 mount option 'acl' is a small trap for users. When xattr feature
is not enabled and 'acl' mount option is specified, it is just silently cleared during mount. IMHO that's not a good behavior - when admin requests ACLs and we are not able to provide them, we should just fail the mount.See
http://www.mail-archive.com/ocfs2-devel at oss.oracle.com/msg03836.html for previous discussion.Quoted 10 lines
Thanks for the pointer. I didn't know about this discussion. Actually,
this is a bit different situation because you won't so easily disable the feature on the filesystem as opposed to just booting a kernel without ACL support.
Also filesystems like ext3/ext4/reiserfs just silently enable the XATTR
feature when you use is for the first time and the kernel supports it (for these filesystems XATTRs are implemented as COMPAT features). OCFS2 will fail the syscall (and it cannot really silently enable the feature because it is an INCOMPAT one) so that's a difference anyway... So I still think my change makes sence.Another thing to consider is which scenario is more likely - a user compiling their kernel without acl support (because really, all major distros have this turned on), or a user mounts an existing (nor newly created with the wrong mkfs options) ocfs2 file system with '-oacl' that doesn't have acl turned on in the feature flags.
Quoted 5 lines
Regarding other file systems, I really wish we could do it their way, but as Jan points out we can't magically enable acls like they can and we definitely can't assume they're always on. So really, today's behavior is *NOT* like those file systems in the first place - instead of magically enabling the feature, we silently ignore the acl flag.
Joel, so what is your final decision? I still think we should fail the
mount when acl mount option is specified but xattr feature is disabled...
Should I resend the patch?
Honza
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR
RFC PATCH 1/1 Mount option trap for users
Quoted 4 lines · Jan Kara
Quoted 3 lines · Mark Fasheh
Quoted 2 lines · Jan Kara
Quoted 1 line · Joel Becker
On Mon, Sep 14, 2009 at 04:56:22PM +0200, Jan Kara wrote:
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
OCFS2 mount option 'acl' is a small trap for users. When xattr feature
is not enabled and 'acl' mount option is specified, it is just silently cleared during mount. IMHO that's not a good behavior - when admin requests ACLs and we are not able to provide them, we should just fail the mount.See
http://www.mail-archive.com/ocfs2-devel at oss.oracle.com/msg03836.html for previous discussion.
Checked the discussion again. What really struck me was:
Chris and Cristoph pointed out that btrfs and xfs always
assume '-o acl,user_xattr' if the feature is compiled in. They are always on. btrfs only disables acls with '-o noacl'. Might be worth considering.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Also filesystems like ext3/ext4/reiserfs just silently enable the XATTR
feature when you use is for the first time and the kernel supports it (for these filesystems XATTRs are implemented as COMPAT features). OCFS2 will fail the syscall (and it cannot really silently enable the feature because it is an INCOMPAT one) so that's a difference anyway... So I still think my change makes sence.
Sure, you can't enable INCOMPAT features. But you can use them
if they are already enabled. Why can't we just use acls when the driver supports them and the filesystem has xattrs already?
Quoted 5 lines
Quoted 5 lines
Another thing to consider is which scenario is more likely - a user compiling their kernel without acl support (because really, all major distros have this turned on), or a user mounts an existing (nor newly created with the wrong mkfs options) ocfs2 file system with '-oacl' that doesn't have acl turned on in the feature flags.
The big boundary for the naive user is probably 1.6. It has
xattrs and 1.4 does not. SLES has it easier, because the boundary is sles10->sles11. EL5 will have both 1.4 and 1.6. But that's OK in either fashion, probably, because if you want to go back to 1.4 you have to turn off xattrs. So why not assume that if you have xattrs, you can just turn on acls?
Quoted 5 lines
Quoted 5 lines
Regarding other file systems, I really wish we could do it their way, but as Jan points out we can't magically enable acls like they can and we definitely can't assume they're always on. So really, today's behavior is *NOT* like those file systems in the first place - instead of magically enabling the feature, we silently ignore the acl flag.
Actually, I just realized where we really differ from the other
filesystems. We're clustered, but CONFIG_OCFS2_POSIX_ACL isn't a feature flag. We can, in theory, have two nodes. Both have xattrs enabled, but only one has acls compiled into the kernel. Now we're fucked.
As far as I can tell, there is no way for the non-acl driver to
notice that other nodes are using acls and reject the mount. Thoughts?
Joel
Signature · 8 lines
"Anything that is too stupid to be spoken is sung."
- Voltaire
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127RFC PATCH 1/1 Mount option trap for users
Quoted 28 lines · Joel Becker
Quoted 4 lines · Jan Kara
Quoted 3 lines · Mark Fasheh
Quoted 2 lines · Jan Kara
Quoted 1 line · Joel Becker
On Mon, Sep 14, 2009 at 04:56:22PM +0200, Jan Kara wrote:
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
OCFS2 mount option 'acl' is a small trap for users. When xattr feature
is not enabled and 'acl' mount option is specified, it is just silently cleared during mount. IMHO that's not a good behavior - when admin requests ACLs and we are not able to provide them, we should just fail the mount.See
http://www.mail-archive.com/ocfs2-devel at oss.oracle.com/msg03836.html for previous discussion.Checked the discussion again. What really struck me was:
Chris and Cristoph pointed out that btrfs and xfs always
assume '-o acl,user_xattr' if the feature is compiled in. They are always on. btrfs only disables acls with '-o noacl'. Might be worth considering.Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Also filesystems like ext3/ext4/reiserfs just silently enable the XATTR
feature when you use is for the first time and the kernel supports it (for these filesystems XATTRs are implemented as COMPAT features). OCFS2 will fail the syscall (and it cannot really silently enable the feature because it is an INCOMPAT one) so that's a difference anyway... So I still think my change makes sence.
Quoted 3 lines
Sure, you can't enable INCOMPAT features. But you can use them
if they are already enabled. Why can't we just use acls when the driver supports them and the filesystem has xattrs already?
We can but that's a bit separate issue. What I'm advocating is:
When user explicitely asks for acls via a mount option and the filesystem does not have the feature enabled, just fail the mount instead of ignoring the 'acl' mount option.
Behavior that makes most sence to me is - when user does not specify any
particular mount option, use acls iff the filesystem has the feature enabled.
When user specifies 'acl' mount option, fail the mount if the filesystem
does not have the feature enabled or kernel is not able to support acls, otherwise mount the filesystem with acls.
When user specifies 'noacl', don't use acls (but see below).
Quoted 6 lines
Quoted 5 lines
Quoted 5 lines
Regarding other file systems, I really wish we could do it their way, but as Jan points out we can't magically enable acls like they can and we definitely can't assume they're always on. So really, today's behavior is *NOT* like those file systems in the first place - instead of magically enabling the feature, we silently ignore the acl flag.
Quoted 7 lines
Actually, I just realized where we really differ from the other
filesystems. We're clustered, butCONFIG_OCFS2_POSIX_ACLisn't a feature flag. We can, in theory, have two nodes. Both have xattrs enabled, but only one has acls compiled into the kernel. Now we're fucked.
As far as I can tell, there is no way for the non-acl driver to
notice that other nodes are using acls and reject the mount. Thoughts?
Hmm, this is nasty. I see two possible solutions:
a) Use acls iff xattr feature is enabled (i.e., mount options do not influence whether acls are used or not), don't let kernel without CONFIG_OCFS2_POSIX_ACL mount the filesystem with xattr feature enabled. That should guarantee consistency among nodes but it can be inconvenient at times (you'd have to disable xattrs via tunefs.ocfs2 to temporarily disable acls and thus you'd loose all acl settings).
b) Introduce superblock bit 'mounted_with_acls'. The first node in the cluster either sets this bit or leaves it zero. Other nodes then refuse to mount the filesystem inconsistently with the bit setting (so if the bit is set, nodes without CONFIG_OCFS2_POSIX_ACL cannot mount the fs).
Honza
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR
RFC PATCH 1/1 Mount option trap for users
Quoted 4 lines · Jan Kara
We can but that's a bit separate issue. What I'm advocating is:
When user explicitely asks for acls via a mount option and the filesystem does not have the feature enabled, just fail the mount instead of ignoring the 'acl' mount option.
I understand the origin of your patch. I just think we need to
consider the overall behavior so we can have a consistent story. Don't worry, it probably involves rejecting -oacl when we can't support it.
Quoted 10 lines
Quoted 2 lines
As far as I can tell, there is no way for the non-acl driver to
notice that other nodes are using acls and reject the mount. Thoughts?Hmm, this is nasty. I see two possible solutions:
a) Use acls iff xattr feature is enabled (i.e., mount options do not influence whether acls are used or not), don't let kernel withoutCONFIG_OCFS2_POSIX_ACLmount the filesystem with xattr feature enabled. That should guarantee consistency among nodes but it can be inconvenient at times (you'd have to disable xattrs via tunefs.ocfs2 to temporarily disable acls and thus you'd loose all acl settings).
Quoted 4 lines
b) Introduce superblock bit '
mounted_with_acls'. The first node in the cluster either sets this bit or leaves it zero. Other nodes then refuse to mount the filesystem inconsistently with the bit setting (so if the bit is set, nodes withoutCONFIG_OCFS2_POSIX_ACLcannot mount the fs).
Quick question: what happens on a filesystem that is run for a
little while without acls? Eg, ext3?
mount -oacl /dev/sda1 /ext3
# do stuff
umount /ext3
mount -onoacl /dev/sda1 /ext3
# do stuff
umount /ext3
mount -oacl /dev/sda1 /ext3
Is it totally screwed up? Are the default acls sufficient such that files created or modified while acls were off are in a sane state?
If they are in a sane state, we can solve this with a cluster
lock. It would require a minor revision of the locking protocol. The lock's LVB stores a simple boolean of whether ACLs are in use or not. It is set by the first node. Subsequent nodes would compare this boolean against their acl support and continue or fail appropriately.
If the first mounter doesn't support this lock (older locking
protocol), we simply honor the mount option as we have up until now. If the sysadmin mismatches acl and !acl nodes...their fault.
Joel
Signature · 10 lines
"Always give your best, never get discouraged, never be petty; always remember, others may hate you. Those who hate you don't win unless you hate them. And then you destroy yourself." - Richard M. Nixon Joel Becker Principal Software Developer Oracle E-mail: joel.becker at oracle.com Phone: (650) 506-8127
RFC PATCH 1/1 Mount option trap for users
Quoted 27 lines · Joel Becker
Quoted 10 lines · Jan Kara
Quoted 2 lines
As far as I can tell, there is no way for the non-acl driver to
notice that other nodes are using acls and reject the mount. Thoughts?Hmm, this is nasty. I see two possible solutions:
a) Use acls iff xattr feature is enabled (i.e., mount options do not influence whether acls are used or not), don't let kernel withoutCONFIG_OCFS2_POSIX_ACLmount the filesystem with xattr feature enabled. That should guarantee consistency among nodes but it can be inconvenient at times (you'd have to disable xattrs via tunefs.ocfs2 to temporarily disable acls and thus you'd loose all acl settings).Quoted 4 lines
b) Introduce superblock bit '
mounted_with_acls'. The first node in the cluster either sets this bit or leaves it zero. Other nodes then refuse to mount the filesystem inconsistently with the bit setting (so if the bit is set, nodes withoutCONFIG_OCFS2_POSIX_ACLcannot mount the fs).Quick question: what happens on a filesystem that is run for a
little while without acls? Eg, ext3?mount -oacl
/dev/sda1/ext3
# do stuff
umount /ext3
mount -onoacl/dev/sda1/ext3
# do stuff
umount /ext3
mount -oacl/dev/sda1/ext3
Quoted 2 lines
Is it totally screwed up? Are the default acls sufficient such that files created or modified while acls were off are in a sane state?
For ext3, when you mount with noacl, acls are not inherited for newly
created files and directories, obviously they are not enforced but apart from that they stay correct.
Quoted 8 lines
If they are in a sane state, we can solve this with a cluster
lock. It would require a minor revision of the locking protocol. The lock's LVB stores a simple boolean of whether ACLs are in use or not. It is set by the first node. Subsequent nodes would compare this boolean against their acl support and continue or fail appropriately.
If the first mounter doesn't support this lock (older locking
protocol), we simply honor the mount option as we have up until now. If the sysadmin mismatches acl and !acl nodes...their fault.
Yes, this looks like a reasonable choice.
Honza
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR
RFC PATCH 1/1 Mount option trap for users
Quoted 11 lines · Jan Kara
Quoted 11 lines
Quick question: what happens on a filesystem that is run for a
little while without acls? Eg, ext3?mount -oacl
/dev/sda1/ext3
# do stuff
umount /ext3
mount -onoacl/dev/sda1/ext3
# do stuff
umount /ext3
mount -oacl/dev/sda1/ext3
Quoted 5 lines
Quoted 2 lines
Is it totally screwed up? Are the default acls sufficient such that files created or modified while acls were off are in a sane state?
For ext3, when you mount with noacl, acls are not inherited for newly
created files and directories, obviously they are not enforced but apart from that they stay correct.
Thanks for clearing that up Jan.
Quoted 9 lines
Quoted 8 lines
If they are in a sane state, we can solve this with a cluster
lock. It would require a minor revision of the locking protocol. The lock's LVB stores a simple boolean of whether ACLs are in use or not. It is set by the first node. Subsequent nodes would compare this boolean against their acl support and continue or fail appropriately.
If the first mounter doesn't support this lock (older locking
protocol), we simply honor the mount option as we have up until now. If the sysadmin mismatches acl and !acl nodes...their fault.Yes, this looks like a reasonable choice.
Hmm, regarding this part of the discussion - how do we know if the admin actually wants the proposed behavior? Presumably the admin in our ext3 example has a good reason for working without acls for a time. Perhaps the same admin would like that ability on a cluster node, without having to unmount from all acl nodes in the cluster...
If we add cluster locking / messaging, etc to disallow this, we're removing a potentially valid use case.
--Mark
--
Mark Fasheh
RFC PATCH 1/1 Mount option trap for users
Quoted 5 lines · Mark Fasheh
Hmm, regarding this part of the discussion - how do we know if the admin actually wants the proposed behavior? Presumably the admin in our ext3 example has a good reason for working without acls for a time. Perhaps the same admin would like that ability on a cluster node, without having to unmount from all acl nodes in the cluster...
I would think anyone would want the acl behavior coherent across
the cluster. Otherwise node 1 is setting an acl that node 2 promptly ignores? Yuk! Especially since that admin could have accidentally booted a non-ACL ocfs2 and not realize it?
Quoted 2 lines
If we add cluster locking / messaging, etc to disallow this, we're removing a potentially valid use case.
I don't know that it is valid. But if we want to support it, we
can clearly differentiate between "my kernel doesn't support this" and "I support it, but I was told noacl".
Joel
Signature · 9 lines
"Three o'clock is always too late or too early for anything you
want to do."
- Jean-Paul Sartre
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127RFC PATCH 1/1 Mount option trap for users
Quoted 11 lines · Joel Becker
Quoted 5 lines · Mark Fasheh
Hmm, regarding this part of the discussion - how do we know if the admin actually wants the proposed behavior? Presumably the admin in our ext3 example has a good reason for working without acls for a time. Perhaps the same admin would like that ability on a cluster node, without having to unmount from all acl nodes in the cluster...
I would think anyone would want the acl behavior coherent across
the cluster. Otherwise node 1 is setting an acl that node 2 promptly ignores? Yuk! Especially since that admin could have accidentally booted a non-ACL ocfs2 and not realize it?
Well, we have to ask ourselves what the (theoretical) person remounting ext3 without acls is doing that for. This isn't about the ext3 rules for mounting with acls as much as it's a question of "why would this happen?".
Quoted 6 lines
Quoted 2 lines
If we add cluster locking / messaging, etc to disallow this, we're removing a potentially valid use case.
I don't know that it is valid. But if we want to support it, we
can clearly differentiate between "my kernel doesn't support this" and "I support it, but I was told noacl".
Right, I am theorizing about the case of "I support it, but I was told noacl" which I don't see a good reason to disallow (even if a mount is mounted acl elsewhere)
It might make more sense to look at this from the other direction. Say I'm a cluster admin and my nodes aren't currently using acls. Perhaps at some point in the future, I want to enable them (maybe so I can deploy a new app on my shared disk). Today, I could do this without taking down the entire cluster - I'd simply enable acls one node at a time. Once they were all back up with acl support, I could deploy my app without having lost any downtime. If we disallow this situation, I'd have to bring down the entire cluster to enable acls.
Considering how much time we put into online-fs-operations, I say we keep this ability. We can market it as "Ocfs2 supports online acl enablement!" ;)
Btw, are we all agreed about Jan's original patch?
--Mark
--
Mark Fasheh
RFC PATCH 1/1 Mount option trap for users
Quoted 8 lines · Mark Fasheh
Quoted 7 lines · Joel Becker
Quoted 5 lines · Mark Fasheh
Hmm, regarding this part of the discussion - how do we know if the admin actually wants the proposed behavior? Presumably the admin in our ext3 example has a good reason for working without acls for a time. Perhaps the same admin would like that ability on a cluster node, without having to unmount from all acl nodes in the cluster...
Quoted 8 lines
Quoted 4 lines
I would think anyone would want the acl behavior coherent across
the cluster. Otherwise node 1 is setting an acl that node 2 promptly ignores? Yuk! Especially since that admin could have accidentally booted a non-ACL ocfs2 and not realize it?Well, we have to ask ourselves what the (theoretical) person remounting ext3 without acls is doing that for. This isn't about the ext3 rules for mounting with acls as much as it's a question of "why would this happen?".
Sure. And with ext3 it's probably "I forgot the option" because
it defaults to off. With xfs, it would have to be a deliberate -onoacl. Christoph, are you paying attention? Any thoughts?
Quoted 7 lines
Quoted 3 lines
I don't know that it is valid. But if we want to support it, we
can clearly differentiate between "my kernel doesn't support this" and "I support it, but I was told noacl".Right, I am theorizing about the case of "I support it, but I was told noacl" which I don't see a good reason to disallow (even if a mount is mounted acl elsewhere)
That sort of thing fits obviously in the realm of "you asked for
it". So it's only a question of effort vs need. That is, we put in the time to add the flexibility (and the potential confusion) because we expect someone really has a valid use case.
Quoted 8 lines
It might make more sense to look at this from the other direction. Say I'm a cluster admin and my nodes aren't currently using acls. Perhaps at some point in the future, I want to enable them (maybe so I can deploy a new app on my shared disk). Today, I could do this without taking down the entire cluster - I'd simply enable acls one node at a time. Once they were all back up with acl support, I could deploy my app without having lost any downtime. If we disallow this situation, I'd have to bring down the entire cluster to enable acls.
Well, if we go to a "acls are on by default" scenario, they're
already on. You just don't notice them because no one has used setfacl() and the default acls match unix permissions ;-) Turning it "on" just means calling setfacl().
The whole problem of "what to do when -oacl is specified" falls
out from our defaulting them off. We're the only "modern" filesystem that does that.
Joel
Signature · 10 lines
"Conservative, n. A statesman who is enamoured of existing evils, as distinguished from the Liberal, who wishes to replace them with others." - Ambrose Bierce, The Devil's Dictionary Joel Becker Principal Software Developer Oracle E-mail: joel.becker at oracle.com Phone: (650) 506-8127
RFC PATCH 1/1 Mount option trap for users
In reply to Joel BeckerQuoted 7 lines · Joel Becker
Actually, I just realized where we really differ from the other
filesystems. We're clustered, butCONFIG_OCFS2_POSIX_ACLisn't a feature flag. We can, in theory, have two nodes. Both have xattrs enabled, but only one has acls compiled into the kernel. Now we're fucked.
As far as I can tell, there is no way for the non-acl driver to
notice that other nodes are using acls and reject the mount. Thoughts?
So why do you allow compiling ocfs2 without ACLs at all?
RFC PATCH 1/1 Mount option trap for users
Quoted 10 lines · Christoph Hellwig
Quoted 7 lines · Joel Becker
Actually, I just realized where we really differ from the other
filesystems. We're clustered, butCONFIG_OCFS2_POSIX_ACLisn't a feature flag. We can, in theory, have two nodes. Both have xattrs enabled, but only one has acls compiled into the kernel. Now we're fucked.
As far as I can tell, there is no way for the non-acl driver to
notice that other nodes are using acls and reject the mount. Thoughts?So why do you allow compiling ocfs2 without ACLs at all?
You *are* paying attention :-) I believe this is for hysterical
raisins. We copied ext3 on this. I'm totally in support of ripping ACLs out of Kconfig.
Joel
Signature · 10 lines
"I almost ran over an angel He had a nice big fat cigar. 'In a sense,' he said, 'You're alone here So if you jump, you'd best jump far.'" Joel Becker Principal Software Developer Oracle E-mail: joel.becker at oracle.com Phone: (650) 506-8127
RFC PATCH 1/1 Mount option trap for users
Quoted 10 lines · Joel Becker
Quoted 9 lines · Christoph Hellwig
Quoted 7 lines · Joel Becker
Actually, I just realized where we really differ from the other
filesystems. We're clustered, butCONFIG_OCFS2_POSIX_ACLisn't a feature flag. We can, in theory, have two nodes. Both have xattrs enabled, but only one has acls compiled into the kernel. Now we're fucked.
As far as I can tell, there is no way for the non-acl driver to
notice that other nodes are using acls and reject the mount. Thoughts?
Quoted 5 lines
Quoted 1 line
So why do you allow compiling ocfs2 without ACLs at all?
You *are* paying attention :-) I believe this is for hysterical
raisins. We copied ext3 on this. I'm totally in support of ripping ACLs out ofKconfig.
Yes, this would certainly simplify the situation. And looking at the
code, disabling CONFIG_OCFS2_POSIX_ACL does not seem to bring any significant code-size or speed advantage... So I'm in favor of this.
Honza
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR
RFC PATCH 1/1 Mount option trap for users
Quoted 7 lines · Jan Kara
Quoted 3 lines · Joel Becker
You *are* paying attention :-) I believe this is for hysterical
raisins. We copied ext3 on this. I'm totally in support of ripping ACLs out ofKconfig.Yes, this would certainly simplify the situation. And looking at the
code, disablingCONFIG_OCFS2_POSIX_ACLdoes not seem to bring any significant code-size or speed advantage... So I'm in favor of this.
So let's do this:
1) Rip out CONFIG_OCFS2_POSIX_ACL. The code is always built in.
2) Always enable acls if a filesystem has xattrs. This is a noop if no one ever calls setacl.
3) If a user explicitly puts -oacl on the mount command line, but the filesystem doesn't have xattrs, fail the mount. This is a safe place to catch people changing kernels, as a too-old kernel driver likely doesn't have xattrs anyway.
4) If a user explicitly puts -onoacl on the mount command line, they get what they asked for.
This behavior matches the other 'modern' filesystems. The only
weirdness is in the cluster case, and the most common users will be using released versions with ACL support. Anyone compiling recent drivers or kernels can't leave the support out.
Mark, Jan?
Joel
Signature · 10 lines
Life's Little Instruction Book #197 "Don't forget, a person's greatest emotional need is to feel appreciated." Joel Becker Principal Software Developer Oracle E-mail: joel.becker at oracle.com Phone: (650) 506-8127
RFC PATCH 1/1 Mount option trap for users
Quoted 21 lines · Joel Becker
Quoted 7 lines · Jan Kara
Quoted 3 lines · Joel Becker
You *are* paying attention :-) I believe this is for hysterical
raisins. We copied ext3 on this. I'm totally in support of ripping ACLs out ofKconfig.Yes, this would certainly simplify the situation. And looking at the
code, disablingCONFIG_OCFS2_POSIX_ACLdoes not seem to bring any significant code-size or speed advantage... So I'm in favor of this.So let's do this:
1) Rip out
CONFIG_OCFS2_POSIX_ACL. The code is always built in.
2) Always enable acls if a filesystem has xattrs. This is a noop if no one ever calls setacl.
3) If a user explicitly puts -oacl on the mount command line, but the filesystem doesn't have xattrs, fail the mount. This is a safe place to catch people changing kernels, as a too-old kernel driver likely doesn't have xattrs anyway.
4) If a user explicitly puts -onoacl on the mount command line, they get what they asked for.
Quoted 5 lines
This behavior matches the other 'modern' filesystems. The only
weirdness is in the cluster case, and the most common users will be using released versions with ACL support. Anyone compiling recent drivers or kernels can't leave the support out.
Mark, Jan?
Yes, this looks good to me.
Honza
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR
RFC PATCH 1/1 Mount option trap for users
In reply to Joel BeckerQuoted 21 lines · Joel Becker
Quoted 7 lines · Jan Kara
Quoted 3 lines · Joel Becker
You *are* paying attention :-) I believe this is for hysterical
raisins. We copied ext3 on this. I'm totally in support of ripping ACLs out ofKconfig.Yes, this would certainly simplify the situation. And looking at the
code, disablingCONFIG_OCFS2_POSIX_ACLdoes not seem to bring any significant code-size or speed advantage... So I'm in favor of this.So let's do this:
1) Rip out
CONFIG_OCFS2_POSIX_ACL. The code is always built in.
2) Always enable acls if a filesystem has xattrs. This is a noop if no one ever calls setacl.
3) If a user explicitly puts -oacl on the mount command line, but the filesystem doesn't have xattrs, fail the mount. This is a safe place to catch people changing kernels, as a too-old kernel driver likely doesn't have xattrs anyway.
4) If a user explicitly puts -onoacl on the mount command line, they get what they asked for.
Quoted 5 lines
This behavior matches the other 'modern' filesystems. The only
weirdness is in the cluster case, and the most common users will be using released versions with ACL support. Anyone compiling recent drivers or kernels can't leave the support out.
Mark, Jan?
Yes, yes, yes and yes. ;)
--Mark
--
Mark Fasheh
RFC PATCH 1/1 Mount option trap for users
Quoted 22 lines · Mark Fasheh
Quoted 21 lines · Joel Becker
Quoted 7 lines · Jan Kara
Quoted 3 lines · Joel Becker
You *are* paying attention :-) I believe this is for hysterical
raisins. We copied ext3 on this. I'm totally in support of ripping ACLs out ofKconfig.Yes, this would certainly simplify the situation. And looking at the
code, disablingCONFIG_OCFS2_POSIX_ACLdoes not seem to bring any significant code-size or speed advantage... So I'm in favor of this.So let's do this:
1) Rip out
CONFIG_OCFS2_POSIX_ACL. The code is always built in.
2) Always enable acls if a filesystem has xattrs. This is a noop if no one ever calls setacl.
3) If a user explicitly puts -oacl on the mount command line, but the filesystem doesn't have xattrs, fail the mount. This is a safe place to catch people changing kernels, as a too-old kernel driver likely doesn't have xattrs anyway.
4) If a user explicitly puts -onoacl on the mount command line, they get what they asked for.
Quoted 7 lines
Quoted 5 lines
This behavior matches the other 'modern' filesystems. The only
weirdness is in the cluster case, and the most common users will be using released versions with ACL support. Anyone compiling recent drivers or kernels can't leave the support out.
Mark, Jan?Yes, yes, yes and yes. ;)
OK, so should I implement it? Or Joel, will you take care of it?
Honza
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR
RFC PATCH 1/1 Mount option trap for users
Quoted 1 line · Jan Kara
OK, so should I implement it? Or Joel, will you take care of it?
You already have half the patch, so it would be awesome if you
could finish it up.
Joel
Signature · 9 lines
Life's Little Instruction Book #222 "Think twice before burdening a friend with a secret." Joel Becker Principal Software Developer Oracle E-mail: joel.becker at oracle.com Phone: (650) 506-8127