From: Gregoire Pichon Date: Wed, 24 Jul 2013 14:42:29 +0000 (+0200) Subject: LU-3624 utils: fix lctl test_mkdir for use in mds-survey X-Git-Tag: 2.4.93~56 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=5ae2c575ff234c7b1189d2f71d8e5a73509591f3 LU-3624 utils: fix lctl test_mkdir for use in mds-survey 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 Change-Id: Idccc13166d6160bfb5f9ac6a79911cc27bfe77a2 Reviewed-on: http://review.whamcloud.com/7101 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Bobbie Lind Reviewed-by: Lai Siyao Reviewed-by: Andreas Dilger --- diff --git a/lustre/utils/obd.c b/lustre/utils/obd.c index 4860d5d..ca2aec8 100644 --- a/lustre/utils/obd.c +++ b/lustre/utils/obd.c @@ -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 |