Re: [RFC 06/12] generic/770: Add atomic write multi-fsblock O_[D]SYNC tests

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



On Fri, Jun 20, 2025 at 01:50:18PM +0530, Ojaswin Mujoo wrote:
> On Thu, Jun 19, 2025 at 04:17:11AM +0800, Zorro Lang wrote:
> > On Wed, Jun 11, 2025 at 03:04:49PM +0530, Ojaswin Mujoo wrote:
> > > This adds various atomic write multi-fsblock stresst tests
> > > with mixed mappings and O_SYNC, to ensure the data and metadata
> > > is atomically persisted even if there is a shutdown.
> > > 
> > > Suggested-by: Ritesh Harjani (IBM) <ritesh.list@xxxxxxxxx>
> > > Signed-off-by: Ojaswin Mujoo <ojaswin@xxxxxxxxxxxxx>
> > > ---
> > >  tests/generic/770     | 161 ++++++++++++++++++++++++++++++++++++++++++
> > >  tests/generic/770.out |   2 +
> > >  2 files changed, 163 insertions(+)
> > >  create mode 100755 tests/generic/770
> > >  create mode 100644 tests/generic/770.out
> > > 
> > > diff --git a/tests/generic/770 b/tests/generic/770
> > > new file mode 100755
> > > index 00000000..2b98b3b3
> > > --- /dev/null
> > > +++ b/tests/generic/770
> > > @@ -0,0 +1,161 @@
> > > +#! /bin/bash
> > > +# SPDX-License-Identifier: GPL-2.0
> > > +# Copyright (c) 2025 IBM Corporation. All Rights Reserved.
> > > +#
> > > +# FS QA Test 770
> > > +#
> > > +# Atomic write multi-fsblock data integrity tests with mixed mappings
> > > +# and O_SYNC
> > > +#
> > > +. ./common/preamble
> > > +. ./common/atomicwrites
> > > +_begin_fstest auto quick rw atomicwrites
> > > +
> > > +_require_scratch_write_atomic_multi_fsblock
> > > +_require_atomic_write_test_commands
> > > +
> 
> <snip>
> 
> > > +			"U")
> > > +				$XFS_IO_PROG -c "falloc $off $blksz" $testfile >> /dev/null
> > 
> > _require_xfs_io_command falloc
> > 
> > > +				;;
> > > +		esac
> > > +		off=$((off + blksz))
> > > +	done
> > > +
> > > +	echo "Mixed mapping preparation complete. Full mapping pattern: $mapping" >> $seqres.full
> > > +
> > > +	sync $testfile
> > > +
> > > +	echo "Performing O_DSYNC atomic write over the entire $awu_max region" >> $seqres.full
> > > +	bytes_written=$($XFS_IO_PROG -dc "pwrite -DA -V1 -b $awu_max 0 $awu_max" $testfile | \
> > 
> > _require_xfs_io_command pwrite -A
> 
> Hey Zorro,
> 
> pwrite -A and falloc command are already checked for in
> _require_atomic_write_test_commands helper used on top.

Oh, sure, sorry I didn't notice that :)

Thanks,
Zorro





[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