From: Chengguang Xu <cgxu@mykernel.net>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Dave Chinner <david@fromorbit.com>, Eryu Guan <eguan@redhat.com>,
fstests <fstests@vger.kernel.org>
Subject: Re: [PATCH] common: Add infrastructure for syncfs syscall tests
Date: Mon, 4 Dec 2017 14:05:16 +0800 [thread overview]
Message-ID: <226EEED1-8707-485D-BEE8-45DBB4D4F670@mykernel.net> (raw)
In-Reply-To: <CAOQ4uxj4kBygrqA44OPCoJ4qRFFF_hPSeY8DL=Y8DA_eTa=p4Q@mail.gmail.com>
>
> 在 2017年12月3日,下午2:45,Amir Goldstein <amir73il@gmail.com> 写道:
>
> On Sat, Dec 2, 2017 at 11:40 PM, Dave Chinner <david@fromorbit.com> wrote:
>> On Sat, Dec 02, 2017 at 12:43:18PM +0200, Amir Goldstein wrote:
>>> On Fri, Dec 1, 2017 at 11:43 PM, Dave Chinner <david@fromorbit.com> wrote:
> [...]
>
>>
>> Implement FS_IOC_SHUTDOWN on overlay, then you can test it via
>> software controlled shutdown. i.e. make overlay return true for
>> _require_scratch_shutdown() and implement what is needed to shut it
>> all down and prevent further writes of dirty inodes. Thens do
>> data/metadata checks after a shutdown/unmount/mount cycle. Then
>> what you have on disk after the mount cycle is what was written by
>> sync/fsync/syncfs...
>>
>> We've only been using this shutdown mechanism to test fsync/sync
>> mechanisms on XFS for ~20 years.
>>
>
> All right.
> We don't need to implement FS_IOC_SHUTDOWN on overlay, we
> only need to shutdown upper fs if upper fs supports shutdown.
> Doing that would be the equivalent of a dm-flakey test for a blokdev fs,
> because upper fs is the only persistent storage of overlayfs.
> Thanks for the advice.
>
> Chengguang,
>
> I propose that you teach _require_scratch_shutdown about
> OVL_BASE_SCRATCH_MNT and write and overlay/* test
> that tests syncfs by shutting down upper fs if upper fs supports shutdown.
OK, let me try this way, for data correctness I’ll use stat & md5_checksum.
Is there anything else should I add for checking?
>
> It doesn't matter much that the test won't run on all underlying fs as long
> as a regression will be caught by someone running overlay tests over
> xfs/ext4.
>
> Cheers,
> Amir.
>
next prev parent reply other threads:[~2017-12-04 6:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-01 3:55 [PATCH] common: Add infrastructure for syncfs syscall tests Chengguang Xu
2017-12-01 4:04 ` Chengguang Xu
2017-12-01 4:13 ` Eryu Guan
2017-12-01 6:38 ` Chengguang Xu
2017-12-01 7:21 ` Amir Goldstein
2017-12-01 21:43 ` Dave Chinner
2017-12-02 10:43 ` Amir Goldstein
2017-12-02 11:37 ` Amir Goldstein
2017-12-02 21:40 ` Dave Chinner
2017-12-03 6:45 ` Amir Goldstein
2017-12-04 6:05 ` Chengguang Xu [this message]
2017-12-04 8:44 ` Amir Goldstein
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=226EEED1-8707-485D-BEE8-45DBB4D4F670@mykernel.net \
--to=cgxu@mykernel.net \
--cc=amir73il@gmail.com \
--cc=david@fromorbit.com \
--cc=eguan@redhat.com \
--cc=fstests@vger.kernel.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