Re: [xfstests PATCH v4 2/5] overlay: hook filesystem check helper

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

 



On 2018/2/22 11:26, Amir Goldstein Wrote:
> Zhangyi,
> 
> Sorry for dropping lists because replying from mobile. Feel free to add back.
> 
> 
> 
> On Feb 22, 2018 3:09 AM, "zhangyi (F)" <yi.zhang@xxxxxxxxxx <mailto:yi.zhang@xxxxxxxxxx>> wrote:
> 
>     Hook filesystem check helper to _check_test_fs and _check_scratch_fs for
>     constants underlying dirs of overlay filesystem, and introduce scratch
>     check helpers for optionally lower/upper/work dirs. These helpers works
>     only if fsck.overlay exists.
> 
>     This patch introduce OVERLAY_FSCK_OPTIONS use for check overlayfs like
>     OVERLAY_MOUNT_OPTIONS, and also introduce a mount point check helper in
>     common/rc to detect a dir is a mount point or not.
> 
>     [ _check_test_fs/_check_scratch_fs part picked from Amir's patch, thanks ]
> 
>     Signed-off-by: zhangyi (F) <yi.zhang@xxxxxxxxxx <mailto:yi.zhang@xxxxxxxxxx>>
>     ---
>      README.overlay |  10 ++++-
>      common/config  |   4 ++
>      common/overlay | 125 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>      common/rc      |  18 ++++++++-
>      4 files changed, 153 insertions(+), 4 deletions(-)
> 
>     diff --git a/README.overlay b/README.overlay
>     index dfb8234..9feaa6a 100644
>     --- a/README.overlay
>     +++ b/README.overlay
>     @@ -22,6 +22,10 @@ the base fs should be pre-formatted before starting the -overlay run.
>      An easy way to accomplish this is by running './check <some test>' once,
>      before running './check -overlay'.
> 
>     +'./check -overlay' support check overlay test and scratch dirs,
>     +OVERLAY_FSCK_OPTIONS should be set instead of FSCK_OPTIONS if fsck
>     +options need to given directly.
>     +
>      Because of the lack of mkfs support, multi-section config files are only
>      partly supported with './check -overlay'. Only multi-section files that
>      do not change FSTYP and MKFS_OPTIONS can be safely used with -overlay.
>     @@ -40,7 +44,9 @@ run overlay tests on the same base fs, but with different mount options:
>       MOUNT_OPTIONS="-o pquota"
>       TEST_FS_MOUNT_OPTS="-o noatime"
>       OVERLAY_MOUNT_OPTIONS="-o redirect_dir=off"
>     + OVERLAY_FSCK_OPTIONS="-n"
> 
> 
> I may have missed this before but was under the impression that -n was the fsck option by default for post test fs check.
> 
> I believe that's how it usually is with fstests.
>
Yes, you are right, -n is the default option. Current OVERLAY_FSCK_OPTIONS is
used to avoid getting the base filesystem's FSCK_OPTIONS in multi sections config
case, becasue we cannot distinguish between leftover FSCK_OPTIONS and user specified
FSCK_OPTIONS, so introduce OVERLAY_FSCK_OPTIONS and set -n to default as example.

> In this example you can set fsck options same as mount options to indicate that for tests that use scratch_mount and test_mount with no extra arguments, fsck should verify there are no redirects in overlay.
> 
> Of course that would mean that you will have to mark more tests with require_scratch_nocheck, but you can do that later when fsck.overlay actually supports the -o arguments.
> 
Agree, we can do it after fsck.overlay can handle extra -o options.

Thanks,
Yi.



--
To unsubscribe from this list: send the line "unsubscribe linux-unionfs" 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 Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux