Whamcloud - gitweb
LU-6101 osd: zfs-osd should convert hash 40/13340/3
authorAlex Zhuravlev <alexey.zhuravlev@intel.com>
Sun, 11 Jan 2015 12:14:26 +0000 (15:14 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 16 Jan 2015 03:27:26 +0000 (03:27 +0000)
externally applied hash should be converted properly.

Change-Id: I91417e1067620ef271b4db5454e39d5e74bda514
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: http://review.whamcloud.com/13340
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/osd-zfs/osd_index.c
lustre/tests/sanity.sh

index 7a82627..b498b23 100644 (file)
@@ -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,
index 5accd1e..c70457c 100644 (file)
@@ -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 ============================================='