From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Li Dongyang <lidongyang@novell.com>, keir@xen.org
Cc: xen-devel@lists.xensource.com, owen.smith@citrix.com,
JBeulich@novell.com
Subject: Re: [PATCH V3 3/3] xen-blkback: handle trim request in backend driver
Date: Fri, 26 Aug 2011 13:18:03 -0400 [thread overview]
Message-ID: <20110826171803.GC2343@dumpdata.com> (raw)
In-Reply-To: <1314177825-22360-4-git-send-email-lidongyang@novell.com>
> +static void xen_blk_trim(struct xen_blkif *blkif, struct blkif_request *req)
Just call it discard: s/trim/discard/ through all the patches.
Also make sure you do that for the functions. And for the 'tr' - change it to
'discard' maybe?
.. snip..
> +int xen_blkbk_trim(struct xenbus_transaction xbt, struct backend_info *be)
Call it discard.
.. snip ..
> + err = xenbus_printf(xbt, dev->nodename, "feature-trim",
>From one hand it would be really nice to call this 'feature-discard'
but the Citrix frontends (and perhaps the SuSE ones too?) expect
it as 'feature-trim'. Maybe we should just call it 'feature-discard'
here and add a backwards compatible patch that will call it
'feature-trim'?
Sadly, the 'feature-trim' has been enumareted in the blkif.h so it
kind of is written in stone.
Keir, what is your feeling on this?
Can we change the name to 'feature-discard'?
> + "%d", state);
> + if (err)
> + xenbus_dev_fatal(dev, err, "writing feature-trim");
> +kfree:
> + kfree(type);
> +out:
> + return err;
> +}
> +
> /*
> * Entry point to this code when a new device is created. Allocate the basic
> * structures, and watch the store waiting for the hotplug scripts to tell us
> @@ -650,6 +708,10 @@ again:
> if (err)
> goto abort;
>
> + err = xen_blkbk_trim(xbt, be);
> + if (err)
> + goto abort;
> +
No need really. We don't need to abort b/c we can't establish discard
support.
> err = xenbus_printf(xbt, dev->nodename, "sectors", "%llu",
> (unsigned long long)vbd_sz(&be->blkif->vbd));
> if (err) {
> --
> 1.7.6
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2011-08-26 17:18 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-24 9:23 [PATCH V3 0/3] xen-blkfront/xen-blkback trim support Li Dongyang
2011-08-24 9:23 ` [PATCH V3 1/3] xen-blkback: add BLKIF_OP_TRIM and backend types Li Dongyang
2011-08-24 10:26 ` Jan Beulich
[not found] ` <4E54EE080200007800052DEC@victor.provo.novell.com>
2011-08-25 6:34 ` Li Dongyang
2011-08-25 7:00 ` Jan Beulich
2011-08-24 9:23 ` [PATCH V3 2/3] xen-blkfront: teach blkfront driver handle trim request Li Dongyang
2011-08-24 10:42 ` Jan Beulich
[not found] ` <4E54F1C20200007800052DF8@victor.provo.novell.com>
2011-08-25 6:37 ` Li Dongyang
2011-08-25 7:03 ` Jan Beulich
2011-08-24 9:23 ` [PATCH V3 3/3] xen-blkback: handle trim request in backend driver Li Dongyang
2011-08-26 17:18 ` Konrad Rzeszutek Wilk [this message]
2011-08-24 14:17 ` [PATCH V3 0/3] xen-blkfront/xen-blkback trim support Pasi Kärkkäinen
2011-08-26 17:10 ` Konrad Rzeszutek Wilk
2011-08-29 7:47 ` Li Dongyang
2011-08-29 15:32 ` Konrad Rzeszutek Wilk
2011-08-26 16:56 ` Konrad Rzeszutek Wilk
2011-08-29 7:50 ` Li Dongyang
2011-08-29 15:31 ` Konrad Rzeszutek Wilk
2011-08-31 9:41 ` Li Dongyang
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=20110826171803.GC2343@dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=JBeulich@novell.com \
--cc=keir@xen.org \
--cc=lidongyang@novell.com \
--cc=owen.smith@citrix.com \
--cc=xen-devel@lists.xensource.com \
/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;
as well as URLs for NNTP newsgroup(s).