Whamcloud - gitweb
LU-15776 tgt: fix transaction handling in tgt_brw_write()
authorMikhail Pershin <mpershin@whamcloud.com>
Tue, 17 May 2022 09:57:28 +0000 (12:57 +0300)
committerOleg Drokin <green@whamcloud.com>
Wed, 1 Jun 2022 03:30:36 +0000 (23:30 -0400)
commit14a4716066a2afd8f24102dd88a1d953b8d12c25
treeb11bb41817d4a24b5a1d16a9d6139bdb3d17c73e
parent6d802909ea44d24208d5372a90a8edaaf35ab515
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
Reviewed-on: https://review.whamcloud.com/47371
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Wang Shilong <wangshilong1991@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/target/tgt_handler.c