All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ext4: delete invalid comments near mb_buddy_adjust_border
@ 2020-09-28 11:36 Chunguang Xu
  2020-09-28 11:36 ` [PATCH] ext4: make mb_check_counter per group Chunguang Xu
  2020-10-03  5:11 ` [PATCH] ext4: delete invalid comments near mb_buddy_adjust_border Theodore Y. Ts'o
  0 siblings, 2 replies; 4+ messages in thread
From: Chunguang Xu @ 2020-09-28 11:36 UTC (permalink / raw)
  To: adilger.kernel, tytso; +Cc: linux-ext4

From: Chunguang Xu <brookxu@tencent.com>

The comment near mb_buddy_adjust_border seems meaningless, just
clear it.

Signed-off-by: Chunguang Xu <brookxu@tencent.com>
---
 fs/ext4/mballoc.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index e5ce7dc..b89a106 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -1397,9 +1397,6 @@ void ext4_set_bits(void *bm, int cur, int len)
 	}
 }
 
-/*
- * _________________________________________________________________ */
-
 static inline int mb_buddy_adjust_border(int* bit, void* bitmap, int side)
 {
 	if (mb_test_bit(*bit + side, bitmap)) {
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] ext4: make mb_check_counter per group
  2020-09-28 11:36 [PATCH] ext4: delete invalid comments near mb_buddy_adjust_border Chunguang Xu
@ 2020-09-28 11:36 ` Chunguang Xu
  2020-10-03  5:19   ` Theodore Y. Ts'o
  2020-10-03  5:11 ` [PATCH] ext4: delete invalid comments near mb_buddy_adjust_border Theodore Y. Ts'o
  1 sibling, 1 reply; 4+ messages in thread
From: Chunguang Xu @ 2020-09-28 11:36 UTC (permalink / raw)
  To: adilger.kernel, tytso; +Cc: linux-ext4

From: Chunguang Xu <brookxu@tencent.com>

Make bb_check_counter per group, so each group has the same chance
to be checked, which can expose errors more easily.

Signed-off-by: Chunguang Xu <brookxu@tencent.com>
---
 fs/ext4/ext4.h    | 3 +++
 fs/ext4/mballoc.c | 7 ++-----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 523e00d..b883a78 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -3153,6 +3153,9 @@ int ext4_update_disksize_before_punch(struct inode *inode, loff_t offset,
 
 struct ext4_group_info {
 	unsigned long   bb_state;
+#ifdef AGGRESSIVE_CHECK
+	unsigned long	bb_check_counter;
+#endif
 	struct rb_root  bb_free_root;
 	ext4_grpblk_t	bb_first_free;	/* first free block */
 	ext4_grpblk_t	bb_free;	/* total free blocks */
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 6487d5c..2705a4c 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -619,11 +619,8 @@ static int __mb_check_buddy(struct ext4_buddy *e4b, char *file,
 	void *buddy;
 	void *buddy2;
 
-	{
-		static int mb_check_counter;
-		if (mb_check_counter++ % 100 != 0)
-			return 0;
-	}
+	if (e4b->bd_info->bb_check_counter++ % 10)
+		return 0;
 
 	while (order > 1) {
 		buddy = mb_find_buddy(e4b, order, &max);
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ext4: delete invalid comments near mb_buddy_adjust_border
  2020-09-28 11:36 [PATCH] ext4: delete invalid comments near mb_buddy_adjust_border Chunguang Xu
  2020-09-28 11:36 ` [PATCH] ext4: make mb_check_counter per group Chunguang Xu
@ 2020-10-03  5:11 ` Theodore Y. Ts'o
  1 sibling, 0 replies; 4+ messages in thread
From: Theodore Y. Ts'o @ 2020-10-03  5:11 UTC (permalink / raw)
  To: Chunguang Xu; +Cc: adilger.kernel, linux-ext4

On Mon, Sep 28, 2020 at 07:36:34PM +0800, Chunguang Xu wrote:
> From: Chunguang Xu <brookxu@tencent.com>
> 
> The comment near mb_buddy_adjust_border seems meaningless, just
> clear it.
> 
> Signed-off-by: Chunguang Xu <brookxu@tencent.com>

Applied, thanks.

					- Ted

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ext4: make mb_check_counter per group
  2020-09-28 11:36 ` [PATCH] ext4: make mb_check_counter per group Chunguang Xu
@ 2020-10-03  5:19   ` Theodore Y. Ts'o
  0 siblings, 0 replies; 4+ messages in thread
From: Theodore Y. Ts'o @ 2020-10-03  5:19 UTC (permalink / raw)
  To: Chunguang Xu; +Cc: adilger.kernel, linux-ext4

On Mon, Sep 28, 2020 at 07:36:35PM +0800, Chunguang Xu wrote:
> From: Chunguang Xu <brookxu@tencent.com>
> 
> Make bb_check_counter per group, so each group has the same chance
> to be checked, which can expose errors more easily.
> 
> Signed-off-by: Chunguang Xu <brookxu@tencent.com>

Applied, thanks.

					- Ted

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-10-03  5:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-28 11:36 [PATCH] ext4: delete invalid comments near mb_buddy_adjust_border Chunguang Xu
2020-09-28 11:36 ` [PATCH] ext4: make mb_check_counter per group Chunguang Xu
2020-10-03  5:19   ` Theodore Y. Ts'o
2020-10-03  5:11 ` [PATCH] ext4: delete invalid comments near mb_buddy_adjust_border Theodore Y. Ts'o

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.