From: Ville Baillie <ville@vmb-tech.com>
To: "axboe@kernel.dk" <axboe@kernel.dk>
Cc: "ming.lei@redhat.com" <ming.lei@redhat.com>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
Ville Baillie <ville@vmb-tech.com>
Subject: [PATCH 0/1] loop: retry short writes
Date: Sat, 28 Nov 2026 15:20:54 +0000 [thread overview]
Message-ID: <20261128152053.1898233-1-ville@vmb-tech.com> (raw)
From: Ville Baillie <ville@vmb-tech.com>
This fixes a silent data-loss issue uncovered when using a sysfs
attribute as the backing file.
I was able to reproduce the issue with writes larger than 4094 through
the loop device. The write would report success but bytes after 4096
would be lost.
The issue was noticed when moving from 6.6 to 6.18.
This patch handles short writes in the loop driver by retrying the
remaining data.
The bug was reproduced on real hardware and with an emulator. This patch
was tested on both, and with the emulator it was proven that the parent
of the "fixes" commit also passed.
Ville Baillie (1):
loop: retry short writes
drivers/block/loop.c | 54 ++++++++++++++++++++++++++++----------------
1 file changed, 35 insertions(+), 19 deletions(-)
--
2.43.0
next reply other threads:[~2026-11-28 15:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-28 15:20 Ville Baillie [this message]
2026-11-28 15:20 ` [PATCH 1/1] loop: retry short writes Ville Baillie
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=20261128152053.1898233-1-ville@vmb-tech.com \
--to=ville@vmb-tech.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=ming.lei@redhat.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