Whamcloud - gitweb
LU-15653 client: able to cleanup devices manually
authorMikhail Pershin <mpershin@whamcloud.com>
Tue, 22 Feb 2022 17:34:37 +0000 (20:34 +0300)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 15 Jul 2022 04:25:24 +0000 (04:25 +0000)
commit695d6a81e74ffb985c8e0b90f3c6c2071d0f1de7
treeb8ac2642003a2ef8fb4c6be02a33cdb105b73daf
parent3b95b7ad1e2117e440a75f6f439ab6595ad1ac85
LU-15653 client: able to cleanup devices manually

Using 'lctl cleanup/detach' could be needed in situations
with unclean umount. Meanwhile that doesn't work now for
LMV and also could cause panic after all

Patch restores ability to cleanup/detach client devices
manually.
- debugfs and lprocfs cleanup in lmv_precleanup() are moved
  lmv_cleanup() to be not cleared too early. This prevents
  hang on 'lctl cleanup' for LMV device
- test 172 is added in sanity. It skips device cleanup during
  normal umount, keeping device alive without client mount
  then manually cleanups/detaches them
- prevent negative lov_connections in lov_disconnect() and
  handle it gracefully
- remove obd_cleanup_client_import() in mdc_precleanup(),
  it is called already inside osc_precleanup_common()

Lustre-change: https://review.whamcloud.com/46859
Lustre-commit: 210803a2475862464045b609eee43237d74e853b

Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: I8a3868fabd1d805e827d04852d1614a3fe57ce35
Reviewed-on: https://review.whamcloud.com/46587
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/include/obd_support.h
lustre/llite/llite_lib.c
lustre/lmv/lmv_obd.c
lustre/lov/lov_obd.c
lustre/mdc/mdc_request.c
lustre/tests/sanity.sh