Changelog
v2,
- use cache_set->flags to set io disable bit, suggested by Junhui.
- check CACHE_SET_IO_DISABLE in bch_btree_gc() to stop a while-loop, this
is reported and inspired from origal patch of Pavel Vazharov.
v1, initial version.
Signed-off-by: Coly Li <col...@suse.de>
Reviewed-b
ense, it is enough for most of
cache devices.
Changelog:
v2: add reviewed-by from Hannes.
v1: initial version for review.
Signed-off-by: Coly Li <col...@suse.de>
Reviewed-by: Hannes Reinecke <h...@suse.com>
Cc: Michael Lyle <ml...@lyle.org>
Cc: Junhui Tang <tang.jun...@zte.com.
s (e.g. hold dc->count, or
use locks), this is the only way I can find which works to properly stop
dc->writeback_rate_update delayed work.
Changelog:
v2: Try to fix the race issue which is pointed out by Junhui.
v1: The initial version for review
Signed-off-by: Coly Li <col...@suse.de>
Cc
ngelog:
v2: fix the race issue in v1 patch.
v1: initial buggy fix.
Signed-off-by: Coly Li <col...@suse.de>
Cc: Michael Lyle <ml...@lyle.org>
Cc: Hannes Reinecke <h...@suse.de>
Cc: Junhui Tang <tang.jun...@zte.com.cn>
---
drivers/md/bcache/alloc.c | 4 +++-
1 file changed, 3
or system reboot, cached_dev->count can always be used correctly.
The patch is simple, but understanding how it works is quite complicated.
Changelog:
v2: set dc->writeback_thread to NULL in this patch, as suggested by Hannes.
v1: inital version for review.
Signed-off-by: Coly Li <
d_dev_get(dc)) {
//will callback generic_end_io_acct()
}
else {
//will not call generic_end_io_acct()
}
This patch calls generic_end_io_acct() in the end of IO for detached
devices, so we can show IO state correctly.
(Modified to use GFP_NOIO in kzalloc() by Coly Li)
Signed-off-by: Tang Junh
connected.
Changelog:
v2: add reviewed-by from Hannes.
v1: initial version for review.
Signed-off-by: Coly Li <col...@suse.de>
Reviewed-by: Hannes Reinecke <h...@suse.com>
Cc: Junhui Tang <tang.jun...@zte.com.cn>
Cc: Michael Lyle <ml...@lyle.org>
---
drivers/md/bcache/super.
is warning message scares users,
makes them feel there might be something risky with bcache and hurt their
data. Setting task state to TASK_RUNNING before returning fixes this
problem.
Changelog:
v2: fix the race issue in v1 patch.
v1: initial buggy fix.
Signed-off-by: Coly Li <col...@s
or system reboot, cached_dev->count can always be used correctly.
The patch is simple, but understanding how it works is quite complicated.
Changelog:
v2: set dc->writeback_thread to NULL in this patch, as suggested by Hannes.
v1: inital version for review.
Signed-off-by: Coly Li <
ngelog:
v2: fix the race issue in v1 patch.
v1: initial buggy fix.
Signed-off-by: Coly Li <col...@suse.de>
Cc: Michael Lyle <ml...@lyle.org>
Cc: Hannes Reinecke <h...@suse.de>
Cc: Junhui Tang <tang.jun...@zte.com.cn>
---
drivers/md/bcache/alloc.c | 4 +++-
1 file changed, 3
es all problems found in v1 review.
add patches to handle backing device failure.
add one more patch to set writeback_rate_update_seconds range.
include a patch from Junhui Tang.
v1: the initial version, only handles cache device failure.
Coly Li (11):
bcache: set writeback_rate_update_s
to decide a
reasonable small timeout.
This patch limits sysfs interface to set dc->writeback_rate_update_seconds
in range of [1, 60] seconds, and replaces the hand-coded number by macros.
Signed-off-by: Coly Li <col...@suse.de>
---
drivers/md/bcache/sysfs.c | 3 +++
drivers/md/bcac
is warning message scares users,
makes them feel there might be something risky with bcache and hurt their
data. Setting task state to TASK_RUNNING before returning fixes this
problem.
Changelog:
v2: fix the race issue in v1 patch.
v1: initial buggy fix.
Signed-off-by: Coly Li <col...@s
es all problems found in v1 review.
add patches to handle backing device failure.
add one more patch to set writeback_rate_update_seconds range.
include a patch from Junhui Tang.
v1: the initial version, only handles cache device failure.
Coly Li (11):
bcache: set writeback_rate_update_s
to decide a
reasonable small timeout.
This patch limits sysfs interface to set dc->writeback_rate_update_seconds
in range of [1, 60] seconds, and replaces the hand-coded number by macros.
Signed-off-by: Coly Li <col...@suse.de>
---
drivers/md/bcache/sysfs.c | 3 +++
drivers/md/bcac
ense, it is enough for most of
cache devices.
Changelog:
v2: add reviewed-by from Hannes.
v1: initial version for review.
Signed-off-by: Coly Li <col...@suse.de>
Reviewed-by: Hannes Reinecke <h...@suse.com>
Cc: Michael Lyle <ml...@lyle.org>
Cc: Junhui Tang <tang.jun...@zte.com.
s (e.g. hold dc->count, or
use locks), this is the only way I can find which works to properly stop
dc->writeback_rate_update delayed work.
Changelog:
v2: Try to fix the race issue which is pointed out by Junhui.
v1: The initial version for review
Signed-off-by: Coly Li <col...@suse.de>
Cc
sers need to recovery the backing
device, register and attach it manually.
Changelog:
v2: this is new added in v2 patch set.
Signed-off-by: Coly Li <col...@suse.de>
Cc: Michael Lyle <ml...@lyle.org>
Cc: Hannes Reinecke <h...@suse.com>
Cc: Junhui Tang <tang.jun...@zte.com.cn>
---
sers need to recovery the backing
device, register and attach it manually.
Changelog:
v2: this is new added in v2 patch set.
Signed-off-by: Coly Li <col...@suse.de>
Cc: Michael Lyle <ml...@lyle.org>
Cc: Hannes Reinecke <h...@suse.com>
Cc: Junhui Tang <tang.jun...@zte.com.cn>
---
set.
Signed-off-by: Coly Li <col...@suse.de>
Cc: Junhui Tang <tang.jun...@zte.com.cn>
Cc: Michael Lyle <ml...@lyle.org>
---
drivers/md/bcache/request.c | 95 +++
drivers/md/bcache/super.c | 1 +
drivers/md/bcache/writeback.c | 1 +
3
set.
Signed-off-by: Coly Li <col...@suse.de>
Reviewed-by: Hannes Reinecke <h...@suse.com>
Cc: Junhui Tang <tang.jun...@zte.com.cn>
Cc: Michael Lyle <ml...@lyle.org>
---
drivers/md/bcache/request.c | 95 +++
drivers/md/bcache/super.
t patch "bcache: fix cached_dev->count
usage for bch_cache_set_error()" already gets a "Reviewed-by:" from Hannes
Reinecke. Also this fix is not trivial and good for a separate patch.
Signed-off-by: Coly Li <col...@suse.de>
Cc: Michael Lyle <ml...@lyle.org>
Cc: Hannes Reinecke
broken
or disconnected cache set is retiring.
When the cached device has dirty data on retiring cache set, if bcache
device is not stopped, following I/O request on the bcache device may
result data corruption on backing device. This patch also prints out warn-
ing information in kernel message.
Signed-off-by
: merge two similar fixes into one patch
v2: fix the race issue in v1 patch.
v1: initial buggy fix.
Signed-off-by: Coly Li <col...@suse.de>
Reviewed-by: Hannes Reinecke <h...@suse.de>
Cc: Michael Lyle <ml...@lyle.org>
Cc: Junhui Tang <tang.jun...@zte.com.cn>
---
drivers/
d_dev_get(dc)) {
//will callback generic_end_io_acct()
}
else {
//will not call generic_end_io_acct()
}
This patch calls generic_end_io_acct() in the end of IO for detached
devices, so we can show IO state correctly.
(Modified to use GFP_NOIO in kzalloc() by Coly Li)
Signed-off-by: Tang Junh
s (e.g. hold dc->count, or
use locks), this is the only way I can find which works to properly stop
dc->writeback_rate_update delayed work.
Changelog:
v2: Try to fix the race issue which is pointed out by Junhui.
v1: The initial version for review
Signed-off-by: Coly Li <col...@suse.de>
Cc
sers need to recovery the backing
device, register and attach it manually.
Signed-off-by: Coly Li <col...@suse.de>
Reviewed-by: Hannes Reinecke <h...@suse.com>
Cc: Michael Lyle <ml...@lyle.org>
Cc: Junhui Tang <tang.jun...@zte.com.cn>
---
drivers/md/bcache/bcache.h | 2 ++
to decide a
reasonable small timeout.
This patch limits sysfs interface to set dc->writeback_rate_update_seconds
in range of [1, 60] seconds, and replaces the hand-coded number by macros.
Signed-off-by: Coly Li <col...@suse.de>
Reviewed-by: Hannes Reinecke <h...@suse.com>
---
d
fix detach issue find in v2 patch set.
v2: fixes all problems found in v1 review.
add patches to handle backing device failure.
add one more patch to set writeback_rate_update_seconds range.
include a patch from Junhui Tang.
v1: the initial version, only handles cache device failure.
Col
or system reboot, cached_dev->count can always be used correctly.
The patch is simple, but understanding how it works is quite complicated.
Changelog:
v2: set dc->writeback_thread to NULL in this patch, as suggested by Hannes.
v1: initial version for review.
Signed-off-by: Coly Li <
broken
or disconnected cache set is retiring.
When the cached device has dirty data on retiring cache set, if bcache
device is not stopped, following I/O request on the bcache device may
result data corruption on backing device. This patch also prints out warn-
ing information in kernel message.
Signed-off-by
unhui,
It sounds great :-) Currently I am not very familiar with gc code, I
need some time to understand how bcache GC works before providing my
feedback. Please give me some time, I hope I am able to provide my
comment after Chinese Spring Festival.
Hope other people may have a look before I am able to.
Thanks.
Coly Li
[code snip]
e called. And in update_writeback_rate()
the bit BCACHE_DEV_RATE_DW_RUNNING is cleared after
schedule_delayed_work() returns, so the race is killed.
A mutex lock indicates an implicit memory barrier, and in your
suggestion up_read(>writeback_lock) is after schedule_delayed_work()
too. This is why I sa
On 29/01/2018 8:57 PM, Nix wrote:
> On 27 Jan 2018, Coly Li said:
>
>> Current bcache failure handling code will stop all attached bcache devices
>> when the cache set is broken or disconnected. This is desired behavior for
>> most of enterprise or cloud use cases, b
t patch "bcache: fix cached_dev->count
usage for bch_cache_set_error()" already gets a "Reviewed-by:" from Hannes
Reinecke. Also this fix is not trivial and good for a separate patch.
Signed-off-by: Coly Li <col...@suse.de>
Cc: Michael Lyle <ml...@lyle.org>
Cc: Hannes Reinecke
ense, it is enough for most of
cache devices.
Changelog:
v2: add reviewed-by from Hannes.
v1: initial version for review.
Signed-off-by: Coly Li <col...@suse.de>
Reviewed-by: Hannes Reinecke <h...@suse.com>
Reviewed-by: Tang Junhui <tang.jun...@zte.com.cn>
Cc: Junhui Tang &l
: merge two similar fixes into one patch
v2: fix the race issue in v1 patch.
v1: initial buggy fix.
Signed-off-by: Coly Li <col...@suse.de>
Reviewed-by: Hannes Reinecke <h...@suse.de>
Cc: Michael Lyle <ml...@lyle.org>
Cc: Junhui Tang <tang.jun...@zte.com.cn>
---
drivers/
to decide a
reasonable small timeout.
This patch limits sysfs interface to set dc->writeback_rate_update_seconds
in range of [1, 60] seconds, and replaces the hand-coded number by macros.
Signed-off-by: Coly Li <col...@suse.de>
Reviewed-by: Hannes Reinecke <h...@suse.com>
---
d
connected.
Changelog:
v2: add reviewed-by from Hannes.
v1: initial version for review.
Signed-off-by: Coly Li <col...@suse.de>
Reviewed-by: Hannes Reinecke <h...@suse.com>
Cc: Junhui Tang <tang.jun...@zte.com.cn>
Cc: Michael Lyle <ml...@lyle.org>
---
drivers/md/bcache/super.
ing device is broken of disconnected, and I/O errors
reach its error limit, backing device will be disabled and the associated
bcache device will be removed from system.
Changelog:
v2: indeed this is new added in v2 patch set.
Signed-off-by: Coly Li <col...@suse.de>
Reviewed-by: Hannes Re
exists but slower, for large
scale deployed environment, it is confused and misleading.
After thinking for a while, I feel the "auto"/"always" options can make
both enterprise and home users get an agreement. I am not able to find
other better solution so far, thank you for th
connected.
Changelog:
v2: add reviewed-by from Hannes.
v1: initial version for review.
Signed-off-by: Coly Li <col...@suse.de>
Reviewed-by: Hannes Reinecke <h...@suse.com>
Cc: Junhui Tang <tang.jun...@zte.com.cn>
Cc: Michael Lyle <ml...@lyle.org>
---
drivers/md/bcache/super.
set.
Signed-off-by: Coly Li <col...@suse.de>
Reviewed-by: Hannes Reinecke <h...@suse.com>
Cc: Junhui Tang <tang.jun...@zte.com.cn>
Cc: Michael Lyle <ml...@lyle.org>
---
drivers/md/bcache/request.c | 95 +++
drivers/md/bcache/super.
d_dev_get(dc)) {
//will callback generic_end_io_acct()
}
else {
//will not call generic_end_io_acct()
}
This patch calls generic_end_io_acct() in the end of IO for detached
devices, so we can show IO state correctly.
(Modified to use GFP_NOIO in kzalloc() by Coly Li)
Signed-off-by: Tang Junh
or system reboot, cached_dev->count can always be used correctly.
The patch is simple, but understanding how it works is quite complicated.
Changelog:
v2: set dc->writeback_thread to NULL in this patch, as suggested by Hannes.
v1: initial version for review.
Signed-off-by: Coly Li <
s (e.g. hold dc->count, or
use locks), this is the only way I can find which works to properly stop
dc->writeback_rate_update delayed work.
Changelog:
v2: Try to fix the race issue which is pointed out by Junhui.
v1: The initial version for review
Signed-off-by: Coly Li <col...@suse.de>
Cc
ense, it is enough for most of
cache devices.
Changelog:
v2: add reviewed-by from Hannes.
v1: initial version for review.
Signed-off-by: Coly Li <col...@suse.de>
Reviewed-by: Hannes Reinecke <h...@suse.com>
Reviewed-by: Tang Junhui <tang.jun...@zte.com.cn>
Cc: Junhui Tang &l
fix detach issue find in v2 patch set.
v2: fixes all problems found in v1 review.
add patches to handle backing device failure.
add one more patch to set writeback_rate_update_seconds range.
include a patch from Junhui Tang.
v1: the initial version, only handles cache device failure.
Col
ing device is broken of disconnected, and I/O errors
reach its error limit, backing device will be disabled and the associated
bcache device will be removed from system.
Changelog:
v2: indeed this is new added in v2 patch set.
Signed-off-by: Coly Li <col...@suse.de>
Reviewed-by: Hannes Re
more complicated.
OK, I get your point, it makes sense. This is just a rough thought from
me, the motivation was to avoid on-disk format change.
>
> Is there a way to save the option somewhere in bcache superblock, like the
> cache mode is saved?
>
It is possible to add flag in bcache superblock, but it means on disk
format modification, this is something I try best to avoid. I need to
check the code before I have the answer of yes or no.
>> How do you think of this ?
>
> Actually, I'd love to hear thoughts from other users and developers. Three
> opinions is too few for this kind of discussion.
Sure I agree. Indeed the suggestion and feedback for you and Nix helps
me quite a lot :-) Firstly I try to avoid data corruption and provide
flexibility to enterprise and personal users, then we can improve it in
future if someone may provide better suggestion than yours :-)
Thanks.
Coly Li
Changelog
v2, more changes by previous review,
- Use CACHE_SET_IO_DISABLE of cache_set->flags, suggested by Junhui.
- Check CACHE_SET_IO_DISABLE in bch_btree_gc() to stop a while-loop, this
is reported and inspired from origal patch of Pavel Vazharov.
v1, initial version.
Signed-off-by: Coly Li
EV_WB_RUNNING4
> +#define BCACHE_DEV_RATE_DW_RUNNING8
> Would be OK just as:
> +#define BCACHE_DEV_WB_RUNNING3
> +#define BCACHE_DEV_RATE_DW_RUNNING4
>
> Reviewed-by: Tang Junhui <tang.jun...@zte.com.cn>
>
Hi Junhui,
I will fix that in v5 patch. Thanks for your review :-)
Coly Li
[snip]
Changelog
v2, more changes by previous review,
- Use CACHE_SET_IO_DISABLE of cache_set->flags, suggested by Junhui.
- Check CACHE_SET_IO_DISABLE in bch_btree_gc() to stop a while-loop, this
is reported and inspired from origal patch of Pavel Vazharov.
v1, initial version.
Signed-off-by: Coly Li
gc() to stop a while-loop, this
is reported and inspired from origal patch of Pavel Vazharov.
v1, initial version.
Signed-off-by: Coly Li <col...@suse.de>
Reviewed-by: Hannes Reinecke <h...@suse.com>
Cc: Junhui Tang <tang.jun...@zte.com.cn>
Cc: Michael Lyle <ml...@l
d_dev_get(dc)) {
//will callback generic_end_io_acct()
}
else {
//will not call generic_end_io_acct()
}
This patch calls generic_end_io_acct() in the end of IO for detached
devices, so we can show IO state correctly.
(Modified to use GFP_NOIO in kzalloc() by Coly Li)
Signed-off-by: Tang Junh
a redundant bch_writeback_add() line
added in v4 patch set.
v1: indeed this is new added in this patch set.
Signed-off-by: Coly Li <col...@suse.de>
Reviewed-by: Hannes Reinecke <h...@suse.com>
Cc: Junhui Tang <tang.jun...@zte.com.cn>
Cc: Michael Lyle <ml...@lyle.org>
---
dri
compose a separte patch because that patch "bcache: fix cached_dev->count
usage for bch_cache_set_error()" already gets a "Reviewed-by:" from Hannes
Reinecke. Also this fix is not trivial and good for a separate patch.
Signed-off-by: Coly Li <col...@suse.de>
Cc: Michael Lyle &l
e which is pointed out by Junhui.
v1: The initial version for review
Signed-off-by: Coly Li <col...@suse.de>
Reviewed-by: Junhui Tang <tang.jun...@zte.com.cn>
Cc: Michael Lyle <ml...@lyle.org>
Cc: Hannes Reinecke <h...@suse.com>
---
drivers/md/bcache/bc
to decide a
reasonable small timeout.
This patch limits sysfs interface to set dc->writeback_rate_update_seconds
in range of [1, 60] seconds, and replaces the hand-coded number by macros.
Changelog:
v2: fix a rebase typo in v4, which is pointed out by Michael Lyle.
v1: initial version.
Signed-
or system reboot, cached_dev->count can always be used correctly.
The patch is simple, but understanding how it works is quite complicated.
Changelog:
v2: set dc->writeback_thread to NULL in this patch, as suggested by Hannes.
v1: initial version for review.
Signed-off-by: Coly Li <
issue find in v2 patch set.
v2: fixes all problems found in v1 review.
add patches to handle backing device failure.
add one more patch to set writeback_rate_update_seconds range.
include a patch from Junhui Tang.
v1: the initial version, only handles cache device failure.
Coly Li
Coly L
e.
v1: indeed this is new added in v2 patch set.
Signed-off-by: Coly Li <col...@suse.de>
Reviewed-by: Hannes Reinecke <h...@suse.com>
Cc: Michael Lyle <ml...@lyle.org>
Cc: Junhui Tang <tang.jun...@zte.com.cn>
---
drivers/md/bcache/bcache.h | 6 ++
drivers/md/bcache/i
sers need to recovery the backing
device, register and attach it manually.
Changelog:
v2: remove "bcache: " prefix when calling pr_warn().
v1: initial version.
Signed-off-by: Coly Li <col...@suse.de>
Reviewed-by: Hannes Reinecke <h...@suse.com>
Cc: Michael Lyle <ml...@l
On 06/02/2018 6:50 PM, Nix wrote:
> On 6 Feb 2018, Coly Li verbalised:
>> diff --git a/drivers/md/bcache/bcache.h b/drivers/md/bcache/bcache.h
>> index 7917b3820dd5..263164490833 100644
>> --- a/drivers/md/bcache/bcache.h
>> +++ b/drivers/md/bcache/bcache.h
>&g
ice.
Changelog:
v3: fix typos pointed out by Nix.
v2: change option values of stop_when_cache_set_failed from 1/0 to
"auto"/"always".
v1: initial version, stop_when_cache_set_failed can be 0 (not stop) or 1
(always stop).
Signed-off-by: Coly Li <col...@suse.de>
Cc: N
e which is pointed out by Junhui.
v1: The initial version for review
Signed-off-by: Coly Li <col...@suse.de>
Reviewed-by: Junhui Tang <tang.jun...@zte.com.cn>
Cc: Michael Lyle <ml...@lyle.org>
Cc: Hannes Reinecke <h...@suse.com>
---
drivers/md/bcache/bc
compose a separte patch because that patch "bcache: fix cached_dev->count
usage for bch_cache_set_error()" already gets a "Reviewed-by:" from Hannes
Reinecke. Also this fix is not trivial and good for a separate patch.
Signed-off-by: Coly Li <col...@suse.de>
, only handles cache device failure.
Coly Li
---
Coly Li (8):
bcache: fix cached_dev->count usage for bch_cache_set_error()
bcache: quit dc->writeback_thread when BCACHE_DEV_DETACHING is set
bcache: stop dc->writeback_rate_update properly
bcache: add CACHE_SET_IO_DISABLE to struct
or system reboot, cached_dev->count can always be used correctly.
The patch is simple, but understanding how it works is quite complicated.
Changelog:
v2: set dc->writeback_thread to NULL in this patch, as suggested by Hannes.
v1: initial version for review.
Signed-off-by: Coly Li <
a redundant bch_writeback_add() line
added in v4 patch set.
v1: indeed this is new added in this patch set.
Signed-off-by: Coly Li <col...@suse.de>
Reviewed-by: Hannes Reinecke <h...@suse.com>
Cc: Junhui Tang <tang.jun...@zte.com.cn>
Cc: Michael Lyle <ml...@lyle.org>
---
dri
d_dev_get(dc)) {
//will callback generic_end_io_acct()
}
else {
//will not call generic_end_io_acct()
}
This patch calls generic_end_io_acct() in the end of IO for detached
devices, so we can show IO state correctly.
(Modified to use GFP_NOIO in kzalloc() by Coly Li)
Changelog:
v2:
ice.
Changelog:
v3: fix typos pointed out by Nix.
v2: change option values of stop_when_cache_set_failed from 1/0 to
"auto"/"always".
v1: initial version, stop_when_cache_set_failed can be 0 (not stop) or 1
(always stop).
Signed-off-by: Coly Li <col...@suse.de>
Review
sers need to recovery the backing
device, register and attach it manually.
Changelog:
v2: remove "bcache: " prefix when calling pr_warn().
v1: initial version.
Signed-off-by: Coly Li <col...@suse.de>
Reviewed-by: Hannes Reinecke <h...@suse.com>
Cc: Michael Lyle <ml...@l
e.
v1: indeed this is new added in v2 patch set.
Signed-off-by: Coly Li <col...@suse.de>
Reviewed-by: Hannes Reinecke <h...@suse.com>
Cc: Michael Lyle <ml...@lyle.org>
Cc: Junhui Tang <tang.jun...@zte.com.cn>
---
drivers/md/bcache/bcache.h | 6 ++
drivers/md/bcache/i
gc() to stop a while-loop, this
is reported and inspired from origal patch of Pavel Vazharov.
v1, initial version.
Signed-off-by: Coly Li <col...@suse.de>
Reviewed-by: Hannes Reinecke <h...@suse.com>
Cc: Junhui Tang <tang.jun...@zte.com.cn>
Cc: Michael Lyle <ml...@l
ng.
>
> This patch fix the problem by calling generic_end_io_acct() with
> (struct bcache_device)->disk.
>
> Signed-off-by: Zhai Zhaoxuan <kxuan...@gmail.com>
Hi Zhaoxuan,
Nice catch, it makes sense. Thanks.
Reviewed-by: Coly Li <col...@suse.de>
One more question,
On 03/01/2018 3:05 PM, Zhaoxuan wrote:
>
> On 03/01/2018 13:45 PM, Coly Li wrote:
>> On 03/01/2018 12:39 PM, Zhai Zhaoxuan wrote:
>>> The function cached_dev_make_request() and flash_dev_make_request() call
>>> generic_start_io_acct() with (struct bcache_dev
han current idle writeback, but half as fast as writeback with full
> device utilization.
>
Nice performance data!
> With only one I/O outstanding at a time, if front-end I/O starts latency
> for the first request is still good.
It is good idea, I like it.
Acked-by: Coly Li <col...@suse.de>
Thanks for the effort :-)
Coly Li
onds after cancel_delayed_work_sync() called, a NULL
pointer
difference oops happens. Cache set memory is freed within 2 seconds
after __cache_set_unregister() called, so inside
__update_writeback_rate() struct cache_set is referenced and causes the
NULL pointer deference bug.
There are s
On 04/01/2018 1:07 AM, Michael Lyle wrote:
> Hey Coly,
>
> On 01/03/2018 06:03 AM, Coly Li wrote:
> [snip]
>> The first 8 patches of this patch set is to fix existing bugs in bcache,
>> the last 2 patches do the real improvement. Order of applying these patches
>&g
c->caching
is still hold and cache set memory will only be freed after
cancel_delayed_work_sync() returns and refcount of c->caching dropped.
And in cached_dev_free(), bcache_device_free() and
kobject_put(>disk.kobj) are called after cancel_delayed_work_sync()
returns. Therefore when update_writeback_rate() is executing and
accessing c->flgas inside, memory of cache_set, bcache_device and
cached_dev are all there.
This is why it is safe ;-)
Coly Li
On 2018/7/28 3:32 AM, Noah Massey wrote:
> On Fri, Jul 27, 2018 at 1:37 PM Noah Massey wrote:
>> On Thu, Jul 26, 2018, 10:23 AM Coly Li wrote:
>>>
>>> Global variable bcache_debug is firstly initialized in bch_debug_init(),
>>> and destroyed in bch_debu
On 2018/7/26 1:44 PM, Stefan Priebe - Profihost AG wrote:
>> Am 25.07.2018 um 08:16 schrieb Stefan Priebe - Profihost AG
>> :
>>
>>> Am 24.07.2018 um 18:36 schrieb Coly Li:
>>>> On 2018/7/24 4:33 PM, Stefan Priebe - Profihost AG wrote:
>>>>>
an updated format in the
future it can be fixed. We still have a long time before the overflow
and checking the tools at https://github.com/koverstreet/bcache-tools
reveals no access to any of them.
Signed-off-by: Arnd Bergmann
Signed-off-by: Coly Li
---
drivers/md/bcache/super.c | 12
From: Shenghui Wang
Free the cache_set->flush_bree heap memory on journal free.
Signed-off-by: Wang Sheng-Hui
Signed-off-by: Coly Li
---
drivers/md/bcache/journal.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/md/bcache/journal.c b/drivers/md/bcache/journal.c
in
From: Florian Schmaus
Fixes an error condition reported by checkpatch.pl which is caused by
assigning a variable in an if condition.
Signed-off-by: Florian Schmaus
Signed-off-by: Coly Li
---
drivers/md/bcache/super.c | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
diff
data of the
device in an incremental way, and do not block other cached devices all the
time.
Patch v2: Rename some variables and macros name as Coly suggested.
Signed-off-by: Tang Junhui
Signed-off-by: Coly Li
---
drivers/md/bcache/writeback.c | 29 ++---
1 file changed
From: Florian Schmaus
Fixes an error condition reported by checkpatch.pl which is caused by
assigning a variable in an if condition.
Signed-off-by: Florian Schmaus
Signed-off-by: Coly Li
---
drivers/md/bcache/super.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git
are for recoganized performance improvement,
these patches are posted for monthes and good to me.
Please pick the first wave for 4.19. Thanks in advance.
Coly Li
---
Arnd Bergmann (1):
bcache: stop using the deprecated get_seconds()
Florian Schmaus (3):
bcache: do not assign in if condition
of flash only devices dirty data in real time,
so we didn't need to calculate the total amount of dirty data any more.
Signed-off-by: Tang Junhui
Signed-off-by: Coly Li
---
drivers/md/bcache/bcache.h| 1 +
drivers/md/bcache/super.c | 2 ++
drivers/md/bcache/writeback.c | 5
ocess more nodes each
time, otherwise GC will process less nodes each time (but no less than
MIN_GC_NODES).
Signed-off-by: Tang Junhui
Signed-off-by: Coly Li
---
drivers/md/bcache/btree.c | 37 +++--
1 file changed, 35 insertions(+), 2 deletions(-)
diff --git a/
are not blocked all the time, and
there is no obvious I/Os zero jump problem any more.
Patch v2: Rename some variables and macros name as Coly suggested.
Signed-off-by: Tang Junhui
Signed-off-by: Coly Li
---
drivers/md/bcache/bcache.h | 5 +
drivers/md/bcache/btree.c | 14 +-
drivers/md
From: Florian Schmaus
Fixes an error condition reported by checkpatch.pl which is caused by
assigning a variable in an if condition.
Signed-off-by: Florian Schmaus
Signed-off-by: Coly Li
---
drivers/md/bcache/super.c | 16 +++-
1 file changed, 11 insertions(+), 5 deletions
he: allow quick writeback when backing idle")
Cc: sta...@vger.kernel.org #4.16+
Signed-off-by: Coly Li
Tested-by: Kai Krakow
Cc: Michael Lyle
Cc: Stefan Priebe
---
Channgelog:
v3, Do not acquire bch_register_lock in set_at_max_writeback_rate().
v2, Fix a deadlock reported by Stefan Priebe.
On 2018/7/26 7:49 PM, Stefan Priebe - Profihost AG wrote:
> Am 26.07.2018 um 12:42 schrieb Coly Li:
>> Commit b1092c9af9ed ("bcache: allow quick writeback when backing idle")
>> allows the writeback rate to be faster if there is no I/O request on a
>> bcache device.
---
drivers/md/bcache/request.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c
index 8eece9ef9f46..91206f329971 100644
--- a/drivers/md/bcache/request.c
+++ b/drivers/md/bcache/request.c
@@ -107,7 +107,7 @@ static int
l varabile bcache_debug to be NULL, to make
the failure code path to be predictable.
Signed-off-by: Coly Li
---
drivers/md/bcache/debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/bcache/debug.c b/drivers/md/bcache/debug.c
index 57f8f5aeee55..24b0eb65d
from me misrepresentation.
Signed-off-by: Coly Li
---
drivers/md/bcache/bset.c | 63
1 file changed, 63 insertions(+)
diff --git a/drivers/md/bcache/bset.c b/drivers/md/bcache/bset.c
index f3403b45bc28..596c93b44e9b 100644
--- a/drivers/md/bcache/bset.c
() and closure_debug_init(). This patch
changes these two functions from int to void type, and ignore return values
of debugfs_create_dir().
This patch does not fix exact bug, just makes things work as they should.
Signed-off-by: Coly Li
Suggested-by: Greg Kroah-Hartman
Cc: Kai Krakow
Cc: Kent
Hi folks,
I ask for help to review these patches, some of them are posted for months.
They are OK with my test for a while, still tt would be great to have more
reviewer before these patches go into v4.19.
Thanks in advance.
Coly Li
---
Coly Li (9):
bcache: do not check return value
201 - 300 of 503 matches
Mail list logo