Re: [PATCH] common: Add infrastructure for syncfs syscall tests

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



> 
> 在 2017年12月3日,下午2:45,Amir Goldstein <amir73il@xxxxxxxxx> 写道:
> 
> On Sat, Dec 2, 2017 at 11:40 PM, Dave Chinner <david@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxx> 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.
> 

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux