<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/md, branch v4.2-rc5</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>dm cache: fix device destroy hang due to improper prealloc_used accounting</title>
<updated>2015-07-29T18:32:09+00:00</updated>
<author>
<name>Mike Snitzer</name>
<email>snitzer@redhat.com</email>
</author>
<published>2015-07-29T17:48:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=795e633a2dc6cbbeac68bc7f6006082150d38bb7'/>
<id>795e633a2dc6cbbeac68bc7f6006082150d38bb7</id>
<content type='text'>
Commit 665022d72f9 ("dm cache: avoid calls to prealloc_free_structs() if
possible") introduced a regression that caused the removal of a DM cache
device to hang in cache_postsuspend()'s call to wait_for_migrations()
with the following stack trace:

  [&lt;ffffffff81651457&gt;] schedule+0x37/0x80
  [&lt;ffffffffa041e21b&gt;] cache_postsuspend+0xbb/0x470 [dm_cache]
  [&lt;ffffffff810ba970&gt;] ? prepare_to_wait_event+0xf0/0xf0
  [&lt;ffffffffa0006f77&gt;] dm_table_postsuspend_targets+0x47/0x60 [dm_mod]
  [&lt;ffffffffa0001eb5&gt;] __dm_destroy+0x215/0x250 [dm_mod]
  [&lt;ffffffffa0004113&gt;] dm_destroy+0x13/0x20 [dm_mod]
  [&lt;ffffffffa00098cd&gt;] dev_remove+0x10d/0x170 [dm_mod]
  [&lt;ffffffffa00097c0&gt;] ? dev_suspend+0x240/0x240 [dm_mod]
  [&lt;ffffffffa0009f85&gt;] ctl_ioctl+0x255/0x4d0 [dm_mod]
  [&lt;ffffffff8127ac00&gt;] ? SYSC_semtimedop+0x280/0xe10
  [&lt;ffffffffa000a213&gt;] dm_ctl_ioctl+0x13/0x20 [dm_mod]
  [&lt;ffffffff811fd432&gt;] do_vfs_ioctl+0x2d2/0x4b0
  [&lt;ffffffff81117d5f&gt;] ? __audit_syscall_entry+0xaf/0x100
  [&lt;ffffffff81022636&gt;] ? do_audit_syscall_entry+0x66/0x70
  [&lt;ffffffff811fd689&gt;] SyS_ioctl+0x79/0x90
  [&lt;ffffffff81023e58&gt;] ? syscall_trace_leave+0xb8/0x110
  [&lt;ffffffff81654f6e&gt;] entry_SYSCALL_64_fastpath+0x12/0x71

Fix this by accounting for the call to prealloc_data_structs()
immediately _before_ the call as opposed to after.  This is needed
because it is possible to break out of the control loop after the call
to prealloc_data_structs() but before prealloc_used was set to true.

Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 665022d72f9 ("dm cache: avoid calls to prealloc_free_structs() if
possible") introduced a regression that caused the removal of a DM cache
device to hang in cache_postsuspend()'s call to wait_for_migrations()
with the following stack trace:

  [&lt;ffffffff81651457&gt;] schedule+0x37/0x80
  [&lt;ffffffffa041e21b&gt;] cache_postsuspend+0xbb/0x470 [dm_cache]
  [&lt;ffffffff810ba970&gt;] ? prepare_to_wait_event+0xf0/0xf0
  [&lt;ffffffffa0006f77&gt;] dm_table_postsuspend_targets+0x47/0x60 [dm_mod]
  [&lt;ffffffffa0001eb5&gt;] __dm_destroy+0x215/0x250 [dm_mod]
  [&lt;ffffffffa0004113&gt;] dm_destroy+0x13/0x20 [dm_mod]
  [&lt;ffffffffa00098cd&gt;] dev_remove+0x10d/0x170 [dm_mod]
  [&lt;ffffffffa00097c0&gt;] ? dev_suspend+0x240/0x240 [dm_mod]
  [&lt;ffffffffa0009f85&gt;] ctl_ioctl+0x255/0x4d0 [dm_mod]
  [&lt;ffffffff8127ac00&gt;] ? SYSC_semtimedop+0x280/0xe10
  [&lt;ffffffffa000a213&gt;] dm_ctl_ioctl+0x13/0x20 [dm_mod]
  [&lt;ffffffff811fd432&gt;] do_vfs_ioctl+0x2d2/0x4b0
  [&lt;ffffffff81117d5f&gt;] ? __audit_syscall_entry+0xaf/0x100
  [&lt;ffffffff81022636&gt;] ? do_audit_syscall_entry+0x66/0x70
  [&lt;ffffffff811fd689&gt;] SyS_ioctl+0x79/0x90
  [&lt;ffffffff81023e58&gt;] ? syscall_trace_leave+0xb8/0x110
  [&lt;ffffffff81654f6e&gt;] entry_SYSCALL_64_fastpath+0x12/0x71

Fix this by accounting for the call to prealloc_data_structs()
immediately _before_ the call as opposed to after.  This is needed
because it is possible to break out of the control loop after the call
to prealloc_data_structs() but before prealloc_used was set to true.

Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "dm cache: do not wake_worker() in free_migration()"</title>
<updated>2015-07-29T18:32:08+00:00</updated>
<author>
<name>Mike Snitzer</name>
<email>snitzer@redhat.com</email>
</author>
<published>2015-07-29T18:11:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3508e6590d4729ac07f01f7ae2256c2f9dc738b8'/>
<id>3508e6590d4729ac07f01f7ae2256c2f9dc738b8</id>
<content type='text'>
This reverts commit 386cb7cdeeef97e0bf082a8d6bbfc07a2ccce07b.

Taking the wake_worker() out of free_migration() will slow writeback
dramatically, and hence adaptability.

Say we have 10k blocks that need writing back, but are only able to
issue 5 concurrently due to the migration bandwidth: it's imperative
that we wake_worker() immediately after migration completion; waiting
for the next 1 second wake up (via do_waker) means it'll take a long
time to write that all back.

Reported-by: Joe Thornber &lt;ejt@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 386cb7cdeeef97e0bf082a8d6bbfc07a2ccce07b.

Taking the wake_worker() out of free_migration() will slow writeback
dramatically, and hence adaptability.

Say we have 10k blocks that need writing back, but are only able to
issue 5 concurrently due to the migration bandwidth: it's imperative
that we wake_worker() immediately after migration completion; waiting
for the next 1 second wake up (via do_waker) means it'll take a long
time to write that all back.

Reported-by: Joe Thornber &lt;ejt@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm crypt: update wiki page URL</title>
<updated>2015-07-27T11:58:16+00:00</updated>
<author>
<name>Baruch Siach</name>
<email>baruch@tkos.co.il</email>
</author>
<published>2015-07-05T06:55:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6ed443c07f1e7f819983422b16598facb152250d'/>
<id>6ed443c07f1e7f819983422b16598facb152250d</id>
<content type='text'>
Cryptsetup moved to gitlab.  This is a leftover from commit e44f23b32dc7
(dm crypt: update URLs to new cryptsetup project page, 2015-04-05).

Signed-off-by: Baruch Siach &lt;baruch@tkos.co.il&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Cryptsetup moved to gitlab.  This is a leftover from commit e44f23b32dc7
(dm crypt: update URLs to new cryptsetup project page, 2015-04-05).

Signed-off-by: Baruch Siach &lt;baruch@tkos.co.il&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm cache policy smq: fix alloc_bitset check that always evaluates as false</title>
<updated>2015-07-27T11:58:15+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2015-07-23T15:47:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=134bf30c06f057d6b8d90132e8f8b3cd2be79572'/>
<id>134bf30c06f057d6b8d90132e8f8b3cd2be79572</id>
<content type='text'>
static analysis by cppcheck has found a check on alloc_bitset that
always evaluates as false and hence never finds an allocation failure:

[drivers/md/dm-cache-policy-smq.c:1689]: (warning) Logical conjunction
  always evaluates to false: !EXPR &amp;&amp; EXPR.

Fix this by removing the incorrect mq-&gt;cache_hit_bits check

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
static analysis by cppcheck has found a check on alloc_bitset that
always evaluates as false and hence never finds an allocation failure:

[drivers/md/dm-cache-policy-smq.c:1689]: (warning) Logical conjunction
  always evaluates to false: !EXPR &amp;&amp; EXPR.

Fix this by removing the incorrect mq-&gt;cache_hit_bits check

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm thin: return -ENOSPC when erroring retry list due to out of data space</title>
<updated>2015-07-26T21:39:19+00:00</updated>
<author>
<name>Mike Snitzer</name>
<email>snitzer@redhat.com</email>
</author>
<published>2015-07-21T17:20:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0a927c2f02a2437a57679527e42ab7cbfa14efb1'/>
<id>0a927c2f02a2437a57679527e42ab7cbfa14efb1</id>
<content type='text'>
Otherwise -EIO would be returned when -ENOSPC should be used
consistently.

Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Otherwise -EIO would be returned when -ENOSPC should be used
consistently.

Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'md/4.2-fixes' of git://neil.brown.name/md</title>
<updated>2015-07-25T18:24:58+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-07-25T18:24:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=aca105a697bf08208909225a66198277e51b4f65'/>
<id>aca105a697bf08208909225a66198277e51b4f65</id>
<content type='text'>
Pull md fixes from Neil Brown:
 "Some md fixes for 4.2

  Several are tagged for -stable.
  A few aren't because they are not very, serious or because they are in
  the 'experimental' cluster code"

* tag 'md/4.2-fixes' of git://neil.brown.name/md:
  md/raid5: clear R5_NeedReplace when no longer needed.
  Fix read-balancing during node failure
  md-cluster: fix bitmap sub-offset in bitmap_read_sb
  md: Return error if request_module fails and returns positive value
  md: Skip cluster setup in case of error while reading bitmap
  md/raid1: fix test for 'was read error from last working device'.
  md: Skip cluster setup for dm-raid
  md: flush -&gt;event_work before stopping array.
  md/raid10: always set reshape_safe when initializing reshape_position.
  md/raid5: avoid races when changing cache size.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull md fixes from Neil Brown:
 "Some md fixes for 4.2

  Several are tagged for -stable.
  A few aren't because they are not very, serious or because they are in
  the 'experimental' cluster code"

* tag 'md/4.2-fixes' of git://neil.brown.name/md:
  md/raid5: clear R5_NeedReplace when no longer needed.
  Fix read-balancing during node failure
  md-cluster: fix bitmap sub-offset in bitmap_read_sb
  md: Return error if request_module fails and returns positive value
  md: Skip cluster setup in case of error while reading bitmap
  md/raid1: fix test for 'was read error from last working device'.
  md: Skip cluster setup for dm-raid
  md: flush -&gt;event_work before stopping array.
  md/raid10: always set reshape_safe when initializing reshape_position.
  md/raid5: avoid races when changing cache size.
</pre>
</div>
</content>
</entry>
<entry>
<title>md/raid5: clear R5_NeedReplace when no longer needed.</title>
<updated>2015-07-24T03:38:04+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.com</email>
</author>
<published>2015-07-17T03:26:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e6030cb06c40e4ab4e8c712f13f494a09638ed2c'/>
<id>e6030cb06c40e4ab4e8c712f13f494a09638ed2c</id>
<content type='text'>
This flag is currently never cleared, which can in rare cases
trigger a warn-on if it is still set but the block isn't
InSync.

So clear it when it isn't need, which includes if the replacement
device has failed.

Signed-off-by: NeilBrown &lt;neilb@suse.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This flag is currently never cleared, which can in rare cases
trigger a warn-on if it is still set but the block isn't
InSync.

So clear it when it isn't need, which includes if the replacement
device has failed.

Signed-off-by: NeilBrown &lt;neilb@suse.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix read-balancing during node failure</title>
<updated>2015-07-24T03:37:59+00:00</updated>
<author>
<name>Goldwyn Rodrigues</name>
<email>rgoldwyn@suse.com</email>
</author>
<published>2015-06-24T14:30:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=90382ed9afeafd42ef193f0eadc6b2a252d6c24d'/>
<id>90382ed9afeafd42ef193f0eadc6b2a252d6c24d</id>
<content type='text'>
During a node failure, We need to suspend read balancing so that the
reads are directed to the first device and stale data is not read.
Suspending writes is not required because these would be recorded and
synced eventually.

A new flag MD_CLUSTER_SUSPEND_READ_BALANCING is set in recover_prep().
area_resyncing() will respond true for the entire devices if this
flag is set and the request type is READ. The flag is cleared
in recover_done().

Signed-off-by: Goldwyn Rodrigues &lt;rgoldwyn@suse.com&gt;
Reported-By: David Teigland &lt;teigland@redhat.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
During a node failure, We need to suspend read balancing so that the
reads are directed to the first device and stale data is not read.
Suspending writes is not required because these would be recorded and
synced eventually.

A new flag MD_CLUSTER_SUSPEND_READ_BALANCING is set in recover_prep().
area_resyncing() will respond true for the entire devices if this
flag is set and the request type is READ. The flag is cleared
in recover_done().

Signed-off-by: Goldwyn Rodrigues &lt;rgoldwyn@suse.com&gt;
Reported-By: David Teigland &lt;teigland@redhat.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>md-cluster: fix bitmap sub-offset in bitmap_read_sb</title>
<updated>2015-07-24T03:37:55+00:00</updated>
<author>
<name>Goldwyn Rodrigues</name>
<email>rgoldwyn@suse.de</email>
</author>
<published>2015-07-01T02:19:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=33e38ac6887d975fe2635c7fcaefb6d5495cb2e1'/>
<id>33e38ac6887d975fe2635c7fcaefb6d5495cb2e1</id>
<content type='text'>
bitmap_read_sb is modifying mddev-&gt;bitmap_info.offset. This works for
the first bitmap read. However, when multiple bitmaps need to be opened
by the same node, it ends up corrupting the offset. Fix it by using a
local variable.

Also, bitmap_read_sb is not required in bitmap_copy_from_slot since
it is called in bitmap_create. Remove bitmap_read_sb().

Signed-off-by: Goldwyn Rodrigues &lt;rgoldwyn@suse.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
bitmap_read_sb is modifying mddev-&gt;bitmap_info.offset. This works for
the first bitmap read. However, when multiple bitmaps need to be opened
by the same node, it ends up corrupting the offset. Fix it by using a
local variable.

Also, bitmap_read_sb is not required in bitmap_copy_from_slot since
it is called in bitmap_create. Remove bitmap_read_sb().

Signed-off-by: Goldwyn Rodrigues &lt;rgoldwyn@suse.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>md: Return error if request_module fails and returns positive value</title>
<updated>2015-07-24T03:37:51+00:00</updated>
<author>
<name>Goldwyn Rodrigues</name>
<email>rgoldwyn@suse.com</email>
</author>
<published>2015-07-22T17:09:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b0c26a79d6993b280931f8e2b406ca4b220bb58f'/>
<id>b0c26a79d6993b280931f8e2b406ca4b220bb58f</id>
<content type='text'>
request_module() can return 256 (process exited) in some cases,
which is not as specified in the documentation before the
request_module() definition. Convert the error to -ENOENT.

The positive error number results in bitmap_create() returning
a value that is meant to be an error but doesn't look like one,
so it is dereferenced as a point and causes a crash.

(not needed for stable as this is "experimental" code)
Fixes: edb39c9deda8 ("Introduce md_cluster_operations to handle cluster functions")
Signed-off-By: Goldwyn Rodrigues &lt;rgoldwyn@suse.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
request_module() can return 256 (process exited) in some cases,
which is not as specified in the documentation before the
request_module() definition. Convert the error to -ENOENT.

The positive error number results in bitmap_create() returning
a value that is meant to be an error but doesn't look like one,
so it is dereferenced as a point and causes a crash.

(not needed for stable as this is "experimental" code)
Fixes: edb39c9deda8 ("Introduce md_cluster_operations to handle cluster functions")
Signed-off-By: Goldwyn Rodrigues &lt;rgoldwyn@suse.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
