Re: [PATCH v11 5/6] xfs/529: quotas and idmapped mounts

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



On Sat, Mar 27, 2021 at 12:18:55PM +0100, Christian Brauner wrote:
> From: Christian Brauner <christian.brauner@xxxxxxxxxx>
> 
> Test that xfs quota behave correctly on idmapped mounts.
> Mount a scratch device with user and group quota support enabled. Create
> directories "unmapped" and "idmapped". Create files in the unampped
> mount and verify quota behavior. Create files through the idmapped mount
> and verify identical behavior.
> 
> Cc: Eryu Guan <guan@xxxxxxx>
> Cc: Darrick J. Wong <djwong@xxxxxxxxxx>
> Cc: fstests@xxxxxxxxxxxxxxx
> Reviewed-by: Christoph Hellwig <hch@xxxxxx>
> Signed-off-by: Christian Brauner <christian.brauner@xxxxxxxxxx>
> ---
> /* v1 - v8 */
> patch not present
> 
> /* v9 */
> - Christian Brauner <christian.brauner@xxxxxxxxxx>:
>   - Rebased on current master.
> 
> /* v10 */
> - Eryu Guan <guan@xxxxxxx>:
>   - Remove leading "_" from local helpers.
>   - Remove redundant "-q" option from umount -l calls.
>   - Use wipe_mount() in a few more places.
> 
> /* v11 */
> - Amir Goldstein <amir73il@xxxxxxxxx>:
>   - Add a dedicated "idmapped" tag for idmapped mounts tests.
> ---
>  tests/xfs/529     | 378 ++++++++++++++++++++++++++
>  tests/xfs/529.out | 657 ++++++++++++++++++++++++++++++++++++++++++++++
>  tests/xfs/group   |   1 +
>  3 files changed, 1036 insertions(+)
>  create mode 100644 tests/xfs/529
>  create mode 100644 tests/xfs/529.out
> 
> diff --git a/tests/xfs/529 b/tests/xfs/529
> new file mode 100644
> index 00000000..a5607306
> --- /dev/null
> +++ b/tests/xfs/529
> @@ -0,0 +1,378 @@
> +#! /bin/bash
> +# SPDX-License-Identifier: GPL-2.0+
> +#
> +# Copyright (c) 2021 Christian Brauner <christian.brauner@xxxxxxxxxx>
> +# All Rights Reserved.
> +#
> +# FS QA Test No. 529
> +#
> +# Exercise basic xfs_quota functionality (user/group/project quota)
> +# Use of "sync" mount option here is an attempt to get deterministic
> +# allocator behaviour.
> +#
> +seq=`basename $0`
> +seqres=$RESULT_DIR/$seq
> +echo "QA output created by $seq"
> +
> +here=`pwd`
> +tmp=/tmp/$$
> +status=1	# failure is the default!
> +trap "_cleanup; exit \$status" 0 1 2 3 15
> +
> +wipe_mounts()
> +{
> +	umount -l "${SCRATCH_MNT}/idmapped" >/dev/null 2>&1

If lazy umount is not necessary, please just use bare umount, I found it
hard to debug if someone is holding the mount.

$UMOUNT_PROG "${SCRATCH_MNT}/idmapped"

Thanks,
Eryu



[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