> > 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.

Paolo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to