This differs from the main snapshot tests in that we do an unmount/mount between creating a snapshot and trying to read it back, so I wonder if this is a bug unmounting where we should be waiting to write back buffered data?

The sequence of operations is:

write some data to snapdir/subdir/file_a

snapshot snapdir

write some other data to snapdir/subdir/file_a

unlink snapdir/subdir/file_a and snapdir/subdir

unmount the client

mount the client again

read back snapdir/.snap/<snapshot>/subdir/file_a and check the original data is still there

I haven't tried reproducing this by hand outside of the automated test, that would be the next natural step.