[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87boj4ps9o.fsf@rustcorp.com.au>
Date: Wed, 25 Jul 2012 10:32:27 +0930
From: Rusty Russell <rusty@...tcorp.com.au>
To: Sasha Levin <levinsasha928@...il.com>,
Paolo Bonzini <pbonzini@...hat.com>
Cc: linux-kernel@...r.kernel.org, kvm@...r.kernel.org
Subject: Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough
On Thu, 05 Jul 2012 09:02:23 +0200, Sasha Levin <levinsasha928@...il.com> 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_CONFIG_WCE
> > >
> > > I'm concerned that the first change is going to break compilation for
> > > any code that included linux/virtio-blk.h and used VIRTIO_BLK_F_FLUSH.
> >
> > That would be nlkt, right? :)
>
> nlkt, lguest, and probably others.
>
> linux/virtio_blk.h is a public kernel header, which is supposed to be
> used from userspace - so I assume many others who implemented virtio-blk
> for any reason took advantage of that header.
BTW, I have patched this myself now:
From: Rusty Russell <rusty@...tcorp.com.au>
Subject: virtio-blk: return VIRTIO_BLK_F_FLUSH to header.
This got renamed and clarified, but let's not break any userspace out there.
Signed-off-by: Rusty Russell <rusty@...tcorp.com.au>
---
include/linux/virtio_blk.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/linux/virtio_blk.h b/include/linux/virtio_blk.h
--- a/include/linux/virtio_blk.h
+++ b/include/linux/virtio_blk.h
@@ -41,6 +41,11 @@
#define VIRTIO_BLK_F_TOPOLOGY 10 /* Topology information is available */
#define VIRTIO_BLK_F_CONFIG_WCE 11 /* Writeback mode available in config */
+#ifndef __KERNEL__
+/* Old (deprecated) name for VIRTIO_BLK_F_WCE. */
+#define VIRTIO_BLK_F_FLUSH VIRTIO_BLK_F_WCE
+#endif
+
#define VIRTIO_BLK_ID_BYTES 20 /* ID string length */
struct virtio_blk_config {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists