[RFC PATCH v3 0/3] make jbd2 debug switch per device

2021-01-27 Thread Chunguang Xu
ost. However, usually this will not have much impact on debugging. Chunguang Xu (3): jbd2: make jdb2_debug module parameter per device jbd2: update the arguments of jbd_debug() ext4: update the arguments of jbd_debug() fs/ext4/balloc.c | 2 +- fs/ext4/ext4_jbd2.c | 4 +- fs/e

[RFC PATCH v3 3/3] ext4: update the arguments of jbd_debug()

2021-01-27 Thread Chunguang Xu
From: Chunguang Xu In order to support jbd2 per device debugging switch, here we need to replace jbd_debug with a new log interface. But there is a small disadvantage here. Because the debugging switch is placed in the journal_t object, the log before the object is initialized will be lost

[RFC PATCH v3 2/3] jbd2: update the arguments of jbd_debug()

2021-01-27 Thread Chunguang Xu
From: Chunguang Xu In order to support jbd2 per device debugging switch, here we need to replace jbd_debug with a new log interface. But there is a small disadvantage here. Because the debugging switch is placed in the journal_t object, the log before the object is initialized will be lost

[RFC PATCH v3 1/3] jbd2: make jdb2_debug module parameter per device

2021-01-27 Thread Chunguang Xu
From: Chunguang Xu On a multi-disk machine, because jbd2's debugging switch is global,this confuses the logs of multiple disks. It is not easy to distinguish the logs of each disk and the amount of generated logs is very large. Or a separate debugging switch for each disk would be better, so

[RFC PATCH v2 3/4] jbd2: replace jbd_debug with the new log interface

2021-01-23 Thread Chunguang Xu
From: Chunguang Xu In order to support jbd2 per device debugging switch, here we need to replace jbd_debug with a new log interface. But there is a small disadvantage here. Because the debugging switch is placed in the journal_t object, the log before the object is initialized will be lost

[RFC PATCH v2 0/4] make jbd2 debug switch per device

2021-01-23 Thread Chunguang Xu
ost. However, usually this will not have much impact on debugging. Chunguang Xu (4): jbd2: make jdb2_debug module parameter per device jbd2: introduce some new log interfaces jbd2: replace jbd_debug with the new log interface ext4: replace jbd_debug with the new log interface fs/ext4/ballo

[RFC PATCH v2 4/4] ext4: replace jbd_debug with the new log interface

2021-01-23 Thread Chunguang Xu
From: Chunguang Xu In order to support jbd2 per device debugging switch, here we need to replace jbd_debug with a new log interface. But there is a small disadvantage here. Because the debugging switch is placed in the journal_t object, the log before the object is initialized will be lost

[RFC PATCH v2 1/4] jbd2: make jdb2_debug module parameter per device

2021-01-23 Thread Chunguang Xu
From: Chunguang Xu On a multi-disk machine, because jbd2's debugging switch is global,this confuses the logs of multiple disks. It is not easy to distinguish the logs of each disk and the amount of generated logs is very large. Maybe a separate debugging switch for each disk would be better, so

[RFC PATCH v2 2/4] jbd2: introduce some new log interfaces

2021-01-23 Thread Chunguang Xu
From: Chunguang Xu Compared to directly using numbers to indicate levels, using abstract error, warn, notice, info, debug to indicate levels may be more convenient for code reading and writing. Similar to other kernel modules, some basic log interfaces are introduced. Signed-off-by: Chunguang

[RFC PATCH 1/4] jbd2: make jdb2_debug module parameter per device

2021-01-21 Thread Chunguang Xu
From: Chunguang Xu On a multi-disk machine, because jbd2's debugging switch is global,this confuses the logs of multiple disks. It is not easy to distinguish the logs of each disk and the amount of generated logs is very large. Or a separate debugging switch for each disk would be better, so

[RFC PATCH 3/4] jbd2: replace jbd_debug with the new log interface

2021-01-21 Thread Chunguang Xu
From: Chunguang Xu In order to support jbd2 per device debugging switch, here we need to replace jbd_debug with a new log interface. But there is a small disadvantage here. Because the debugging switch is placed in the journal_t object, the log before the object is initialized will be lost

[RFC PATCH 4/4] ext4: replace jbd_debug with the new log interface

2021-01-21 Thread Chunguang Xu
From: Chunguang Xu In order to support jbd2 per device debugging switch, here we need to replace jbd_debug with a new log interface. But there is a small disadvantage here. Because the debugging switch is placed in the journal_t object, the log before the object is initialized will be lost

[RFC PATCH 2/4] jbd2: introduce some new log interfaces

2021-01-21 Thread Chunguang Xu
From: Chunguang Xu Compared to directly using numbers to indicate levels, using abstract error, warn, notice, info, debug to indicate levels may be more convenient for code reading and writing. Similar to other kernel modules, some basic log interfaces are introduced. Signed-off-by: Chunguang

[RFC PATCH 0/4] make jbd2 debug switch per device

2021-01-21 Thread Chunguang Xu
ost. However, usually this will not have much impact on debugging. Chunguang Xu (4): jbd2: make jdb2_debug module parameter per device jbd2: introduce some new log interfaces jbd2: replace jbd_debug with the new log interface ext4: replace jbd_debug with the new log interface fs/ext4/ballo

[tip: timers/urgent] timekeeping: Remove unused get_seconds()

2021-01-12 Thread tip-bot2 for Chunguang Xu
The following commit has been merged into the timers/urgent branch of tip: Commit-ID: aba428a0c612bb259891307da12e22efd0fab14c Gitweb: https://git.kernel.org/tip/aba428a0c612bb259891307da12e22efd0fab14c Author:Chunguang Xu AuthorDate:Tue, 01 Dec 2020 17:52:31 +08:00

[PATCH] block: introduce for_each_rq_qos macro

2021-01-06 Thread Chunguang Xu
From: Chunguang Xu Compared to direct pointer traversal, introducing a macro will make the code more concise. But the introduction of macros will make rq_qos_xxx() produce a redundant judgment, usually this may not be a big problem. Signed-off-by: Chunguang Xu --- block/blk-rq-qos.c | 45

[PATCH] timekeeping: remove unused get_seconds()

2020-12-01 Thread Chunguang Xu
From: Chunguang Xu The get_seconds() cleanup seems to have been completed, now it is time to delete the legacy interface to avoid misuse later. Signed-off-by: Chunguang Xu --- include/linux/ktime.h | 1 - include/linux/timekeeping32.h | 14 -- kernel/time/timekeeping.c

[PATCH 03/23] KVM: use ASSERT_FAIL()/ASSERT_WARN() to cleanup some code

2020-08-27 Thread Chunguang Xu
Since ASSERT_FAIL() and ASSERT_WARN() have been provided, ASSERT() may be realized through them, thus reducing code redundancy and facilitating problem analysis. Signed-off-by: Chunguang Xu --- arch/x86/kvm/ioapic.h | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git

[PATCH 05/23] scsi: use ASSERT_FAIL()/ASSERT_WARN() to cleanup some code

2020-08-27 Thread Chunguang Xu
Since ASSERT_FAIL() and ASSERT_WARN() have been provided, ASSERT() may be realized through them, thus reducing code redundancy and facilitating problem analysis. Signed-off-by: Chunguang Xu --- drivers/scsi/megaraid/mega_common.h | 10 ++ 1 file changed, 2 insertions(+), 8 deletions

[PATCH 02/23] ia64: use ASSERT_FAIL()/ASSERT_WARN() to cleanup some code

2020-08-27 Thread Chunguang Xu
Since ASSERT_FAIL() and ASSERT_WARN() have been provided, ASSERT() may be realized through them, thus reducing code redundancy and facilitating problem analysis. Signed-off-by: Chunguang Xu --- arch/ia64/hp/common/sba_iommu.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff

[PATCH 07/23] lib/mpi: use ASSERT_FAIL()/ASSERT_WARN() to cleanup some code

2020-08-27 Thread Chunguang Xu
Since ASSERT_FAIL() and ASSERT_WARN() have been provided, ASSERT() may be realized through them, thus reducing code redundancy and facilitating problem analysis. Signed-off-by: Chunguang Xu --- lib/mpi/mpi-internal.h | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib

[PATCH 06/23] rxrpc: use ASSERT_FAIL()/ASSERT_WARN() to cleanup some code

2020-08-27 Thread Chunguang Xu
Since ASSERT_FAIL() and ASSERT_WARN() have been provided, ASSERT() may be realized through them, thus reducing code redundancy and facilitating problem analysis. Signed-off-by: Chunguang Xu --- net/rxrpc/ar-internal.h | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git

[PATCH 01/23] include/asm-generic/bug.h: add ASSERT_FAIL() and ASSERT_WARN() wrapper

2020-08-27 Thread Chunguang Xu
and facilitate problem analysis. Signed-off-by: Chunguang Xu --- include/asm-generic/bug.h | 33 + 1 file changed, 33 insertions(+) diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index 18b0f4e..28f8c27 100644 --- a/include/asm-generic/bug.h +++ b

[PATCH 10/23] btrfs: use ASSERT_FAIL()/ASSERT_WARN() to cleanup some code

2020-08-27 Thread Chunguang Xu
Since ASSERT_FAIL() and ASSERT_WARN() have been provided, ASSERT() may be realized through them, thus reducing code redundancy and facilitating problem analysis. Signed-off-by: Chunguang Xu --- fs/btrfs/ctree.h | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/fs

[PATCH 11/23] afs: use ASSERT_FAIL()/ASSERT_WARN() to cleanup some code

2020-08-27 Thread Chunguang Xu
Since ASSERT_FAIL() and ASSERT_WARN() have been provided, ASSERT() may be realized through them, thus reducing code redundancy and facilitating problem analysis. Signed-off-by: Chunguang Xu --- fs/afs/internal.h | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/fs/afs

[PATCH 14/23] fbdev/cirrusfb:: use ASSERT_FAIL()/ASSERT_WARN() to cleanup some code

2020-08-27 Thread Chunguang Xu
Since ASSERT_FAIL() and ASSERT_WARN() have been provided, ASSERT() may be realized through them, thus reducing code redundancy and facilitating problem analysis. Signed-off-by: Chunguang Xu --- drivers/video/fbdev/cirrusfb.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git

[PATCH 16/23] sym53c8xx: use ASSERT_FAIL()/ASSERT_WARN() to cleanup some code

2020-08-27 Thread Chunguang Xu
Since ASSERT_FAIL() and ASSERT_WARN() have been provided, ASSERT() may be realized through them, thus reducing code redundancy and facilitating problem analysis. Signed-off-by: Chunguang Xu --- drivers/scsi/sym53c8xx_2/sym_hipd.h | 9 + 1 file changed, 1 insertion(+), 8 deletions

[PATCH 12/23] rivafb: use ASSERT_FAIL()/ASSERT_WARN() to cleanup some code

2020-08-27 Thread Chunguang Xu
Since ASSERT_FAIL() and ASSERT_WARN() have been provided, ASSERT() may be realized through them, thus reducing code redundancy and facilitating problem analysis. Signed-off-by: Chunguang Xu --- drivers/video/fbdev/riva/fbdev.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff

[PATCH 17/23] 8139too: use ASSERT_FAIL()/ASSERT_WARN() to cleanup some code

2020-08-27 Thread Chunguang Xu
Since ASSERT_FAIL() and ASSERT_WARN() have been provided, ASSERT() may be realized through them, thus reducing code redundancy and facilitating problem analysis. Signed-off-by: Chunguang Xu --- drivers/net/ethernet/realtek/8139too.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions

[PATCH 18/23] net:hns: use ASSERT_FAIL()/ASSERT_WARN() to cleanup some code

2020-08-27 Thread Chunguang Xu
Since ASSERT_FAIL() and ASSERT_WARN() have been provided, ASSERT() may be realized through them, thus reducing code redundancy and facilitating problem analysis. Signed-off-by: Chunguang Xu --- drivers/net/ethernet/hisilicon/hns/hnae.h | 8 +--- 1 file changed, 1 insertion(+), 7 deletions

[PATCH 09/23] cachefiles: use ASSERT_FAIL()/ASSERT_WARN() to cleanup some code

2020-08-27 Thread Chunguang Xu
Since ASSERT_FAIL() and ASSERT_WARN() have been provided, ASSERT() may be realized through them, thus reducing code redundancy and facilitating problem analysis. Signed-off-by: Chunguang Xu --- fs/cachefiles/internal.h | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git

[PATCH 20/23] skb: use ASSERT_FAIL()/ASSERT_WARN() to cleanup some code

2020-08-27 Thread Chunguang Xu
Since ASSERT_FAIL() and ASSERT_WARN() have been provided, ASSERT() may be realized through them, thus reducing code redundancy and facilitating problem analysis. Signed-off-by: Chunguang Xu --- drivers/block/skd_main.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git

[PATCH 22/23] rbd: use ASSERT_FAIL()/ASSERT_WARN() to cleanup some code

2020-08-27 Thread Chunguang Xu
Since ASSERT_FAIL() and ASSERT_WARN() have been provided, ASSERT() may be realized through them, thus reducing code redundancy and facilitating problem analysis. Signed-off-by: Chunguang Xu --- drivers/block/rbd.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git

[PATCH 21/23] ext4: use ASSERT_FAIL()/ASSERT_WARN() to cleanup some code

2020-08-27 Thread Chunguang Xu
Since ASSERT_FAIL() and ASSERT_WARN() have been provided, ASSERT() may be realized through them, thus reducing code redundancy and facilitating problem analysis. Signed-off-by: Chunguang Xu --- fs/ext4/mballoc.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/fs

[PATCH 23/23] ALSA: asihpi: use ASSERT_FAIL()/ASSERT_WARN() to cleanup some code

2020-08-27 Thread Chunguang Xu
Since ASSERT_FAIL() and ASSERT_WARN() have been provided, ASSERT() may be realized through them, thus reducing code redundancy and facilitating problem analysis. Signed-off-by: Chunguang Xu --- sound/pci/asihpi/hpidebug.h | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git

[PATCH 08/23] jfs: use ASSERT_FAIL()/ASSERT_WARN() to cleanup some code

2020-08-27 Thread Chunguang Xu
Since ASSERT_FAIL() and ASSERT_WARN() have been provided, ASSERT() may be realized through them, thus reducing code redundancy and facilitating problem analysis. Signed-off-by: Chunguang Xu --- fs/jfs/jfs_debug.h | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git

[PATCH 15/23] media/staging: use ASSERT_FAIL()/ASSERT_WARN() to cleanup some code

2020-08-27 Thread Chunguang Xu
Since ASSERT_FAIL() and ASSERT_WARN() have been provided, ASSERT() may be realized through them, thus reducing code redundancy and facilitating problem analysis. Signed-off-by: Chunguang Xu --- .../staging/media/atomisp/pci/hive_isp_css_include/assert_support.h | 6 +- 1 file changed, 1

[PATCH 00/23] clean up the code related to ASSERT()

2020-08-27 Thread Chunguang Xu
n up the code, maybe in other ways, and more discussion is needed here. If this approach is reasonable, I will clean up these codes later and issue related patches. Chunguang Xu (23): include/asm-generic/bug.h: add ASSERT_FAIL() and ASSERT_WARN() wrapper ia64: use ASSERT_FAIL()/ASSERT_WARN() to cleanup

[PATCH 19/23] block/sx8: use ASSERT_FAIL()/ASSERT_WARN() to cleanup some code

2020-08-27 Thread Chunguang Xu
Since ASSERT_FAIL() and ASSERT_WARN() have been provided, ASSERT() may be realized through them, thus reducing code redundancy and facilitating problem analysis. Signed-off-by: Chunguang Xu --- drivers/block/sx8.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers

[PATCH 13/23] nvidia: use ASSERT_FAIL()/ASSERT_WARN() to cleanup some code

2020-08-27 Thread Chunguang Xu
Since ASSERT_FAIL() and ASSERT_WARN() have been provided, ASSERT() may be realized through them, thus reducing code redundancy and facilitating problem analysis. Signed-off-by: Chunguang Xu --- drivers/video/fbdev/nvidia/nvidia.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff

[PATCH 04/23] fore200e: use ASSERT_FAIL()/ASSERT_WARN() to cleanup some code

2020-08-27 Thread Chunguang Xu
Since ASSERT_FAIL() and ASSERT_WARN() have been provided, ASSERT() may be realized through them, thus reducing code redundancy and facilitating problem analysis. Signed-off-by: Chunguang Xu --- drivers/atm/fore200e.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git