LU-18989 osd: no tx restart in fallocate
A transaction restart in osd_fallocate_preallocate()
while holding an object lock may lead to a deadlock
with another thread which takes the lock first and then
starts a transaction.
crash> bt 44982
#0 __schedule at
ffffffffa2331fe8
#1 schedule at
ffffffffa233241a
#2 wait_transaction_locked at
ffffffffc106f08a
#3 add_transaction_credits at
ffffffffc106f67a
#4 start_this_handle at
ffffffffc106fa10
#5 jbd2__journal_restart at
ffffffffc107015e
#6 osd_fallocate_preallocate.constprop.0 at
ffffffffc23e3b1b
#7 osd_fallocate at
ffffffffc23e40cb
#8 mdt_object_fallocate at
ffffffffc21418f9
#9 mdt_fallocate_hdl at
ffffffffc2144125
and
crash> bt
PID: 47838 TASK:
ffff9f66f5288000 CPU: 9 COMMAND: "mdt00_020"
#0 __schedule at
ffffffffa2331fe8
#1 schedule at
ffffffffa233241a
#2 rwsem_down_write_slowpath at
ffffffffa2334a9b
#3 osd_write_lock at
ffffffffc23b6b4d
#4 mdd_xattr_del at
ffffffffc208cd88
#5 mdt_reint_setxattr at
ffffffffc21224a9
#6 mdt_reint_rec at
ffffffffc211ec69
#7 mdt_reint_internal at
ffffffffc20f0a64
#8 mdt_reint at
ffffffffc20fc6b9
#9 tgt_handle_request0 at
ffffffffc1dea9e7
HPE-bug-id: LUS-12819
Signed-off-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Change-Id: I8baa3ba1505c7a55e96841524368a66d447d18c5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59158
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@hpe.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>