From: David Howells <dhowells@redhat.com>
To: Steve French <sfrench@samba.org>
Cc: dhowells@redhat.com, fstests@vger.kernel.org,
linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Weird behaviour with cifs in xfstests shutdown tests
Date: Thu, 27 Apr 2023 09:26:53 +0100 [thread overview]
Message-ID: <971805.1682584013@warthog.procyon.org.uk> (raw)
I'm seeing some failures running xfstests on cifs when it comes to tests that
do a shutdown of the filesystem, generic/392 for example:
generic/392 [failed, exit status 1]- output mismatch (see /root/xfstests-dev/results//smb3/generic/392.out.bad)
--- tests/generic/392.out 2021-05-25 13:27:50.000000000 +0100
+++ /root/xfstests-dev/results//smb3/generic/392.out.bad 2023-04-27 09:07:42.402657080 +0100
@@ -1,11 +1,67 @@
QA output created by 392
==== i_size 1024 test with fsync ====
+stat: cannot statx '/xfstest.scratch/testfile': Input/output error
+Before: "b: 8194 s: 4195328 a: 2023-04-27 09:07:39.410675400 +0100 m: 2023-04-27 09:07:39.410675400 +0100 c: 2023-04-27 09:07:39.410675400 +0100"
+After :
+rm: cannot remove '/xfstest.scratch/testfile': Input/output error
==== i_size 4096 test with fsync ====
...
(Run 'diff -u /root/xfstests-dev/tests/generic/392.out /root/xfstests-dev/results//smb3/generic/392.out.bad' to see the entire diff)
The problem appears to be that the CIFS_MOUNT_SHUTDOWN persists if there's
another cifs mount from the same server present. So in generic/392 it does:
before=`stat "$stat_opt" $testfile`
$XFS_IO_PROG -c "$sync_mode" $testfile | _filter_xfs_io
_scratch_shutdown | tee -a $seqres.full
_scratch_cycle_mount
after=`stat "$stat_opt" $testfile`
which cycles the *scratch* mount, but leaves the test mount still mounted and
then the 'after' stat fails with EIO.
Testing this by hand:
mount //192.168.6.1/scratch /xfstest.scratch/ -o user=shares,pass=...;\
touch /xfstest.scratch/testfile; \
stat /xfstest.scratch/testfile; \
./src/godown /xfstest.scratch/; \
umount /xfstest.scratch/; \
mount //192.168.6.1/scratch /xfstest.scratch/ -o user=shares,pass=...; \
stat /xfstest.scratch/testfile
works, but will fail if I do:
mount //192.168.6.1/test /xfstest.test/ -o user=shares,pass=...;
first.
Interestingly, the two mounts have different device numbers according to stat,
so they would appear to have different superblocks.
David
reply other threads:[~2023-04-27 8:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=971805.1682584013@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=fstests@vger.kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=sfrench@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox