From a729dbf0b898f5feef3b8c871364242f78f75bf1 Mon Sep 17 00:00:00 2001
From: tappro <tappro>
Date: Sat, 6 Oct 2007 06:33:21 +0000
Subject: [PATCH] - land fix to support CMD configurations   b:13060  
 i:nathan, yury

---
 lustre/mgs/mgs_handler.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lustre/mgs/mgs_handler.c b/lustre/mgs/mgs_handler.c
index 6a7ec0715c..def11e3487 100644
--- a/lustre/mgs/mgs_handler.c
+++ b/lustre/mgs/mgs_handler.c
@@ -389,13 +389,15 @@ static int mgs_handle_target_reg(struct ptlrpc_request *req)
         /* Log writing contention is handled by the fsdb_sem */
 
         if (mti->mti_flags & LDD_F_WRITECONF) {
-                if (mti->mti_flags & LDD_F_SV_TYPE_MDT) {
+                if (mti->mti_flags & LDD_F_SV_TYPE_MDT &&
+                    mti->mti_stripe_index == 0) {
                         rc = mgs_erase_logs(obd, mti->mti_fsname);
                         LCONSOLE_WARN("%s: Logs for fs %s were removed by user "
                                       "request.  All servers must be restarted "
                                       "in order to regenerate the logs."
                                       "\n", obd->obd_name, mti->mti_fsname);
-                } else if (mti->mti_flags & LDD_F_SV_TYPE_OST) {
+                } else if (mti->mti_flags &
+                           (LDD_F_SV_TYPE_OST | LDD_F_SV_TYPE_MDT)) {
                         rc = mgs_erase_log(obd, mti->mti_svname);
                         LCONSOLE_WARN("%s: Regenerating %s log by user "
                                       "request.\n",
-- 
GitLab