All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrea Parri <parri.andrea@gmail.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Zorro Lang <zlang@kernel.org>,
	fstests@vger.kernel.org, Christoph Hellwig <hch@infradead.org>,
	linux-xfs@vger.kernel.org, Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH v2] xfs: exercise a failed CoW conversion during writeback
Date: Mon, 28 Sep 2026 18:24:42 +0200	[thread overview]
Message-ID: <20260928162443.352542-1-parri.andrea@gmail.com> (raw)
In-Reply-To: <20260928154149.GA6253@frogsfrogsfrogs>

On Mon, Sep 28, 2026 at 08:41:49AM -0700, Darrick J. Wong wrote:
> for ((off = 0; off < (blksz * nr * 2); off += (blksz * 2))); do
> 	_pwrite_byte 0x59 $off $blksz $SCRATCH_MNT/file2 >> $seqres.full
> done

That's nicer, no loop counter at all, and it writes the same eight
ranges as before.

Zorro, if you're folding the fix in at merge time, please use Darrick's
version rather than the rename I suggested earlier, i.e.:

@@ -48,11 +48,8 @@ _cp_reflink $SCRATCH_MNT/file1 $SCRATCH_MNT/file2
 
 # Dirty several widely separated ranges of file2's CoW extents so that a
 # single writepages() call has to submit more than one ioend.
-seq=0
-while [ $seq -lt $nr ]; do
-	off=$((seq * blksz * 2))
+for ((off = 0; off < (blksz * nr * 2); off += (blksz * 2))); do
 	_pwrite_byte 0x59 $off $blksz $SCRATCH_MNT/file2 >> $seqres.full
-	seq=$((seq + 1))
 done
 
 echo "Inject wb_cow_convert_error"

Again, happy to send a v3 with this if that's easier.

Thanks!
  Andrea

  reply	other threads:[~2026-09-28 16:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-28  8:50 [PATCH v2] xfs: exercise a failed CoW conversion during writeback Andrea Parri
2026-09-28 13:53 ` Zorro Lang
2026-09-28 14:15   ` Andrea Parri
2026-09-28 15:41   ` Darrick J. Wong
2026-09-28 16:24     ` Andrea Parri [this message]
2026-09-28 21:47       ` Zorro Lang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260928162443.352542-1-parri.andrea@gmail.com \
    --to=parri.andrea@gmail.com \
    --cc=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=hch@infradead.org \
    --cc=hch@lst.de \
    --cc=linux-xfs@vger.kernel.org \
    --cc=zlang@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.