Re: [Xen-devel] [PATCH v2] xen-blkfront: remove type check from blkfront_setup_discard

2014-01-22 Thread Konrad Rzeszutek Wilk
Jan Beulich wrote: On 13.01.14 at 14:45, David Vrabel wrote: >> On 13/01/14 13:16, Jan Beulich wrote: >> On 13.01.14 at 14:00, Ian Campbell >wrote: On Mon, 2014-01-13 at 12:34 +, Jan Beulich wrote: On 13.01.14 at 13:01, Olaf Hering wrote: >> On Mon, Jan 13, Jan Be

Re: [Xen-devel] [PATCH v2] xen-blkfront: remove type check from blkfront_setup_discard

2014-01-14 Thread David Vrabel
On 14/01/14 14:53, Olaf Hering wrote: > On Mon, Jan 13, David Vrabel wrote: > >> Can we have a patch to blkif.h that clarifies this? > > What about this change? > > diff --git a/xen/include/public/io/blkif.h b/xen/include/public/io/blkif.h > index 84eb7fd..56e2faa 100644 > --- a/xen/include/publ

Re: [Xen-devel] [PATCH v2] xen-blkfront: remove type check from blkfront_setup_discard

2014-01-14 Thread Olaf Hering
On Mon, Jan 13, David Vrabel wrote: > Can we have a patch to blkif.h that clarifies this? What about this change? diff --git a/xen/include/public/io/blkif.h b/xen/include/public/io/blkif.h index 84eb7fd..56e2faa 100644 --- a/xen/include/public/io/blkif.h +++ b/xen/include/public/io/blkif.h @@ -1

Re: [Xen-devel] [PATCH v2] xen-blkfront: remove type check from blkfront_setup_discard

2014-01-13 Thread Jan Beulich
>>> On 13.01.14 at 14:45, David Vrabel wrote: > On 13/01/14 13:16, Jan Beulich wrote: > On 13.01.14 at 14:00, Ian Campbell wrote: >>> On Mon, 2014-01-13 at 12:34 +, Jan Beulich wrote: >>> On 13.01.14 at 13:01, Olaf Hering wrote: > On Mon, Jan 13, Jan Beulich wrote: > >> Y

Re: [Xen-devel] [PATCH v2] xen-blkfront: remove type check from blkfront_setup_discard

2014-01-13 Thread David Vrabel
On 13/01/14 13:16, Jan Beulich wrote: On 13.01.14 at 14:00, Ian Campbell wrote: >> On Mon, 2014-01-13 at 12:34 +, Jan Beulich wrote: >> On 13.01.14 at 13:01, Olaf Hering wrote: On Mon, Jan 13, Jan Beulich wrote: > You can't do this in one go - the first two and the last

Re: [Xen-devel] [PATCH v2] xen-blkfront: remove type check from blkfront_setup_discard

2014-01-13 Thread Ian Campbell
On Mon, 2014-01-13 at 13:16 +, Jan Beulich wrote: > >>> On 13.01.14 at 14:00, Ian Campbell wrote: > > On Mon, 2014-01-13 at 12:34 +, Jan Beulich wrote: > >> >>> On 13.01.14 at 13:01, Olaf Hering wrote: > >> > On Mon, Jan 13, Jan Beulich wrote: > >> > > >> >> You can't do this in one go -

Re: [Xen-devel] [PATCH v2] xen-blkfront: remove type check from blkfront_setup_discard

2014-01-13 Thread Jan Beulich
>>> On 13.01.14 at 14:00, Ian Campbell wrote: > On Mon, 2014-01-13 at 12:34 +, Jan Beulich wrote: >> >>> On 13.01.14 at 13:01, Olaf Hering wrote: >> > On Mon, Jan 13, Jan Beulich wrote: >> > >> >> You can't do this in one go - the first two and the last one may be >> >> set independently (an

Re: [Xen-devel] [PATCH v2] xen-blkfront: remove type check from blkfront_setup_discard

2014-01-13 Thread Ian Campbell
On Mon, 2014-01-13 at 12:34 +, Jan Beulich wrote: > >>> On 13.01.14 at 13:01, Olaf Hering wrote: > > On Mon, Jan 13, Jan Beulich wrote: > > > >> You can't do this in one go - the first two and the last one may be > >> set independently (and are independent in their meaning), and > >> hence ne

Re: [Xen-devel] [PATCH v2] xen-blkfront: remove type check from blkfront_setup_discard

2014-01-13 Thread Olaf Hering
On Mon, Jan 13, Jan Beulich wrote: > >>> On 13.01.14 at 13:01, Olaf Hering wrote: > > On Mon, Jan 13, Jan Beulich wrote: > > > >> You can't do this in one go - the first two and the last one may be > >> set independently (and are independent in their meaning), and > >> hence need to be queried i

Re: [Xen-devel] [PATCH v2] xen-blkfront: remove type check from blkfront_setup_discard

2014-01-13 Thread Jan Beulich
>>> On 13.01.14 at 13:01, Olaf Hering wrote: > On Mon, Jan 13, Jan Beulich wrote: > >> You can't do this in one go - the first two and the last one may be >> set independently (and are independent in their meaning), and >> hence need to be queried independently (xenbus_gather() fails >> on the fi

Re: [Xen-devel] [PATCH v2] xen-blkfront: remove type check from blkfront_setup_discard

2014-01-13 Thread Olaf Hering
On Mon, Jan 13, Jan Beulich wrote: > You can't do this in one go - the first two and the last one may be > set independently (and are independent in their meaning), and > hence need to be queried independently (xenbus_gather() fails > on the first absent value). Yes, thats the purpose. Since the

Re: [Xen-devel] [PATCH v2] xen-blkfront: remove type check from blkfront_setup_discard

2014-01-13 Thread Jan Beulich
>>> On 13.01.14 at 11:14, Olaf Hering wrote: > --- a/drivers/block/xen-blkfront.c > +++ b/drivers/block/xen-blkfront.c > @@ -1634,37 +1634,22 @@ blkfront_closing(struct blkfront_info *info) > > static void blkfront_setup_discard(struct blkfront_info *info) > { > - int err; > - char *ty

[PATCH v2] xen-blkfront: remove type check from blkfront_setup_discard

2014-01-13 Thread Olaf Hering
In its initial implementation a check for "type" was added, but only phy and file are handled. This breaks advertised discard support for other type values such as qdisk. Fix and simplify this function: remove the check for "type" as the frontend is not supposed to care about this backend detail.