Whamcloud - gitweb
LU-12967 tgt: clean up sync_on_cancel references 38/37038/2
authorAndreas Dilger <adilger@whamcloud.com>
Thu, 14 Nov 2019 02:49:23 +0000 (19:49 -0700)
committerOleg Drokin <green@whamcloud.com>
Fri, 3 Jan 2020 23:42:25 +0000 (23:42 +0000)
commit1e43d3c4fc8432bebacfa7a8a320163e3b15448d
treebcb98e308f004744f0d75c1c13d16fd7789bbdeb
parentcdffffb73080ad1100549afbcdbb09d3ee7a1c50
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.

Lustre-change: https://review.whamcloud.com/36754
Lustre-commit: 52a5981be4df863088168b3ea41fac9e29ddf060

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: If7c6015420a5c3266a13798fd8b96539323ebbe5
Reviewed-by: Arshad Hussain <arshad.super@gmail.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/37038
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
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