<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/md/bcache/super.c, branch linux-4.20.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.20.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.20.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-10-08T14:19:59+00:00</updated>
<entry>
<title>bcache: panic fix for making cache device</title>
<updated>2018-10-08T14:19:59+00:00</updated>
<author>
<name>Dongbo Cao</name>
<email>cdbdyx@163.com</email>
</author>
<published>2018-10-08T12:41:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3a646fd77684dd5fbe20748bb04e12077bbecddc'/>
<id>urn:sha1:3a646fd77684dd5fbe20748bb04e12077bbecddc</id>
<content type='text'>
when the nbuckets of cache device is smaller than 1024, making cache
device will trigger BUG_ON in kernel, add a condition to avoid this.

Reported-by: nitroxis &lt;n@nxs.re&gt;
Signed-off-by: Dongbo Cao &lt;cdbdyx@163.com&gt;
Signed-off-by: Coly Li &lt;colyli@suse.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>bcache: split combined if-condition code into separate ones</title>
<updated>2018-10-08T14:19:57+00:00</updated>
<author>
<name>Dongbo Cao</name>
<email>cdbdyx@163.com</email>
</author>
<published>2018-10-08T12:41:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f6027bca9e382efc4d4f28a2d9678e0a07428363'/>
<id>urn:sha1:f6027bca9e382efc4d4f28a2d9678e0a07428363</id>
<content type='text'>
Split the combined '||' statements in if() check, to make the code easier
for debug.

Signed-off-by: Dongbo Cao &lt;cdbdyx@163.com&gt;
Signed-off-by: Coly Li &lt;colyli@suse.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>bcache: remove useless parameter of bch_debug_init()</title>
<updated>2018-10-08T14:19:53+00:00</updated>
<author>
<name>Dongbo Cao</name>
<email>cdbdyx@163.com</email>
</author>
<published>2018-10-08T12:41:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=91bafdf081b8ad8ab4977918ee45dffe3d744060'/>
<id>urn:sha1:91bafdf081b8ad8ab4977918ee45dffe3d744060</id>
<content type='text'>
Parameter "struct kobject *kobj" in bch_debug_init() is useless,
remove it in this patch.

Signed-off-by: Dongbo Cao &lt;cdbdyx@163.com&gt;
Signed-off-by: Coly Li &lt;colyli@suse.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>bcache: recal cached_dev_sectors on detach</title>
<updated>2018-10-08T14:19:50+00:00</updated>
<author>
<name>Shenghui Wang</name>
<email>shhuiw@foxmail.com</email>
</author>
<published>2018-10-08T12:41:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=46010141da6677b81cc77f9b47f8ac62bd1cbfd3'/>
<id>urn:sha1:46010141da6677b81cc77f9b47f8ac62bd1cbfd3</id>
<content type='text'>
Recal cached_dev_sectors on cached_dev detached, as recal done on
cached_dev attached.

Update the cached_dev_sectors before bcache_device_detach called
as bcache_device_detach will set bcache_device-&gt;c to NULL.

Signed-off-by: Shenghui Wang &lt;shhuiw@foxmail.com&gt;
Signed-off-by: Coly Li &lt;colyli@suse.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>bcache: correct dirty data statistics</title>
<updated>2018-10-08T14:19:45+00:00</updated>
<author>
<name>Tang Junhui</name>
<email>tang.junhui.linux@gmail.com</email>
</author>
<published>2018-10-08T12:41:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2e17a262a2371d38d2ec03614a2675a32cef9912'/>
<id>urn:sha1:2e17a262a2371d38d2ec03614a2675a32cef9912</id>
<content type='text'>
When bcache device is clean, dirty keys may still exist after
journal replay, so we need to count these dirty keys even
device in clean status, otherwise after writeback, the amount
of dirty data would be incorrect.

Signed-off-by: Tang Junhui &lt;tang.junhui.linux@gmail.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Coly Li &lt;colyli@suse.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>bcache: fix ioctl in flash device</title>
<updated>2018-10-08T14:19:42+00:00</updated>
<author>
<name>Tang Junhui</name>
<email>tang.junhui.linux@gmail.com</email>
</author>
<published>2018-10-08T12:41:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dd0c91793b7c2658ea32c6b3a2247a8ceca45dc0'/>
<id>urn:sha1:dd0c91793b7c2658ea32c6b3a2247a8ceca45dc0</id>
<content type='text'>
When doing ioctl in flash device, it will call ioctl_dev() in super.c,
then we should not to get cached device since flash only device has
no backend device. This patch just move the jugement dc-&gt;io_disable
to cached_dev_ioctl() to make ioctl in flash device correctly.

Fixes: 0f0709e6bfc3c ("bcache: stop bcache device when backing device is offline")
Signed-off-by: Tang Junhui &lt;tang.junhui.linux@gmail.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Coly Li &lt;colyli@suse.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>bcache: account size of buckets used in uuid write to ca-&gt;meta_sectors_written</title>
<updated>2018-10-08T14:19:37+00:00</updated>
<author>
<name>Shenghui Wang</name>
<email>shhuiw@foxmail.com</email>
</author>
<published>2018-10-08T12:41:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7a55948d38eb9b274cbbdd56dc1dd4b96ebfbe04'/>
<id>urn:sha1:7a55948d38eb9b274cbbdd56dc1dd4b96ebfbe04</id>
<content type='text'>
UUIDs are considered as metadata. __uuid_write should add the number
of buckets (in sectors) written to disk to ca-&gt;meta_sectors_written.
Currently only 1 bucket is used in uuid write.

Steps to test:
1) create a fresh backing device and a fresh cache device separately.
   The backing device didn't attach to any cache set.
2) cd /sys/block/&lt;cache device&gt;/bcache
   cat metadata_written      // record the output value
   cat bucket_size
3) attach the backing device to cache set
4) cat metadata_written
   The output value is almost the same as the value in step 2
   before the change.
   After the change, the value is bigger about 1 bucket size.

Signed-off-by: Shenghui Wang &lt;shhuiw@foxmail.com&gt;
Reviewed-by: Tang Junhui &lt;tang.junhui.linux@gmail.com&gt;
Signed-off-by: Coly Li &lt;colyli@suse.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>bcache: add separate workqueue for journal_write to avoid deadlock</title>
<updated>2018-09-27T15:47:01+00:00</updated>
<author>
<name>Guoju Fang</name>
<email>fangguoju@gmail.com</email>
</author>
<published>2018-09-27T15:41:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0f843e65d9eef4936929bb036c5f771fb261eea4'/>
<id>urn:sha1:0f843e65d9eef4936929bb036c5f771fb261eea4</id>
<content type='text'>
After write SSD completed, bcache schedules journal_write work to
system_wq, which is a public workqueue in system, without WQ_MEM_RECLAIM
flag. system_wq is also a bound wq, and there may be no idle kworker on
current processor. Creating a new kworker may unfortunately need to
reclaim memory first, by shrinking cache and slab used by vfs, which
depends on bcache device. That's a deadlock.

This patch create a new workqueue for journal_write with WQ_MEM_RECLAIM
flag. It's rescuer thread will work to avoid the deadlock.

Signed-off-by: Guoju Fang &lt;fangguoju@gmail.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Coly Li &lt;colyli@suse.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>bcache: add the missing comments for smp_mb()/smp_wmb()</title>
<updated>2018-08-11T21:46:42+00:00</updated>
<author>
<name>Coly Li</name>
<email>colyli@suse.de</email>
</author>
<published>2018-08-11T05:20:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=eb2b3d034511f7f5f5fa781b9354ea4d5dbd4fc5'/>
<id>urn:sha1:eb2b3d034511f7f5f5fa781b9354ea4d5dbd4fc5</id>
<content type='text'>
Checkpatch.pl warns there are 2 locations of smp_mb() and smp_wmb()
without code comment. This patch adds the missing code comments for
these memory barrier calls.

Signed-off-by: Coly Li &lt;colyli@suse.de&gt;
Reviewed-by: Shenghui Wang &lt;shhuiw@foxmail.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>bcache: add missing SPDX header</title>
<updated>2018-08-11T21:46:42+00:00</updated>
<author>
<name>Coly Li</name>
<email>colyli@suse.de</email>
</author>
<published>2018-08-11T05:19:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=87418ef9f07ac6bc00af7992dc1ccd96da46cd68'/>
<id>urn:sha1:87418ef9f07ac6bc00af7992dc1ccd96da46cd68</id>
<content type='text'>
The SPDX header is missing fro closure.c, super.c and util.c, this
patch adds SPDX header for GPL-2.0 into these files.

Signed-off-by: Coly Li &lt;colyli@suse.de&gt;
Reviewed-by: Shenghui Wang &lt;shhuiw@foxmail.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
</feed>
