From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH] blktap[12]: include instead of Date: Wed, 12 Jan 2011 22:12:40 +0000 Message-ID: <1294870360.12280.83.camel@localhost.localdomain> References: <1294869968.7920.10085.camel@agari.van.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1294869968.7920.10085.camel@agari.van.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Daniel Stodden Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Wed, 2011-01-12 at 22:06 +0000, Daniel Stodden wrote: > On Wed, 2011-01-12 at 04:49 -0500, Ian Campbell wrote: > > # HG changeset patch > > # User Ian Campbell > > # Date 1294825752 0 > > # Node ID a5a02c0baa75b66c71f2828d22971f9dfb1e8a6b > > # Parent 610c0b9e9e3d70275a37aba9857e1b9d3a361bd0 > > blktap[12]: include instead of > > > > The former is a userspace sanitised header which contains the > > definitions we need. In some distros linux/fs.h defines WRITE which > > conflicts with blktaps own use of that name. > > Ack. > > [But fwiw we have BLKIF_OP_WRITE and TD_OP_WRITE and all proper code > should carry a TD_, so I'm slightly surprised.] Bare WRITE (and READ) seem to be used in e.g. tools/blktap/drivers/blktapctrl.c and tools/blktap/drivers/tapdisk.c in xen-unstable.hg. blktap2 looks clean apart from the header though. I think using sys/mount.h is correct in its own right but it would probably also be correct to switch to the properly namespaced variants. Ian. > > Daniel > > > Also there is no reason to use over the more normal > > . > > > > Signed-off-by: Ian Campbell > > > > diff -r 610c0b9e9e3d -r a5a02c0baa75 tools/blktap/drivers/blk_linux.c > > --- a/tools/blktap/drivers/blk_linux.c Wed Jan 12 09:49:00 2011 +0000 > > +++ b/tools/blktap/drivers/blk_linux.c Wed Jan 12 09:49:12 2011 +0000 > > @@ -1,6 +1,6 @@ > > #include > > #include > > -#include > > +#include > > #include "tapdisk.h" > > #include "blk.h" > > > > diff -r 610c0b9e9e3d -r a5a02c0baa75 tools/blktap2/drivers/blk_linux.c > > --- a/tools/blktap2/drivers/blk_linux.c Wed Jan 12 09:49:00 2011 +0000 > > +++ b/tools/blktap2/drivers/blk_linux.c Wed Jan 12 09:49:12 2011 +0000 > > @@ -1,7 +1,7 @@ > > #include > > +#include > > #include > > -#include > > -#include > > +#include > > #include "tapdisk.h" > > #include "blk.h" > > >