Whamcloud - gitweb
Branch HEAD
authorbobijam <bobijam>
Thu, 12 Jun 2008 02:51:11 +0000 (02:51 +0000)
committerbobijam <bobijam>
Thu, 12 Jun 2008 02:51:11 +0000 (02:51 +0000)
b=15345
o=johann
i=nathan, bobijam

check --writeconf flag when forcing the index.

lustre/mgs/mgs_llog.c

index 49c7aac..497226e 100644 (file)
@@ -520,10 +520,12 @@ int mgs_set_index(struct obd_device *obd, struct mgs_target_info *mti)
         }
 
         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 {