From: Olaf Hering <olaf@aepfle.de>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: konrad.wilk@oracle.com, xen-devel@lists.xen.org,
linux-kernel@vger.kernel.org, david.vrabel@citrix.com
Subject: Re: [PATCH] xen-blkfront: remove type check from blkfront_setup_discard
Date: Mon, 13 Jan 2014 10:30:32 +0100 [thread overview]
Message-ID: <20140113093032.GA13919@aepfle.de> (raw)
In-Reply-To: <52D073F0.5020400@oracle.com>
On Fri, Jan 10, Boris Ostrovsky wrote:
> I don't know discard code works but it seems to me that if you pass, for
> example, zero as discard_granularity (which may happen if xenbus_gather()
> fails) then blkdev_issue_discard() in the backend will set granularity to 1
> and continue with discard. This may not be what the the guest admin
> requested. And he won't know about this since no error message is printed
> anywhere.
If I understand the code using granularity/alignment correctly, both are
optional properties. So if the granularity is just 1 it means byte
ranges, which is fine if the backend uses FALLOC_FL_PUNCH_HOLE. Also
both properties are not admin controlled, for phy the blkbk drivers just
passes on what it gets from the underlying hardware.
> Similarly, if xenbug_gather("discard-secure") fails, I think the code will
> assume that secure discard has not been requested. I don't know what
> security implications this will have but it sounds bad to me.
There are no security implications, if the backend does not advertise it
then its not present.
After poking around some more it seems that blkif.h is the spec, it does
not say anything that the three properties are optional. Also the
backend drivers in sles11sp2 and mainline create all three properties
unconditionally. So I think a better change is to expect all three
properties in the frontend. I will send another version of the patch.
Olaf
next prev parent reply other threads:[~2014-01-13 9:30 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-10 16:28 [PATCH] xen-blkfront: remove type check from blkfront_setup_discard Olaf Hering
2014-01-10 18:07 ` Boris Ostrovsky
2014-01-10 18:07 ` Boris Ostrovsky
2014-01-10 21:37 ` Olaf Hering
2014-01-10 22:28 ` Boris Ostrovsky
2014-01-10 22:28 ` Boris Ostrovsky
2014-01-10 22:49 ` Olaf Hering
2014-01-10 22:49 ` [Xen-devel] " Olaf Hering
2014-01-10 22:57 ` Boris Ostrovsky
2014-01-10 22:57 ` [Xen-devel] " Boris Ostrovsky
2014-01-13 9:30 ` Olaf Hering
2014-01-13 9:30 ` Olaf Hering [this message]
2014-01-13 14:51 ` Boris Ostrovsky
2014-01-13 14:51 ` Boris Ostrovsky
2014-01-13 16:24 ` Konrad Rzeszutek Wilk
2014-01-13 16:24 ` Konrad Rzeszutek Wilk
2014-01-13 23:07 ` Olaf Hering
2014-01-14 2:11 ` Boris Ostrovsky
2014-01-14 2:11 ` Boris Ostrovsky
2014-01-14 10:46 ` David Vrabel
2014-01-14 10:46 ` David Vrabel
2014-01-13 23:07 ` Olaf Hering
2014-01-10 21:37 ` Olaf Hering
-- strict thread matches above, loose matches on Subject: below --
2014-01-10 16:28 Olaf Hering
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=20140113093032.GA13919@aepfle.de \
--to=olaf@aepfle.de \
--cc=boris.ostrovsky@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.