[LU-12859] Both "flock" and "localflock" appear in /proc/mounts Created: 14/Oct/19  Updated: 12/Dec/19  Resolved: 23/Oct/19

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.13.0, Lustre 2.12.3
Fix Version/s: Lustre 2.13.0, Lustre 2.12.4

Type: Bug Priority: Major
Reporter: Andreas Dilger Assignee: Andreas Dilger
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
Related
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Both "flock" and "localflock" appear in "mount" output, although only "localflock" is set in /etc/fstab:

root@client:~# mount | grep lustre
10.0.0.1@o2ib:/testfs on /mnt/testfs type lustre (rw,flock,localflock)

root@client:~# grep lustre /etc/fstab
10.0.0.1@o2ib:/testfs /mnt/testfs lustre noauto,_netdev,localflock 0 0


 Comments   
Comment by Andreas Dilger [ 14/Oct/19 ]

AFAICS, this issue affects the flock mode, not just the display.. It makes it very confusing to know which flock behavior is present on a client node. NOTE: it appears that the "most global" option takes precedence, so in this case "localflock" is overridden by the default "flock" option. It may be possible to work around this issue temporarily by using both "noflock,localflock" mount options to first clear the "flock" option before enabling "localflock".

The fix needs a small change to ll_options() to fix the parsing of these options. Right now it looks like any one of the options that is passed at mount will set the corresponding LL_SBI_*FLOCK option, but does not clear the other options. Any flock option should clear both of the other option flags, and the last one specified wins.

Comment by Gerrit Updater [ 15/Oct/19 ]

Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/36452
Subject: LU-12859 llite: clear flock when using localflock
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 2543dd9733580a8dbb553b0f84bd77154a9b91f9

Comment by Gerrit Updater [ 22/Oct/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36452/
Subject: LU-12859 llite: clear flock when using localflock
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 22ee4a1f64eca526ef34a3fd89dc4e95bb307732

Comment by Peter Jones [ 23/Oct/19 ]

Landed for 2.13

Comment by Gerrit Updater [ 05/Dec/19 ]

Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/36934
Subject: LU-12859 llite: clear flock when using localflock
Project: fs/lustre-release
Branch: b2_12
Current Patch Set: 1
Commit: e5173badfcb6d3448adb0dc46311285253e19e12

Comment by Gerrit Updater [ 12/Dec/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36934/
Subject: LU-12859 llite: clear flock when using localflock
Project: fs/lustre-release
Branch: b2_12
Current Patch Set:
Commit: bfa43920135dacffb77adedeac213966ea450b2c

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