qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Thomas Huth <thuth@redhat.com>, qemu-devel@nongnu.org
Cc: Qemu-block <qemu-block@nongnu.org>
Subject: Re: [PATCH 3/4] Move CONFIG_XFS handling to meson.build
Date: Fri, 10 Dec 2021 11:10:05 +0100	[thread overview]
Message-ID: <73e6f8e1-d30c-6c1b-008f-235f624d08f0@redhat.com> (raw)
In-Reply-To: <4ebf08ed-dd35-8347-45f8-18be46fae16f@redhat.com>

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	other threads:[~2021-12-10 10:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-28 18:59 [PATCH 0/4] configure and meson.build improvements Thomas Huth
2021-10-28 18:59 ` [PATCH 1/4] configure: Remove the check for the __thread keyword Thomas Huth
2021-10-29 16:48   ` Richard Henderson
2021-11-02 11:37     ` Paolo Bonzini
2021-10-28 18:59 ` [PATCH 2/4] Move the l2tpv3 test from configure to meson.build Thomas Huth
2021-11-02 11:36   ` Paolo Bonzini
2021-10-28 18:59 ` [PATCH 3/4] Move CONFIG_XFS handling " Thomas Huth
2021-11-02 11:34   ` Paolo Bonzini
2021-11-02 11:38     ` Thomas Huth
2021-11-02 11:50       ` Paolo Bonzini
2021-12-10  7:53     ` Thomas Huth
2021-12-10  8:39       ` Paolo Bonzini
2021-12-10  8:46         ` Thomas Huth
2021-12-10 10:10           ` Paolo Bonzini [this message]
2021-12-14  9:15             ` Thomas Huth
2021-10-28 18:59 ` [PATCH 4/4] Move the libssh setup from configure " Thomas Huth
2021-10-29  6:09   ` Thomas Huth
2021-11-02 11:36     ` Paolo Bonzini

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=73e6f8e1-d30c-6c1b-008f-235f624d08f0@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@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;
as well as URLs for NNTP newsgroup(s).