linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [REGRESSION] loopback block device on top of block devices don't work anymore
@ 2025-08-27 19:30 Lennart Poettering
  2025-08-27 19:55 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Lennart Poettering @ 2025-08-27 19:30 UTC (permalink / raw)
  To: Jens Axboe, linux-block, linux-kernel, Rajeev Mishra

Heya!

Recent kernels fail if it is attempted to create a loopback block
device on top of a block device (rather than a regular file), which is a
feature long supported on Linux kernels, and that systemd relies on
(specifically, systemd-repart does).

For example, this used to work:

losetup --find --show --offset=4096 --sizelimit=409600 /dev/nvme0n1

But now it doesn't anymore...

This is on 6.17rc3. My educated guess is that this is caused by
Rajeev's 8aa5a3b68ad144da49a3d17f165e6561255e3529, which tightened the
screws on validating the backing file's size, which now fails if the
backing file isn't actually a file, but a block device.

(But I didn't spend more time tracking this down.)

Lennart

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [REGRESSION] loopback block device on top of block devices don't work anymore
  2025-08-27 19:30 [REGRESSION] loopback block device on top of block devices don't work anymore Lennart Poettering
@ 2025-08-27 19:55 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2025-08-27 19:55 UTC (permalink / raw)
  To: Lennart Poettering, linux-block, linux-kernel, Rajeev Mishra

On 8/27/25 1:30 PM, Lennart Poettering wrote:
> Heya!
> 
> Recent kernels fail if it is attempted to create a loopback block
> device on top of a block device (rather than a regular file), which is a
> feature long supported on Linux kernels, and that systemd relies on
> (specifically, systemd-repart does).
> 
> For example, this used to work:
> 
> losetup --find --show --offset=4096 --sizelimit=409600 /dev/nvme0n1
> 
> But now it doesn't anymore...
> 
> This is on 6.17rc3. My educated guess is that this is caused by
> Rajeev's 8aa5a3b68ad144da49a3d17f165e6561255e3529, which tightened the
> screws on validating the backing file's size, which now fails if the
> backing file isn't actually a file, but a block device.
> 
> (But I didn't spend more time tracking this down.)

Yeah sorry about that, the problem is the followup to the commit
you mentioned, and the fix for that is here:

https://web.git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/commit/?h=block-6.17&id=d14469ed7c00314fe8957b2841bda329e4eaf4ab

and will land in -rc4.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-08-27 19:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-27 19:30 [REGRESSION] loopback block device on top of block devices don't work anymore Lennart Poettering
2025-08-27 19:55 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).