qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/4] Move CONFIG_XFS handling to meson.build


From: Paolo Bonzini
Subject: Re: [PATCH 3/4] Move CONFIG_XFS handling to meson.build
Date: Fri, 10 Dec 2021 11:10:05 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0

On 12/10/21 09:46, Thomas Huth wrote:

platform_test_xfs_fd() is only used to decide whether to invoke XFS_IOC_DIOINFO; but failures of XFS_IOC_DIOINFO are ignored anyway, so we can get rid of is_xfs in BDRVRawState, too.

After staring at the code for a while, I wonder why we're not simply using fstat() here instead to get the st_blksize value... wouldn't that be better anyway since it also works with other file system types?

The value that XFS_IOC_DIOINFO returns is the logical sector size of the underlying device; it should be 512 or 4096, but more likely 512. It can be smaller than st_blksize, because often it will be if it is 512 but the st_blksize is usually 4096.

If it is wrong, QEMU will do unnecessary read/modify/write operations for disk writes that are not 4K-aligned.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]