From c73ecdfc43f92e8c88d0eca5dff8de90ff957661 Mon Sep 17 00:00:00 2001 From: bobijam Date: Thu, 12 Jun 2008 02:43:27 +0000 Subject: [PATCH] Branch b1_8 b=15345 o=johann i=nathan, bobijam check --writeconf flag when forcing the index. --- lustre/mgs/mgs_llog.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lustre/mgs/mgs_llog.c b/lustre/mgs/mgs_llog.c index 8917d28..2134bd8 100644 --- a/lustre/mgs/mgs_llog.c +++ b/lustre/mgs/mgs_llog.c @@ -476,12 +476,14 @@ int mgs_set_index(struct obd_device *obd, struct mgs_target_info *mti) INDEX_MAP_SIZE * 8); RETURN(-ERANGE); } - + if (test_bit(mti->mti_stripe_index, imap)) { - if (mti->mti_flags & LDD_F_VIRGIN) { + if ((mti->mti_flags & LDD_F_VIRGIN) && + !(mti->mti_flags & LDD_F_WRITECONF)) { LCONSOLE_ERROR_MSG(0x140, "Server %s requested index " "%d, but that index is already in " - "use\n", mti->mti_svname, + "use. Use --writeconf to force\n", + mti->mti_svname, mti->mti_stripe_index); RETURN(-EADDRINUSE); } else { -- 1.8.3.1