<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/md, branch v2.6.29</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>dm crypt: wait for endio to complete before destruction</title>
<updated>2009-03-16T17:44:36+00:00</updated>
<author>
<name>Milan Broz</name>
<email>mbroz@redhat.com</email>
</author>
<published>2009-03-16T17:44:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b35f8caa0890169000fec22902290d9a15274cbd'/>
<id>b35f8caa0890169000fec22902290d9a15274cbd</id>
<content type='text'>
The following oops has been reported when dm-crypt runs over a loop device.

...
[   70.381058] Process loop0 (pid: 4268, ti=cf3b2000 task=cf1cc1f0 task.ti=cf3b2000)
...
[   70.381058] Call Trace:
[   70.381058]  [&lt;d0d76601&gt;] ? crypt_dec_pending+0x5e/0x62 [dm_crypt]
[   70.381058]  [&lt;d0d767b8&gt;] ? crypt_endio+0xa2/0xaa [dm_crypt]
[   70.381058]  [&lt;d0d76716&gt;] ? crypt_endio+0x0/0xaa [dm_crypt]
[   70.381058]  [&lt;c01a2f24&gt;] ? bio_endio+0x2b/0x2e
[   70.381058]  [&lt;d0806530&gt;] ? dec_pending+0x224/0x23b [dm_mod]
[   70.381058]  [&lt;d08066e4&gt;] ? clone_endio+0x79/0xa4 [dm_mod]
[   70.381058]  [&lt;d080666b&gt;] ? clone_endio+0x0/0xa4 [dm_mod]
[   70.381058]  [&lt;c01a2f24&gt;] ? bio_endio+0x2b/0x2e
[   70.381058]  [&lt;c02bad86&gt;] ? loop_thread+0x380/0x3b7
[   70.381058]  [&lt;c02ba8a1&gt;] ? do_lo_send_aops+0x0/0x165
[   70.381058]  [&lt;c013754f&gt;] ? autoremove_wake_function+0x0/0x33
[   70.381058]  [&lt;c02baa06&gt;] ? loop_thread+0x0/0x3b7

When a table is being replaced, it waits for I/O to complete
before destroying the mempool, but the endio function doesn't
call mempool_free() until after completing the bio.

Fix it by swapping the order of those two operations.

The same problem occurs in dm.c with md referenced after dec_pending.
Again, we swap the order.

Cc: stable@kernel.org
Signed-off-by: Milan Broz &lt;mbroz@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The following oops has been reported when dm-crypt runs over a loop device.

...
[   70.381058] Process loop0 (pid: 4268, ti=cf3b2000 task=cf1cc1f0 task.ti=cf3b2000)
...
[   70.381058] Call Trace:
[   70.381058]  [&lt;d0d76601&gt;] ? crypt_dec_pending+0x5e/0x62 [dm_crypt]
[   70.381058]  [&lt;d0d767b8&gt;] ? crypt_endio+0xa2/0xaa [dm_crypt]
[   70.381058]  [&lt;d0d76716&gt;] ? crypt_endio+0x0/0xaa [dm_crypt]
[   70.381058]  [&lt;c01a2f24&gt;] ? bio_endio+0x2b/0x2e
[   70.381058]  [&lt;d0806530&gt;] ? dec_pending+0x224/0x23b [dm_mod]
[   70.381058]  [&lt;d08066e4&gt;] ? clone_endio+0x79/0xa4 [dm_mod]
[   70.381058]  [&lt;d080666b&gt;] ? clone_endio+0x0/0xa4 [dm_mod]
[   70.381058]  [&lt;c01a2f24&gt;] ? bio_endio+0x2b/0x2e
[   70.381058]  [&lt;c02bad86&gt;] ? loop_thread+0x380/0x3b7
[   70.381058]  [&lt;c02ba8a1&gt;] ? do_lo_send_aops+0x0/0x165
[   70.381058]  [&lt;c013754f&gt;] ? autoremove_wake_function+0x0/0x33
[   70.381058]  [&lt;c02baa06&gt;] ? loop_thread+0x0/0x3b7

When a table is being replaced, it waits for I/O to complete
before destroying the mempool, but the endio function doesn't
call mempool_free() until after completing the bio.

Fix it by swapping the order of those two operations.

The same problem occurs in dm.c with md referenced after dec_pending.
Again, we swap the order.

Cc: stable@kernel.org
Signed-off-by: Milan Broz &lt;mbroz@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm crypt: fix kcryptd_async_done parameter</title>
<updated>2009-03-16T17:44:33+00:00</updated>
<author>
<name>Huang Ying</name>
<email>ying.huang@intel.com</email>
</author>
<published>2009-03-16T17:44:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b2174eebd1fadb76454dad09a1dacbc17081e6b0'/>
<id>b2174eebd1fadb76454dad09a1dacbc17081e6b0</id>
<content type='text'>
In the async encryption-complete function (kcryptd_async_done), the
crypto_async_request passed in may be different from the one passed to
crypto_ablkcipher_encrypt/decrypt.  Only crypto_async_request-&gt;data is
guaranteed to be same as the one passed in.  The current
kcryptd_async_done uses the passed-in crypto_async_request directly
which may cause the AES-NI-based AES algorithm implementation to panic.

This patch fixes this bug by only using crypto_async_request-&gt;data,
which points to dm_crypt_request, the crypto_async_request passed in.
The original data (convert_context) is gotten from dm_crypt_request.

[mbroz@redhat.com: reworked]
Cc: stable@kernel.org
Signed-off-by: Huang Ying &lt;ying.huang@intel.com&gt;
Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Milan Broz &lt;mbroz@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the async encryption-complete function (kcryptd_async_done), the
crypto_async_request passed in may be different from the one passed to
crypto_ablkcipher_encrypt/decrypt.  Only crypto_async_request-&gt;data is
guaranteed to be same as the one passed in.  The current
kcryptd_async_done uses the passed-in crypto_async_request directly
which may cause the AES-NI-based AES algorithm implementation to panic.

This patch fixes this bug by only using crypto_async_request-&gt;data,
which points to dm_crypt_request, the crypto_async_request passed in.
The original data (convert_context) is gotten from dm_crypt_request.

[mbroz@redhat.com: reworked]
Cc: stable@kernel.org
Signed-off-by: Huang Ying &lt;ying.huang@intel.com&gt;
Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Milan Broz &lt;mbroz@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm io: respect BIO_MAX_PAGES limit</title>
<updated>2009-03-16T17:44:30+00:00</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2009-03-16T17:44:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d659e6cc98766a1a61d6bdd283f95d149abd7719'/>
<id>d659e6cc98766a1a61d6bdd283f95d149abd7719</id>
<content type='text'>
dm-io calls bio_get_nr_vecs to get the maximum number of pages to use
for a given device.  It allocates one additional bio_vec to use
internally but failed to respect BIO_MAX_PAGES, so fix this.

This was the likely cause of:
  https://bugzilla.redhat.com/show_bug.cgi?id=173153

Cc: stable@kernel.org
Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
dm-io calls bio_get_nr_vecs to get the maximum number of pages to use
for a given device.  It allocates one additional bio_vec to use
internally but failed to respect BIO_MAX_PAGES, so fix this.

This was the likely cause of:
  https://bugzilla.redhat.com/show_bug.cgi?id=173153

Cc: stable@kernel.org
Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm table: rework reference counting fix</title>
<updated>2009-03-16T17:44:26+00:00</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2009-03-16T17:44:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f80a557008462a0a4adef25407f1872e793d8dd5'/>
<id>f80a557008462a0a4adef25407f1872e793d8dd5</id>
<content type='text'>
Fix an error introduced in dm-table-rework-reference-counting.patch.

When there is failure after table initialization, we need to use
dm_table_destroy, not dm_table_put, to free the table.

dm_table_put may be used only after dm_table_get.

Cc: Kiyoshi Ueda &lt;k-ueda@ct.jp.nec.com&gt;
Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Reviewed-by: Jonathan Brassow &lt;jbrassow@redhat.com&gt;
Reviewed-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix an error introduced in dm-table-rework-reference-counting.patch.

When there is failure after table initialization, we need to use
dm_table_destroy, not dm_table_put, to free the table.

dm_table_put may be used only after dm_table_get.

Cc: Kiyoshi Ueda &lt;k-ueda@ct.jp.nec.com&gt;
Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Reviewed-by: Jonathan Brassow &lt;jbrassow@redhat.com&gt;
Reviewed-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm ioctl: validate name length when renaming</title>
<updated>2009-03-16T16:56:01+00:00</updated>
<author>
<name>Milan Broz</name>
<email>mbroz@redhat.com</email>
</author>
<published>2009-03-16T16:56:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=bc0fd67feba2e0770aad85393500ba77c6489f1c'/>
<id>bc0fd67feba2e0770aad85393500ba77c6489f1c</id>
<content type='text'>
When renaming a mapped device validate the length of the new name.

The rename ioctl accepted any correctly-terminated string enclosed
within the data passed from userspace.  The other ioctls enforce a
size limit of DM_NAME_LEN.  If the name is changed and becomes longer
than that, the device can no longer be addressed by name.

Fix it by properly checking for device name length (including
terminating zero).

Cc: stable@kernel.org
Signed-off-by: Milan Broz &lt;mbroz@redhat.com&gt;
Reviewed-by: Jonathan Brassow &lt;jbrassow@redhat.com&gt;
Reviewed-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When renaming a mapped device validate the length of the new name.

The rename ioctl accepted any correctly-terminated string enclosed
within the data passed from userspace.  The other ioctls enforce a
size limit of DM_NAME_LEN.  If the name is changed and becomes longer
than that, the device can no longer be addressed by name.

Fix it by properly checking for device name length (including
terminating zero).

Cc: stable@kernel.org
Signed-off-by: Milan Broz &lt;mbroz@redhat.com&gt;
Reviewed-by: Jonathan Brassow &lt;jbrassow@redhat.com&gt;
Reviewed-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>md: fix deadlock when stopping arrays</title>
<updated>2009-03-04T07:57:25+00:00</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2009-03-04T07:57:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5fd3a17ed456637a224cf4ca82b9ad9d005bc8d4'/>
<id>5fd3a17ed456637a224cf4ca82b9ad9d005bc8d4</id>
<content type='text'>
Resolve a deadlock when stopping redundant arrays, i.e. ones that
require a call to sysfs_remove_group when shutdown.  The deadlock is
summarized below:

Thread1                Thread2
-------                -------
read sysfs attribute   stop array
                       take mddev lock
                       sysfs_remove_group
sysfs_get_active
wait for mddev lock
                       wait for active

Sysrq-w:
--------
mdmon         S 00000017  2212  4163      1
  f1982ea8 00000046 2dcf6b85 00000017 c0b23100 f2f83ed0 c0b23100 f2f8413c
  c0b23100 c0b23100 c0b1fb98 f2f8413c 00000000 f2f8413c c0b23100 f2291ecc
  00000002 c0b23100 00000000 00000017 f2f83ed0 f1982eac 00000046 c044d9dd
Call Trace:
  [&lt;c044d9dd&gt;] ? debug_mutex_add_waiter+0x1d/0x58
  [&lt;c06ef451&gt;] __mutex_lock_common+0x1d9/0x338
  [&lt;c06ef451&gt;] ? __mutex_lock_common+0x1d9/0x338
  [&lt;c06ef5e3&gt;] mutex_lock_interruptible_nested+0x33/0x3a
  [&lt;c0634553&gt;] ? mddev_lock+0x14/0x16
  [&lt;c0634553&gt;] mddev_lock+0x14/0x16
  [&lt;c0634eda&gt;] md_attr_show+0x2a/0x49
  [&lt;c04e9997&gt;] sysfs_read_file+0x93/0xf9
mdadm         D 00000017  2812  4177      1
  f0401d78 00000046 430456f8 00000017 f0401d58 f0401d20 c0b23100 f2da2c4c
  c0b23100 c0b23100 c0b1fb98 f2da2c4c 0a10fc36 00000000 c0b23100 f0401d70
  00000003 c0b23100 00000000 00000017 f2da29e0 00000001 00000002 00000000
Call Trace:
  [&lt;c06eed1b&gt;] schedule_timeout+0x1b/0x95
  [&lt;c06eed1b&gt;] ? schedule_timeout+0x1b/0x95
  [&lt;c06eeb97&gt;] ? wait_for_common+0x34/0xdc
  [&lt;c044fa8a&gt;] ? trace_hardirqs_on_caller+0x18/0x145
  [&lt;c044fbc2&gt;] ? trace_hardirqs_on+0xb/0xd
  [&lt;c06eec03&gt;] wait_for_common+0xa0/0xdc
  [&lt;c0428c7c&gt;] ? default_wake_function+0x0/0x12
  [&lt;c06eeccc&gt;] wait_for_completion+0x17/0x19
  [&lt;c04ea620&gt;] sysfs_addrm_finish+0x19f/0x1d1
  [&lt;c04e920e&gt;] sysfs_hash_and_remove+0x42/0x55
  [&lt;c04eb4db&gt;] sysfs_remove_group+0x57/0x86
  [&lt;c0638086&gt;] do_md_stop+0x13a/0x499

This has been there for a while, but is easier to trigger now that mdmon
is closely watching sysfs.

Cc: &lt;stable@kernel.org&gt;
Reported-by: Jacek Danecki &lt;jacek.danecki@intel.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Resolve a deadlock when stopping redundant arrays, i.e. ones that
require a call to sysfs_remove_group when shutdown.  The deadlock is
summarized below:

Thread1                Thread2
-------                -------
read sysfs attribute   stop array
                       take mddev lock
                       sysfs_remove_group
sysfs_get_active
wait for mddev lock
                       wait for active

Sysrq-w:
--------
mdmon         S 00000017  2212  4163      1
  f1982ea8 00000046 2dcf6b85 00000017 c0b23100 f2f83ed0 c0b23100 f2f8413c
  c0b23100 c0b23100 c0b1fb98 f2f8413c 00000000 f2f8413c c0b23100 f2291ecc
  00000002 c0b23100 00000000 00000017 f2f83ed0 f1982eac 00000046 c044d9dd
Call Trace:
  [&lt;c044d9dd&gt;] ? debug_mutex_add_waiter+0x1d/0x58
  [&lt;c06ef451&gt;] __mutex_lock_common+0x1d9/0x338
  [&lt;c06ef451&gt;] ? __mutex_lock_common+0x1d9/0x338
  [&lt;c06ef5e3&gt;] mutex_lock_interruptible_nested+0x33/0x3a
  [&lt;c0634553&gt;] ? mddev_lock+0x14/0x16
  [&lt;c0634553&gt;] mddev_lock+0x14/0x16
  [&lt;c0634eda&gt;] md_attr_show+0x2a/0x49
  [&lt;c04e9997&gt;] sysfs_read_file+0x93/0xf9
mdadm         D 00000017  2812  4177      1
  f0401d78 00000046 430456f8 00000017 f0401d58 f0401d20 c0b23100 f2da2c4c
  c0b23100 c0b23100 c0b1fb98 f2da2c4c 0a10fc36 00000000 c0b23100 f0401d70
  00000003 c0b23100 00000000 00000017 f2da29e0 00000001 00000002 00000000
Call Trace:
  [&lt;c06eed1b&gt;] schedule_timeout+0x1b/0x95
  [&lt;c06eed1b&gt;] ? schedule_timeout+0x1b/0x95
  [&lt;c06eeb97&gt;] ? wait_for_common+0x34/0xdc
  [&lt;c044fa8a&gt;] ? trace_hardirqs_on_caller+0x18/0x145
  [&lt;c044fbc2&gt;] ? trace_hardirqs_on+0xb/0xd
  [&lt;c06eec03&gt;] wait_for_common+0xa0/0xdc
  [&lt;c0428c7c&gt;] ? default_wake_function+0x0/0x12
  [&lt;c06eeccc&gt;] wait_for_completion+0x17/0x19
  [&lt;c04ea620&gt;] sysfs_addrm_finish+0x19f/0x1d1
  [&lt;c04e920e&gt;] sysfs_hash_and_remove+0x42/0x55
  [&lt;c04eb4db&gt;] sysfs_remove_group+0x57/0x86
  [&lt;c0638086&gt;] do_md_stop+0x13a/0x499

This has been there for a while, but is easier to trigger now that mdmon
is closely watching sysfs.

Cc: &lt;stable@kernel.org&gt;
Reported-by: Jacek Danecki &lt;jacek.danecki@intel.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>md: avoid races when stopping resync.</title>
<updated>2009-02-25T02:18:47+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2009-02-25T02:18:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=73d5c38a9536142e062c35997b044e89166e063b'/>
<id>73d5c38a9536142e062c35997b044e89166e063b</id>
<content type='text'>
There has been a race in raid10 and raid1 for a long time
which has only recently started showing up due to a scheduler changed.

When a sync_read request finishes, as soon as reschedule_retry
is called, another thread can mark the resync request as having
completed, so md_do_sync can finish, -&gt;stop can be called, and
-&gt;conf can be freed.  So using conf after reschedule_retry is not
safe.

Similarly, when finishing a sync_write, calling md_done_sync must be
the last thing we do, as it allows a chain of events which will free
conf and other data structures.

The first of these requires action in raid10.c
The second requires action in raid1.c and raid10.c

Cc: stable@kernel.org
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There has been a race in raid10 and raid1 for a long time
which has only recently started showing up due to a scheduler changed.

When a sync_read request finishes, as soon as reschedule_retry
is called, another thread can mark the resync request as having
completed, so md_do_sync can finish, -&gt;stop can be called, and
-&gt;conf can be freed.  So using conf after reschedule_retry is not
safe.

Similarly, when finishing a sync_write, calling md_done_sync must be
the last thing we do, as it allows a chain of events which will free
conf and other data structures.

The first of these requires action in raid10.c
The second requires action in raid1.c and raid10.c

Cc: stable@kernel.org
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>md/raid10:  Don't call bitmap_cond_end_sync when we are doing recovery.</title>
<updated>2009-02-25T02:18:47+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2009-02-25T02:18:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=78200d45cde2a79c0d0ae0407883bb264caa3c18'/>
<id>78200d45cde2a79c0d0ae0407883bb264caa3c18</id>
<content type='text'>
For raid1/4/5/6, resync (fixing inconsistencies between devices) is
very similar to recovery (rebuilding a failed device onto a spare).
The both walk through the device addresses in order.

For raid10 it can be quite different.  resync follows the 'array'
address, and makes sure all copies are the same.  Recover walks
through 'device' addresses and recreates each missing block.

The 'bitmap_cond_end_sync' function allows the write-intent-bitmap
(When present) to be updated to reflect a partially completed resync.
It makes assumptions which mean that it does not work correctly for
raid10 recovery at all.

In particularly, it can cause bitmap-directed recovery of a raid10 to
not recovery some of the blocks that need to be recovered.

So move the call to bitmap_cond_end_sync into the resync path, rather
than being in the common "resync or recovery" path.


Cc: stable@kernel.org
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For raid1/4/5/6, resync (fixing inconsistencies between devices) is
very similar to recovery (rebuilding a failed device onto a spare).
The both walk through the device addresses in order.

For raid10 it can be quite different.  resync follows the 'array'
address, and makes sure all copies are the same.  Recover walks
through 'device' addresses and recreates each missing block.

The 'bitmap_cond_end_sync' function allows the write-intent-bitmap
(When present) to be updated to reflect a partially completed resync.
It makes assumptions which mean that it does not work correctly for
raid10 recovery at all.

In particularly, it can cause bitmap-directed recovery of a raid10 to
not recovery some of the blocks that need to be recovered.

So move the call to bitmap_cond_end_sync into the resync path, rather
than being in the common "resync or recovery" path.


Cc: stable@kernel.org
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>md/raid10:  Don't skip more than 1 bitmap-chunk at a time during recovery.</title>
<updated>2009-02-25T02:18:47+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2009-02-25T02:18:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=09b4068a7fe442efc40e9dcbcf5ff37c3338ab15'/>
<id>09b4068a7fe442efc40e9dcbcf5ff37c3338ab15</id>
<content type='text'>
When doing recovery on a raid10 with a write-intent bitmap, we only
need to recovery chunks that are flagged in the bitmap.

However if we choose to skip a chunk as it isn't flag, the code
currently skips the whole raid10-chunk, thus it might not recovery
some blocks that need recovering.

This patch fixes it.

In case that is confusing, it might help to understand that there
is a 'raid10 chunk size' which guides how data is distributed across
the devices, and a 'bitmap chunk size' which says how much data
corresponds to a single bit in the bitmap.

This bug only affects cases where the bitmap chunk size is smaller
than the raid10 chunk size.



Cc: stable@kernel.org
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When doing recovery on a raid10 with a write-intent bitmap, we only
need to recovery chunks that are flagged in the bitmap.

However if we choose to skip a chunk as it isn't flag, the code
currently skips the whole raid10-chunk, thus it might not recovery
some blocks that need recovering.

This patch fixes it.

In case that is confusing, it might help to understand that there
is a 'raid10 chunk size' which guides how data is distributed across
the devices, and a 'bitmap chunk size' which says how much data
corresponds to a single bit in the bitmap.

This bug only affects cases where the bitmap chunk size is smaller
than the raid10 chunk size.



Cc: stable@kernel.org
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>block: fix bad definition of BIO_RW_SYNC</title>
<updated>2009-02-18T09:32:00+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>jens.axboe@oracle.com</email>
</author>
<published>2009-02-16T09:25:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=93dbb393503d53cd226e5e1f0088fe8f4dbaa2b8'/>
<id>93dbb393503d53cd226e5e1f0088fe8f4dbaa2b8</id>
<content type='text'>
We can't OR shift values, so get rid of BIO_RW_SYNC and use BIO_RW_SYNCIO
and BIO_RW_UNPLUG explicitly. This brings back the behaviour from before
213d9417fec62ef4c3675621b9364a667954d4dd.

Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can't OR shift values, so get rid of BIO_RW_SYNC and use BIO_RW_SYNCIO
and BIO_RW_UNPLUG explicitly. This brings back the behaviour from before
213d9417fec62ef4c3675621b9364a667954d4dd.

Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
