[LU-12348] "flock" mount option should be enable by default Created: 28/May/19  Updated: 29/May/19  Resolved: 29/May/19

Status: Closed
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Li Xi Assignee: Li Xi
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Duplicate
is duplicated by LU-12349 print error to console when flock() i... Resolved
Related
is related to LU-10885 enable flock by default Resolved
Rank (Obsolete): 9223372036854775807

 Description   

By default, flock()/lockf()/fcntl() functions that try to lock files would return failure because "-o flock" option is not enabled by default. This would cause failure to applications which are being migrated from local file systems (or other network file systems) to Lustre. And it makes sense to enable it by default because: 1) If nobody is going to use flock/lockf, as assumed by the default option, no overhead will be introduced by enabling it 2) flock()/lockf() only needs a single LDLM so not so expensive at all. 3) For users that abuse flock/lockf, they have the motivation to discover the option "localflock". 4) For users that don't use flock/lockf a lot, they don't even need to know their applications use flock/lockf or not.

Other improvement that can be done:

1) Console message like "flock disabled, mount with '-o flock' to enable" instead of just returning -EOPNOTSUPP.

2) Console message like "Lustre doesn't support mandatory POSIX file lock" when an application tries to lock file with S_ISGID and without S_IXGRP too.



 Comments   
Comment by Gerrit Updater [ 28/May/19 ]

Li Xi (lixi@ddn.com) uploaded a new patch: https://review.whamcloud.com/34981
Subject: LU-12348 llite: enable "flock" mount option by default
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 0101f4bda8b4d474b855c09d6699de24435c5258

Generated at Sat Feb 10 02:51:47 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.