<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/md/bcache, branch v4.9.20</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>bcache: Make gc wakeup sane, remove set_task_state()</title>
<updated>2017-02-23T16:44:36+00:00</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@gmail.com</email>
</author>
<published>2016-10-27T03:31:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8629aed2387cd22d1bde76e798034c3ea31018f7'/>
<id>8629aed2387cd22d1bde76e798034c3ea31018f7</id>
<content type='text'>
commit be628be09563f8f6e81929efbd7cf3f45c344416 upstream.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@gmail.com&gt;
Cc: Coly Li &lt;colyli@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit be628be09563f8f6e81929efbd7cf3f45c344416 upstream.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@gmail.com&gt;
Cc: Coly Li &lt;colyli@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>block: export bio_free_pages to other modules</title>
<updated>2016-09-22T13:48:03+00:00</updated>
<author>
<name>Guoqing Jiang</name>
<email>gqjiang@suse.com</email>
</author>
<published>2016-09-22T07:10:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=491221f88d00651e449c9caf7415b6453c8a77b7'/>
<id>491221f88d00651e449c9caf7415b6453c8a77b7</id>
<content type='text'>
bio_free_pages is introduced in commit 1dfa0f68c040
("block: add a helper to free bio bounce buffer pages"),
we can reuse the func in other modules after it was
imported.

Cc: Christoph Hellwig &lt;hch@infradead.org&gt;
Cc: Jens Axboe &lt;axboe@fb.com&gt;
Cc: Mike Snitzer &lt;snitzer@redhat.com&gt;
Cc: Shaohua Li &lt;shli@fb.com&gt;
Signed-off-by: Guoqing Jiang &lt;gqjiang@suse.com&gt;
Acked-by: Kent Overstreet &lt;kent.overstreet@gmail.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
bio_free_pages is introduced in commit 1dfa0f68c040
("block: add a helper to free bio bounce buffer pages"),
we can reuse the func in other modules after it was
imported.

Cc: Christoph Hellwig &lt;hch@infradead.org&gt;
Cc: Jens Axboe &lt;axboe@fb.com&gt;
Cc: Mike Snitzer &lt;snitzer@redhat.com&gt;
Cc: Shaohua Li &lt;shli@fb.com&gt;
Signed-off-by: Guoqing Jiang &lt;gqjiang@suse.com&gt;
Acked-by: Kent Overstreet &lt;kent.overstreet@gmail.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bcache: pr_err: more meaningful error message when nr_stripes is invalid</title>
<updated>2016-08-19T03:31:03+00:00</updated>
<author>
<name>Eric Wheeler</name>
<email>git@linux.ewheeler.net</email>
</author>
<published>2016-08-19T03:15:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=90706094d5be614ae7285b3c96c3125bb198618c'/>
<id>90706094d5be614ae7285b3c96c3125bb198618c</id>
<content type='text'>
The original error was thought to be corruption, but was actually caused by:
	make-bcache --data-offset N
where N was in bytes and should have been in sectors.  While userspace
tools should be updated to check --data-offset beyond end of volume,
hopefully this will help others that might not have noticed the units.

Signed-off-by: Eric Wheeler &lt;bcache@linux.ewheeler.net&gt;
Cc: Kent Overstreet &lt;kent.overstreet@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The original error was thought to be corruption, but was actually caused by:
	make-bcache --data-offset N
where N was in bytes and should have been in sectors.  While userspace
tools should be updated to check --data-offset beyond end of volume,
hopefully this will help others that might not have noticed the units.

Signed-off-by: Eric Wheeler &lt;bcache@linux.ewheeler.net&gt;
Cc: Kent Overstreet &lt;kent.overstreet@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bcache: RESERVE_PRIO is too small by one when prio_buckets() is a power of two.</title>
<updated>2016-08-19T03:29:49+00:00</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@gmail.com</email>
</author>
<published>2016-08-18T01:21:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=acc9cf8c66c66b2cbbdb4a375537edee72be64df'/>
<id>acc9cf8c66c66b2cbbdb4a375537edee72be64df</id>
<content type='text'>
This patch fixes a cachedev registration-time allocation deadlock.
This can deadlock on boot if your initrd auto-registeres bcache devices:

Allocator thread:
[  720.727614] INFO: task bcache_allocato:3833 blocked for more than 120 seconds.
[  720.732361]  [&lt;ffffffff816eeac7&gt;] schedule+0x37/0x90
[  720.732963]  [&lt;ffffffffa05192b8&gt;] bch_bucket_alloc+0x188/0x360 [bcache]
[  720.733538]  [&lt;ffffffff810e6950&gt;] ? prepare_to_wait_event+0xf0/0xf0
[  720.734137]  [&lt;ffffffffa05302bd&gt;] bch_prio_write+0x19d/0x340 [bcache]
[  720.734715]  [&lt;ffffffffa05190bf&gt;] bch_allocator_thread+0x3ff/0x470 [bcache]
[  720.735311]  [&lt;ffffffff816ee41c&gt;] ? __schedule+0x2dc/0x950
[  720.735884]  [&lt;ffffffffa0518cc0&gt;] ? invalidate_buckets+0x980/0x980 [bcache]

Registration thread:
[  720.710403] INFO: task bash:3531 blocked for more than 120 seconds.
[  720.715226]  [&lt;ffffffff816eeac7&gt;] schedule+0x37/0x90
[  720.715805]  [&lt;ffffffffa05235cd&gt;] __bch_btree_map_nodes+0x12d/0x150 [bcache]
[  720.716409]  [&lt;ffffffffa0522d30&gt;] ? bch_btree_insert_check_key+0x1c0/0x1c0 [bcache]
[  720.717008]  [&lt;ffffffffa05236e4&gt;] bch_btree_insert+0xf4/0x170 [bcache]
[  720.717586]  [&lt;ffffffff810e6950&gt;] ? prepare_to_wait_event+0xf0/0xf0
[  720.718191]  [&lt;ffffffffa0527d9a&gt;] bch_journal_replay+0x14a/0x290 [bcache]
[  720.718766]  [&lt;ffffffff810cc90d&gt;] ? ttwu_do_activate.constprop.94+0x5d/0x70
[  720.719369]  [&lt;ffffffff810cf684&gt;] ? try_to_wake_up+0x1d4/0x350
[  720.719968]  [&lt;ffffffffa05317d0&gt;] run_cache_set+0x580/0x8e0 [bcache]
[  720.720553]  [&lt;ffffffffa053302e&gt;] register_bcache+0xe2e/0x13b0 [bcache]
[  720.721153]  [&lt;ffffffff81354cef&gt;] kobj_attr_store+0xf/0x20
[  720.721730]  [&lt;ffffffff812a2dad&gt;] sysfs_kf_write+0x3d/0x50
[  720.722327]  [&lt;ffffffff812a225a&gt;] kernfs_fop_write+0x12a/0x180
[  720.722904]  [&lt;ffffffff81225177&gt;] __vfs_write+0x37/0x110
[  720.723503]  [&lt;ffffffff81228048&gt;] ? __sb_start_write+0x58/0x110
[  720.724100]  [&lt;ffffffff812cedb3&gt;] ? security_file_permission+0x23/0xa0
[  720.724675]  [&lt;ffffffff812258a9&gt;] vfs_write+0xa9/0x1b0
[  720.725275]  [&lt;ffffffff8102479c&gt;] ? do_audit_syscall_entry+0x6c/0x70
[  720.725849]  [&lt;ffffffff81226755&gt;] SyS_write+0x55/0xd0
[  720.726451]  [&lt;ffffffff8106a390&gt;] ? do_page_fault+0x30/0x80
[  720.727045]  [&lt;ffffffff816f2cae&gt;] system_call_fastpath+0x12/0x71

