lkml.org 
[lkml]   [2012]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH V3 3/3] virtio-blk: Add bio-based IO path for virtio-blk
    On 07/28/2012 02:42 PM, Paolo Bonzini wrote:
    >>> I'm not sure what the correct behavior for bio & cacheflush is, if
    >>> any.
    >>
    >> REQ_FLUSH is not supported in the bio path.
    >
    > Ouch, that's correct:
    >
    > @@ -414,7 +529,7 @@ static void virtblk_update_cache_mode(struct virtio_device *vdev)
    > u8 writeback = virtblk_get_cache_mode(vdev);
    > struct virtio_blk *vblk = vdev->priv;
    >
    > - if (writeback)
    > + if (writeback && !use_bio)
    > blk_queue_flush(vblk->disk->queue, REQ_FLUSH);
    > else
    > blk_queue_flush(vblk->disk->queue, 0);
    >
    > then it is not safe against power losses.

    Yes. Something like this:

    qemu -drive file=foo.img,cache=writeback/unsafe

    is not safe against power losses also?

    I think we can add REQ_FLUSH & REQ_FUA support to bio path and that
    deserves another patch.

    --
    Asias


    \
     
     \ /
      Last update: 2012-07-30 07:21    [W:2.130 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site