Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-24 Thread Rusty Russell
On Thu, 05 Jul 2012 09:02:23 +0200, Sasha Levin wrote: > On Thu, 2012-07-05 at 08:47 +0200, Paolo Bonzini wrote: > > Il 04/07/2012 23:11, Sasha Levin ha scritto: > > > There are two things going on here: > > > 1. Rename VIRTIO_BLK_F_FLUSH to VIRTIO_BLK_F_WCE > > > 2. Add a new VIRTIO_BLK_F_CONFI

Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-08 Thread Rusty Russell
On Thu, 05 Jul 2012 09:02:23 +0200, Sasha Levin wrote: > On Thu, 2012-07-05 at 08:47 +0200, Paolo Bonzini wrote: > > Il 04/07/2012 23:11, Sasha Levin ha scritto: > > > There are two things going on here: > > > 1. Rename VIRTIO_BLK_F_FLUSH to VIRTIO_BLK_F_WCE > > > 2. Add a new VIRTIO_BLK_F_CONFI

Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-05 Thread Paolo Bonzini
Il 05/07/2012 20:39, Badari Pulavarty ha scritto: > On Tue, 2012-07-03 at 15:19 +0200, Paolo Bonzini wrote: >> This patch adds support for the new VIRTIO_BLK_F_CONFIG_WCE feature, >> which exposes the cache mode in the configuration space and lets the >> driver modify it. The cache mode is exposed

Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-05 Thread Badari Pulavarty
On Tue, 2012-07-03 at 15:19 +0200, Paolo Bonzini wrote: > This patch adds support for the new VIRTIO_BLK_F_CONFIG_WCE feature, > which exposes the cache mode in the configuration space and lets the > driver modify it. The cache mode is exposed via sysfs. > > Even if the host does not support the

Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-05 Thread Sasha Levin
On Thu, 2012-07-05 at 08:47 +0200, Paolo Bonzini wrote: > Il 04/07/2012 23:11, Sasha Levin ha scritto: > > There are two things going on here: > > 1. Rename VIRTIO_BLK_F_FLUSH to VIRTIO_BLK_F_WCE > > 2. Add a new VIRTIO_BLK_F_CONFIG_WCE > > > > I'm concerned that the first change is going to bre

Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-04 Thread Paolo Bonzini
Il 04/07/2012 23:11, Sasha Levin ha scritto: > There are two things going on here: > 1. Rename VIRTIO_BLK_F_FLUSH to VIRTIO_BLK_F_WCE > 2. Add a new VIRTIO_BLK_F_CONFIG_WCE > > I'm concerned that the first change is going to break compilation for > any code that included linux/virtio-blk.h and u

Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-04 Thread Paolo Bonzini
Il 04/07/2012 23:30, Michael S. Tsirkin ha scritto: >> +static int virtblk_get_cache_mode(struct virtio_device *vdev) > > Why are you converting u8 to int here? The fact that it is a u8 is really an internal detail. Perhaps the bug is using u8 in the callers. >>> >>> Mak

Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-04 Thread Michael S. Tsirkin
On Wed, Jul 04, 2012 at 06:08:50PM +0200, Paolo Bonzini wrote: > Il 04/07/2012 18:02, Michael S. Tsirkin ha scritto: > > On Wed, Jul 04, 2012 at 05:54:16PM +0200, Paolo Bonzini wrote: > >> Il 04/07/2012 17:42, Michael S. Tsirkin ha scritto: > >>> On Tue, Jul 03, 2012 at 03:19:37PM +0200, Paolo Bonz

Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-04 Thread Sasha Levin
On Wed, 2012-07-04 at 18:32 +0200, Paolo Bonzini wrote: > Il 04/07/2012 18:26, Sasha Levin ha scritto: > > On Tue, 2012-07-03 at 15:19 +0200, Paolo Bonzini wrote: > >> diff --git a/include/linux/virtio_blk.h b/include/linux/virtio_blk.h > >> index e0edb40..18a1027 100644 > >> --- a/include/linux/vi

Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-04 Thread Paolo Bonzini
Il 04/07/2012 18:26, Sasha Levin ha scritto: > On Tue, 2012-07-03 at 15:19 +0200, Paolo Bonzini wrote: >> diff --git a/include/linux/virtio_blk.h b/include/linux/virtio_blk.h >> index e0edb40..18a1027 100644 >> --- a/include/linux/virtio_blk.h >> +++ b/include/linux/virtio_blk.h >> @@ -37,8 +37,9 @

Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-04 Thread Sasha Levin
On Tue, 2012-07-03 at 15:19 +0200, Paolo Bonzini wrote: > diff --git a/include/linux/virtio_blk.h b/include/linux/virtio_blk.h > index e0edb40..18a1027 100644 > --- a/include/linux/virtio_blk.h > +++ b/include/linux/virtio_blk.h > @@ -37,8 +37,9 @@ > #define VIRTIO_BLK_F_RO5

Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-04 Thread Paolo Bonzini
Il 04/07/2012 18:02, Michael S. Tsirkin ha scritto: > On Wed, Jul 04, 2012 at 05:54:16PM +0200, Paolo Bonzini wrote: >> Il 04/07/2012 17:42, Michael S. Tsirkin ha scritto: >>> On Tue, Jul 03, 2012 at 03:19:37PM +0200, Paolo Bonzini wrote: This patch adds support for the new VIRTIO_BLK_F_CONFIG

Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-04 Thread Michael S. Tsirkin
On Wed, Jul 04, 2012 at 05:54:16PM +0200, Paolo Bonzini wrote: > Il 04/07/2012 17:42, Michael S. Tsirkin ha scritto: > > On Tue, Jul 03, 2012 at 03:19:37PM +0200, Paolo Bonzini wrote: > >> This patch adds support for the new VIRTIO_BLK_F_CONFIG_WCE feature, > >> which exposes the cache mode in the

Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-04 Thread Paolo Bonzini
Il 04/07/2012 17:42, Michael S. Tsirkin ha scritto: > On Tue, Jul 03, 2012 at 03:19:37PM +0200, Paolo Bonzini wrote: >> This patch adds support for the new VIRTIO_BLK_F_CONFIG_WCE feature, >> which exposes the cache mode in the configuration space and lets the >> driver modify it. The cache mode i

Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-04 Thread Michael S. Tsirkin
On Tue, Jul 03, 2012 at 03:19:37PM +0200, Paolo Bonzini wrote: > This patch adds support for the new VIRTIO_BLK_F_CONFIG_WCE feature, > which exposes the cache mode in the configuration space and lets the > driver modify it. The cache mode is exposed via sysfs. > > Even if the host does not suppo

Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-04 Thread Michael S. Tsirkin
On Tue, Jul 03, 2012 at 03:19:37PM +0200, Paolo Bonzini wrote: > This patch adds support for the new VIRTIO_BLK_F_CONFIG_WCE feature, > which exposes the cache mode in the configuration space and lets the > driver modify it. The cache mode is exposed via sysfs. > > Even if the host does not suppo

Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-03 Thread Rusty Russell
On Tue, 3 Jul 2012 15:19:37 +0200, Paolo Bonzini wrote: > This patch adds support for the new VIRTIO_BLK_F_CONFIG_WCE feature, > which exposes the cache mode in the configuration space and lets the > driver modify it. The cache mode is exposed via sysfs. > > Even if the host does not support th

Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-03 Thread Rusty Russell
On Tue, 3 Jul 2012 15:19:37 +0200, Paolo Bonzini wrote: > This patch adds support for the new VIRTIO_BLK_F_CONFIG_WCE feature, > which exposes the cache mode in the configuration space and lets the > driver modify it. The cache mode is exposed via sysfs. > > Even if the host does not support th

[PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-03 Thread Paolo Bonzini
This patch adds support for the new VIRTIO_BLK_F_CONFIG_WCE feature, which exposes the cache mode in the configuration space and lets the driver modify it. The cache mode is exposed via sysfs. Even if the host does not support the new feature, the cache mode is visible (thanks to the existing VIR