From: "Jan Beulich" <JBeulich@suse.com>
To: "Olaf Hering" <olaf@aepfle.de>
Cc: <david.vrabel@citrix.com>, <xen-devel@lists.xen.org>,
<boris.ostrovsky@oracle.com>, <konrad.wilk@oracle.com>,
<linux-kernel@vger.kernel.org>
Subject: Re: [Xen-devel] [PATCH v2] xen-blkfront: remove type check from blkfront_setup_discard
Date: Mon, 13 Jan 2014 11:24:14 +0000 [thread overview]
Message-ID: <52D3DAEE0200007800112FD4@nat28.tlf.novell.com> (raw)
In-Reply-To: <1389608052-7139-1-git-send-email-olaf@aepfle.de>
>>> On 13.01.14 at 11:14, Olaf Hering <olaf@aepfle.de> 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 *type;
> unsigned int discard_granularity;
> unsigned int discard_alignment;
> unsigned int discard_secure;
>
> - type = xenbus_read(XBT_NIL, info->xbdev->otherend, "type", NULL);
> - if (IS_ERR(type))
> + if (xenbus_gather(XBT_NIL, info->xbdev->otherend,
> + "discard-granularity", "%u", &discard_granularity,
> + "discard-alignment", "%u", &discard_alignment,
> + "discard-secure", "%u", &discard_secure,
> + NULL))
> return;
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).
Jan
next prev parent reply other threads:[~2014-01-13 11:24 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-13 10:14 Olaf Hering
2014-01-13 11:24 ` Jan Beulich [this message]
2014-01-13 12:01 ` [Xen-devel] " Olaf Hering
2014-01-13 12:34 ` Jan Beulich
2014-01-13 12:40 ` Olaf Hering
2014-01-13 13:00 ` Ian Campbell
2014-01-13 13:16 ` Jan Beulich
2014-01-13 13:34 ` Ian Campbell
2014-01-13 13:45 ` David Vrabel
2014-01-13 13:58 ` Jan Beulich
2014-01-13 15:57 ` Konrad Rzeszutek Wilk
2014-01-14 14:53 ` Olaf Hering
2014-01-14 15:17 ` David Vrabel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52D3DAEE0200007800112FD4@nat28.tlf.novell.com \
--to=jbeulich@suse.com \
--cc=boris.ostrovsky@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=olaf@aepfle.de \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®