ceph/qa/workunits/snaptest-double-null.sh
Sage Weil 3d10b34074 mds: fix null_snapflush with multiple intervening snaps
The client is allowed to not send a snapflush if there is no dirty metadata
to write for a given snap.  However, the mds can only look up inodes by
the last snapid in the interval.  So, when doing a null_snapflush (filling
in for snapflushes the client didn't send), we have to walk forward through
intervening snaps until we find the right inode.

Note that this means we will call _do_snap_update multiple times on the
same inode, but with different snapids.

Add unit test to check this.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-10 20:58:49 -08:00

24 lines
346 B
Bash
Executable File

#!/bin/sh -x
set -e
# multiple intervening snapshots with no modifications, and thus no
# snapflush client_caps messages. make sure the mds can handle this.
for f in `seq 1 20` ; do
mkdir a
cat > a/foo &
mkdir a/.snap/one
mkdir a/.snap/two
chmod 777 a/foo
sync # this might crash the mds
ps
rmdir a/.snap/*
rm a/foo
rmdir a
done
echo OK