The fifo code in upstream bcache can't use the last element in the buffer,
which was the cause of the bug: if you asked for a power of two size,
it'd give you a fifo that could hold one less than what you asked for
rather than allocating a buffer twice as big.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@gmail.com&gt;
Tested-by: Eric Wheeler &lt;bcache@linux.ewheeler.net&gt;
Cc: stable@vger.kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes a cachedev registration-time allocation deadlock.
This can deadlock on boot if your initrd auto-registeres bcache devices:

Allocator thread:
[  720.727614] INFO: task bcache_allocato:3833 blocked for more than 120 seconds.
[  720.732361]  [&lt;ffffffff816eeac7&gt;] schedule+0x37/0x90
[  720.732963]  [&lt;ffffffffa05192b8&gt;] bch_bucket_alloc+0x188/0x360 [bcache]
[  720.733538]  [&lt;ffffffff810e6950&gt;] ? prepare_to_wait_event+0xf0/0xf0
[  720.734137]  [&lt;ffffffffa05302bd&gt;] bch_prio_write+0x19d/0x340 [bcache]
[  720.734715]  [&lt;ffffffffa05190bf&gt;] bch_allocator_thread+0x3ff/0x470 [bcache]
[  720.735311]  [&lt;ffffffff816ee41c&gt;] ? __schedule+0x2dc/0x950
[  720.735884]  [&lt;ffffffffa0518cc0&gt;] ? invalidate_buckets+0x980/0x980 [bcache]

Registration thread:
[  720.710403] INFO: task bash:3531 blocked for more than 120 seconds.
[  720.715226]  [&lt;ffffffff816eeac7&gt;] schedule+0x37/0x90
[  720.715805]  [&lt;ffffffffa05235cd&gt;] __bch_btree_map_nodes+0x12d/0x150 [bcache]
[  720.716409]  [&lt;ffffffffa0522d30&gt;] ? bch_btree_insert_check_key+0x1c0/0x1c0 [bcache]
[  720.717008]  [&lt;ffffffffa05236e4&gt;] bch_btree_insert+0xf4/0x170 [bcache]
[  720.717586]  [&lt;ffffffff810e6950&gt;] ? prepare_to_wait_event+0xf0/0xf0
[  720.718191]  [&lt;ffffffffa0527d9a&gt;] bch_journal_replay+0x14a/0x290 [bcache]
[  720.718766]  [&lt;ffffffff810cc90d&gt;] ? ttwu_do_activate.constprop.94+0x5d/0x70
[  720.719369]  [&lt;ffffffff810cf684&gt;] ? try_to_wake_up+0x1d4/0x350
[  720.719968]  [&lt;ffffffffa05317d0&gt;] run_cache_set+0x580/0x8e0 [bcache]
[  720.720553]  [&lt;ffffffffa053302e&gt;] register_bcache+0xe2e/0x13b0 [bcache]
[  720.721153]  [&lt;ffffffff81354cef&gt;] kobj_attr_store+0xf/0x20
[  720.721730]  [&lt;ffffffff812a2dad&gt;] sysfs_kf_write+0x3d/0x50
[  720.722327]  [&lt;ffffffff812a225a&gt;] kernfs_fop_write+0x12a/0x180
[  720.722904]  [&lt;ffffffff81225177&gt;] __vfs_write+0x37/0x110
[  720.723503]  [&lt;ffffffff81228048&gt;] ? __sb_start_write+0x58/0x110
[  720.724100]  [&lt;ffffffff812cedb3&gt;] ? security_file_permission+0x23/0xa0
[  720.724675]  [&lt;ffffffff812258a9&gt;] vfs_write+0xa9/0x1b0
[  720.725275]  [&lt;ffffffff8102479c&gt;] ? do_audit_syscall_entry+0x6c/0x70
[  720.725849]  [&lt;ffffffff81226755&gt;] SyS_write+0x55/0xd0
[  720.726451]  [&lt;ffffffff8106a390&gt;] ? do_page_fault+0x30/0x80
[  720.727045]  [&lt;ffffffff816f2cae&gt;] system_call_fastpath+0x12/0x71

The fifo code in upstream bcache can't use the last element in the buffer,
which was the cause of the bug: if you asked for a power of two size,
it'd give you a fifo that could hold one less than what you asked for
rather than allocating a buffer twice as big.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@gmail.com&gt;
Tested-by: Eric Wheeler &lt;bcache@linux.ewheeler.net&gt;
Cc: stable@vger.kernel.org
</pre>
</div>
</content>
</entry>
<entry>
<title>bcache: register_bcache(): call blkdev_put() when cache_alloc() fails</title>
<updated>2016-08-19T03:28:23+00:00</updated>
<author>
<name>Eric Wheeler</name>
<email>git@linux.ewheeler.net</email>
</author>
<published>2016-06-17T22:01:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d9dc1702b297ec4a6bb9c0326a70641b322ba886'/>
<id>d9dc1702b297ec4a6bb9c0326a70641b322ba886</id>
<content type='text'>
register_cache() is supposed to return an error string on error so that
register_bcache() will will blkdev_put and cleanup other user counters,
but it does not set 'char *err' when cache_alloc() fails (eg, due to
memory pressure) and thus register_bcache() performs no cleanup.

register_bcache() &lt;----------\  &lt;- no jump to err_close, no blkdev_put()
   |                         |
   +-&gt;register_cache()       |  &lt;- fails to set char *err
         |                   |
         +-&gt;cache_alloc() ---/  &lt;- returns error

This patch sets `char *err` for this failure case so that register_cache()
will cause register_bcache() to correctly jump to err_close and do
cleanup.  This was tested under OOM conditions that triggered the bug.

Signed-off-by: Eric Wheeler &lt;bcache@linux.ewheeler.net&gt;
Cc: Kent Overstreet &lt;kent.overstreet@gmail.com&gt;
Cc: stable@vger.kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
register_cache() is supposed to return an error string on error so that
register_bcache() will will blkdev_put and cleanup other user counters,
but it does not set 'char *err' when cache_alloc() fails (eg, due to
memory pressure) and thus register_bcache() performs no cleanup.

register_bcache() &lt;----------\  &lt;- no jump to err_close, no blkdev_put()
   |                         |
   +-&gt;register_cache()       |  &lt;- fails to set char *err
         |                   |
         +-&gt;cache_alloc() ---/  &lt;- returns error

This patch sets `char *err` for this failure case so that register_cache()
will cause register_bcache() to correctly jump to err_close and do
cleanup.  This was tested under OOM conditions that triggered the bug.

Signed-off-by: Eric Wheeler &lt;bcache@linux.ewheeler.net&gt;
Cc: Kent Overstreet &lt;kent.overstreet@gmail.com&gt;
Cc: stable@vger.kernel.org
</pre>
</div>
</content>
</entry>
<entry>
<title>block: rename bio bi_rw to bi_opf</title>
<updated>2016-08-07T20:41:02+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@fb.com</email>
</author>
<published>2016-08-05T21:35:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1eff9d322a444245c67515edb52bc0eb68374aa8'/>
<id>1eff9d322a444245c67515edb52bc0eb68374aa8</id>
<content type='text'>
Since commit 63a4cc24867d, bio-&gt;bi_rw contains flags in the lower
portion and the op code in the higher portions. This means that
old code that relies on manually setting bi_rw is most likely
going to be broken. Instead of letting that brokeness linger,
rename the member, to force old and out-of-tree code to break
at compile time instead of at runtime.

