<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel">
    <title>gmane.linux.kernel.device-mapper.devel</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15984"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15983"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15982"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15981"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15980"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15978"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15977"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15976"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15975"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15974"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15973"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15972"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15964"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15963"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15962"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15961"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15959"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15958"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15957"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15956"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15984">
    <title>[PATCH v3 09/16] block: Add bio_clone_kmalloc()</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15984</link>
    <description>&lt;pre&gt;Signed-off-by: Kent Overstreet &amp;lt;koverstreet&amp;lt; at &amp;gt;google.com&amp;gt;
Change-Id: I4aad3ae23640e847056f9de54d6cb75b0ddaa85b
---
 drivers/block/osdblk.c |    3 +--
 fs/bio.c               |   13 +++++++++++++
 fs/exofs/ore.c         |    5 ++---
 include/linux/bio.h    |    1 +
 4 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/drivers/block/osdblk.c b/drivers/block/osdblk.c
index 87311eb..1bbc681 100644
--- a/drivers/block/osdblk.c
+++ b/drivers/block/osdblk.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -266,11 +266,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static struct bio *bio_chain_clone(struct bio *old_chain, gfp_t gfpmask)
 struct bio *tmp, *new_chain = NULL, *tail = NULL;
 
 while (old_chain) {
-tmp = bio_kmalloc(gfpmask, old_chain-&amp;gt;bi_max_vecs);
+tmp = bio_clone_kmalloc(old_chain, gfpmask);
 if (!tmp)
 goto err_out;
 
-__bio_clone(tmp, old_chain);
 tmp-&amp;gt;bi_bdev = NULL;
 gfpmask &amp;amp;= ~__GFP_WAIT;
 tmp-&amp;gt;bi_next = NULL;
diff --git a/fs/bio.c b/fs/bio.c
index 62c4af81..d212ee2 100644
--- a/fs/bio.c
+++ b/fs/bio.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -489,6 +489,19 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct bio *bio_clone(struct b&lt;/pre&gt;</description>
    <dc:creator>Kent Overstreet</dc:creator>
    <dc:date>2012-05-25T20:25:32</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15983">
    <title>[PATCH v3 11/16] block: Only clone bio vecs that are inuse</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15983</link>
    <description>&lt;pre&gt;bcache creates large bios internally, and then splits them according to
the device requirements before it sends them down. If a lower level
device tries to clone the bio, and the original bio had more than
BIO_MAX_PAGES, the clone will fail unecessarily.

We can fix this by only cloning the bio vecs that are actually in use.

Signed-off-by: Kent Overstreet &amp;lt;koverstreet&amp;lt; at &amp;gt;google.com&amp;gt;
Change-Id: I71971827a623ce90626fa4a09b07f95f875ad890
---
 drivers/block/rbd.c |    2 +-
 drivers/md/dm.c     |    5 ++---
 fs/bio.c            |   13 +++++++------
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 11777b4..c1f8a8fe 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -729,7 +729,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static struct bio *bio_chain_clone(struct bio **old, struct bio **next,
 }
 
 while (old_chain &amp;amp;&amp;amp; (total &amp;lt; len)) {
-tmp = bio_kmalloc(gfpmask, old_chain-&amp;gt;bi_max_vecs);
+tmp = bio_kmalloc(gfpmask, bio_segments(old_chain));
 if (!tmp)
 goto err_out;
 
dif&lt;/pre&gt;</description>
    <dc:creator>Kent Overstreet</dc:creator>
    <dc:date>2012-05-25T20:25:34</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15982">
    <title>[PATCH v3 06/16] block: Add an explicit bio flag forbios that own their bvec</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15982</link>
    <description>&lt;pre&gt;This is for the new bio splitting code. When we split a bio, if the
split occured on a bvec boundry we reuse the bvec for the new bio. But
that means bio_free() can't free it, hence the explicit flag.

Signed-off-by: Kent Overstreet &amp;lt;koverstreet&amp;lt; at &amp;gt;google.com&amp;gt;
Change-Id: I040f6b501088e882a9f013d6b6e730ff04e9c1da
---
 fs/bio.c                  |    3 ++-
 include/linux/bio.h       |    5 -----
 include/linux/blk_types.h |    1 +
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/fs/bio.c b/fs/bio.c
index 4075171..692911e 100644
--- a/fs/bio.c
+++ b/fs/bio.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -243,7 +243,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void bio_free(struct bio *bio)
 return;
 }
 
-if (bio_has_allocated_vec(bio))
+if (bio_flagged(bio, BIO_OWNS_VEC))
 bvec_free_bs(bs, bio-&amp;gt;bi_io_vec, BIO_POOL_IDX(bio));
 
 if (bio_integrity(bio))
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -313,6 +313,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct bio *bio_alloc_bioset(gfp_t gfp_mask, int nr_iovecs, struct bio_set *bs)
 goto err_free;
 
 nr_iovecs = bvec_nr_vecs(idx);
+bio-&amp;gt;bi_flags |= 1 &amp;lt;&amp;lt; BIO_OWNS_VEC;
 }
 out_set:
 bio-&amp;gt;bi_f&lt;/pre&gt;</description>
    <dc:creator>Kent Overstreet</dc:creator>
    <dc:date>2012-05-25T20:25:29</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15981">
    <title>[PATCH v3 08/16] block: Rework bio splitting</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15981</link>
    <description>&lt;pre&gt;Break out bio_split() and bio_pair_split(), and get rid of the
limitations of bio_split()

Signed-off-by: Kent Overstreet &amp;lt;koverstreet&amp;lt; at &amp;gt;google.com&amp;gt;
Change-Id: Ic4733be7af6a4957974b42b09233b2209a779cbf
---
 drivers/block/drbd/drbd_req.c |   16 +---
 drivers/block/pktcdvd.c       |    4 +-
 drivers/block/rbd.c           |    7 +-
 drivers/md/linear.c           |    4 +-
 drivers/md/raid0.c            |    6 +-
 drivers/md/raid10.c           |   21 +-----
 fs/bio-integrity.c            |   44 -----------
 fs/bio.c                      |  167 +++++++++++++++++++++++++++++------------
 include/linux/bio.h           |   25 +++---
 9 files changed, 144 insertions(+), 150 deletions(-)

diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index 1c7e3c4..68fa494 100644
--- a/drivers/block/drbd/drbd_req.c
+++ b/drivers/block/drbd/drbd_req.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1101,18 +1101,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void drbd_make_request(struct request_queue *q, struct bio *bio)
 if (likely(s_enr == e_enr)) {
 inc_ap_bio(mdev, 1);
 drbd_make_req&lt;/pre&gt;</description>
    <dc:creator>Kent Overstreet</dc:creator>
    <dc:date>2012-05-25T20:25:31</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15980">
    <title>[PATCH v3 12/16] Closures</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15980</link>
    <description>&lt;pre&gt;Asynchronous refcounty thingies; they embed a refcount and a work
struct. Extensive documentation follows in include/linux/closure.h

Signed-off-by: Kent Overstreet &amp;lt;koverstreet&amp;lt; at &amp;gt;google.com&amp;gt;
---
 include/linux/closure.h |  658 +++++++++++++++++++++++++++++++++++++++++++++++
 lib/Kconfig.debug       |    8 +
 lib/Makefile            |    2 +-
 lib/closure.c           |  344 +++++++++++++++++++++++++
 4 files changed, 1011 insertions(+), 1 deletion(-)
 create mode 100644 include/linux/closure.h
 create mode 100644 lib/closure.c

diff --git a/include/linux/closure.h b/include/linux/closure.h
new file mode 100644
index 0000000..7cae8cf
--- /dev/null
+++ b/include/linux/closure.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,658 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#ifndef _LINUX_CLOSURE_H
+#define _LINUX_CLOSURE_H
+
+#include &amp;lt;linux/llist.h&amp;gt;
+#include &amp;lt;linux/sched.h&amp;gt;
+#include &amp;lt;linux/workqueue.h&amp;gt;
+
+/*
+ * Closure is perhaps the most overused and abused term in computer science, but
+ * since I've been unable to come up with anything better you're stuck with it
+ * again.
+ *
+ *&lt;/pre&gt;</description>
    <dc:creator>Kent Overstreet</dc:creator>
    <dc:date>2012-05-25T20:25:35</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15978">
    <title>[PATCH v3 13/16] Make generic_make_request handlearbitrarily large bios</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15978</link>
    <description>&lt;pre&gt;The way the block layer is currently written, it goes to great lengths
to avoid having to split bios; upper layer code (such as bio_add_page())
checks what the underlying device can handle and tries to always create
bios that don't need to be split.

But this approach becomes unwieldy and eventually breaks down with
stacked devices and devices with dynamic limits, and it adds a lot of
complexity. If the block layer could split bios as needed, we could
eliminate a lot of complexity elsewhere - particularly in stacked
drivers. Code that creates bios can then create whatever size bios are
convenient, and more importantly stacked drivers don't have to deal with
both their own bio size limitations and the limitations of the
(potentially multiple) devices underneath them.

Signed-off-by: Kent Overstreet &amp;lt;koverstreet&amp;lt; at &amp;gt;google.com&amp;gt;
Change-Id: I53ed182e8c0a5fe192b040b1fdedba205fe953d5
---
 block/blk-core.c       |  118 ++++++++++++++++++++++++++++++++++++++++++++++++
 fs/bio.c               |   41 +++++++++++++++++
 in&lt;/pre&gt;</description>
    <dc:creator>Kent Overstreet</dc:creator>
    <dc:date>2012-05-25T20:25:36</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15977">
    <title>[PATCH v3 07/16] block: Rename bio_split() -&gt;bio_pair_split()</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15977</link>
    <description>&lt;pre&gt;This is prep work for introducing a more general bio_split()

Change-Id: Ib9c4ff691af889d26bc9ec9fb42a2f3068f34ad9

Signed-off-by: Kent Overstreet &amp;lt;koverstreet&amp;lt; at &amp;gt;google.com&amp;gt;
---
 drivers/block/drbd/drbd_req.c |    2 +-
 drivers/block/pktcdvd.c       |    2 +-
 drivers/block/rbd.c           |    3 ++-
 drivers/md/linear.c           |    2 +-
 drivers/md/raid0.c            |    6 +++---
 drivers/md/raid10.c           |    4 ++--
 fs/bio.c                      |    4 ++--
 include/linux/bio.h           |    2 +-
 8 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index 4a0f314..1c7e3c4 100644
--- a/drivers/block/drbd/drbd_req.c
+++ b/drivers/block/drbd/drbd_req.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1128,7 +1128,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void drbd_make_request(struct request_queue *q, struct bio *bio)
 const int sps = 1 &amp;lt;&amp;lt; HT_SHIFT; /* sectors per slot */
 const int mask = sps - 1;
 const sector_t first_sectors = sps - (sect &amp;amp; mask);
-bp = bio_split(bio, first_sectors);
+bp = bio_p&lt;/pre&gt;</description>
    <dc:creator>Kent Overstreet</dc:creator>
    <dc:date>2012-05-25T20:25:30</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15976">
    <title>[PATCH v3 10/16] block: Add bio_clone_bioset()</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15976</link>
    <description>&lt;pre&gt;This consolidates some code, and will help in a later patch changing how
bio cloning works.

Signed-off-by: Kent Overstreet &amp;lt;koverstreet&amp;lt; at &amp;gt;google.com&amp;gt;
Change-Id: If6cfd840db9cf90a798c6a5862e3314465c83000
---
 block/blk-core.c    |    8 +-------
 drivers/md/dm.c     |    4 ++--
 drivers/md/md.c     |   20 +-------------------
 fs/bio.c            |   16 ++++++++++++----
 include/linux/bio.h |    1 +
 5 files changed, 17 insertions(+), 32 deletions(-)

diff --git a/block/blk-core.c b/block/blk-core.c
index 1f61b74..91617eb 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2660,16 +2660,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int blk_rq_prep_clone(struct request *rq, struct request *rq_src,
 blk_rq_init(NULL, rq);
 
 __rq_for_each_bio(bio_src, rq_src) {
-bio = bio_alloc_bioset(gfp_mask, bio_src-&amp;gt;bi_max_vecs, bs);
+bio = bio_clone_bioset(bio_src, gfp_mask, bs);
 if (!bio)
 goto free_and_out;
 
-__bio_clone(bio, bio_src);
-
-if (bio_integrity(bio_src) &amp;amp;&amp;amp;
-    bio_integrity_clone(bio, bio_src, gfp_mask, bs))
-goto free_and&lt;/pre&gt;</description>
    <dc:creator>Kent Overstreet</dc:creator>
    <dc:date>2012-05-25T20:25:33</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15975">
    <title>[PATCH v3 04/16] pktcdvd: Switch to bio_kmalloc()</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15975</link>
    <description>&lt;pre&gt;This is prep work for killing bi_destructor - previously, pktcdvd had
its own pkt_bio_alloc which was basically duplication bio_kmalloc(),
necessitating its own bi_destructor implementation.

Signed-off-by: Kent Overstreet &amp;lt;koverstreet&amp;lt; at &amp;gt;google.com&amp;gt;
Change-Id: I5604293e07f695c8f0106ae819e306f1def89a67
---
 drivers/block/pktcdvd.c |  115 ++++++++++++++++-------------------------------
 1 file changed, 39 insertions(+), 76 deletions(-)

diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index ba66e44..6fe693a 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -522,36 +522,38 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void pkt_bio_finished(struct pktcdvd_device *pd)
 }
 }
 
-static void pkt_bio_destructor(struct bio *bio)
+static void pkt_end_io_read(struct bio *bio, int err)
 {
-kfree(bio-&amp;gt;bi_io_vec);
-kfree(bio);
-}
+struct packet_data *pkt = bio-&amp;gt;bi_private;
+struct pktcdvd_device *pd = pkt-&amp;gt;pd;
+BUG_ON(!pd);
 
-static struct bio *pkt_bio_alloc(int nr_iovecs)
-{
-struct bio_vec *bvl = NULL;
-struct bio *&lt;/pre&gt;</description>
    <dc:creator>Kent Overstreet</dc:creator>
    <dc:date>2012-05-25T20:25:27</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15974">
    <title>[PATCH v3 05/16] block: Kill bi_destructor</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15974</link>
    <description>&lt;pre&gt;Now that we've got generic code for freeing bios allocated from bio
pools, this isn't needed anymore.

This also changes the semantics of bio_free() a bit - it now also frees
bios allocated by bio_kmalloc(). It's also no longer exported, as
without bi_destructor there should be no need for it to be called
anywhere else.

Signed-off-by: Kent Overstreet &amp;lt;koverstreet&amp;lt; at &amp;gt;google.com&amp;gt;
Change-Id: Iade939e76ff329cb03eef9125e4377ba1e4265c5
---
 Documentation/block/biodoc.txt |    5 -----
 fs/bio.c                       |   33 +++++++++++++++------------------
 include/linux/bio.h            |    1 -
 include/linux/blk_types.h      |    3 ---
 4 files changed, 15 insertions(+), 27 deletions(-)

diff --git a/Documentation/block/biodoc.txt b/Documentation/block/biodoc.txt
index e418dc0..8df5e8e 100644
--- a/Documentation/block/biodoc.txt
+++ b/Documentation/block/biodoc.txt
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -465,7 +465,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct bio {
        bio_end_io_t*bi_end_io;  /* bi_end_io (bio) */
        atomic_tbi_cnt;     /* pin count: free when it hits&lt;/pre&gt;</description>
    <dc:creator>Kent Overstreet</dc:creator>
    <dc:date>2012-05-25T20:25:28</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15973">
    <title>[PATCH v3 00/16] Block cleanups</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15973</link>
    <description>&lt;pre&gt;Incorporated various review feedback, and I reordered/reworked the patches to
make them more coherent.

This also has the latest version of the closure code, incorporating review
feedback from Joe and Tejun. I may rewrite the bio splitting stuff to not
depend on it so it can go in sooner (Tejun is not a fan of closures), but IMO
the patch is better for using them.

First 5 patches: Kill bi_destructor

Next 3 patches: Better bio splitting

Next 3 patches: Rework bio cloning to not clone entire bio vec

Tejun also pointed out that with the bio splitting improvements we ought to be
able to get rid of merge_bvec_fn, so I started on that. Those patches are
definitely a WIP, though.

For most of the md code, it looks like things will almost just work - they
already had bio_pair_split() calls to handle single page bios that crossed bvec
boundries, but bio_pair_split() now splits arbitrary bios so things should just work.

(I just thought of one problem - previously, in practice you'd never need to
split a bio more &lt;/pre&gt;</description>
    <dc:creator>Kent Overstreet</dc:creator>
    <dc:date>2012-05-25T20:25:23</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15972">
    <title>[PATCH v3 02/16] dm: Use bioset's front_pad fordm_rq_clone_bio_info</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15972</link>
    <description>&lt;pre&gt;Previously, dm_rq_clone_bio_info needed to be freed by the bio's
destructor to avoid a memory leak in the blk_rq_prep_clone() error path.
This gets rid of a memory allocation and means we can kill
dm_rq_bio_destructor.

Change-Id: I4ed2b9dbd1dffd44ad15bc3de89d3c3b6bc7714a

Signed-off-by: Kent Overstreet &amp;lt;koverstreet&amp;lt; at &amp;gt;google.com&amp;gt;
---
 drivers/md/dm.c |   31 +++++--------------------------
 1 file changed, 5 insertions(+), 26 deletions(-)

diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 40b7735..4014696 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -92,6 +92,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct dm_rq_target_io {
 struct dm_rq_clone_bio_info {
 struct bio *orig;
 struct dm_rq_target_io *tio;
+struct bio clone;
 };
 
 union map_info *dm_get_mapinfo(struct bio *bio)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -467,16 +468,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void free_rq_tio(struct dm_rq_target_io *tio)
 mempool_free(tio, tio-&amp;gt;md-&amp;gt;tio_pool);
 }
 
-static struct dm_rq_clone_bio_info *alloc_bio_info(struct mapped_device *md)
-{
-return mempool_alloc(md-&amp;gt;io_pool, GFP_ATOMIC);
-}
-
-static&lt;/pre&gt;</description>
    <dc:creator>Kent Overstreet</dc:creator>
    <dc:date>2012-05-25T20:25:25</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15964">
    <title>[RFC PATCH v2 2/3] Adds support for security checks inthe linear target</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15964</link>
    <description>&lt;pre&gt;Just a security check implementation for linear target

---
 drivers/md/dm-linear.c |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/drivers/md/dm-linear.c b/drivers/md/dm-linear.c
index 3639eea..b04aa00 100644
--- a/drivers/md/dm-linear.c
+++ b/drivers/md/dm-linear.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -153,9 +153,25 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int linear_iterate_devices(struct dm_target *ti,
 return fn(ti, lc-&amp;gt;dev, lc-&amp;gt;start, ti-&amp;gt;len, data);
 }
 
+static int linear_security(struct dm_target *ti, unsigned int argc, char **argv)
+{
+int r;
+
+if (argc &amp;lt; 1) {
+ti-&amp;gt;error = "dm-linear: Security check: invalid number of parameters";
+return -EINVAL;
+}
+
+r = dm_check_backing_dev_permission(ti, argv[0]);
+if (r)
+ti-&amp;gt;error = "dm-linear: Security check failed";
+
+return r;
+}
+
 static struct target_type linear_target = {
 .name   = "linear",
-.version = {1, 1, 0},
+.version = {1, 2, 0},
 .module = THIS_MODULE,
 .ctr    = linear_ctr,
 .dtr    = linear_dtr,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -164,6 +180,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static struct target_type&lt;/pre&gt;</description>
    <dc:creator>Ondrej Kozina</dc:creator>
    <dc:date>2012-05-25T13:22:27</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15963">
    <title>[RFC PATCH v2 1/3] Adds support for user-submitted ioctlcommands</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15963</link>
    <description>&lt;pre&gt;The core of changes in DM ioctl operations

Changes in version No. 2:
^^^^^^^^^^^^^^^^^^^^^^^^

(*) With security enabled, open file descriptor for backing device has to be 
    passed in target parameters (e.g. "fd:9" instead of "8:2")

(*) Load time parameter for dm-mod "enable_security"

(*) Removed owner_gid from sysfs attributes

---
 drivers/md/Makefile           |    2 +-
 drivers/md/dm-ioctl.c         |  141 +++++++++++++++++++++++++++++++++++------
 drivers/md/dm-security.c      |   95 +++++++++++++++++++++++++++
 drivers/md/dm-sysfs.c         |   15 +++++
 drivers/md/dm-table.c         |   23 +++++++-
 drivers/md/dm.c               |   87 +++++++++++++++++++++++++
 drivers/md/dm.h               |   12 ++++
 include/linux/device-mapper.h |    5 ++
 8 files changed, 358 insertions(+), 22 deletions(-)
 create mode 100644 drivers/md/dm-security.c

diff --git a/drivers/md/Makefile b/drivers/md/Makefile
index 8b2e0df..28d0808 100644
--- a/drivers/md/Makefile
+++ b/drivers/md/Makefile
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3,7 +3,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #
 &lt;/pre&gt;</description>
    <dc:creator>Ondrej Kozina</dc:creator>
    <dc:date>2012-05-25T13:22:26</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15962">
    <title>[RFC PATCH v2 0/3] Allow user w/o CAP_SYS_ADMIN tosubmit ioctl commands into DM</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15962</link>
    <description>&lt;pre&gt;Hi,

I would like to post new version of my previous RFC with a set of changes for
device-mapper that would enable user w/o CAP_SYS_ADMIN capability to create 
and manage his own devices.

Changes in version No. 2:
^^^^^^^^^^^^^^^^^^^^^^^^

(*) No major:minor translation to dentry (inode) in kernel space. Supposing
    userspace should resolve that.

(*) Load time parameter to enable security enhancements

(*) Supposing security is enabled, userspace should handle open file descriptors
    and kernel checks whether the user is authorised to access the device
    linked to the device node.

The rest of message is the same as in original RFC

Simple use cases:
^^^^^^^^^^^^^^^^
(1) Non-root user would be able to create dm-crypt device from USB stick
    (assuming the user has permission to access backing device)
(2) You can create pool of storage space for virtual machines. VM managers
    would be able to administrate the pool w/o root permissions:

    .--------------. .----------------.
    |_owner: VM 01_| &lt;/pre&gt;</description>
    <dc:creator>Ondrej Kozina</dc:creator>
    <dc:date>2012-05-25T13:22:25</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15961">
    <title>[RFC PATCH v2 3/3] Adds support for security checks inthe crypt target</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15961</link>
    <description>&lt;pre&gt;Just a security check implementation for the crypt target

---
 drivers/md/dm-crypt.c |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
index 3f06df5..af6f319 100644
--- a/drivers/md/dm-crypt.c
+++ b/drivers/md/dm-crypt.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1867,9 +1867,24 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int crypt_iterate_devices(struct dm_target *ti,
 return fn(ti, cc-&amp;gt;dev, cc-&amp;gt;start, ti-&amp;gt;len, data);
 }
 
+static int crypt_security(struct dm_target *ti, unsigned int argc, char **argv)
+{
+int r;
+
+if (argc &amp;lt; 4) {
+ti-&amp;gt;error = "dm-crypt: Security check: invalid number of parameters";
+return -EINVAL;
+}
+r = dm_check_backing_dev_permission(ti, argv[3]);
+if (r)
+ti-&amp;gt;error = "dm-crypt: Security check failed";
+
+return r;
+}
+
 static struct target_type crypt_target = {
 .name   = "crypt",
-.version = {1, 11, 0},
+.version = {1, 12, 0},
 .module = THIS_MODULE,
 .ctr    = crypt_ctr,
 .dtr    = crypt_dtr,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1881,6 +1896,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static struct target_type crypt_&lt;/pre&gt;</description>
    <dc:creator>Ondrej Kozina</dc:creator>
    <dc:date>2012-05-25T13:22:28</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15959">
    <title>Re: [PATCH 0/2] multipath: compile cleanup</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15959</link>
    <description>&lt;pre&gt;Merged.

Thanks.




&lt;/pre&gt;</description>
    <dc:creator>Christophe Varoqui</dc:creator>
    <dc:date>2012-05-25T05:20:53</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15958">
    <title>[PATCH 0/2] multipath: compile cleanup</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15958</link>
    <description>&lt;pre&gt;When the multipath code is compiled with the standard redhat rpm cflags,
there are a number of warnings that get issued, some about real problems.

These patches switch multipath to use those cflags, and then clean up
warnings. If people want upstream to continue using the existing cflags,
I don't particularly mind.  I really included the first patch to make sure
people can see the warnings that the second patch corrects.

Also, some of the warnings are for actual errors, and how to fix them is
obvious.  Others won't actually cause problems, and if people object to
the changes I made to make them go away, I'm happy to fix them differently. 

Benjamin Marzinski (2):
  multipath: Build with standard rpm cflags
  multipath: Fix warnings from stricter compile options.

 Makefile.inc                     |    6 +++++-
 libmpathpersist/mpath_persist.c  |   10 +++++++---
 libmpathpersist/mpath_pr_ioctl.c |    9 +++++++++
 libmultipath/alias.c             |    8 ++++++--
 mpathpersist/main.c              |    2 --
 m&lt;/pre&gt;</description>
    <dc:creator>Benjamin Marzinski</dc:creator>
    <dc:date>2012-05-25T04:57:41</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15957">
    <title>[PATCH 2/2] multipath: Fix warnings from strictercompile options.</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15957</link>
    <description>&lt;pre&gt;With stricter compilation options, multipath printed number of
warnings during compilation. Some of them were actual bugs. Others
couldn't cause any problems.  This patch cleans up all the new
warnings.

Signed-off-by: Benjamin Marzinski &amp;lt;bmarzins&amp;lt; at &amp;gt;redhat.com&amp;gt;
---
 libmpathpersist/mpath_persist.c  |   10 +++++++---
 libmpathpersist/mpath_pr_ioctl.c |    9 +++++++++
 libmultipath/alias.c             |    8 ++++++--
 mpathpersist/main.c              |    2 --
 multipathd/main.c                |   24 +++++++++++++++++++-----
 5 files changed, 41 insertions(+), 12 deletions(-)

diff --git a/libmpathpersist/mpath_persist.c b/libmpathpersist/mpath_persist.c
index d99c0da..3041089 100644
--- a/libmpathpersist/mpath_persist.c
+++ b/libmpathpersist/mpath_persist.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -177,8 +177,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int mpath_persistent_reserve_in (int fd, int rq_servact, struct prin_resp *resp,
 goto out;
 }
 
-if (path_discovery(pathvec, conf, DI_SYSFS | DI_CHECKER))
+if (path_discovery(pathvec, conf, DI_SYSFS | DI_CHECKER)) {
+ret = MPATH_&lt;/pre&gt;</description>
    <dc:creator>Benjamin Marzinski</dc:creator>
    <dc:date>2012-05-25T04:57:43</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15956">
    <title>[PATCH 1/2] multipath: Build with standard rpm cflags</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15956</link>
    <description>&lt;pre&gt;This patch makes multipath build with the standard redhat rpm cflags, which
can help catch some code errors.

Signed-off-by: Benjamin Marzinski &amp;lt;bmarzins&amp;lt; at &amp;gt;redhat.com&amp;gt;
---
 Makefile.inc |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/Makefile.inc b/Makefile.inc
index 02aef4f..b0c68f4 100644
--- a/Makefile.inc
+++ b/Makefile.inc
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -38,7 +38,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; mpathpersistdir = $(TOPDIR)/libmpathpersist
 GZIP        = /bin/gzip -9 -c
 INSTALL_PROGRAM = install
 
-OPTFLAGS     = -pipe -g -Wall -Wunused -Wstrict-prototypes
+ifndef RPM_OPT_FLAGS
+RPM_OPT_FLAGS = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4
+endif
+
+OPTFLAGS     = $(RPM_OPT_FLAGS) -Wunused -Wstrict-prototypes
 CFLAGS     = $(OPTFLAGS) -fPIC -DLIB_STRING=\"${LIB}\"
 SHARED_FLAGS = -shared
 
&lt;/pre&gt;</description>
    <dc:creator>Benjamin Marzinski</dc:creator>
    <dc:date>2012-05-25T04:57:42</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15947">
    <title>Re: [PATCH v2 08/14] block: Kill bi_destructor</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15947</link>
    <description>&lt;pre&gt;
Just noticed bio_kmalloc_destructor() will take care of freeing bio_kmalloc()
bios and it has been dropped in this patch. So memory leak point is moot.
bio_reset() question still remains though.

Thanks
Vivek

&lt;/pre&gt;</description>
    <dc:creator>Vivek Goyal</dc:creator>
    <dc:date>2012-05-24T19:58:10</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.linux.kernel.device-mapper.devel">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.linux.kernel.device-mapper.devel</link>
  </textinput>
</rdf:RDF>

