LU-4398 mdt: acquire an open lock for write or execute

In mdt_object_open_lock() opens for write or execute will always
acquire an open lock of the appropriate mode so that any conflicting
cached open locks on other clients will be canceled. Add a regression
test to sanityn.sh.

Lustre-commit: 708d85a652a77f85153790e6cca1b7a2b91947cf

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I8092bca4c418ec99a25584abdfb635ffec19a26e
Reviewed-on: http://review.whamcloud.com/9063
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/10218
LU-4980 tests: enhance sanity-scrub test_11

If there are new objects created during the OI scrub re-scanning,
then the new created objects will not be skipped by OI scrub this
time. The test should record the total checked objects count for
each cycle scanning to avoid unnecessary check failure.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I2bde83a5c03910216070cc23d01785624d829af4
Reviewed-on: http://review.whamcloud.com/10214
Tested-by: Jenkins
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>