<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/md/dm-bio-list.h, branch v2.6.31-rc2</title>
<subtitle>Linux Kernel (branches are rebased on master from time to time)</subtitle>
<id>https://sre.ring0.de/linux/atom?h=v2.6.31-rc2</id>
<link rel='self' href='https://sre.ring0.de/linux/atom?h=v2.6.31-rc2'/>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/'/>
<updated>2009-04-15T06:28:09Z</updated>
<entry>
<title>block: move bio list helpers into bio.h</title>
<updated>2009-04-15T06:28:09Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2009-04-07T17:55:13Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=8f3d8ba20e67991b531e9c0227dcd1f99271a32c'/>
<id>urn:sha1:8f3d8ba20e67991b531e9c0227dcd1f99271a32c</id>
<content type='text'>
It's used by DM and MD and generally useful, so move the bio list
helpers into bio.h.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Acked-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>dm: bio list add bio_list_add_head</title>
<updated>2009-04-02T18:55:36Z</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2009-04-02T18:55:36Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=99c75e3130cff0c869c657ee97fb4a68958eeffc'/>
<id>urn:sha1:99c75e3130cff0c869c657ee97fb4a68958eeffc</id>
<content type='text'>
Introduce a function that adds a bio to the head of the list for
use by the patch that will support barriers.

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
</content>
</entry>
<entry>
<title>dm: bio_list macro renaming</title>
<updated>2007-10-20T01:01:11Z</updated>
<author>
<name>Alasdair G Kergon</name>
<email>agk@redhat.com</email>
</author>
<published>2007-10-19T21:38:55Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=051814c69fac92f1964739c0cf08b5e3b1156b04'/>
<id>urn:sha1:051814c69fac92f1964739c0cf08b5e3b1156b04</id>
<content type='text'>
Remove BIO_LIST and DEFINE_BIO_LIST macros that gain us nothing
since contents are initialised to NULL.

Cc: Jan Engelhardt &lt;jengelh@linux01.gwdg.de&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
</content>
</entry>
<entry>
<title>Fix kernel buuild with (CONFIG_COMPAT &amp;&amp; ! CONFIG_BLOCK)</title>
<updated>2007-09-14T20:56:47Z</updated>
<author>
<name>aherrman@arcor.de</name>
<email>aherrman@arcor.de</email>
</author>
<published>2007-09-13T23:28:56Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=2123a09f3f129f4d56f59026ec63e5990f86db2f'/>
<id>urn:sha1:2123a09f3f129f4d56f59026ec63e5990f86db2f</id>
<content type='text'>
Commit 02a5e0acb3cb85d80d0fe834e366d38a92bbaa22 ("BLOCK: Hide the
contents of linux/bio.h if CONFIG_BLOCK=n") broke the kernel build for
the CONFIG_COMPAT &amp;&amp; !CONFIG_BLOCK case:

    CC      fs/compat_ioctl.o
  In file included from include/linux/raid/md_k.h:19,
                   from include/linux/raid/md.h:54,
                   from fs/compat_ioctl.c:25:
  include/linux/raid/../../../drivers/md/dm-bio-list.h: In bio_list_:
  include/linux/raid/../../../drivers/md/dm-bio-list.h:40: error: dereferencing pointer to incomplete type
  include/linux/raid/../../../drivers/md/dm-bio-list.h: In bio_list_:
  include/linux/raid/../../../drivers/md/dm-bio-list.h:48: error: dereferencing pointer to incomplete type
  include/linux/raid/../../../drivers/md/dm-bio-list.h:51: error: dereferencing pointer to incomplete type
  include/linux/raid/../../../drivers/md/dm-bio-list.h: In bio_list_:
  include/linux/raid/../../../drivers/md/dm-bio-list.h:64: error: dereferencing pointer to incomplete type
  include/linux/raid/../../../drivers/md/dm-bio-list.h: In bio_list_merge_:
  include/linux/raid/../../../drivers/md/dm-bio-list.h:78: error: dereferencing pointer to incomplete type
  include/linux/raid/../../../drivers/md/dm-bio-list.h: In bio_list_:
  include/linux/raid/../../../drivers/md/dm-bio-list.h:90: error: dereferencing pointer to incomplete type
  include/linux/raid/../../../drivers/md/dm-bio-list.h:94: error: dereferencing pointer to incomplete type
  make[1]: *** [fs/compat_ioctl.o] Error 1
  make: *** [fs] Error 2

Signed-off-by: Andreas Herrmann &lt;aherrman@arcor.de&gt;
Acked-By: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>dm: bio_list prefetch removal</title>
<updated>2007-07-12T22:01:08Z</updated>
<author>
<name>Alasdair G Kergon</name>
<email>agk@redhat.com</email>
</author>
<published>2007-07-12T16:26:19Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=79e15ae424afa0a40b1a0c4478046d6ba0b71e20'/>
<id>urn:sha1:79e15ae424afa0a40b1a0c4478046d6ba0b71e20</id>
<content type='text'>
Remove dubious prefetch from bio_list_for_each() macro.

Cc: Jens Axboe &lt;jens.axboe@oracle.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>dm: bio list helpers</title>
<updated>2007-05-09T19:30:47Z</updated>
<author>
<name>Heinz Mauelshagen</name>
<email>hjm@redhat.com</email>
</author>
<published>2007-05-09T09:33:05Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=0ba699347e96b5468b42b3decf1f381abbf99652'/>
<id>urn:sha1:0ba699347e96b5468b42b3decf1f381abbf99652</id>
<content type='text'>
More bio_list helper functions for new targets (including dm-delay and
dm-loop) to manipulate lists of bios.

Signed-off-by: Heinz Mauelshagen &lt;hjm@redhat.com&gt;
Signed-off-by: Bryn Reeves &lt;breeves@redhat.com&gt;
Signed-off-by: Milan Broz &lt;mbroz@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] dm: suspend: add noflush pushback</title>
<updated>2006-12-08T16:29:09Z</updated>
<author>
<name>Kiyoshi Ueda</name>
<email>k-ueda@ct.jp.nec.com</email>
</author>
<published>2006-12-08T10:41:09Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=2e93ccc1933d08d32d9bde3784c3823e67b9b030'/>
<id>urn:sha1:2e93ccc1933d08d32d9bde3784c3823e67b9b030</id>
<content type='text'>
In device-mapper I/O is sometimes queued within targets for later processing.
For example the multipath target can be configured to store I/O when no paths
are available instead of returning it -EIO.

