Whamcloud - gitweb
LU-15609 flr: Don't assume RDONLY implies SOM 66/46666/5
authorPatrick Farrell <pfarrell@whamcloud.com>
Mon, 7 Mar 2022 20:29:26 +0000 (15:29 -0500)
committerOleg Drokin <green@whamcloud.com>
Mon, 27 Jun 2022 04:37:43 +0000 (04:37 +0000)
commit250108ad754cfa932306d7edae10de14d40aeb4e
tree30a749a01a90f145418d9274c52a9a69d596bee5
parent441ec2296a0938dd30cf60a70943eb0799d1d70c
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.

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/46666
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/obd_support.h
lustre/lov/lov_io.c
lustre/tests/sanity-flr.sh