Skip to content
Snippets Groups Projects
Commit 024a2f89 authored by bwzhou's avatar bwzhou
Browse files

Branch HEAD

b=13285
r=adilger, deen

1. updated ext3-mballoc3-core.patch and added ext3-max-dir-size.patch to limit the maximum size of a directory;
2. updated other ldiskfs patches to resolve patch conflicts caused by the above two new patches;
3. added a test case in sanity.sh.
parent 31e1dbf5
No related branches found
No related tags found
No related merge requests found
......@@ -4992,6 +4992,43 @@ test_128() { # bug 15212
}
run_test 128 "interactive lfs for 2 consecutive find's"
test_129() {
[ "$FSTYPE" = "ldiskfs" ] || return 0
mkdir $DIR/$tdir
EFBIG=27
ldiskfs_prefix=/proc/fs/ldiskfs
proc_file=max_dir_size
max_bytes=16385
echo $max_bytes >$ldiskfs_prefix/$proc_file
I=0
J=0
while [ $I -lt $max_bytes ]; do
touch $DIR/$tdir/$J
J=$((J+1))
I=$(stat -c%s "$DIR/$tdir")
done
# One more file and we should be over the limit
multiop $DIR/$tdir/$J Oc
rc=$?
if [ $rc -eq 0 ]; then
rm -rf $DIR/$tdir
error "exceeded dir size limit: $I bytes"
elif [ $rc -ne $EFBIG ]; then
rm -rf $DIR/$tdir
error "return code $rc received instead of expected $EFBIG"
else
echo "return code $rc received as expected"
fi
echo 0 >$ldiskfs_prefix/$proc_file
rm -rf $DIR/$tdir
}
run_test 129 "test directory size limit ========================"
TMPDIR=$OLDTMPDIR
TMP=$OLDTMP
HOME=$OLDHOME
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment