OpenVZ / Virtuozzo kernel development (devel@openvz.org)
 help / color / mirror / Atom feed
From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: Alexey Kuznetsov <kuznet@virtuozzo.com>
Cc: azaitsev@virtuozzo.com, devel@openvz.org, kui.liu@virtuozzo.com
Subject: Re: [Devel] [PATCH hci-8.1 2/2] fs/ext4: ensure ext4 transaction credits while swapext
Date: Tue, 17 Nov 2026 15:00:00 +0100	[thread overview]
Message-ID: <179492400071.138826.12621727898071032054.b4-review@b4> (raw)
In-Reply-To: <avxVtFVOz3wI2xF/@mops2>

I won't apply this version, please send v2 with the changes below.

On Tue, 17 Nov 2026 21:25:08 +0800, Alexey Kuznetsov wrote:
> The patch is suggested by Claude. It looks reasonable,
> the technique is borrowed from ext4_block_write_begin().

Items 3-6 of my reply to 1/2.

5. Before this patch one call of swap_one_extent() swapped a donor
extent in one transaction. When jbd2_journal_extend() refuses, the
rest now goes into the next transaction, so a crash between the two
commits leaves that extent half swapped.

> +		 * sure the handle can afford the worst case. If it cannot,
> +		 * return to the caller with -EAGAIN, it will restart the
> +		 * transaction and continue from lblk1 + replaced_count.

6. lblk1 is advanced together with replaced_count in the loop, so the
caller resumes at lblk1 itself, not at lblk1 + replaced_count.

-- 
Konstantin Khorenko,
Virtuozzo Linux Kernel Team

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

  reply	other threads:[~2026-11-17 14:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 13:24 [Devel] [PATCH hci-8.1 1/2] fs/ext4: rectify behaviour of swapext ioctl on error Alexey Kuznetsov
2026-11-17 13:25 ` [Devel] [PATCH hci-8.1 2/2] fs/ext4: ensure ext4 transaction credits while swapext Alexey Kuznetsov
2026-11-17 14:00   ` Konstantin Khorenko [this message]
2026-11-17 14:00 ` [Devel] [PATCH hci-8.1 1/2] fs/ext4: rectify behaviour of swapext ioctl on error Konstantin Khorenko

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=179492400071.138826.12621727898071032054.b4-review@b4 \
    --to=khorenko@virtuozzo.com \
    --cc=azaitsev@virtuozzo.com \
    --cc=devel@openvz.org \
    --cc=kui.liu@virtuozzo.com \
    --cc=kuznet@virtuozzo.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox