Whamcloud - gitweb
LU-13227 ofd: update lvb before dropping server lock 90/37790/7
authorWang Shilong <wshilong@ddn.com>
Wed, 4 Mar 2020 07:41:58 +0000 (15:41 +0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 11 Mar 2020 02:19:37 +0000 (02:19 +0000)
commit92d799217aeac4e1e859264d157c62e0f02b83a8
tree879f09258c88fab3d848bbd44e35bfba9f6bbb20
parentee7ca785615f2da71932512d8545763836ef8197
LU-13227 ofd: update lvb before dropping server lock

If this is a local lock on a server namespace and this was
the last reference, lock will be canceled directly instead
of staying at LRU, this might be problem that we will lose
O_DIRECT write size expanding without LVB updating.

This patch try to fix the problem by updating LVB just after
writing but before lock is dropped.

Fixes: 6bce536725 ("LU-4198 clio: turn on lockless for some kind of IO")
Change-Id: I9d1fbac30c8599d677358e8720fe9b3ca81fe818
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/37790
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ofd/ofd_io.c
lustre/tests/sanityn.sh