Whamcloud - gitweb
LU-12859 llite: clear flock when using localflock 34/36934/2
authorAndreas Dilger <adilger@whamcloud.com>
Mon, 14 Oct 2019 22:29:30 +0000 (06:29 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 12 Dec 2019 23:05:57 +0000 (23:05 +0000)
commitbfa43920135dacffb77adedeac213966ea450b2c
treef2ebb71037a7a8856eed83bb8a4602e11ed25ba1
parent517c08e2e83eaf14ecf03eb593246fb2e408bf69
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.

Lustre-change: https://review.whamcloud.com/36452
Lustre-commit: 22ee4a1f64eca526ef34a3fd89dc4e95bb307732

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-by: Ben Evans <bevans@cray.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/36934
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/llite/llite_lib.c
lustre/tests/conf-sanity.sh
lustre/tests/test-framework.sh