Whamcloud - gitweb
LU-12859 llite: clear flock when using localflock 52/36452/4
authorAndreas Dilger <adilger@whamcloud.com>
Mon, 14 Oct 2019 22:29:30 +0000 (06:29 +0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 22 Oct 2019 23:56:53 +0000 (23:56 +0000)
commit22ee4a1f64eca526ef34a3fd89dc4e95bb307732
tree3c229f99feef237eb7eb71c678b97c42c6c338e4
parent2b905746ee3b5d9dbafcdb1af5930aea18120a7b
LU-12859 llite: clear flock when using localflock

When mounting a client with "-o localflock" or equivalent option in
/etc/fstab, it does not clear out the "flock" mount option flag from
the superblock.  This results in "flock" still being the option used
and it displays both options in the /proc/mounts output:

  10.0.0.1@o2ib:/lfs on /mnt/lfs type lustre (rw,flock,localflock)

Mount a client with both "flock,localflock" as mount options and
verify that the "flock" option is cleared by "localflock", and
vice versa.  Verify that "noflock" clears both options.

Remove the "remount_client()" helper in conf-sanity.sh, since this
shadows a helper function of the same name in test-framework.sh and
is confusing.  Instead, use "mount_client()" now that it can accept
mount options, and just pass "remount" explicitly in a few places.

Fixes: 3613af3e15cb ("LU-10885 llite: enable flock mount option by default")
Test-Parameters: trivial testlist=conf-sanity
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ie31b0c4f6674c99d3ed5b73caa39cfc23d3ebbe5
Reviewed-on: https://review.whamcloud.com/36452
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/llite_lib.c
lustre/tests/conf-sanity.sh
lustre/tests/test-framework.sh