Skip to contentSkip to conversation

Deprecated mandatory file locking

DISCUSSION Jan Kara 2 participants 7 messages Aug 14, 2019 – Nov 8, 2019 VFS

lore
Share & tools
lore

Jan Kara

author reviewer
#0 lore raw

Hello Jeff,

we've got a report from user
(https://bugzilla.suse.com/show_bug.cgi?id=1145007) wondering why his fstab entry (for root filesystem!) using 'mand' mount option stopped working. Now I understand your rationale in 9e8925b67a "locks: Allow disabling mandatory locking at compile time" but I guess there's some work to do wrt documentation. At least mount(8) manpage could mention that mandatory locking is broken and may be disabled referencing the rationale in fcntl manpage? Or the kernel could mention something in the log about failing mount because of 'mand' mount option? What do you think? Because it took me some code searching to understand why the mount is actually failing which we can hardly expect from a normal sysadmin...

Honza

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
author reviewer
#1 lore raw

Resending to proper Jeff's address...

Quoted 15 lines · Jan Kara

Hello Jeff,

we've got a report from user
(https://bugzilla.suse.com/show_bug.cgi?id=1145007) wondering why his fstab entry (for root filesystem!) using 'mand' mount option stopped working. Now I understand your rationale in 9e8925b67a "locks: Allow disabling mandatory locking at compile time" but I guess there's some work to do wrt documentation. At least mount(8) manpage could mention that mandatory locking is broken and may be disabled referencing the rationale in fcntl manpage? Or the kernel could mention something in the log about failing mount because of 'mand' mount option? What do you think? Because it took me some code searching to understand why the mount is actually failing which we can hardly expect from a normal sysadmin...

Honza

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
#2 lore raw
Quoted 18 lines · Jan Kara

Resending to proper Jeff's address...

Quoted 15 lines · Jan Kara

Hello Jeff,

we've got a report from user
(https://bugzilla.suse.com/show_bug.cgi?id=1145007) wondering why his fstab entry (for root filesystem!) using 'mand' mount option stopped working. Now I understand your rationale in 9e8925b67a "locks: Allow disabling mandatory locking at compile time" but I guess there's some work to do wrt documentation. At least mount(8) manpage could mention that mandatory locking is broken and may be disabled referencing the rationale in fcntl manpage? Or the kernel could mention something in the log about failing mount because of 'mand' mount option? What do you think? Because it took me some code searching to understand why the mount is actually failing which we can hardly expect from a normal sysadmin...

Honza

Wow, I think this is the first actual user fallout we've ever had from that change! Why was he setting that option? Does he actually use mandatory locking?

I think a pr_notice() or pr_warn() at mount time when someone tries to use it sounds like a very reasonable thing to do. Perhaps we can just stick one in may_mandlock()?

I'll draft up a patch, and also update Documentation/filesystems/mandatory-locking.txt with the current situation.

Thanks,

Signature · 1 line
Jeff Layton <[email protected]>
author reviewer
#3 lore raw
Quoted 18 lines · Jeff Layton
Quoted 17 lines · Jan Kara

Resending to proper Jeff's address...

Quoted 14 lines · Jan Kara

Hello Jeff,

we've got a report from user
(https://bugzilla.suse.com/show_bug.cgi?id=1145007) wondering why his fstab entry (for root filesystem!) using 'mand' mount option stopped working. Now I understand your rationale in 9e8925b67a "locks: Allow disabling mandatory locking at compile time" but I guess there's some work to do wrt documentation. At least mount(8) manpage could mention that mandatory locking is broken and may be disabled referencing the rationale in fcntl manpage? Or the kernel could mention something in the log about failing mount because of 'mand' mount option? What do you think? Because it took me some code searching to understand why the mount is actually failing which we can hardly expect from a normal sysadmin...

Quoted 5 lines
Quoted 1 line
Quoted 1 line

Honza

Wow, I think this is the first actual user fallout we've ever had from that change! Why was he setting that option? Does he actually use mandatory locking?

Yeah, reportedly they had an application that required mandatory locking. But they don't use it anymore so they just removed the mount option.

Quoted 3 lines

I think a pr_notice() or pr_warn() at mount time when someone tries to use it sounds like a very reasonable thing to do. Perhaps we can just stick one in may_mandlock()?

Yeah, sounds reasonable to me.

Quoted 3 lines

I'll draft up a patch, and also update Documentation/filesystems/mandatory-locking.txt with the current situation.

Thanks!

Honza

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
author reviewer
#4 lore raw

Hi Jeff,

Quoted 32 lines · Jan Kara
Quoted 18 lines · Jeff Layton
Quoted 17 lines · Jan Kara

Resending to proper Jeff's address...

Quoted 14 lines · Jan Kara

Hello Jeff,

we've got a report from user
(https://bugzilla.suse.com/show_bug.cgi?id=1145007) wondering why his fstab entry (for root filesystem!) using 'mand' mount option stopped working. Now I understand your rationale in 9e8925b67a "locks: Allow disabling mandatory locking at compile time" but I guess there's some work to do wrt documentation. At least mount(8) manpage could mention that mandatory locking is broken and may be disabled referencing the rationale in fcntl manpage? Or the kernel could mention something in the log about failing mount because of 'mand' mount option? What do you think? Because it took me some code searching to understand why the mount is actually failing which we can hardly expect from a normal sysadmin...

Quoted 5 lines
Quoted 1 line
Quoted 1 line

Honza

Wow, I think this is the first actual user fallout we've ever had from that change! Why was he setting that option? Does he actually use mandatory locking?

Yeah, reportedly they had an application that required mandatory locking. But they don't use it anymore so they just removed the mount option.

Quoted 3 lines

I think a pr_notice() or pr_warn() at mount time when someone tries to use it sounds like a very reasonable thing to do. Perhaps we can just stick one in may_mandlock()?

Quoted 7 lines

Yeah, sounds reasonable to me.

Quoted 3 lines

I'll draft up a patch, and also update Documentation/filesystems/mandatory-locking.txt with the current situation.

Thanks!

Did you ever get to this?

Honza

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
#5 lore raw
Quoted 41 lines · Jan Kara

Hi Jeff,

Quoted 38 lines · Jan Kara
Quoted 18 lines · Jeff Layton
Quoted 17 lines · Jan Kara

Resending to proper Jeff's address...

Quoted 14 lines · Jan Kara

Hello Jeff,

we've got a report from user
(https://bugzilla.suse.com/show_bug.cgi?id=1145007) wondering why his fstab entry (for root filesystem!) using 'mand' mount option stopped working. Now I understand your rationale in 9e8925b67a "locks: Allow disabling mandatory locking at compile time" but I guess there's some work to do wrt documentation. At least mount(8) manpage could mention that mandatory locking is broken and may be disabled referencing the rationale in fcntl manpage? Or the kernel could mention something in the log about failing mount because of 'mand' mount option? What do you think? Because it took me some code searching to understand why the mount is actually failing which we can hardly expect from a normal sysadmin...

Quoted 5 lines
Quoted 1 line
Quoted 1 line

Honza

Wow, I think this is the first actual user fallout we've ever had from that change! Why was he setting that option? Does he actually use mandatory locking?

Yeah, reportedly they had an application that required mandatory locking. But they don't use it anymore so they just removed the mount option.

Quoted 3 lines

I think a pr_notice() or pr_warn() at mount time when someone tries to use it sounds like a very reasonable thing to do. Perhaps we can just stick one in may_mandlock()?

Yeah, sounds reasonable to me.

Quoted 3 lines

I'll draft up a patch, and also update Documentation/filesystems/mandatory-locking.txt with the current situation.

Quoted 5 lines
Quoted 1 line

Thanks!

Did you ever get to this?

Honza

Yes. It went into v5.4-rc1. You even reviewed it! ;)

See:

commit df2474a22c42ce419b67067c52d71da06c385501

Author: Jeff Layton <[email protected]>
Date:   Thu Aug 15 15:21:17 2019 -0400

locks: print a warning when mount fails due to lack of "mand" support

Cheers,

Signature · 1 line
Jeff Layton <[email protected]>
author reviewer
#6 lore raw
Quoted 42 lines · Jeff Layton
Quoted 41 lines · Jan Kara

Hi Jeff,

Quoted 38 lines · Jan Kara
Quoted 18 lines · Jeff Layton
Quoted 17 lines · Jan Kara

Resending to proper Jeff's address...

Quoted 14 lines · Jan Kara

Hello Jeff,

we've got a report from user
(https://bugzilla.suse.com/show_bug.cgi?id=1145007) wondering why his fstab entry (for root filesystem!) using 'mand' mount option stopped working. Now I understand your rationale in 9e8925b67a "locks: Allow disabling mandatory locking at compile time" but I guess there's some work to do wrt documentation. At least mount(8) manpage could mention that mandatory locking is broken and may be disabled referencing the rationale in fcntl manpage? Or the kernel could mention something in the log about failing mount because of 'mand' mount option? What do you think? Because it took me some code searching to understand why the mount is actually failing which we can hardly expect from a normal sysadmin...

Quoted 5 lines
Quoted 1 line
Quoted 1 line

Honza

Wow, I think this is the first actual user fallout we've ever had from that change! Why was he setting that option? Does he actually use mandatory locking?

Yeah, reportedly they had an application that required mandatory locking. But they don't use it anymore so they just removed the mount option.

Quoted 3 lines

I think a pr_notice() or pr_warn() at mount time when someone tries to use it sounds like a very reasonable thing to do. Perhaps we can just stick one in may_mandlock()?

Yeah, sounds reasonable to me.

Quoted 3 lines

I'll draft up a patch, and also update Documentation/filesystems/mandatory-locking.txt with the current situation.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Thanks!

Did you ever get to this?

Honza

Yes. It went into v5.4-rc1. You even reviewed it! ;)

Bah ;) I completely forgot and somehow didn't realize the section 7. in Documentation/filesystems/mandatory-locking.txt is describing what I wanted when I looked at it yesterday. Sorry for the noise!

Honza

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR