<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/md/bcache/closure.c, branch linux-4.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2018-03-19T02:15:20Z</updated>
<entry>
<title>bcache: Fix kernel-doc warnings</title>
<updated>2018-03-19T02:15:20Z</updated>
<author>
<name>Bart Van Assche</name>
</author>
<published>2018-03-19T00:36:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=47344e330eabc1515cbe6061eb337100a3ab6d37'/>
<id>urn:sha1:47344e330eabc1515cbe6061eb337100a3ab6d37</id>
<content type='text'>
Avoid that building with W=1 triggers warnings about the kernel-doc
headers.

Signed-off-by: Bart Van Assche &lt;bart.vanassche@wdc.com&gt;
Reviewed-by: Michael Lyle &lt;mlyle@lyle.org&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>bcache: move closure debug file into debug directory</title>
<updated>2018-03-19T02:15:20Z</updated>
<author>
<name>Chengguang Xu</name>
</author>
<published>2018-03-19T00:36:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=df2b94313ae5b4f60d49e01d4dff5acb4c2757cf'/>
<id>urn:sha1:df2b94313ae5b4f60d49e01d4dff5acb4c2757cf</id>
<content type='text'>
In current code closure debug file is outside of debug directory
and when unloading module there is lack of removing operation
for closure debug file, so it will cause creating error when trying
to reload  module.

This patch move closure debug file into "bcache" debug direcory
so that the file can get deleted properly.

Signed-off-by: Chengguang Xu &lt;cgxu519@gmx.com&gt;
Reviewed-by: Michael Lyle &lt;mlyle@lyle.org&gt;
Reviewed-by: Tang Junhui &lt;tang.junhui@zte.com.cn&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>bcache: mark closure_sync() __sched</title>
<updated>2018-01-08T20:29:00Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2018-01-08T20:21:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ce439bf78b4850cadb1e67f0d4a48178d489c75d'/>
<id>urn:sha1:ce439bf78b4850cadb1e67f0d4a48178d489c75d</id>
<content type='text'>
[edit by mlyle: include sched/debug.h to get __sched]

Signed-off-by: Kent Overstreet &lt;kent.overstreet@gmail.com&gt;
Signed-off-by: Michael Lyle &lt;mlyle@lyle.org&gt;
Reviewed-by: Michael Lyle &lt;mlyle@lyle.org&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>bcache: Fix, improve efficiency of closure_sync()</title>
<updated>2018-01-08T20:29:00Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2018-01-08T20:21:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e4bf791937d82afca79e1df4063f72dbc6960ac7'/>
<id>urn:sha1:e4bf791937d82afca79e1df4063f72dbc6960ac7</id>
<content type='text'>
Eliminates cases where sync can race and fail to complete / get stuck.
Removes many status flags and simplifies entering-and-exiting closure
sleeping behaviors.

[mlyle: fixed conflicts due to changed return behavior in mainline.
extended commit comment, and squashed down two commits that were mostly
contradictory to get to this state.  Changed __set_current_state to
set_current_state per Jens review comment]

Signed-off-by: Kent Overstreet &lt;kent.overstreet@gmail.com&gt;
Signed-off-by: Michael Lyle &lt;mlyle@lyle.org&gt;
Reviewed-by: Michael Lyle &lt;mlyle@lyle.org&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>bcache: use llist_for_each_entry_safe() in __closure_wake_up()</title>
<updated>2017-09-27T20:54:49Z</updated>
<author>
<name>Coly Li</name>
</author>
<published>2017-09-26T09:54:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a5f3d8a5eaaf917878f07998e6f1ea46024e6bab'/>
<id>urn:sha1:a5f3d8a5eaaf917878f07998e6f1ea46024e6bab</id>
<content type='text'>
Commit 09b3efec ("bcache: Don't reinvent the wheel but use existing llist
API") replaces the following while loop by llist_for_each_entry(),

-
-	while (reverse) {
-		cl = container_of(reverse, struct closure, list);
-		reverse = llist_next(reverse);
-
+	llist_for_each_entry(cl, reverse, list) {
 		closure_set_waiting(cl, 0);
 		closure_sub(cl, CLOSURE_WAITING + 1);
 	}

This modification introduces a potential race by iterating a corrupted
list. Here is how it happens.

In the above modification, closure_sub() may wake up a process which is
waiting on reverse list. If this process decides to wait again by calling
closure_wait(), its cl-&gt;list will be added to another wait list. Then
when llist_for_each_entry() continues to iterate next node, it will travel
on another new wait list which is added in closure_wait(), not the
original reverse list in __closure_wake_up(). It is more probably to
happen on UP machine because the waked up process may preempt the process
which wakes up it.

Use llist_for_each_entry_safe() will fix the issue, the safe version fetch
next node before waking up a process. Then the copy of next node will make
sure list iteration stays on original reverse list.

Fixes: 09b3efec81de ("bcache: Don't reinvent the wheel but use existing llist API")
Signed-off-by: Coly Li &lt;colyli@suse.de&gt;
Reported-by: Michael Lyle &lt;mlyle@lyle.org&gt;
Reviewed-by: Byungchul Park &lt;byungchul.park@lge.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>bcache: Don't reinvent the wheel but use existing llist API</title>
<updated>2017-09-06T14:17:33Z</updated>
<author>
<name>Byungchul Park</name>
</author>
<published>2017-09-06T06:25:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=09b3efec81def807fb225359e34a8e72866dd9c4'/>
<id>urn:sha1:09b3efec81def807fb225359e34a8e72866dd9c4</id>
<content type='text'>
Although llist provides proper APIs, they are not used. Make them used.

Signed-off-by: Byungchul Park &lt;byungchul.park@lge.com&gt;
Acked-by: Coly Li &lt;colyli@suse.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>bcache: update document info</title>
<updated>2016-07-05T17:34:49Z</updated>
<author>
<name>Yijing Wang</name>
</author>
<published>2016-07-04T01:23:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7abc70d7007757ac1c0e87c57f39cd79f50a632f'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>bcache: Really show state of work pending bit</title>
<updated>2015-11-06T14:06:05Z</updated>
<author>
<name>Petr Mladek</name>
</author>
<published>2015-10-05T12:39:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8d090f47315507c3064ca4eefa9a1da52390b52e'/>
<id>urn:sha1:8d090f47315507c3064ca4eefa9a1da52390b52e</id>
<content type='text'>
WORK_STRUCT_PENDING is a mask for testing the pending bit.
test_bit() expects the number of the bit and we need to
use WORK_STRUCT_PENDING_BIT there.

Also work_data_bits() is defined in workqueues.h now.

I have noticed this just by chance when looking how
WORK_STRUCT_PENDING_BIT is used. The change is compile
tested.

Signed-off-by: Petr Mladek &lt;pmladek@suse.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>bcache: kill closure locking code</title>
<updated>2014-01-08T21:05:08Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2013-12-20T23:55:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1dd13c8d3c2d82e1b668d0b4754591291656542a'/>
<id>urn:sha1:1dd13c8d3c2d82e1b668d0b4754591291656542a</id>
<content type='text'>
Also flesh out the documentation a bit

Signed-off-by: Kent Overstreet &lt;kmo@daterainc.com&gt;
</content>
</entry>
<entry>
<title>bcache: Drop some closure stuff</title>
<updated>2013-11-11T05:56:10Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2013-11-02T01:03:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=faadf0c96547ec8277ad0abd6959f2ef48522f31'/>
<id>urn:sha1:faadf0c96547ec8277ad0abd6959f2ef48522f31</id>
<content type='text'>
With a the recent bcache refactoring, some of the closure code isn't
needed anymore.

Signed-off-by: Kent Overstreet &lt;kmo@daterainc.com&gt;
</content>
</entry>
</feed>
