2010-08-05 23:16:02 +00:00
|
|
|
#!/bin/sh -x
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
mkdir foo
|
2010-08-17 21:23:19 +00:00
|
|
|
|
|
|
|
# make sure mds handles it when the client does not send flushsnap
|
|
|
|
echo x > foo/x
|
|
|
|
sync
|
|
|
|
mkdir foo/.snap/ss
|
|
|
|
ln foo/x foo/xx
|
|
|
|
cat foo/.snap/ss/x
|
|
|
|
rmdir foo/.snap/ss
|
|
|
|
|
|
|
|
#
|
2010-08-05 23:16:02 +00:00
|
|
|
echo a > foo/a
|
|
|
|
echo b > foo/b
|
|
|
|
mkdir foo/.snap/s
|
|
|
|
r=`cat foo/.snap/s/a`
|
|
|
|
[ -z "$r" ] && echo "a appears empty in snapshot" && false
|
|
|
|
|
|
|
|
ln foo/b foo/b2
|
|
|
|
cat foo/.snap/s/b
|
|
|
|
|
|
|
|
echo "this used to hang:"
|
|
|
|
echo more >> foo/b2
|
|
|
|
echo "oh, it didn't hang! good job."
|
|
|
|
cat foo/b
|
|
|
|
rmdir foo/.snap/s
|
2010-08-17 19:47:36 +00:00
|
|
|
|
2010-08-05 23:16:02 +00:00
|
|
|
rm -r foo
|
2010-08-24 23:01:47 +00:00
|
|
|
|
|
|
|
echo OK
|