[lustre-devel] [PATCH 23/41] lustre: lov: fix layout generation inc for mirror split
James Simmons
jsimmons at infradead.org
Mon Apr 5 00:50:52 PST 2021
From: Bobi Jam <bobijam at whamcloud.com>
Mirror split does not increase the layout generation properly.
Mirror split does not change FLR state of the file, even when it
contains 1 mirror afterwards, and FLR state should be LCM_FL_NONE
instead.
WC-bug-id: https://jira.whamcloud.com/browse/LU-14268
Lustre-commit: ffa858b1657145c ("LU-14268 lod: fix layout generation inc for mirror split")
Signed-off-by: Bobi Jam <bobijam at whamcloud.com>
Reviewed-on: https://review.whamcloud.com/41068
Reviewed-by: Andreas Dilger <adilger at whamcloud.com>
Reviewed-by: John L. Hammond <jhammond at whamcloud.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
fs/lustre/lov/lov_ea.c | 4 ++--
fs/lustre/lov/lov_object.c | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/lustre/lov/lov_ea.c b/fs/lustre/lov/lov_ea.c
index 75a19a4..f6b3df0 100644
--- a/fs/lustre/lov/lov_ea.c
+++ b/fs/lustre/lov/lov_ea.c
@@ -635,10 +635,10 @@ void dump_lsm(unsigned int level, const struct lov_stripe_md *lsm)
int i, j;
CDEBUG_LIMIT(level,
- "lsm %p, objid " DOSTID ", maxbytes %#llx, magic 0x%08X, refc: %d, entry: %u, layout_gen %u\n",
+ "lsm %p, objid " DOSTID ", maxbytes %#llx, magic 0x%08X, refc: %d, entry: %u, mirror: %u, flags: %u,layout_gen %u\n",
lsm, POSTID(&lsm->lsm_oi), lsm->lsm_maxbytes, lsm->lsm_magic,
atomic_read(&lsm->lsm_refc), lsm->lsm_entry_count,
- lsm->lsm_layout_gen);
+ lsm->lsm_mirror_count, lsm->lsm_flags, lsm->lsm_layout_gen);
if (lsm->lsm_magic == LOV_MAGIC_FOREIGN) {
struct lov_foreign_md *lfm = (void *)lsm_foreign(lsm);
diff --git a/fs/lustre/lov/lov_object.c b/fs/lustre/lov/lov_object.c
index 5d618c1..abe1cee 100644
--- a/fs/lustre/lov/lov_object.c
+++ b/fs/lustre/lov/lov_object.c
@@ -1374,6 +1374,7 @@ static int lov_conf_set(const struct lu_env *env, struct cl_object *obj,
if ((!lsm && !lov->lo_lsm) ||
((lsm && lov->lo_lsm) &&
(lov->lo_lsm->lsm_layout_gen == lsm->lsm_layout_gen) &&
+ (lov->lo_lsm->lsm_flags == lsm->lsm_flags) &&
(lov->lo_lsm->lsm_entries[0]->lsme_pattern ==
lsm->lsm_entries[0]->lsme_pattern))) {
/* same version of layout */
--
1.8.3.1
More information about the lustre-devel
mailing list