Whamcloud - gitweb
Branch:b_new_cmd
authorwangdi <wangdi>
Sun, 26 Nov 2006 04:41:20 +0000 (04:41 +0000)
committerwangdi <wangdi>
Sun, 26 Nov 2006 04:41:20 +0000 (04:41 +0000)
if ost failed is detected in lfs find, only return 0 to make tranverse continue
for cmd3-test18

lustre/utils/liblustreapi.c

index 263e126..ebe4f67 100644 (file)
@@ -819,9 +819,21 @@ static int cb_find_init(char *path, DIR *parent, DIR *dir, void *data)
                 }
 
                 if (ret) {
-                        fprintf(stderr, "%s: IOC_LOV_GETINFO on %s failed: "
-                                "%s.\n", __FUNCTION__, path, strerror(errno));
-                        return -EINVAL;
+                        if (errno == EIO) {
+                                /* Totally for cmd3 verification test XXX. since 
+                                 * test criterion required list all the objects 
+                                 * affected by the failed the OST. so it return 
+                                 * 0 to let traverse continue. This should be 
+                                 * removed after cmd3 verfication XXX*/
+                                fprintf(stderr, "%s: IOC_LOV_GETINFO on %s failed: "
+                                        "%s." "obd_uuid: %s failed \n",__FUNCTION__,
+                                        path, strerror(errno), param->obduuid->uuid);
+                                return 0; 
+                        } else {
+                                fprintf(stderr, "%s: IOC_LOV_GETINFO on %s failed: "
+                                        "%s.\n", __FUNCTION__, path, strerror(errno));
+                                return -EINVAL;
+                        }
                 }
 
                 /* Check the time on osc. */