[PATCH] block: remove unnecessary condition check

2018-08-27 Thread Chengguang Xu
kmem_cache_destroy() can handle NULL pointer correctly, so there is no need to check e->icq_cache before calling kmem_cache_destroy(). Signed-off-by: Chengguang Xu --- block/elevator.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/elevator.c b/block/elevato

[PATCH] block: change return type to bool

2018-08-16 Thread Chengguang Xu
Because blk_do_io_stat() only does a judgement about the request contributes to IO statistics, it better changes return type to bool. Signed-off-by: Chengguang Xu --- block/blk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk.h b/block/blk.h index d4d67e948920

[PATCH] blk-throttle: return proper bool type to caller instead of 0/1

2018-05-29 Thread Chengguang Xu
Change to return true/false only for bool type return code. Signed-off-by: Chengguang Xu --- block/blk-throttle.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/block/blk-throttle.c b/block/blk-throttle.c index c5a1316..3155dee 100644 --- a/block/blk-throttle.c

Re: [PATCH v2] bcache: move closure debug file into debug direcotry

2018-03-06 Thread Chengguang Xu
Hi Mike I'm really sorry for the inconvenient, in my test box it can compile with no error, so I didn't notice that before, I've sent modified v2 version for the problem. > Sent: Wednesday, March 07, 2018 at 10:54 AM > From: "Michael Lyle" <ml...@lyle.org> >

[PATCH v2] bcache: move closure debug file into debug direcotry

2018-03-06 Thread Chengguang Xu
t the file can get deleted properly. Signed-off-by: Chengguang Xu <cgxu...@gmx.com> --- Changes since v1: - Rename dentry name of debug directory to "bcache_debug" from "debug" to avoid compile error. drivers/md/bcache/closure.c | 9 + drivers/md/bcache/closure.h |

[PATCH v2] bcache: move closure debug file into debug direcotry

2018-03-04 Thread Chengguang Xu
t the file can get deleted properly. Signed-off-by: Chengguang Xu <cgxu...@gmx.com> --- Changes since v1: - Move closure debug file into "bcache" debug direcory instead of deleting it individually. - Change Signed-off-by mail address. drivers/md/bcache/closure.c | 9 + drive

Re: [PATCH] bcache: remove closure debug file when unloading module

2018-03-04 Thread Chengguang Xu
for your review. > >> This fix introduces closure_debug_exit to handle removing >> operation properly. >> >> Signed-off-by: Chengguang Xu <cgxu...@icloud.com> >> --- >> drivers/md/bcache/closure.c | 5 + >> drivers/md/bcache/closure.h | 2 ++ >

Re: [PATCH] blk-throttle: avoid multiple counting for same bio

2018-02-22 Thread Chengguang Xu
Hi Joseph, Thanks for quick reply, I didn’t notice that patch before. Thanks, Chengguang. > 在 2018年2月23日,上午11:55,Joseph Qi <jiangqi...@gmail.com> 写道: > > > > On 18/2/23 11:33, Chengguang Xu wrote: >> Hi Tejun, >> >> Sorry for delayed reply, I was on

Re: [PATCH] blk-throttle: avoid multiple counting for same bio

2018-02-22 Thread Chengguang Xu
pied, 102.411 s, 10.5 MB/s 8:16 rbytes=1077314048 wbytes=0 rios=572 wios=0 ——— > 在 2018年2月13日,下午10:43,Tejun Heo <t...@kernel.org> 写道: > > On Tue, Feb 13, 2018 at 02:45:50PM +0800, Chengguang Xu wrote: >> In current throttling/upper lim

[PATCH] blk-throttle: avoid multiple counting for same bio

2018-02-12 Thread Chengguang Xu
counting for same bio. Signed-off-by: Chengguang Xu <cgxu...@icloud.com> --- include/linux/blk-cgroup.h | 4 include/linux/blk_types.h | 1 + 2 files changed, 5 insertions(+) diff --git a/include/linux/blk-cgroup.h b/include/linux/blk-cgroup.h index 69bea82..6c77711 100644 --- a/include

Question about strange phenomenon of cgroup blkio stat

2018-02-11 Thread Chengguang Xu
Hi All I’m new to cgroup and block layer, recently I found a strange phenomenon in cgroup blkio stat as blow. I setup a blkio cgroup and wrote 1GB data in direct mode, but the stat indicated almost wrote 2.56GB, I tested several times in physical machine on cgroup v1 & v2 and both were same