<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/md/linear.c, branch linux-2.6.16.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-2.6.16.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-2.6.16.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2007-03-26T21:42:40+00:00</updated>
<entry>
<title>fix read past end of array in md/linear.c</title>
<updated>2007-03-26T21:42:40+00:00</updated>
<author>
<name>Andy Isaacson</name>
<email>adi@hexapodia.org</email>
</author>
<published>2007-03-26T21:42:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=36c8a3d3ac8b0157ea4ebc54926d40309787a865'/>
<id>urn:sha1:36c8a3d3ac8b0157ea4ebc54926d40309787a865</id>
<content type='text'>
When iterating through an array, one must be careful to test one's index
variable rather than another similarly-named variable.

The loop will read off the end of conf-&gt;disks[] in the following
(pathological) case:

% dd bs=1 seek=840716287 if=/dev/zero of=d1 count=1
% for i in 2 3 4; do dd if=/dev/zero of=d$i bs=1k count=$(($i+150)); done
% ./vmlinux ubd0=root ubd1=d1 ubd2=d2 ubd3=d3 ubd4=d4
# mdadm -C /dev/md0 --level=linear --raid-devices=4 /dev/ubd[1234]

adding some printks, I saw this:
[42949374.960000] hash_spacing = 821120
[42949374.960000] cnt          = 4
[42949374.960000] min_spacing  = 801
[42949374.960000] j=0 size=820928 sz=820928
[42949374.960000] i=0 sz=820928 hash_spacing=820928
[42949374.960000] j=1 size=64 sz=64
[42949374.960000] j=2 size=64 sz=128
[42949374.960000] j=3 size=64 sz=192
[42949374.960000] j=4 size=1515870810 sz=1515871002

Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] md: allow array level to be set textually via sysfs</title>
<updated>2006-01-06T16:34:09+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2006-01-06T08:20:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d9d166c2a9d5d01af34396793950aa695883eed4'/>
<id>urn:sha1:d9d166c2a9d5d01af34396793950aa695883eed4</id>
<content type='text'>
Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
Acked-by: Greg KH &lt;greg@kroah.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] md: remove personality numbering from md</title>
<updated>2006-01-06T16:34:06+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2006-01-06T08:20:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2604b703b6b3db80e3c75ce472a54dfd0b7bf9f4'/>
<id>urn:sha1:2604b703b6b3db80e3c75ce472a54dfd0b7bf9f4</id>
<content type='text'>
md supports multiple different RAID level, each being implemented by a
'personality' (which is often in a separate module).

These personalities have fairly artificial 'numbers'.  The numbers
are use to:
 1- provide an index into an array where the various personalities
    are recorded
 2- identify the module (via an alias) which implements are particular
    personality.

Neither of these uses really justify the existence of personality numbers.
The array can be replaced by a linked list which is searched (array lookup
only happens very rarely).  Module identification can be done using an alias
based on level rather than 'personality' number.

The current 'raid5' modules support two level (4 and 5) but only one
personality.  This slight awkwardness (which was handled in the mapping from
level to personality) can be better handled by allowing raid5 to register 2
personalities.

With this change in place, the core md module does not need to have an
exhaustive list of all possible personalities, so other personalities can be
added independently.

This patch also moves the check for chunksize being non-zero into the -&gt;run
routines for the personalities that need it, rather than having it in core-md.
 This has a side effect of allowing 'faulty' and 'linear' not to have a
chunk-size set.

Signed-off-by: Neil Brown &lt;neilb@suse.de&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] md: convert md to use kzalloc throughout</title>
<updated>2006-01-06T16:34:05+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2006-01-06T08:20:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9ffae0cf3ea02f75d163922accfd3e592d87adde'/>
<id>urn:sha1:9ffae0cf3ea02f75d163922accfd3e592d87adde</id>
<content type='text'>
Replace multiple kmalloc/memset pairs with kzalloc calls.

Signed-off-by: Neil Brown &lt;neilb@suse.de&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>[BLOCK] Unify the seperate read/write io stat fields into arrays</title>
<updated>2005-11-01T08:26:16+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@suse.de</email>
</author>
<published>2005-11-01T08:26:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a362357b6cd62643d4dda3b152639303d78473da'/>
<id>urn:sha1:a362357b6cd62643d4dda3b152639303d78473da</id>
<content type='text'>
Instead of having -&gt;read_sectors and -&gt;write_sectors, combine the two
into -&gt;sectors[2] and similar for the other fields. This saves a branch
several places in the io path, since we don't have to care for what the
actual io direction is. On my x86-64 box, that's 200 bytes less text in
just the core (not counting the various drivers).

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] md: support md/linear array with components greater than 2 terabytes.</title>
<updated>2005-09-09T23:39:10+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@cse.unsw.edu.au</email>
</author>
<published>2005-09-09T23:23:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=15945fee6f09bff1f86b1a735b5888dc59cf38e3'/>
<id>urn:sha1:15945fee6f09bff1f86b1a735b5888dc59cf38e3</id>
<content type='text'>
linear currently uses division by the size of the smallest componenet device
to find which device a request goes to.  If that smallest device is larger
than 2 terabytes, then the division will not work on some systems.

So we introduce a pre-shift, and take care not to make the hash table too
large, much like the code in raid0.

Also get rid of conf-&gt;nr_zones, which is not needed.

Signed-off-by: Neil Brown &lt;neilb@cse.unsw.edu.au&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] md: fail IO request to md that require a barrier.</title>
<updated>2005-09-09T23:39:09+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@cse.unsw.edu.au</email>
</author>
<published>2005-09-09T23:23:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e5dcdd80a60627371f40797426273048630dc8ca'/>
<id>urn:sha1:e5dcdd80a60627371f40797426273048630dc8ca</id>
<content type='text'>
md does not yet support BIO_RW_BARRIER, so be honest about it and fail
(-EOPNOTSUPP) any such requests.

Signed-off-by: Neil Brown &lt;neilb@cse.unsw.edu.au&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] md: remove unneeded NULL checks before kfree</title>
<updated>2005-06-22T02:07:48+00:00</updated>
<author>
<name>Jesper Juhl</name>
<email>juhl-lkml@dif.dk</email>
</author>
<published>2005-06-22T00:17:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=990a8baf568ca1d0ae65e59783ff821794118d07'/>
<id>urn:sha1:990a8baf568ca1d0ae65e59783ff821794118d07</id>
<content type='text'>
This patch removes some unneeded checks of pointers being NULL before
calling kfree() on them.  kfree() handles NULL pointers just fine, checking
first is pointless.

Signed-off-by: Jesper Juhl &lt;juhl-lkml@dif.dk&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] md: fix splitting of md/linear request that cross a device boundary</title>
<updated>2005-05-17T14:59:11+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@cse.unsw.edu.au</email>
</author>
<published>2005-05-17T04:53:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=29ac8e056f2016a8404edc02749d095019aa1f82'/>
<id>urn:sha1:29ac8e056f2016a8404edc02749d095019aa1f82</id>
<content type='text'>
When a request crosses a boundary between devices, it needs to be split.
But where we should calculate the amount of the request before the boundary
to find the split-point, we care currently calculating the amount that is
*after* the boundary !!!

Signed-off-by: Neil Brown &lt;neilb@cse.unsw.edu.au&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:36+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@ppc970.osdl.org</email>
</author>
<published>2005-04-16T22:20:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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>
