mirror of
https://github.com/versity/scoutfs.git
synced 2026-01-05 03:44:05 +00:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
50bff13f21 | ||
|
|
de70ca2372 | ||
|
|
5af1412d5f | ||
|
|
0a2b2ad409 | ||
|
|
6c4590a8a0 | ||
|
|
1768f69c3c | ||
|
|
dcb0fd5805 | ||
|
|
660f874488 | ||
|
|
e1a6689a9b | ||
|
|
2884a92408 | ||
|
|
e194714004 | ||
|
|
8bb2f83cf9 | ||
|
|
6a9a6789d5 | ||
|
|
ee630b164f | ||
|
|
1c7678b6f5 |
@@ -1618,7 +1618,8 @@ static int server_get_log_trees(struct super_block *sb,
|
|||||||
goto update;
|
goto update;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = alloc_move_empty(sb, &super->data_alloc, <.data_freed, 100);
|
ret = alloc_move_empty(sb, &super->data_alloc, <.data_freed,
|
||||||
|
COMMIT_HOLD_ALLOC_BUDGET / 2);
|
||||||
if (ret == -EINPROGRESS)
|
if (ret == -EINPROGRESS)
|
||||||
ret = 0;
|
ret = 0;
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
@@ -1913,9 +1914,11 @@ static int reclaim_open_log_tree(struct super_block *sb, u64 rid)
|
|||||||
scoutfs_alloc_splice_list(sb, &server->alloc, &server->wri, server->other_freed,
|
scoutfs_alloc_splice_list(sb, &server->alloc, &server->wri, server->other_freed,
|
||||||
<.meta_avail)) ?:
|
<.meta_avail)) ?:
|
||||||
(err_str = "empty data_avail",
|
(err_str = "empty data_avail",
|
||||||
alloc_move_empty(sb, &super->data_alloc, <.data_avail, 100)) ?:
|
alloc_move_empty(sb, &super->data_alloc, <.data_avail,
|
||||||
|
COMMIT_HOLD_ALLOC_BUDGET / 2)) ?:
|
||||||
(err_str = "empty data_freed",
|
(err_str = "empty data_freed",
|
||||||
alloc_move_empty(sb, &super->data_alloc, <.data_freed, 100));
|
alloc_move_empty(sb, &super->data_alloc, <.data_freed,
|
||||||
|
COMMIT_HOLD_ALLOC_BUDGET / 2));
|
||||||
mutex_unlock(&server->alloc_mutex);
|
mutex_unlock(&server->alloc_mutex);
|
||||||
|
|
||||||
/* only finalize, allowing merging, once the allocators are fully freed */
|
/* only finalize, allowing merging, once the allocators are fully freed */
|
||||||
@@ -3036,7 +3039,13 @@ static int server_commit_log_merge(struct super_block *sb,
|
|||||||
SCOUTFS_LOG_MERGE_STATUS_ZONE, 0, 0,
|
SCOUTFS_LOG_MERGE_STATUS_ZONE, 0, 0,
|
||||||
&stat, sizeof(stat));
|
&stat, sizeof(stat));
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
err_str = "getting merge status item";
|
/*
|
||||||
|
* During a retransmission, it's possible that the server
|
||||||
|
* already committed and resolved this log merge. ENOENT
|
||||||
|
* is expected in that case.
|
||||||
|
*/
|
||||||
|
if (ret != -ENOENT)
|
||||||
|
err_str = "getting merge status item";
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
echo "$0 running rid '$SCOUTFS_FENCED_REQ_RID' ip '$SCOUTFS_FENCED_REQ_IP' args '$@'"
|
echo "$0 running rid '$SCOUTFS_FENCED_REQ_RID' ip '$SCOUTFS_FENCED_REQ_IP' args '$@'"
|
||||||
|
|
||||||
echo_fail() {
|
echo_fail() {
|
||||||
echo "$@" >> /dev/stderr
|
echo "$@" >&2
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -27,8 +27,7 @@ for fs in /sys/fs/scoutfs/*; do
|
|||||||
nr="$(quiet_cat $fs/data_device_maj_min)"
|
nr="$(quiet_cat $fs/data_device_maj_min)"
|
||||||
[ ! -d "$fs" -o "$fs_rid" != "$rid" ] && continue
|
[ ! -d "$fs" -o "$fs_rid" != "$rid" ] && continue
|
||||||
|
|
||||||
mnt=$(findmnt -l -n -t scoutfs -o TARGET -S $nr) || \
|
mnt=$(findmnt -l -n -t scoutfs -o TARGET -S $nr)
|
||||||
echo_fail "findmnt -t scoutfs -S $nr failed"
|
|
||||||
[ -z "$mnt" ] && continue
|
[ -z "$mnt" ] && continue
|
||||||
|
|
||||||
if ! umount -qf "$mnt"; then
|
if ! umount -qf "$mnt"; then
|
||||||
|
|||||||
@@ -170,6 +170,9 @@ t_filter_dmesg()
|
|||||||
# some ci test guests are unresponsive
|
# some ci test guests are unresponsive
|
||||||
re="$re|longest quorum heartbeat .* delay"
|
re="$re|longest quorum heartbeat .* delay"
|
||||||
|
|
||||||
|
# creating block devices may trigger this
|
||||||
|
re="$re|block device autoloading is deprecated and will be removed."
|
||||||
|
|
||||||
egrep -v "($re)" | \
|
egrep -v "($re)" | \
|
||||||
ignore_harmless_unwind_kasan_stack_oob
|
ignore_harmless_unwind_kasan_stack_oob
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,9 +43,14 @@ t_tap_progress()
|
|||||||
local testname=$1
|
local testname=$1
|
||||||
local result=$2
|
local result=$2
|
||||||
|
|
||||||
|
local stmsg=""
|
||||||
local diff=""
|
local diff=""
|
||||||
local dmsg=""
|
local dmsg=""
|
||||||
|
|
||||||
|
if [[ -s $T_RESULTS/tmp/${testname}/status.msg ]]; then
|
||||||
|
stmsg="1"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -s "$T_RESULTS/tmp/${testname}/dmesg.new" ]]; then
|
if [[ -s "$T_RESULTS/tmp/${testname}/dmesg.new" ]]; then
|
||||||
dmsg="1"
|
dmsg="1"
|
||||||
fi
|
fi
|
||||||
@@ -61,6 +66,7 @@ t_tap_progress()
|
|||||||
echo "# ${testname} ** skipped - permitted **"
|
echo "# ${testname} ** skipped - permitted **"
|
||||||
else
|
else
|
||||||
echo "not ok ${i} - ${testname}"
|
echo "not ok ${i} - ${testname}"
|
||||||
|
|
||||||
case ${result} in
|
case ${result} in
|
||||||
101)
|
101)
|
||||||
echo "# ${testname} ** skipped **"
|
echo "# ${testname} ** skipped **"
|
||||||
@@ -70,6 +76,13 @@ t_tap_progress()
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
if [[ -n "${stmsg}" ]]; then
|
||||||
|
echo "#"
|
||||||
|
echo "# status:"
|
||||||
|
echo "#"
|
||||||
|
cat $T_RESULTS/tmp/${testname}/status.msg | sed 's/^/# - /'
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -n "${diff}" ]]; then
|
if [[ -n "${diff}" ]]; then
|
||||||
echo "#"
|
echo "#"
|
||||||
echo "# diff:"
|
echo "# diff:"
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ touch $T_D0/dir/file
|
|||||||
mkdir $T_D0/dir/dir
|
mkdir $T_D0/dir/dir
|
||||||
ln -s $T_D0/dir/file $T_D0/dir/symlink
|
ln -s $T_D0/dir/file $T_D0/dir/symlink
|
||||||
mknod $T_D0/dir/char c 1 3 # null
|
mknod $T_D0/dir/char c 1 3 # null
|
||||||
mknod $T_D0/dir/block b 7 0 # loop0
|
mknod $T_D0/dir/block b 42 0 # SAMPLE block dev - nonexistant/demo use only number
|
||||||
for name in $(ls -UA $T_D0/dir | sort); do
|
for name in $(ls -UA $T_D0/dir | sort); do
|
||||||
ino=$(stat -c '%i' $T_D0/dir/$name)
|
ino=$(stat -c '%i' $T_D0/dir/$name)
|
||||||
$GRE $ino | filter_types
|
$GRE $ino | filter_types
|
||||||
|
|||||||
@@ -8,19 +8,19 @@ t_require_mounts 2
|
|||||||
echo "=== renameat2 noreplace flag test"
|
echo "=== renameat2 noreplace flag test"
|
||||||
|
|
||||||
# give each mount their own dir (lock group) to minimize create contention
|
# give each mount their own dir (lock group) to minimize create contention
|
||||||
mkdir $T_M0/dir0
|
mkdir $T_D0/dir0
|
||||||
mkdir $T_M1/dir1
|
mkdir $T_D1/dir1
|
||||||
|
|
||||||
echo "=== run two asynchronous calls to renameat2 NOREPLACE"
|
echo "=== run two asynchronous calls to renameat2 NOREPLACE"
|
||||||
for i in $(seq 0 100); do
|
for i in $(seq 0 100); do
|
||||||
# prepare inputs in isolation
|
# prepare inputs in isolation
|
||||||
touch "$T_M0/dir0/old0"
|
touch "$T_D0/dir0/old0"
|
||||||
touch "$T_M1/dir1/old1"
|
touch "$T_D1/dir1/old1"
|
||||||
|
|
||||||
# race doing noreplace renames, both can't succeed
|
# race doing noreplace renames, both can't succeed
|
||||||
dumb_renameat2 -n "$T_M0/dir0/old0" "$T_M0/dir0/sharednew" 2> /dev/null &
|
dumb_renameat2 -n "$T_D0/dir0/old0" "$T_D0/dir0/sharednew" 2> /dev/null &
|
||||||
pid0=$!
|
pid0=$!
|
||||||
dumb_renameat2 -n "$T_M1/dir1/old1" "$T_M1/dir0/sharednew" 2> /dev/null &
|
dumb_renameat2 -n "$T_D1/dir1/old1" "$T_D1/dir0/sharednew" 2> /dev/null &
|
||||||
pid1=$!
|
pid1=$!
|
||||||
|
|
||||||
wait $pid0
|
wait $pid0
|
||||||
@@ -31,7 +31,7 @@ for i in $(seq 0 100); do
|
|||||||
test "$rc0" == 0 -a "$rc1" == 0 && t_fail "both renames succeeded"
|
test "$rc0" == 0 -a "$rc1" == 0 && t_fail "both renames succeeded"
|
||||||
|
|
||||||
# blow away possible files for either race outcome
|
# blow away possible files for either race outcome
|
||||||
rm -f "$T_M0/dir0/old0" "$T_M1/dir1/old1" "$T_M0/dir0/sharednew" "$T_M1/dir1/sharednew"
|
rm -f "$T_D0/dir0/old0" "$T_D1/dir1/old1" "$T_D0/dir0/sharednew" "$T_D1/dir1/sharednew"
|
||||||
done
|
done
|
||||||
|
|
||||||
t_pass
|
t_pass
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ message_output()
|
|||||||
|
|
||||||
error_message()
|
error_message()
|
||||||
{
|
{
|
||||||
message_output "$@" >> /dev/stderr
|
message_output "$@" >&2
|
||||||
}
|
}
|
||||||
|
|
||||||
error_exit()
|
error_exit()
|
||||||
|
|||||||
Reference in New Issue
Block a user