From: Yan, Zheng Date: Fri, 22 Dec 2017 02:19:12 +0000 (+0800) Subject: qa/workunits/snaps: add hardlink snapshot test X-Git-Tag: v13.1.0~413^2~17 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=35af091a041384c8ef6c3a102c2762d6bfe15269;p=ceph.git qa/workunits/snaps: add hardlink snapshot test Signed-off-by: "Yan, Zheng" --- diff --git a/qa/workunits/fs/snaps/snaptest-hardlink.sh b/qa/workunits/fs/snaps/snaptest-hardlink.sh new file mode 100755 index 00000000000..9848a01981e --- /dev/null +++ b/qa/workunits/fs/snaps/snaptest-hardlink.sh @@ -0,0 +1,27 @@ +#!/bin/sh -x + +set -e + +ceph fs set cephfs allow_new_snaps true --yes-i-really-mean-it + +mkdir 1 2 +echo asdf >1/file1 +echo asdf >1/file2 + +ln 1/file1 2/file1 +ln 1/file2 2/file2 + +mkdir 2/.snap/s1 + +echo qwer >1/file1 +grep asdf 2/.snap/s1/file1 + +rm -f 1/file2 +grep asdf 2/.snap/s1/file2 +rm -f 2/file2 +grep asdf 2/.snap/s1/file2 + +rmdir 2/.snap/s1 +rm -rf 1 2 + +echo OK