lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aIDpdg_SibBYFAPy@li-dc0c254c-257c-11b2-a85c-98b6c1322444.ibm.com>
Date: Wed, 23 Jul 2025 19:23:58 +0530
From: Ojaswin Mujoo <ojaswin@...ux.ibm.com>
To: "Darrick J. Wong" <djwong@...nel.org>
Cc: Zorro Lang <zlang@...hat.com>, fstests@...r.kernel.org,
        Ritesh Harjani <ritesh.list@...il.com>, john.g.garry@...cle.com,
        tytso@....edu, linux-xfs@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-ext4@...r.kernel.org
Subject: Re: [PATCH v3 07/13] generic/1228: Add atomic write multi-fsblock
 O_[D]SYNC tests

On Thu, Jul 17, 2025 at 09:35:10AM -0700, Darrick J. Wong wrote:

<snip>

> > +verify_atomic_write() {
> > +	if [[ "$1" == "shutdown" ]]
> > +	then
> > +		local do_shutdown=1
> > +	fi
> > +
> > +	test $bytes_written -eq $awu_max || _fail "atomic write len=$awu_max assertion failed"
> > +
> > +	if [[ $do_shutdown -eq "1" ]]
> > +	then
> > +		echo "Shutting down filesystem" >> $seqres.full
> > +		_scratch_shutdown >> $seqres.full
> > +		_scratch_cycle_mount >>$seqres.full 2>&1 || _fail "remount failed for Test-3"
> > +	fi
> > +
> > +	check_data_integrity
> > +}
> > +
> > +mixed_mapping_test() {
> > +	prep_mixed_mapping
> > +
> > +	echo "+ + Performing O_DSYNC atomic write from 0 to $awu_max" >> $seqres.full
> > +	bytes_written=$($XFS_IO_PROG -dc "pwrite -DA -V1 -b $awu_max 0 $awu_max" $testfile | \
> > +		        grep wrote | awk -F'[/ ]' '{print $2}')
> > +
> > +	verify_atomic_write $1
> 
> The shutdown happens after the synchronous write completes?  If so, then
> what part of recovery is this testing?
> 
> --D

Right, it is mostly inspired by [1] where sometimes isize update could
be lost after dio completion. Although this might not exactly be
affected by atomic writes, we added it here out of caution.

[1] https://lore.kernel.org/fstests/434beffaf18d39f898518ea9eb1cea4548e77c3a.1695383715.git.ritesh.list@gmail.com/
> 
> > +}
> > +

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