Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / qa / workunits / fs / snaps / snaptest-upchildrealms.sh
1 #!/bin/sh -x
2
3 set -e
4
5 ceph mds set allow_new_snaps true --yes-i-really-mean-it
6
7 #
8 # verify that a snap update on a parent realm will induce
9 # snap cap writeback for inodes child realms
10 #
11
12 mkdir a
13 mkdir a/b
14 mkdir a/.snap/a1
15 mkdir a/b/.snap/b1
16 echo asdf > a/b/foo
17 mkdir a/.snap/a2
18 # client _should_ have just queued a capsnap for writeback
19 ln a/b/foo a/b/bar       # make the server cow the inode
20
21 echo "this should not hang..."
22 cat a/b/.snap/_a2_*/foo
23 echo "good, it did not hang."
24
25 rmdir a/b/.snap/b1
26 rmdir a/.snap/a1
27 rmdir a/.snap/a2
28 rm -r a
29
30 echo "OK"