<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/md/raid0.c, branch v3.13</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.13</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.13'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2013-06-26T02:38:19Z</updated>
<entry>
<title>md: fix buglet in RAID5 -&gt; RAID0 conversion.</title>
<updated>2013-06-26T02:38:19Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2013-06-26T01:55:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=eea136d69f9facb2d3807386bbac1e6b1161795f'/>
<id>urn:sha1:eea136d69f9facb2d3807386bbac1e6b1161795f</id>
<content type='text'>
RAID5 uses a 'per-array' value for the 'size' of each device.
RAID0 uses a 'per-device' value - it can be different for each device.

When converting a RAID5 to a RAID0 we must ensure that the per-device
size of each device matches the per-array size for the RAID5, else
the array will change size.

If the metadata cannot record a changed per-device size (as is the
case with v0.90 metadata) the array could get bigger on restart.  This
does not cause data corruption, so it not a big issue and is mainly
yet another a reason to not use 0.90.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>block: Change bio_split() to respect the current value of bi_idx</title>
<updated>2013-03-23T21:15:30Z</updated>
<author>
<name>Kent Overstreet</name>
<email>koverstreet@google.com</email>
</author>
<published>2012-09-04T22:20:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5b83636ae3c3b4f87d02a5929ad4dee831534db0'/>
<id>urn:sha1:5b83636ae3c3b4f87d02a5929ad4dee831534db0</id>
<content type='text'>
In the current code bio_split() won't be seeing partially completed bios
so this doesn't change any behaviour, but this makes the code a bit
clearer as to what bio_split() actually requires.

The immediate purpose of the patch is removing unnecessary bi_idx
references, but the end goal is to allow partial completed bios to be
submitted, which along with immutable biovecs enables effecient bio
splitting.

Some of the callers were (double) checking that bios could be split, so
update their checks too.

Signed-off-by: Kent Overstreet &lt;koverstreet@google.com&gt;
CC: Jens Axboe &lt;axboe@kernel.dk&gt;
CC: Lars Ellenberg &lt;drbd-dev@lists.linbit.com&gt;
CC: Neil Brown &lt;neilb@suse.de&gt;
CC: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>block: Use bio_sectors() more consistently</title>
<updated>2013-03-23T21:15:30Z</updated>
<author>
<name>Kent Overstreet</name>
<email>koverstreet@google.com</email>
</author>
<published>2013-02-05T23:19:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=aa8b57aa3d1c06ca53312294ee6dfc767ee3ddb3'/>
<id>urn:sha1:aa8b57aa3d1c06ca53312294ee6dfc767ee3ddb3</id>
<content type='text'>
Bunch of places in the code weren't using it where they could be -
this'll reduce the size of the patch that puts bi_sector/bi_size/bi_idx
into a struct bvec_iter.

Signed-off-by: Kent Overstreet &lt;koverstreet@google.com&gt;
CC: Jens Axboe &lt;axboe@kernel.dk&gt;
CC: "Ed L. Cashin" &lt;ecashin@coraid.com&gt;
CC: Nick Piggin &lt;npiggin@kernel.dk&gt;
CC: Jiri Kosina &lt;jkosina@suse.cz&gt;
CC: Jim Paris &lt;jim@jtan.com&gt;
CC: Geoff Levand &lt;geoff@infradead.org&gt;
CC: Alasdair Kergon &lt;agk@redhat.com&gt;
CC: dm-devel@redhat.com
CC: Neil Brown &lt;neilb@suse.de&gt;
CC: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Acked-by: Ed Cashin &lt;ecashin@coraid.com&gt;
</content>
</entry>
<entry>
<title>md/raid0: improve error message when converting RAID4-with-spares to RAID0</title>
<updated>2013-02-26T00:58:44Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2013-02-21T04:50:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f96c9f305c24a0d4a075e2c75aa6b417aa238687'/>
<id>urn:sha1:f96c9f305c24a0d4a075e2c75aa6b417aa238687</id>
<content type='text'>
Mentioning "bad disk number -1" exposes irrelevant internal detail.
Just say they are inactive and must be removed.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: raid0: fix error return from create_stripe_zones.</title>
<updated>2013-02-26T00:57:04Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2013-02-21T04:36:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=58ebb34c49fcfcaa029e4b1c1453d92583900f9a'/>
<id>urn:sha1:58ebb34c49fcfcaa029e4b1c1453d92583900f9a</id>
<content type='text'>
Create_stripe_zones returns an error slightly differently to
raid0_run and to raid0_takeover_*.

The error returned used by the second was wrong and an error would
result in mddev-&gt;private being set to NULL and sooner or later a
crash.

So never return NULL, return ERR_PTR(err), not NULL from
create_stripe_zones.

This bug has been present since 2.6.35 so the fix is suitable
for any kernel since then.

Cc: stable@vger.kernel.org
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: fix two bugs when attempting to resize RAID0 array.</title>
<updated>2013-02-26T00:55:40Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2013-02-21T03:33:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a64685399181780998281fe07309a94b25dd24c3'/>
<id>urn:sha1:a64685399181780998281fe07309a94b25dd24c3</id>
<content type='text'>
You cannot resize a RAID0 array (in terms of making the devices
bigger), but the code doesn't entirely stop you.
So:

 disable setting of the available size on each device for
 RAID0 and Linear devices.  This must not change as doing so
 can change the effective layout of data.

 Make sure that the size that raid0_size() reports is accurate,
 but rounding devices sizes to chunk sizes.  As the device sizes
 cannot change now, this isn't so important, but it is best to be
 safe.

Without this change:
  mdadm --grow /dev/md0 -z max
  mdadm --grow /dev/md0 -Z max
  then read to the end of the array

can cause a BUG in a RAID0 array.

These bugs have been present ever since it became possible
to resize any device, which is a long time.  So the fix is
suitable for any -stable kerenl.

Cc: stable@vger.kernel.org
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: raid 0 supports TRIM</title>
<updated>2012-10-11T02:25:44Z</updated>
<author>
<name>Shaohua Li</name>
<email>shli@fusionio.com</email>
</author>
<published>2012-10-11T02:25:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c83057a1f4f987327c49448b046d9625c612ed8e'/>
<id>urn:sha1:c83057a1f4f987327c49448b046d9625c612ed8e</id>
<content type='text'>
This makes md raid 0 support TRIM.

Signed-off-by: Shaohua Li &lt;shli@fusionio.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>block: Implement support for WRITE SAME</title>
<updated>2012-09-20T12:31:45Z</updated>
<author>
<name>Martin K. Petersen</name>
<email>martin.petersen@oracle.com</email>
</author>
<published>2012-09-18T16:19:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4363ac7c13a9a4b763c6e8d9fdbfc2468f3b8ca4'/>
<id>urn:sha1:4363ac7c13a9a4b763c6e8d9fdbfc2468f3b8ca4</id>
<content type='text'>
The WRITE SAME command supported on some SCSI devices allows the same
block to be efficiently replicated throughout a block range. Only a
single logical block is transferred from the host and the storage device
writes the same data to all blocks described by the I/O.

This patch implements support for WRITE SAME in the block layer. The
blkdev_issue_write_same() function can be used by filesystems and block
drivers to replicate a buffer across a block range. This can be used to
efficiently initialize software RAID devices, etc.

Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Acked-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>md: Avoid OOPS when reshaping raid1 to raid0</title>
<updated>2012-04-03T05:37:26Z</updated>
<author>
<name>Jes Sorensen</name>
<email>Jes.Sorensen@redhat.com</email>
</author>
<published>2012-04-01T13:48:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=24b961f811a3e790a9b93604d2594bfb6cce4fa4'/>
<id>urn:sha1:24b961f811a3e790a9b93604d2594bfb6cce4fa4</id>
<content type='text'>
raid1 arrays do not have the notion of chunk size. Calculate the
largest chunk sector size we can use to avoid a divide by zero OOPS
when aligning the size of the new array to the chunk size.

Signed-off-by: Jes Sorensen &lt;Jes.Sorensen@redhat.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md/raid0: If md_integrity_register() fails, raid0_run() must free the mem.</title>
<updated>2012-04-01T23:48:37Z</updated>
<author>
<name>majianpeng</name>
<email>majianpeng@gmail.com</email>
</author>
<published>2012-04-01T23:48:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0366ef847581d692e197b88825867ca9ee00e358'/>
<id>urn:sha1:0366ef847581d692e197b88825867ca9ee00e358</id>
<content type='text'>
Signed-off-by: majianpeng &lt;majianpeng@gmail.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
</feed>
