Whamcloud - gitweb
LU-15609 flr: Don't assume RDONLY implies SOM
authorPatrick Farrell <pfarrell@whamcloud.com>
Fri, 4 Mar 2022 19:26:21 +0000 (14:26 -0500)
committerAndreas Dilger <adilger@whamcloud.com>
Wed, 9 Mar 2022 17:09:15 +0000 (17:09 +0000)
commitcdeccb759d49e3ed39172d3b3a9cc1a6f49e603a
tree28416440f39352631e513b4dbfe6c242bb643a57
parent1a720d73c5c46e1deae9233b010cb5af455648f0
LU-15609 flr: Don't assume RDONLY implies SOM

In lov_io_slice_mirror_init, the client code assumes that
the LCM_FL_RDONLY flag in the layout implies SOM and skips
glimpse if it sees one.  The RDONLY flag means the mirrors
are in sync, which has historically implied SOM is valid.

To start with, using LCM_FL_RDONLY to imply SOM is sort of
a layering violation.  SOM is only communicated from the
MDS when it is valid, and the client already skips glimpse
in that case, so this duplicates functionality from the
higher layers.

More seriously, patch:
"LU-14526 flr: mirror split downgrade SOM"
(https://review.whamcloud.com/43168/)
Made it possible to have LCM_FL_RDONLY but not strict SOM,
so this assumption is no longer correct.

The fix is to not look at LCM_FL_RDONLY when deciding
whether to glimpse a file for size.

Lustre-change: https://review.whamcloud.com/46666/
Lustre-commit: 91db60601be1e3ac1f06dc79185f67884598acd2 (tbd)

Fixes: d87b6f4d1c ("LU-14526 flr: mirror split downgrade SOM")
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I5ed0a2124005bc58c1ed11681c9bd642cffcd1b5
Reviewed-on: https://review.whamcloud.com/46668
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/include/obd_support.h
lustre/lov/lov_io.c
lustre/tests/sanity-flr.sh