Whamcloud - gitweb
LU-16073 utils: double snapshot_mount fix 25/48225/5
authorAkash B <akash-b@hpe.com>
Thu, 11 Aug 2022 07:51:57 +0000 (03:51 -0400)
committerOleg Drokin <green@whamcloud.com>
Mon, 12 Sep 2022 02:57:11 +0000 (02:57 +0000)
commit27723374a38c76c8b8905b5c38f284060161fc3d
tree365007c0732dbf5a32742cd20429bca0932fae17
parent34b2246e4a6c8ce827c404cb4e52f7c6a0a1b90b
LU-16073 utils: double snapshot_mount fix

lsnapshot_mount on already mounted snapshot fs
results in umount of snapshot fs and the following
error is seen:

-> lsnapshot_mount -F testfs -n snap_test_fo
Can't mount the snapshot snap_test_fo: No such process

Add additional test to the existing sanity-lsnapshot.sh
(test_1b) to reproduce the above issue.

This is handled by returning appropriate error
code and return -EALREADY if snapshot fs is
already mounted.

HPE-bug-id: LUS-10650
Test-Parameters: fstype=zfs testlist=sanity-lsnapshot
Signed-off-by: Akash B <akash-b@hpe.com>
Change-Id: Ia13c3e1cf929ec7c53463a2ea74eb98fb46f8358
Reviewed-on: https://es-gerrit.dev.cray.com/160589
Reviewed-by: Dipak Ghosh <dipak.ghosh@hpe.com>
Reviewed-by: Sergey Cheremencev <sergey.cheremencev@hpe.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-on: https://review.whamcloud.com/48225
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-by: Alexander <alexander.boyko@hpe.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity-lsnapshot.sh
lustre/utils/lsnapshot.c