<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/md/raid0.c, branch v2.6.30.1</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/md/raid0.c?h=v2.6.30.1</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/md/raid0.c?h=v2.6.30.1'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2009-03-31T04:00:31Z</updated>
<entry>
<title>md: 'array_size' sysfs attribute</title>
<updated>2009-03-31T04:00:31Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2009-03-31T04:00:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b522adcde9c4d3fb7b579cfa9160d8bde7744be8'/>
<id>urn:sha1:b522adcde9c4d3fb7b579cfa9160d8bde7744be8</id>
<content type='text'>
Allow userspace to set the size of the array according to the following
semantics:

1/ size must be &lt;= to the size returned by mddev-&gt;pers-&gt;size(mddev, 0, 0)
   a) If size is set before the array is running, do_md_run will fail
      if size is greater than the default size
   b) A reshape attempt that reduces the default size to less than the set
      array size should be blocked
2/ once userspace sets the size the kernel will not change it
3/ writing 'default' to this attribute returns control of the size to the
   kernel and reverts to the size reported by the personality

Also, convert locations that need to know the default size from directly
reading -&gt;array_sectors to &lt;pers&gt;_size.  Resync/reshape operations
always follow the default size.

Finally, fixup other locations that read a number of 1k-blocks from
userspace to use strict_blocks_to_sectors() which checks for unsigned
long long to sector_t overflow and blocks to sectors overflow.

Reviewed-by: Andre Noll &lt;maan@systemlinux.org&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>md: centralize -&gt;array_sectors modifications</title>
<updated>2009-03-31T03:59:03Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2009-03-31T03:59:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1f403624bde3c678a166984b1e6a727a0ce06f2b'/>
<id>urn:sha1:1f403624bde3c678a166984b1e6a727a0ce06f2b</id>
<content type='text'>
Get personalities out of the business of directly modifying
-&gt;array_sectors.  Lays groundwork to introduce policy on when
-&gt;array_sectors can be modified.

Reviewed-by: Andre Noll &lt;maan@systemlinux.org&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>md: add 'size' as a personality method</title>
<updated>2009-03-31T03:57:49Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2009-03-18T01:10:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=80c3a6ce4ba4470379b9e6a4d9bcd9d2ee26ae03'/>
<id>urn:sha1:80c3a6ce4ba4470379b9e6a4d9bcd9d2ee26ae03</id>
<content type='text'>
In preparation for giving userspace control over -&gt;array_sectors we need
to be able to retrieve the 'default' size, and the 'anticipated' size
when a reshape is requested.  For personalities that do not reshape emit
a warning if anything but the default size is requested.

In the raid5 case we need to update -&gt;previous_raid_disks to make the
new 'default' size available.

Reviewed-by: Andre Noll &lt;maan@systemlinux.org&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>md: Represent raid device size in sectors.</title>
<updated>2009-03-31T03:33:13Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@systemlinux.org</email>
</author>
<published>2009-03-31T03:33:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=dd8ac336c13fd8afdb082ebacb1cddd5cf727889'/>
<id>urn:sha1:dd8ac336c13fd8afdb082ebacb1cddd5cf727889</id>
<content type='text'>
This patch renames the "size" field of struct mdk_rdev_s to
"sectors" and changes this field to store sectors instead of
blocks.

All users of this field, linear.c, raid0.c and md.c, are fixed up
accordingly which gets rid of many multiplications and divisions.

Signed-off-by: Andre Noll &lt;maan@systemlinux.org&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: move md_k.h from include/linux/raid/ to drivers/md/</title>
<updated>2009-03-31T03:33:13Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2009-03-31T03:33:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=43b2e5d86d8bdd77386226db0bc961529492c043'/>
<id>urn:sha1:43b2e5d86d8bdd77386226db0bc961529492c043</id>
<content type='text'>
It really is nicer to keep related code together..

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: move lots of #include lines out of .h files and into .c</title>
<updated>2009-03-31T03:33:13Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2009-03-31T03:33:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bff61975b3d6c18ee31457cc5b4d73042f44915f'/>
<id>urn:sha1:bff61975b3d6c18ee31457cc5b4d73042f44915f</id>
<content type='text'>
This makes the includes more explicit, and is preparation for moving
md_k.h to drivers/md/md.h

Remove include/raid/md.h as its only remaining use was to #include
other files.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: move headers out of include/linux/raid/</title>
<updated>2009-03-31T03:27:03Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2009-03-31T03:27:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ef740c372dfd80e706dbf955d4e4aedda6c0c148'/>
<id>urn:sha1:ef740c372dfd80e706dbf955d4e4aedda6c0c148</id>
<content type='text'>
Move the headers with the local structures for the disciplines and
bitmap.h into drivers/md/ so that they are more easily grepable for
hacking and not far away.  md.h is left where it is for now as there
are some uses from the outside.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: use list_for_each_entry macro directly</title>
<updated>2009-01-08T21:31:08Z</updated>
<author>
<name>Cheng Renquan</name>
<email>crquan@gmail.com</email>
</author>
<published>2009-01-08T21:31:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=159ec1fc060ab22b157a62364045f5e98749c4d3'/>
<id>urn:sha1:159ec1fc060ab22b157a62364045f5e98749c4d3</id>
<content type='text'>
The rdev_for_each macro defined in &lt;linux/raid/md_k.h&gt; is identical to
list_for_each_entry_safe, from &lt;linux/list.h&gt;, it should be defined to
use list_for_each_entry_safe, instead of reinventing the wheel.

But some calls to each_entry_safe don't really need a safe version,
just a direct list_for_each_entry is enough, this could save a temp
variable (tmp) in every function that used rdev_for_each.

In this patch, most rdev_for_each loops are replaced by list_for_each_entry,
totally save many tmp vars; and only in the other situations that will call
list_del to delete an entry, the safe version is used.

Signed-off-by: Cheng Renquan &lt;crquan@gmail.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: raid0: make hash_spacing and preshift sector-based.</title>
<updated>2009-01-08T21:31:08Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@systemlinux.org</email>
</author>
<published>2009-01-08T21:31:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ccacc7d2cf03114a24ab903f710118e9e5d43273'/>
<id>urn:sha1:ccacc7d2cf03114a24ab903f710118e9e5d43273</id>
<content type='text'>
This patch renames the hash_spacing and preshift members of struct
raid0_private_data to spacing and sector_shift respectively and
changes the semantics as follows:

We always have spacing = 2 * hash_spacing. In case
sizeof(sector_t) &gt; sizeof(u32) we also have sector_shift = preshift + 1
while sector_shift = preshift = 0 otherwise.

Note that the values of nb_zone and zone are unaffected by these changes
because in the sector_div() preceeding the assignement of these two
variables both arguments double.

Signed-off-by: Andre Noll &lt;maan@systemlinux.org&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: raid0: Represent the size of strip zones in sectors.</title>
<updated>2009-01-08T21:31:07Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@systemlinux.org</email>
</author>
<published>2009-01-08T21:31:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=83838ed87898e0a8ff8dbf001e54e6c017f0a011'/>
<id>urn:sha1:83838ed87898e0a8ff8dbf001e54e6c017f0a011</id>
<content type='text'>
This completes the block -&gt; sector conversion of struct strip_zone.

Signed-off-by: Andre Noll &lt;maan@systemlinux.org&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
</feed>
