Whamcloud - gitweb
LU-12681 osc: wrong cache of LVB attrs, part2 40/40740/3
authorVitaly Fertman <c17818@cray.com>
Wed, 11 Sep 2019 15:22:23 +0000 (18:22 +0300)
committerOleg Drokin <green@whamcloud.com>
Wed, 17 Mar 2021 23:21:13 +0000 (23:21 +0000)
commit8c74fe2c6c3f8472ddf39f6ccc5e9c3744de344d
tree8810aae3f1a6800ad246e91bed2c3b1dadcdd34b
parent1d67a1eb08c7b95e7d15fa72c360e4fe11f838d4
LU-12681 osc: wrong cache of LVB attrs, part2

It may happen that osc oinfo lvb cache has size < kms.

It occurs if a reply re-ordering happens and an older size is applied
to oinfo unconditionally.

Another possibility is RA, when osc_match_base() attaches the dlm lock
to osc object but does not cache the lvb. The next layout change will
overwrites the lock lvb by the oinfo cache (previous LUS-7731 fix),
presumably smaller values. Therefore, the next lock re-use may run
into a problem with partial page write which thinks the preliminary
read is not needed.

Do not let the cached oinfo lvb size to become less than kms.
Also, cache the lock's lvb in the oinfo on osc_match_base().

Lustre-change: https://review.whamcloud.com/36200
Lustre-commit: 40319db5bc649adaf3dad066e2c1bb49f7f1c04a

Change-Id: I50136f57491364146ce7b6a81b814e474e3edb86
Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/40740
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/mdc/mdc_dev.c
lustre/osc/osc_internal.h
lustre/osc/osc_lock.c
lustre/osc/osc_object.c
lustre/osc/osc_request.c