Whamcloud - gitweb
LU-3624 utils: fix lctl test_mkdir for use in mds-survey 01/7101/2
authorGregoire Pichon <gregoire.pichon@bull.net>
Wed, 24 Jul 2013 14:42:29 +0000 (16:42 +0200)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 10 Sep 2013 16:46:09 +0000 (16:46 +0000)
The mds-survey script uses the 'lctl test_mkdir' command to create
directories for metadata tests. This currently raises the following
error message:
"...stre-2.4.0/lustre/include/lustre/lustre_idl.h:683:ostid_set_id())
Bad 18446744073709551615 to set 0:0"

This patch fixes the jt_obd_md_common() routine to avoid this error
to be generated.

Signed-off-by: Gregoire Pichon <gregoire.pichon@bull.net>
Change-Id: Idccc13166d6160bfb5f9ac6a79911cc27bfe77a2
Reviewed-on: http://review.whamcloud.com/7101
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobbie Lind <bobbie.j.lind@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/utils/obd.c

index 4860d5d..ca2aec8 100644 (file)
@@ -1404,7 +1404,9 @@ int jt_obd_md_common(int argc, char **argv, int cmd)
         while (shmem_running()) {
                 struct lu_fid fid = { 0 };
 
-               ostid_set_id(&data.ioc_obdo2.o_oi, child_base_id);
+               if (child_base_id != -1)
+                       ostid_set_id(&data.ioc_obdo2.o_oi, child_base_id);
+
                 data.ioc_obdo2.o_mode = mode | create_mode;
                 data.ioc_obdo2.o_valid = OBD_MD_FLID | OBD_MD_FLTYPE |
                                          OBD_MD_FLMODE | OBD_MD_FLFLAGS |