<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/raid, branch v2.6.28.3</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v2.6.28.3</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v2.6.28.3'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2008-10-21T02:25:28+00:00</updated>
<entry>
<title>md: use sysfs_notify_dirent to notify changes to md/dev-xxx/state</title>
<updated>2008-10-21T02:25:28+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2008-10-21T02:25:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3c0ee63a64a20351ed6c16ec797e1f8c850741ea'/>
<id>urn:sha1:3c0ee63a64a20351ed6c16ec797e1f8c850741ea</id>
<content type='text'>
The 'state' file for a device reports, for example, when the device
has failed.  Changes should be reported to userspace ASAP without
the possibility of blocking on low-memory.  sysfs_notify does
have that possibility (as it takes a mutex which can be held
across a kmalloc) so use sysfs_notify_dirent instead.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: use sysfs_notify_dirent to notify changes to md/array_state</title>
<updated>2008-10-21T02:25:21+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2008-10-21T02:25:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b62b75905d571c29262a6c38cf9e5f089c203871'/>
<id>urn:sha1:b62b75905d571c29262a6c38cf9e5f089c203871</id>
<content type='text'>
Now that we have sysfs_notify_dirent, use it to notify changes
to md/array_state.
As sysfs_notify_dirent can be called in atomic context, we can
remove the delayed notify and the MD_NOTIFY_ARRAY_STATE flag.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: remove space after function name in declaration and call.</title>
<updated>2008-10-13T00:55:12+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2008-10-13T00:55:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d710e13812600037a723a673dc5c96a071de98d3'/>
<id>urn:sha1:d710e13812600037a723a673dc5c96a071de98d3</id>
<content type='text'>
Having
   function (args)
instead of
   function(args)

make is harder to search for calls of particular functions.
So remove all those spaces.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: Remove unnecessary #includes, #defines, and function declarations.</title>
<updated>2008-10-13T00:55:12+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2008-10-13T00:55:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fb4d8c76e56a887b9eee99fbc55fe82b18625d30'/>
<id>urn:sha1:fb4d8c76e56a887b9eee99fbc55fe82b18625d30</id>
<content type='text'>
A lot of cruft has gathered over the years.  Time to remove it.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: Convert remaining 1k representations in linear.c to sectors.</title>
<updated>2008-10-13T00:55:12+00:00</updated>
<author>
<name>Andre Noll</name>
<email>maan@systemlinux.org</email>
</author>
<published>2008-10-13T00:55:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ab5bd5cbc8d4b868378d062eed3d4240930fbb86'/>
<id>urn:sha1:ab5bd5cbc8d4b868378d062eed3d4240930fbb86</id>
<content type='text'>
This patch renames hash_spacing and preshift to  spacing and
sector_shift respectively with the following change of semantics:

Case 1: (sizeof(sector_t) &lt;= sizeof(u32)).
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In this case, we have sector_shift = preshift = 0 and spacing =
2 * hash_spacing.

Hence, the index for the hash table which is computed by the new code
in which_dev() as sector / spacing equals the old value which was
(sector/2) / hash_spacing.

Note also that the value of nb_zone stays the same because both sz
and base double.

Case 2: (sizeof(sector_t) &gt; sizeof(u32)).
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

(aka the shifting dance case). Here we have sector_shift = preshift +
1 and

spacing = 2 * hash_spacing

during the computation of nb_zone and curr_sector, but

spacing = hash_spacing

in which_dev() because in the last hunk of the patch for linear.c we
shift down conf-&gt;spacing (= 2 * hash_spacing) by one more bit than
in the old code.

Hence in the computation of nb_zone, sz and base have the same value
as before, so nb_zone is not affected. Also curr_sector in the next
hunk stays the same.

In which_dev() the hash table index is computed as

(sector &gt;&gt; sector_shift) / spacing

In view of sector_shift = preshift + 1 and spacing = hash_spacing,
this equals

((sector/2) &gt;&gt; preshift) / hash_spacing

which is the value computed by the old code.

Signed-off-by: Andre Noll &lt;maan@systemlinux.org&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: linear: Represent dev_info-&gt;size and dev_info-&gt;offset in sectors.</title>
<updated>2008-10-13T00:55:12+00:00</updated>
<author>
<name>Andre Noll</name>
<email>maan@systemlinux.org</email>
</author>
<published>2008-10-13T00:55:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6283815d1853b7daf31dc4adb83e5c1dc9568251'/>
<id>urn:sha1:6283815d1853b7daf31dc4adb83e5c1dc9568251</id>
<content type='text'>
Rename them to num_sectors and start_sector which is more descriptive.

Signed-off-by: Andre Noll &lt;maan@systemlinux.org&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: delay notification of 'active_idle' to the recovery thread</title>
<updated>2008-07-23T20:09:48+00:00</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2008-07-23T20:09:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d8e64406a037a64444175730294e449c9e21f5ec'/>
<id>urn:sha1:d8e64406a037a64444175730294e449c9e21f5ec</id>
<content type='text'>
sysfs_notify might sleep, so do not call it from md_safemode_timeout.

Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>md: Protect access to mddev-&gt;disks list using RCU</title>
<updated>2008-07-21T07:05:25+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2008-07-21T07:05:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4b80991c6cb9efa607bc4fd6f3ecdf5511c31bb0'/>
<id>urn:sha1:4b80991c6cb9efa607bc4fd6f3ecdf5511c31bb0</id>
<content type='text'>
All modifications and most access to the mddev-&gt;disks list are made
under the reconfig_mutex lock.  However there are three places where
the list is walked without any locking.  If a reconfig happens at this
time, havoc (and oops) can ensue.

So use RCU to protect these accesses:
  - wrap them in rcu_read_{,un}lock()
  - use list_for_each_entry_rcu
  - add to the list with list_add_rcu
  - delete from the list with list_del_rcu
  - delay the 'free' with call_rcu rather than schedule_work

Note that export_rdev did a list_del_init on this list.  In almost all
cases the entry was not in the list anymore so it was a no-op and so
safe.  It is no longer safe as after list_del_rcu we may not touch
the list_head.
An audit shows that export_rdev is called:
  - after unbind_rdev_from_array, in which case the delete has
     already been done,
  - after bind_rdev_to_array fails, in which case the delete isn't needed.
  - before the device has been put on a list at all (e.g. in
      add_new_disk where reading the superblock fails).
  - and in autorun devices after a failure when the device is on a
      different list.

So remove the list_del_init call from export_rdev, and add it back
immediately before the called to export_rdev for that last case.

Note also that -&gt;same_set is sometimes used for lists other than
mddev-&gt;list (e.g. candidates).  In these cases rcu is not needed.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: only count actual openers as access which prevent a 'stop'</title>
<updated>2008-07-21T07:05:25+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2008-07-21T07:05:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f2ea68cf42aafdd93393b6b8b20fc3c2b5f4390c'/>
<id>urn:sha1:f2ea68cf42aafdd93393b6b8b20fc3c2b5f4390c</id>
<content type='text'>
Open isn't the only thing that increments -&gt;active.  e.g. reading
/proc/mdstat will increment it briefly.  So to avoid false positives
in testing for concurrent access, introduce a new counter that counts
just the number of times the md device it open.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: linear: Make array_size sector-based and rename it to array_sectors.</title>
<updated>2008-07-21T07:05:25+00:00</updated>
<author>
<name>Andre Noll</name>
<email>maan@systemlinux.org</email>
</author>
<published>2008-07-21T07:05:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d6e2215052810678bc9782fd980b52706fc71f50'/>
<id>urn:sha1:d6e2215052810678bc9782fd980b52706fc71f50</id>
<content type='text'>
Signed-off-by: Andre Noll &lt;maan@systemlinux.org&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
</feed>
