All of lore.kernel.org
 help / color / mirror / Atom feed
* Regression in xen-blkfront regarding sector sizes
@ 2024-06-24 13:48 Marek Marczykowski-Górecki
  2024-06-24 14:29 ` Jürgen Groß
  0 siblings, 1 reply; 4+ messages in thread
From: Marek Marczykowski-Górecki @ 2024-06-24 13:48 UTC (permalink / raw)
  To: xen-devel
  Cc: Juergen Gross, Christoph Hellwig, Roger Pau Monné,
	Jens Axboe

[-- Attachment #1: Type: text/plain, Size: 1751 bytes --]

Hi,

Some Qubes users report a regression in xen-blkfront regarding block
size reporting. It works fine on 6.8.8, but appears broken on 6.9.2.

The specific problem is that blkfront reports block size of 512, even for
backend devices of 4096. This, for example, fails 512-bytes reads with
O_DIRECT, and appears to break mounting a filesystem on such a device
(at least xfs one).

For example it looks like this:

    [user@dom0 ~]$ head /sys/block/loop12/queue/*_block_size
    ==> /sys/block/loop12/queue/logical_block_size <==
    4096

    ==> /sys/block/loop12/queue/physical_block_size <==
    4096

    [user@dom0 bin]$ qvm-run -p the-vm 'head /sys/block/xvdi/queue/*_block_size'
    ==> /sys/block/xvdi/queue/logical_block_size <==
    512

    ==> /sys/block/xvdi/queue/physical_block_size <==
    512

and then:

    $ sudo dd if=/dev/xvdi of=/dev/null count=1 status=progress iflag=direct
    /usr/bin/dd: error reading '/dev/xvdi': Input/output error
    0+0 records in
    0+0 records out
    0 bytes copied, 0.000170858 s, 0.0 kB/s

and mounting fails like this:

    [   68.055045] SGI XFS with ACLs, security attributes, realtime, scrub, quota, no debug enabled
    [   68.057308] I/O error, dev xvdi, sector 0 op 0x0:(READ) flags 0x1000 phys_seg 1 prio class 0
    [   68.057333] XFS (xvdi): SB validate failed with error -5.

More details at https://github.com/QubesOS/qubes-issues/issues/9293

Rusty suspects it's related to
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/block/xen-blkfront.c?id=ba3f67c1163812b5d7ec33705c31edaa30ce6c51,
so I'm cc-ing people mentioned there too.

-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2024-06-25  6:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-24 13:48 Regression in xen-blkfront regarding sector sizes Marek Marczykowski-Górecki
2024-06-24 14:29 ` Jürgen Groß
2024-06-24 14:38   ` Christoph Hellwig
2024-06-24 20:56     ` Rusty Bird

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.