From 558a3a4a060fc4eaeff8c86c3719e2f4a047a07d Mon Sep 17 00:00:00 2001 From: Alex Zhuravlev Date: Sun, 11 Jan 2015 15:14:26 +0300 Subject: [PATCH 1/1] LU-6101 osd: zfs-osd should convert hash externally applied hash should be converted properly. Change-Id: I91417e1067620ef271b4db5454e39d5e74bda514 Signed-off-by: Alex Zhuravlev Reviewed-on: http://review.whamcloud.com/13340 Tested-by: Jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Isaac Huang Reviewed-by: Nathaniel Clark Reviewed-by: Oleg Drokin --- lustre/osd-zfs/osd_index.c | 3 ++- lustre/tests/sanity.sh | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/lustre/osd-zfs/osd_index.c b/lustre/osd-zfs/osd_index.c index 7a82627..b498b23 100644 --- a/lustre/osd-zfs/osd_index.c +++ b/lustre/osd-zfs/osd_index.c @@ -138,7 +138,8 @@ static inline void osd_obj_cursor_init_serialized(zap_cursor_t *zc, uint64_t dirhash) { struct osd_device *d = osd_obj2dev(o); - zap_cursor_init_serialized(zc, d->od_os, o->oo_db->db_object, dirhash); + osd_zap_cursor_init_serialized(zc, d->od_os, + o->oo_db->db_object, dirhash); } static inline int osd_obj_cursor_init(zap_cursor_t **zc, struct osd_object *o, diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 5accd1e..c70457c 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -58,7 +58,7 @@ init_test_env $@ . ${CONFIG:=$LUSTRE/tests/cfg/${NAME}.sh} init_logging -[ "$SLOW" = "no" ] && EXCEPT_SLOW="24o 27m 64b 68 71 77f 78 115 124b 230d" +[ "$SLOW" = "no" ] && EXCEPT_SLOW="24o 24D 27m 64b 68 71 77f 78 115 124b 230d" if [ $(facet_fstype $SINGLEMDS) = "zfs" ]; then # bug number for skipped test: LU-1593 LU-4536 LU-5242 LU-1957 LU-2805 @@ -1251,6 +1251,23 @@ test_24C() { } run_test 24C "check .. in striped dir" +test_24D() { # LU-6101 + local NFILES=50000 + + rm -rf $DIR/$tdir + mkdir -p $DIR/$tdir + createmany -m $DIR/$tdir/$tfile $NFILES + local t=$(ls $DIR/$tdir | wc -l) + local u=$(ls $DIR/$tdir | sort -u | wc -l) + local v=$(ls -ai $DIR/$tdir | sort -u | wc -l) + if [ $t -ne $NFILES -o $u -ne $NFILES -o $v -ne $((NFILES + 2)) ] ; then + error "Expected $NFILES files, got $t ($u unique $v .&..)" + fi + + rm -rf $DIR/$tdir || error "Can not delete directories" +} +run_test 24D "readdir() returns correct number of entries after cursor reload" + test_25a() { echo '== symlink sanity =============================================' -- 1.8.3.1