From 659f577e2fb9b7599b51efbfb574e832c1cfedfe Mon Sep 17 00:00:00 2001 From: bobijam Date: Wed, 9 Sep 2009 08:59:19 +0000 Subject: [PATCH] Branch b_release_1_8_1 b=20318 o=johann i=adilger i=andrew.perepechko (panda) keep same lsm in place. --- lustre/include/obd.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lustre/include/obd.h b/lustre/include/obd.h index 0762e06..d9e09a4 100644 --- a/lustre/include/obd.h +++ b/lustre/include/obd.h @@ -199,11 +199,17 @@ struct obd_info { static inline int lov_stripe_md_cmp(struct lov_stripe_md *m1, struct lov_stripe_md *m2) { + int len = sizeof(m1->lsm_wire); + /* * ->lsm_wire contains padding, but it should be zeroed out during - * allocation. + * allocation. If either lsm is LOV_MAGIC_V1 do not check that + * the pool is the same, due to downgrade/upgrade (b=20318). This + * assumes that lw_pool_name is the last member in lsm_wire. */ - return memcmp(&m1->lsm_wire, &m2->lsm_wire, sizeof m1->lsm_wire); + if (m1->lsm_magic == LOV_MAGIC_V1 || m2->lsm_magic == LOV_MAGIC_V1) + len -= LOV_MAXPOOLNAME; + return memcmp(&m1->lsm_wire, &m2->lsm_wire, len); } void lov_stripe_lock(struct lov_stripe_md *md); -- 1.8.3.1