From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH] virtio-blk: set QUEUE_ORDERED_DRAIN by default
Date: Fri, 21 Aug 2009 09:30:39 +0200 [thread overview]
Message-ID: <200908210930.39861.borntraeger@de.ibm.com> (raw)
In-Reply-To: <20090820205616.GA5503@lst.de>
Am Donnerstag 20 August 2009 22:56:16 schrieb Christoph Hellwig:
> Currently virtio-blk doesn't set any QUEUE_ORDERED_ flag by default, which
> means it does not allow filesystems to use barriers. But the typical use
> case for virtio-blk is to use a backed that uses synchronous I/O, and in
> that case we can simply set QUEUE_ORDERED_DRAIN to make the block layer
> drain the request queue around barrier I/O and provide the semantics that
> the filesystems need. This is what the SCSI disk driver does for disks
> that have the write cache disabled.
>
> With this patch we incorrectly advertise barrier support if someone
> configure qemu with write back caching. While this displays wrong
> information in the guest there is nothing that guest could have done
> even if we rightfully told it that we do not support any barriers.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Make sense to me.
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
[...]
> - /* If barriers are supported, tell block layer that queue is ordered */
> + /*
> + * If barriers are supported, tell block layer that queue is ordered.
> + *
> + * If no barriers are supported assume the host uses synchronous
> + * writes and just drain the the queue before and after the barrier.
> + */
> if (virtio_has_feature(vdev, VIRTIO_BLK_F_BARRIER))
> blk_queue_ordered(vblk->disk->queue, QUEUE_ORDERED_TAG, NULL);
> + else
> + blk_queue_ordered(vblk->disk->queue, QUEUE_ORDERED_DRAIN, NULL);
[...]
next prev parent reply other threads:[~2009-08-21 7:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-20 20:56 Christoph Hellwig
2009-08-21 7:30 ` Christian Borntraeger [this message]
2009-08-25 14:11 ` Rusty Russell
2009-08-25 14:16 ` Christoph Hellwig
2009-08-26 12:06 ` Rusty Russell
2009-08-26 12:28 ` Avi Kivity
2009-08-27 10:43 ` Rusty Russell
2009-08-27 11:04 ` Avi Kivity
2009-08-28 1:15 ` Rusty Russell
2009-08-28 6:33 ` Avi Kivity
2009-08-27 17:06 ` Christoph Hellwig
2009-09-17 17:31 ` Christoph Hellwig
2009-09-22 6:27 ` Rusty Russell
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=200908210930.39861.borntraeger@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=hch@lst.de \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/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
all inboxes | Powered by JetHome®