No intended functional changes in this commit.

Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since commit 63a4cc24867d, bio-&gt;bi_rw contains flags in the lower
portion and the op code in the higher portions. This means that
old code that relies on manually setting bi_rw is most likely
going to be broken. Instead of letting that brokeness linger,
rename the member, to force old and out-of-tree code to break
at compile time instead of at runtime.

No intended functional changes in this commit.

Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>block: simplify and cleanup bvec pool handling</title>
<updated>2016-07-20T23:37:02+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2016-07-19T09:28:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ed996a52c868b62c4e5bf529cb4ccb44bcfa2f8e'/>
<id>ed996a52c868b62c4e5bf529cb4ccb44bcfa2f8e</id>
<content type='text'>
Instead of a flag and an index just make sure an index of 0 means
no need to free the bvec array.  Also move the constants related
to the bvec pools together and use a consistent naming scheme for
them.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Reviewed-by: Mike Christie &lt;mchristi@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of a flag and an index just make sure an index of 0 means
no need to free the bvec array.  Also move the constants related
to the bvec pools together and use a consistent naming scheme for
them.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Reviewed-by: Mike Christie &lt;mchristi@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bcache: Remove redundant block_size assignment</title>
<updated>2016-07-05T17:34:50+00:00</updated>
<author>
<name>Yijing Wang</name>
<email>wangyijing@huawei.com</email>
</author>
<published>2016-07-04T01:23:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=89b920e0031673882e2217189c655dd89d5c1553'/>
<id>89b920e0031673882e2217189c655dd89d5c1553</id>
<content type='text'>
We have assigned sb-&gt;block_size before the switch,
so remove the redundant one.

Reviewed-by: Coly Li &lt;colyli@suse.de&gt;
Signed-off-by: Yijing Wang &lt;wangyijing@huawei.com&gt;
Acked-by: Eric Wheeler &lt;bcache@lists.ewheeler.net&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We have assigned sb-&gt;block_size before the switch,
so remove the redundant one.

Reviewed-by: Coly Li &lt;colyli@suse.de&gt;
Signed-off-by: Yijing Wang &lt;wangyijing@huawei.com&gt;
Acked-by: Eric Wheeler &lt;bcache@lists.ewheeler.net&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bcache: update document info</title>
<updated>2016-07-05T17:34:49+00:00</updated>
<author>
<name>Yijing Wang</name>
<email>wangyijing@huawei.com</email>
</author>
<published>2016-07-04T01:23:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7abc70d7007757ac1c0e87c57f39cd79f50a632f'/>
<id>7abc70d7007757ac1c0e87c57f39cd79f50a632f</id>
<content type='text'>
There is no return in continue_at(), update the documentation.

Signed-off-by: Yijing Wang &lt;wangyijing@huawei.com&gt;
Acked-by: Coly Li &lt;colyli@suse.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is no return in continue_at(), update the documentation.

Signed-off-by: Yijing Wang &lt;wangyijing@huawei.com&gt;
Acked-by: Coly Li &lt;colyli@suse.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bcache: Remove redundant parameter for cache_alloc()</title>
<updated>2016-07-05T17:34:47+00:00</updated>
<author>
<name>Yijing Wang</name>
<email>wangyijing@huawei.com</email>
</author>
<published>2016-07-04T01:23:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c50d4d5dd367f996393f1d33f5a3a3048bb414f8'/>
<id>c50d4d5dd367f996393f1d33f5a3a3048bb414f8</id>
<content type='text'>
Cache_sb is not used in cache_alloc, and we have copied
sb info to cache-&gt;sb already, remove it.

Reviewed-by: Coly Li &lt;colyli@suse.de&gt;
Signed-off-by: Yijing Wang &lt;wangyijing@huawei.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Cache_sb is not used in cache_alloc, and we have copied
sb info to cache-&gt;sb already, remove it.

Reviewed-by: Coly Li &lt;colyli@suse.de&gt;
Signed-off-by: Yijing Wang &lt;wangyijing@huawei.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
