[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20241106005740.GM2386201@frogsfrogsfrogs>
Date: Tue, 5 Nov 2024 16:57:40 -0800
From: "Darrick J. Wong" <djwong@...nel.org>
To: brauner@...nel.org
Cc: "Ritesh Harjani (IBM)" <ritesh.list@...il.com>,
John Garry <john.g.garry@...cle.com>,
Catherine Hoang <catherine.hoang@...cle.com>,
linux-ext4@...r.kernel.org, Theodore Ts'o <tytso@....edu>,
Jan Kara <jack@...e.cz>, Christoph Hellwig <hch@...radead.org>,
Ojaswin Mujoo <ojaswin@...ux.ibm.com>, linux-block@...r.kernel.org,
Dave Chinner <david@...morbit.com>, linux-kernel@...r.kernel.org,
linux-xfs@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: [ANNOUNCE v2] work tree for untorn filesystem writes
Hi everyone,
Here's a slightly updated working branch for the filesystem side of
atomic write changes for 6.13:
https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git/log/?h=fs-atomic_2024-11-05
This branch is, like yesterday's, based off of axboe's
for-6.13/block-atomic branch:
https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/log/?h=for-6.13/block-atomic
The only difference is that I added Ojaswin's Tested-by: tags to the end
of the xfs series. I have done basic testing with the shell script at
the end of this email and am satisfied that it at least seems to do the
(limited) things that I think we're targeting for 6.13.
Christian: Could you pull this fs-atomic branch into your vfs.git work
for 6.13, please? Or would you rather I ask rothwell to include this
branch into for-next/fs-next and send the PR to Linus myself?
(Actually I might just ask rothwell to do that tomorrow regardless...)
--D
#!/bin/bash -x
# Mess around with atomic writes via scsi_debug
mnt=/opt
true "${FSTYP:=xfs}"
true "${MIN_ATOMIC:=32768}"
true "${SECTOR_SIZE:=512}"
true "${FSBLOCK_SIZE:=4096}"
umount $mnt
rmmod "$FSTYP"
rmmod scsi_debug
modprobe scsi_debug atomic_wr=1 dev_size_mb=300 \
SECTOR_SIZE=$SECTOR_SIZE \
atomic_wr_align=$((MIN_ATOMIC / SECTOR_SIZE)) \
atomic_wr_gran=$((MIN_ATOMIC / SECTOR_SIZE))
sleep 1
dev="$(readlink -m /dev/disk/by-id/wwn-0x3333333000*)"
sysfs=/sys/block/$(basename "$dev")
sysfs-dump $sysfs/queue/atomic_write_*
for ((i = 9; i < 20; i++)); do
xfs_io -d -c "pwrite -b 1m -V 1 -AD $((2 ** i)) $((2 ** i))" $dev
done
case "$FSTYP" in
"xfs")
mkfs.xfs -f $dev -b size=$MIN_ATOMIC
;;
"ext4")
mkfs.ext4 -F $dev -b $FSBLOCK_SIZE -C $MIN_ATOMIC -O bigalloc
;;
*)
echo "$FSTYP: not recognized"
exit 1
;;
esac
mount $dev $mnt
xfs_io -f -c 'falloc 0 1m' -c fsync $mnt/a
filefrag -v $mnt/a
for ((i = 9; i < 20; i++)); do
xfs_io -d -c "pwrite -b 1m -V 1 -AD $((2 ** i)) $((2 ** i))" $mnt/a
done
# does not support buffered io
xfs_io -c "pwrite -b 1m -V 1 -AD 0 $MIN_ATOMIC" $mnt/a
# does not support unaligned directio
xfs_io -c "pwrite -b 1m -V 1 -AD $SECTOR_SIZE $MIN_ATOMIC" $mnt/a
Powered by blists - more mailing lists