Whamcloud - gitweb
- ll_dirstripe_verify is used to verify if files are created using parent
authorshaocheng <shaocheng>
Tue, 10 Feb 2004 09:34:17 +0000 (09:34 +0000)
committershaocheng <shaocheng>
Tue, 10 Feb 2004 09:34:17 +0000 (09:34 +0000)
    directories' stripe info
- add set/get dir stripe info tests into sanity.sh
- create new header file include/lustre/liblustreapi.h and move
    include/linux/lustre_user.h into include/lustre. pass "make rpms"

lustre/utils/liblustreapi.c

index 72d5607..d0f8532 100644 (file)
@@ -45,7 +45,7 @@
 #include <liblustre.h>
 #include <linux/obd.h>
 #include <linux/lustre_lib.h>
-#include <linux/lustre_user.h>
+#include <lustre/lustre_user.h>
 #include <linux/obd_lov.h>
 
 #include <portals/ptlctl.h>
@@ -278,6 +278,16 @@ void lov_dump_user_lmm_v1(struct lov_user_md_v1 *lum, char *dname, char *fname,
                 obdstripe = 1;
         }
 
+        /* if it's a directory */
+        if (*fname == '\0') {
+                if (header && (obdstripe == 1)) {
+                        printf("count: %d, size: %d, offset: %d\n\n",
+                               lum->lmm_stripe_count, lum->lmm_stripe_size,
+                               (short int)lum->lmm_stripe_offset);
+                }                
+                return;
+        }        
+
         if (header && (obdstripe == 1)) {
                 printf("lmm_magic:          0x%08X\n",  lum->lmm_magic);
                 printf("lmm_object_gr:      "LPX64"\n", lum->lmm_object_gr);