}
run_test 16b "$FSXNUM iterations of dual-mount fsx at small size"
+test_16c() {
+ local file1=$DIR1/$tfile
+ local file2=$DIR2/$tfile
+ local stripe_size=$(do_facet $SINGLEMDS \
+ "$LCTL get_param -n lod.$(facet_svc $SINGLEMDS)*.stripesize")
+
+ [ $(facet_fstype ost1) != ldiskfs ] && skip "dio on ldiskfs only"
+
+ # to allocate grant because it may run out due to test_15.
+ $LFS setstripe -c -1 $file1
+ dd if=/dev/zero of=$file1 bs=$stripe_size count=$OSTCOUNT oflag=sync
+ dd if=/dev/zero of=$file2 bs=$stripe_size count=$OSTCOUNT oflag=sync
+ rm -f $file1
+ wait_delete_completed
+
+ local list=$(comma_list $(osts_nodes))
+ if ! get_osd_param $list '' read_cache_enable >/dev/null; then
+ skip "not cache-capable obdfilter"
+ fi
+
+ set_osd_param $list '' read_cache_enable 0
+ set_osd_param $list '' writethrough_cache_enable 0
+
+ $LFS setstripe -c -1 $file1 # b=10919
+ fsx -c 50 -p $FSXP -N $FSXNUM -l $((SIZE * 256)) -S 0 $file1 $file2 \
+ || error "fsx failed"
+ rm -f $file1
+
+ set_osd_param $list '' read_cache_enable 1
+ set_osd_param $list '' writethrough_cache_enable 1
+
+ return 0
+}
+run_test 16c "verify data consistency on ldiskfs with cache disabled (b=17397)"
+
+
test_17() { # bug 3513, 3667
remote_ost_nodsh && skip "remote OST with nodsh" && return
[ "x$DOM" = "xyes" ] && node=$(facet_active_host $SINGLEMDS)
# check whether obdfilter is cache capable at all
- if ! get_osd_param $node '' read_cache_enable >/dev/null; then
- echo "not cache-capable obdfilter"
- return 0
- fi
+ get_osd_param $node '' read_cache_enable >/dev/null ||
+ skip "not cache-capable obdfilter"
- local MAX=$(get_osd_param $node '' readcache_max_filesize | \
- head -n 1)
+ local MAX=$(get_osd_param $node '' readcache_max_filesize | head -n 1)
set_osd_param $node '' readcache_max_filesize 4096
dd if=/dev/urandom of=$TMP/$tfile bs=512k count=32
local SUM=$(cksum $TMP/$tfile | cut -d" " -f 1,2)
}
run_test 101c "Discard DoM data on close-unlink"
+# test to verify file handle related system calls
+# (name_to_handle_at/open_by_handle_at)
+# The new system calls are supported in glibc >= 2.14.
+
+# test to verify we can open by handle an unlinked file from > 1 client
+# This test opens the file normally on $DIR1, which is on one mount, and then
+# opens it by handle on $DIR2, which is on a different mount.
+test_102() {
+ echo "Test file_handle syscalls" > $DIR/$tfile ||
+ error "write failed"
+ check_fhandle_syscalls $DIR/$tfile $DIR2 ||
+ error "check_fhandle_syscalls failed"
+ rm -f $DIR2/$tfile
+}
+run_test 102 "Test open by handle of unlinked file"
+
log "cleanup: ======================================================"
# kill and wait in each test only guarentee script finish, but command in script