2010-08-22 22:18:21 +00:00
|
|
|
#!/bin/sh -x
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2014-02-05 18:44:40 +00:00
|
|
|
ceph mds set allow_new_snaps true --yes-i-really-mean-it
|
2013-09-25 23:02:02 +00:00
|
|
|
|
2010-08-24 17:46:23 +00:00
|
|
|
echo "testing simple xattr wb"
|
|
|
|
touch x
|
|
|
|
setfattr -n user.foo x
|
|
|
|
mkdir .snap/s1
|
|
|
|
getfattr -n user.foo .snap/s1/x | grep user.foo
|
|
|
|
rm x
|
|
|
|
rmdir .snap/s1
|
|
|
|
|
|
|
|
echo "testing wb with pre-wb server cow"
|
2010-08-22 22:18:21 +00:00
|
|
|
mkdir a
|
|
|
|
mkdir a/b
|
|
|
|
mkdir a/b/c
|
|
|
|
# b now has As but not Ax
|
|
|
|
setfattr -n user.foo a/b
|
|
|
|
mkdir a/.snap/s
|
|
|
|
mkdir a/b/cc
|
|
|
|
# b now has been cowed on the server, but we still have dirty xattr caps
|
|
|
|
getfattr -n user.foo a/b # there they are...
|
2010-08-24 17:46:23 +00:00
|
|
|
getfattr -n user.foo a/.snap/s/b | grep user.foo # should be there, too!
|
2010-08-22 22:18:21 +00:00
|
|
|
|
|
|
|
# ok, clean up
|
|
|
|
rmdir a/.snap/s
|
|
|
|
rm -r a
|
|
|
|
|
2010-08-24 23:01:47 +00:00
|
|
|
echo OK
|