Whamcloud - gitweb
LU-12967 tgt: clean up sync_on_cancel references 54/36754/3
authorAndreas Dilger <adilger@whamcloud.com>
Thu, 14 Nov 2019 02:49:23 +0000 (19:49 -0700)
committerOleg Drokin <green@whamcloud.com>
Mon, 16 Dec 2019 05:59:41 +0000 (05:59 +0000)
commit52a5981be4df863088168b3ea41fac9e29ddf060
tree7eeda4359a3b486736678a8ccff41b972844bbf3
parent7df7347b7b188e7168e094304fd6d2d985f7f274
LU-12967 tgt: clean up sync_on_cancel references

Clean up the use of "sync_on_cancel" in the code, since the tunable
parameter is named "sync_lock_cancel" and using the same name in
the code makes it easier to find the related parts.

Rename constants to be more consistent:
  NEVER_SYNC_ON_CANCEL    -> SYNC_LOCK_CANCEL_NEVER
  BLOCKING_SYNC_ON_CANCEL -> SYNC_LOCK_CANCEL_BLOCKING
  ALWAYS_SYNC_ON_CANCEL   -> SYNC_LOCK_CANCEL_ALWAYS

Initialize sync_lock_cancel_states[] with designated initializers
so that the state names always match the declared values.

Use ARRAY_SIZE() instead of needing NUM_SYNC_ON_CANCEL_STATES.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: If7c6015420a5c3266a13798fd8b96539323ebbe5
Reviewed-on: https://review.whamcloud.com/36754
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.super@gmail.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/obd.h
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_internal.h
lustre/ofd/ofd_internal.h
lustre/target/tgt_handler.c
lustre/target/tgt_main.c