Re: [PATCH v2 6/6] xfs/260: Move xfs/260 to generic

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



On 2020/6/30 23:50, Ira Weiny wrote:
On Tue, Jun 30, 2020 at 03:08:50PM +0800, Xiao Yang wrote:
On 2020/6/24 2:08, Ira Weiny wrote:
On Tue, Jun 23, 2020 at 04:51:31PM +0800, Xiao Yang wrote:
On 2020/6/19 23:15, Ira Weiny wrote:
On Thu, Jun 18, 2020 at 11:35:56PM +0800, Xiao Yang wrote:
On 6/18/20 5:48 AM, Ira Weiny wrote:
On Wed, Jun 17, 2020 at 05:32:04PM +0800, Xiao Yang wrote:
From: Xiao Yang<yangx.jy@xxxxxxxxxxxxxx>
[snip]

     }
@@ -124,17 +151,11 @@ do_tests()
     # make xfs aligned for PMD fault testing
     _scratch_mkfs_geom $(_get_hugepagesize) 1>>    $seqres.full 2>&1
-# mount with dax option
-_scratch_mount "-o dax"
-
Hi Ira,

Why do you want to remove this combination(i.e. test per-inode DAX flag
under mounting with dax option) ?
Is it because mounting with dax option ignore FS_XFLAG_DAX flag?
I think it is a reasonable combination. :-)
Yes running with the DAX mount option really does not test anything IMO.
Hi Ira,

Sorry for the late reply because I was busy with other tasks last week. :-)

After reading related code, setting/clearing FS_XFLAG_DAX have no chance to
change S_DAX
flag if mount with dax option, so I will remove this combination in v3
patch.

     tsize=$((128 * 1024 * 1024))
-do_tests
-_scratch_unmount
-
     # mount again without dax option
     export MOUNT_OPTIONS=""
-_scratch_mount
+_scratch_mount "-o dax=inode"
     do_tests
     # success, all done
Could we keep _scratch_mount without dax so that this test can run on both
old and new kernel?
See the following reasons:
1) FS_XFLAG_DAX was introduced by commit 58f88ca("xfs: introduce per-inode
DAX enablement") since 2017.
2) _scratch_mount with dax=inode is equal to _scratch_mount without dax.
I suppose that would be ok.  But being generic what happens when this runs on
FS's which don't have the FS_XFLAG_DAX flag?  is it ignored?
Test will report notrun by _require_scratch_dax_iflag() If fs doesn't
support FS_XFLAG_DAX flag.

FWIW I believe that any FS (which includes older kernels) which do not support
dax=inode have no need for this test to run.  The use of FS_XFLAG_DAX on older
xfs does not do anything and simply does not exist elsewhere.  Only FS's which
support dax=inode have behavior which needs to be tested IMO.
I just want to test FS_XFLAG_DAX on older xfs by keeping _scratch_mount
without dax because
the original test(i.e. xfs/260) is designed to test this point. :-)
Sure you can test swapping the flag itself but it really does nothing.

BTW:  It seems that older xfs can do dax mmap by setting/clearing
FS_XFLAG_DAX, or do I miss something?
No it can only use DAX with '-o dax' mount option.  Changing FS_XFLAG_DAX on
xfs prior to 5.8 is effectively a no-op as the S_DAX flag would not be set.

See "742d84290739 xfs: disable per-inode DAX flag"
Hi Ira,

Ah, I actually missed the marco disabling per-inode DAX flag.
OK, I will use dax=inode directly in v4 patch.

Best Regards,
Xiao Yang
Ira

Best Regards,
Xiao Yang
Ira

Best Regards,
Xiao Yang
.

.




.







[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