From 5ae2c575ff234c7b1189d2f71d8e5a73509591f3 Mon Sep 17 00:00:00 2001 From: Gregoire Pichon Date: Wed, 24 Jul 2013 16:42:29 +0200 Subject: [PATCH] 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 --- lustre/utils/obd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 | -- 1.8.3.1