This patch allows the device-mapper core to instruct a target to transfer the
contents of any such in-target queue back into the core.  This frees up the
resources used by the target so the core can replace that target with an
alternative one and then resend the I/O to it.  Without this patch the only
way to change the target in such circumstances involves returning the I/O with
an error back to the filesystem/application.  In the multipath case, this
patch will let us add new paths for existing I/O to try after all the existing
paths have failed.

    DMF_NOFLUSH_SUSPENDING
    ----------------------

If the DM_NOFLUSH_FLAG ioctl option is specified at suspend time, the
DMF_NOFLUSH_SUSPENDING flag is set in md-&gt;flags during dm_suspend().  It
is always cleared before dm_suspend() returns.

The flag must be visible while the target is flushing pending I/Os so it
is set before presuspend where the flush starts and unset after the wait
for md-&gt;pending where the flush ends.

Target drivers can check this flag by calling dm_noflush_suspending().

    DM_MAPIO_REQUEUE / DM_ENDIO_REQUEUE
    -----------------------------------

A target's map() function can now return DM_MAPIO_REQUEUE to request the
device mapper core queue the bio.

Similarly, a target's end_io() function can return DM_ENDIO_REQUEUE to request
the same.  This has been labelled 'pushback'.

The __map_bio() and clone_endio() functions in the core treat these return
values as errors and call dec_pending() to end the I/O.

    dec_pending
    -----------

dec_pending() saves the pushback request in struct dm_io-&gt;error.  Once all
the split clones have ended, dec_pending() will put the original bio on
the md-&gt;pushback list.  Note that this supercedes any I/O errors.

It is possible for the suspend with DM_NOFLUSH_FLAG to be aborted while
in progress (e.g. by user interrupt).  dec_pending() checks for this and
returns -EIO if it happened.

    pushdback list and pushback_lock
    --------------------------------

The bio is queued on md-&gt;pushback temporarily in dec_pending(), and after
all pending I/Os return, md-&gt;pushback is merged into md-&gt;deferred in
dm_suspend() for re-issuing at resume time.

md-&gt;pushback_lock protects md-&gt;pushback.
The lock should be held with irq disabled because dec_pending() can be
called from interrupt context.

