From: thantry Date: Wed, 11 Dec 2002 18:59:18 +0000 (+0000) Subject: Merged from HEAD on 12/11/2002. X-Git-Tag: v1_7_110~2^11~230 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=37681f9830101a9a49012ab5374bac541d996d7c;p=fs%2Flustre-release.git Merged from HEAD on 12/11/2002. --- diff --git a/lustre/scripts/version_tag.pl b/lustre/scripts/version_tag.pl index e810f3f..a92fef4 100644 --- a/lustre/scripts/version_tag.pl +++ b/lustre/scripts/version_tag.pl @@ -135,7 +135,8 @@ sub generate_ver($$$) localtime($mtime); $year += 1900; $mon++; - my $show_last = $year . $mon . $mday . $hour . $min . $sec; + my $show_last = sprintf("%04d%02d%02d%02d%02d%02d", $year, $mon, $mday, + $hour, $min, $sec); print "#define BUILD_VERSION \""; if ($pristine) { diff --git a/lustre/tests/llmount2-hack.sh b/lustre/tests/llmount2-hack.sh index d17805a..495626c 100644 --- a/lustre/tests/llmount2-hack.sh +++ b/lustre/tests/llmount2-hack.sh @@ -2,16 +2,11 @@ # suggested boilerplate for test script LCONF=${LCONF:-../utils/lconf} -NAME=${NAME:-local2} +NAME=${NAME:-local2-hack} config=$NAME.xml -mkconfig=./$NAME.sh -if [ ! -f $config -o $mkconfig -nt $config ]; then - sh $mkconfig $config || exit 1 -fi - -${LCONF} -v --reformat --gdb $config || exit 2 +${LCONF} --reformat --gdb $config || exit 2 ../utils/lctl < -#include -#include -#include -#include -#include -#include -#include -#include -#include - -int main(int argc, char ** argv) -{ - int rc, fsuid; - - if (argc < 2) { - printf("Usage %s fsuid\n", argv[0]); - return 1; - } - - fsuid = strtoul(argv[2], NULL, 0); - rc = setfsuid(fsuid); - if (rc) { - printf("mknod(%s) error: %s\n", argv[1], strerror(errno)); - } - return rc; -} diff --git a/lustre/utils/lfind.c b/lustre/utils/lfind.c index d488748..26f6a3f 100644 --- a/lustre/utils/lfind.c +++ b/lustre/utils/lfind.c @@ -24,7 +24,7 @@ char * cmd; struct option longOpts[] = { {"help", 0, 0, 'h'}, {"obd", 1, 0, 'o'}, - {"query", 0, 0, 'o'}, + {"query", 0, 0, 'q'}, {"verbose", 0, 0, 'v'}, {0, 0, 0, 0} }; @@ -217,12 +217,12 @@ processFile(const char *path, const struct stat *sp, int flag, struct FTW *ftwp) close(fd); - if (query || verbose) - printf("\n%s:\n", path); + if (query || verbose || lmm->lmm_objects[obdindex].l_object_id) + printf("%s\n", path); if (verbose) { printf("lmm_magic: 0x%x\n", lmm->lmm_magic); - printf("lmm_object_id: 0x%llx\n", lmm->lmm_object_id); + printf("lmm_object_id: "LPX64"\n", lmm->lmm_object_id); printf("lmm_stripe_offset: %d\n", lmm->lmm_stripe_offset); printf("lmm_stripe_count: %d\n", lmm->lmm_stripe_count); printf("lmm_ost_count: %d\n", lmm->lmm_ost_count); @@ -232,24 +232,26 @@ processFile(const char *path, const struct stat *sp, int flag, struct FTW *ftwp) count = lmm->lmm_ost_count; if (query || verbose) { - struct lov_object_id *loi; - __u64 oid; - - loi = lmm->lmm_objects; - - printf("obdidx\tobjid\n"); - - for (i = 0; i < count; i++, loi++) - if ((oid = loi->l_object_id)) - printf("%6d\t%5lld\n", i, oid); + long long oid; + int ost = lmm->lmm_stripe_offset; + int header = 1; + + for (i = 0; i < count; i++, ost++) { + ost %= lmm->lmm_ost_count; + if ((oid = lmm->lmm_objects[ost].l_object_id)) { + if (header) { + printf("\tobdidx\t objid\n"); + header = 0; + } + printf("\t%6u\t%8llu%s\n", + ost, oid, obdindex == ost ? " *" : ""); + } + } if (query) return(0); } - if (lmm->lmm_objects[obdindex].l_object_id) - printf("%s\n", path); - return(0); } @@ -297,7 +299,7 @@ getobdindex(const char *path) obdcount = desc.ld_tgt_count; - if (query) { + if (query || verbose) { printf("OBDS:\n"); for (i = 0, uuidp = uuids; i < obdcount; i++, uuidp++) printf("%4d: %s\n", i, (char *)uuidp);