Whamcloud - gitweb
LU-15776 tgt: fix transaction handling in tgt_brw_write() 71/47371/2
authorMikhail Pershin <mpershin@whamcloud.com>
Tue, 17 May 2022 09:57:28 +0000 (12:57 +0300)
committerMike Pershin <mpershin@whamcloud.com>
Fri, 20 May 2022 14:32:56 +0000 (14:32 +0000)
commitccce4f23c773d9b9cc98cb15ed31861803167bb9
tree5179078cd51187bc13feec49d37745f1b1afe62a
parent6bac96ed3b4a6bf514e4bd4c9c27c8ad89d627d1
LU-15776 tgt: fix transaction handling in tgt_brw_write()

Hotfix to prevent possible data loss during WRITE replay.
Since commit f0f92773ee18 from LU-14187 the obd_commitrw()
may restart write transaction in OFD and MDT. That causes
transaction number to be assigned multiple times if such
restart happens. Without flag tti_mult_trans the first
transaction number is stored only so later one could remain
not applied causing data loss after recovery.

Patch sets tti_mult_trans for tgt_brw_write() so the latest
transaction number will be used as request transno.

Fixes: f0f92773ee ("LU-14187 osd-ldiskfs: fix locking in write commit")
Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: I364b478591942be5562c3e98ee6e6aa487f3e0c5
lustre/target/tgt_handler.c