# bug number: LU-8411 LU-9054
ALWAYS_EXCEPT+=" 407 312"
+if $SHARED_KEY; then
+ # bug number: LU-14181 LU-14181
+ ALWAYS_EXCEPT+=" 64e 64f"
+fi
+
selinux_status=$(getenforce)
if [ "$selinux_status" != "Disabled" ]; then
# bug number:
}
run_test 31p "remove of open striped directory"
+test_31q() {
+ [ $MDSCOUNT -lt 3 ] && skip_env "needs >= 3 MDTs"
+
+ $LFS mkdir -i 3,1 $DIR/$tdir || error "mkdir failed"
+ index=$($LFS getdirstripe -i $DIR/$tdir)
+ [ $index -eq 3 ] || error "first stripe index $index != 3"
+ index=$($LFS getdirstripe $DIR/$tdir | tail -1 | awk '{print $1}')
+ [ $index -eq 1 ] || error "second stripe index $index != 1"
+
+ # when "-c <stripe_count>" is set, the number of MDTs specified after
+ # "-i" should equal to the stripe count
+ $LFS mkdir -i 3,1 -c 3 $DIR/$tdir.2 && error "mkdir should fail" || true
+}
+run_test 31q "create striped directory on specific MDTs"
+
cleanup_test32_mount() {
local rc=0
trap 0
}
run_test 398d "run aiocp to verify block size > stripe size"
+test_398e() {
+ dd if=/dev/zero of=$DIR/$tfile bs=1234 count=1
+ touch $DIR/$tfile.new
+ dd if=$DIR/$tfile of=$DIR/$tfile.new bs=1M count=1 oflag=direct
+}
+run_test 398e "O_Direct open cleared by fcntl doesn't cause hang"
+
test_fake_rw() {
local read_write=$1
if [ "$read_write" = "write" ]; then
[[ $offset == 1000000 ]] || error "offset $offset != 1000000"
printf "Seeking data from 1000000 ... "
lseek_test -d 1000000 $file && error "lseek should fail"
- # full first component, non-inited second one
+ rm $file
+
+ # full component followed by non-inited one
+ $LFS setstripe -E 1M -c2 -E eof $file
dd if=/dev/urandom of=$file bs=1M count=1
printf "Seeking hole from 1000000 ... "
offset=$(lseek_test -l 1000000 $file)
# init second component and truncate back
echo "123" >> $file
$TRUNCATE $file 1048576
- ls -lia $file
printf "Seeking hole from 1000000 ... "
offset=$(lseek_test -l 1000000 $file)
echo $offset
# open intent should update default EA size
# see mdc_update_max_ea_from_body()
# notice this is the very first RPC to MDS2
- cp /etc/services $DIR/$tdir/mds2 ||
- error "Failed to copy files to mds$n"
+ out=$(cp /etc/services $DIR/$tdir/mds2 2>&1)
+ ret=$?
+ echo $out
+ # With SSK, this situation can lead to -EPERM being returned.
+ # In that case, simply retry.
+ if [ $ret -ne 0 ] && $SHARED_KEY; then
+ if echo "$out" | grep -q "not permitted"; then
+ cp /etc/services $DIR/$tdir/mds2
+ ret=$?
+ fi
+ fi
+ [ $ret -eq 0 ] || error "Failed to copy files to mds$n"
}
run_test 820 "update max EA from open intent"