Whamcloud - gitweb
b=19808 2.6.29-fc11 patchless client support
[fs/lustre-release.git] / lustre / include / lustre_disk.h
index 69baf77..336045b 100644 (file)
@@ -295,6 +295,20 @@ struct lsd_client_data {
         __u8  lcd_padding[LR_CLIENT_SIZE - 128];
 };
 
+/* bug20354: the lcd_uuid for export of clients may be wrong */
+static inline void check_lcd(char *obd_name, int index,
+                             struct lsd_client_data *lcd)
+{
+        int length = sizeof(lcd->lcd_uuid);
+        if (strnlen((char*)lcd->lcd_uuid, length) == length) {
+                lcd->lcd_uuid[length - 1] = '\0';
+
+                LCONSOLE_ERROR("the client UUID (%s) on %s for exports"
+                               "stored in last_rcvd(index = %d) is bad!\n", 
+                               lcd->lcd_uuid, obd_name, index);
+        }
+}
+
 /* last_rcvd handling */
 static inline void lsd_le_to_cpu(struct lr_server_data *buf,
                                  struct lr_server_data *lsd)