Queueing bios to md-&gt;pushback in dec_pending() must be done atomically
with the check for DMF_NOFLUSH_SUSPENDING flag.  So md-&gt;pushback_lock is
held when checking the flag.  Otherwise dec_pending() may queue a bio to
md-&gt;pushback after the interrupted dm_suspend() flushes md-&gt;pushback.
Then the bio would be left in md-&gt;pushback.

Flag setting in dm_suspend() can be done without md-&gt;pushback_lock because
the flag is checked only after presuspend and the set value is already
made visible via the target's presuspend function.

The flag can be checked without md-&gt;pushback_lock (e.g. the first part of
the dec_pending() or target drivers), because the flag is checked again
with md-&gt;pushback_lock held when the bio is really queued to md-&gt;pushback
as described above.  So even if the flag is cleared after the lockless
checkings, the bio isn't left in md-&gt;pushback but returned to applications
with -EIO.

    Other notes on the current patch
    --------------------------------

- md-&gt;pushback is added to the struct mapped_device instead of using
  md-&gt;deferred directly because md-&gt;io_lock which protects md-&gt;deferred is
  rw_semaphore and can't be used in interrupt context like dec_pending(),
  and md-&gt;io_lock protects the DMF_BLOCK_IO flag of md-&gt;flags too.

- Don't issue lock_fs() in dm_suspend() if the DM_NOFLUSH_FLAG
  ioctl option is specified, because I/Os generated by lock_fs() would be
  pushed back and never return if there were no valid devices.

- If an error occurs in dm_suspend() after the DMF_NOFLUSH_SUSPENDING
  flag is set, md-&gt;pushback must be flushed because I/Os may be queued to
  the list already.  (flush_and_out label in dm_suspend())

    Test results
    ------------

I have tested using multipath target with the next patch.

The following tests are for regression/compatibility:
  - I/Os succeed when valid paths exist;
  - I/Os fail when there are no valid paths and queue_if_no_path is not
    set;
  - I/Os are queued in the multipath target when there are no valid paths and
    queue_if_no_path is set;
  - The queued I/Os above fail when suspend is issued without the
    DM_NOFLUSH_FLAG ioctl option.  I/Os spanning 2 multipath targets also
    fail.

The following tests are for the normal code path of new pushback feature:
  - Queued I/Os in the multipath target are flushed from the target
    but don't return when suspend is issued with the DM_NOFLUSH_FLAG
    ioctl option;
  - The I/Os above are queued in the multipath target again when
    resume is issued without path recovery;
  - The I/Os above succeed when resume is issued after path recovery
    or table load;
  - Queued I/Os in the multipath target succeed when resume is issued
    with the DM_NOFLUSH_FLAG ioctl option after table load. I/Os
    spanning 2 multipath targets also succeed.

The following tests are for the error paths of the new pushback feature:
  - When the bdget_disk() fails in dm_suspend(), the
    DMF_NOFLUSH_SUSPENDING flag is cleared and I/Os already queued to the
    pushback list are flushed properly.
  - When suspend with the DM_NOFLUSH_FLAG ioctl option is interrupted,
      o I/Os which had already been queued to the pushback list
        at the time don't return, and are re-issued at resume time;
      o I/Os which hadn't been returned at the time return with EIO.

Signed-off-by: Kiyoshi Ueda &lt;k-ueda@ct.jp.nec.com&gt;
Signed-off-by: Jun'ichi Nomura &lt;j-nomura@ce.jp.nec.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Cc: dm-devel@redhat.com
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] device-mapper snapshot: bio_list fix</title>
<updated>2005-11-22T17:14:31Z</updated>
<author>
<name>jblunck@suse.de</name>
<email>jblunck@suse.de</email>
</author>
<published>2005-11-22T05:32:36Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=233886dd32ad71daf9c21bf3728c0933a94870f0'/>
<id>urn:sha1:233886dd32ad71daf9c21bf3728c0933a94870f0</id>
<content type='text'>
bio_list_merge() should do nothing if the second list is empty - not oops.

Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>Linux-2.6.12-rc2</title>
<updated>2005-04-16T22:20:36Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@ppc970.osdl.org</email>
</author>
<published>2005-04-16T22:20:36Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2'/>
<id>urn:sha1:1da177e4c3f41524e886b7f1b8a0c1fc7321cac2</id>
<content type='text'>
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
</content>
</entry>
</feed>
