<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/md/dm-table.c, branch linux-2.6.23.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.23.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.23.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2008-02-08T20:01:07Z</updated>
<entry>
<title>dm: table detect io beyond device</title>
<updated>2008-02-08T20:01:07Z</updated>
<author>
<name>Jun'ichi Nomura</name>
</author>
<published>2007-12-13T14:42:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3fb754b906d44263625e8bbf4e53a694af181f0a'/>
<id>urn:sha1:3fb754b906d44263625e8bbf4e53a694af181f0a</id>
<content type='text'>
Patch 512875bd9661368da6f993205a61213b79ba1df0 in mainline.

This patch fixes a panic on shrinking a DM device if there is
outstanding I/O to the part of the device that is being removed.
(Normally this doesn't happen - a filesystem would be resized first,
for example.)

The bug is that __clone_and_map() assumes dm_table_find_target()
always returns a valid pointer.  It may fail if a bio arrives from the
block layer but its target sector is no longer included in the DM
btree.

This patch appends an empty entry to table-&gt;targets[] which will
be returned by a lookup beyond the end of the device.

After calling dm_table_find_target(), __clone_and_map() and target_message()
check for this condition using 
dm_target_is_valid().

Sample test script to trigger oops:

#!/bin/bash

FILE=$(mktemp)
LODEV=$(losetup -f)
MAP=$(basename ${FILE})
SIZE=4M

dd if=/dev/zero of=${FILE} bs=${SIZE} count=1
losetup ${LODEV} ${FILE}

echo "0 $(blockdev --getsz ${LODEV}) linear ${LODEV} 0" |dmsetup create ${MAP}
dmsetup suspend ${MAP}
echo "0 1 linear ${LODEV} 0" |dmsetup load ${MAP}
dd if=/dev/zero of=/dev/mapper/${MAP} bs=${SIZE} count=1 &amp;
echo "Wait til dd push some I/O"
sleep 5
dmsetup resume ${MAP}

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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</content>
</entry>
<entry>
<title>[BLOCK] Get rid of request_queue_t typedef</title>
<updated>2007-07-24T07:28:11Z</updated>
<author>
<name>Jens Axboe</name>
</author>
<published>2007-07-24T07:28:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=165125e1e480f9510a5ffcfbfee4e3ee38c05f23'/>
<id>urn:sha1:165125e1e480f9510a5ffcfbfee4e3ee38c05f23</id>
<content type='text'>
Some of the code has been gradually transitioned to using the proper
struct request_queue, but there's lots left. So do a full sweet of
the kernel and get rid of this typedef and replace its uses with
the proper type.

Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>dm: allow offline devices</title>
<updated>2007-05-09T19:30:47Z</updated>
<author>
<name>Mike Anderson</name>
</author>
<published>2007-05-09T09:32:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2cd54d9bedb79a97f014e86c0da393416b264eb3'/>
<id>urn:sha1:2cd54d9bedb79a97f014e86c0da393416b264eb3</id>
<content type='text'>
Allow check_device_area to succeed if a device has an i_size of zero.  This
addresses an issue seen on DASD devices setting up a multipath table for paths
in online and offline state.

Signed-off-by: Mike Anderson &lt;andmike@us.ibm.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 table: add target flush</title>
<updated>2006-10-03T15:04:16Z</updated>
<author>
<name>Bryn Reeves</name>
</author>
<published>2006-10-03T08:15:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=999d816851c3e080412a19558f111d01852d2f04'/>
<id>urn:sha1:999d816851c3e080412a19558f111d01852d2f04</id>
<content type='text'>
This patch adds support for a per-target dm_flush_fn method.  This is needed
to allow dm-loop to invalidate page cache mappings in response to BLKFLSBUF
ioctl commands.

Signed-off-by: Bryn Reeves &lt;breeves@redhat.com&gt;
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>[PATCH] dm: extract device limit setting</title>
<updated>2006-10-03T15:04:16Z</updated>
<author>
<name>Bryn Reeves</name>
</author>
<published>2006-10-03T08:15:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3cb4021453a69585e458ec2177677c0c1300dccf'/>
<id>urn:sha1:3cb4021453a69585e458ec2177677c0c1300dccf</id>
<content type='text'>
Separate the setting of device I/O limits from dm_get_device().  dm-loop will
use this.

Signed-off-by: Bryn Reeves &lt;breeves@redhat.com&gt;
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>[PATCH] dm table: add target preresume</title>
<updated>2006-10-03T15:04:15Z</updated>
<author>
<name>Milan Broz</name>
</author>
<published>2006-10-03T08:15:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8757b7764f13e336f3c0eb1f634440d4ee4c3a67'/>
<id>urn:sha1:8757b7764f13e336f3c0eb1f634440d4ee4c3a67</id>
<content type='text'>
This patch adds a target preresume hook.

It is called before the targets are resumed and if it returns an error the
resume gets cancelled.

The crypt target will use this to indicate that it is unable to process I/O
because no encryption key has been supplied.

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@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] dm: improve error message consistency</title>
<updated>2006-06-26T16:58:36Z</updated>
<author>
<name>Alasdair G Kergon</name>
</author>
<published>2006-06-26T07:27:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=72d9486169a2a8353e022813185ba2f32d7dde69'/>
<id>urn:sha1:72d9486169a2a8353e022813185ba2f32d7dde69</id>
<content type='text'>
Tidy device-mapper error messages to include context information
automatically.

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>[PATCH] dm: create error table</title>
<updated>2006-06-26T16:58:36Z</updated>
<author>
<name>David Teigland</name>
</author>
<published>2006-06-26T07:27:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c2ade42dd35466d90aa6fc7cc717f396e165492f'/>
<id>urn:sha1:c2ade42dd35466d90aa6fc7cc717f396e165492f</id>
<content type='text'>
Add a library function dm_create_error_table() to create a table that rejects
any I/O sent to a device with EIO.

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>[PATCH] dm table split_args: handle no input</title>
<updated>2006-06-26T16:58:36Z</updated>
<author>
<name>David Teigland</name>
</author>
<published>2006-06-26T07:27:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=814d68629b40e863997fa0eea459be4cc99a06cc'/>
<id>urn:sha1:814d68629b40e863997fa0eea459be4cc99a06cc</id>
<content type='text'>
Return sense if dm_split_args is called with a NULL input parameter.

Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
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>[PATCH] dm table: get_target: fix last index</title>
<updated>2006-06-26T16:58:35Z</updated>
<author>
<name>Milan Broz</name>
</author>
<published>2006-06-26T07:27:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=143535396c7ebd9395a931a000b3963f457712b8'/>
<id>urn:sha1:143535396c7ebd9395a931a000b3963f457712b8</id>
<content type='text'>
The table is indexed from 0, so an index equal to t-&gt;num_targets should be
rejected.

(There is no code in the current tree that would exercise this bug.)

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@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
</feed>
