All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bcachefs: Use uncompressed_size as the operand
@ 2025-02-10  3:04 Alan Huang
  2025-02-10  3:04 ` [PATCH] bcachefs: Fix use after free Alan Huang
  2025-02-10 16:25 ` [PATCH] bcachefs: Use uncompressed_size as the operand Kent Overstreet
  0 siblings, 2 replies; 8+ messages in thread
From: Alan Huang @ 2025-02-10  3:04 UTC (permalink / raw)
  To: kent.overstreet; +Cc: linux-bcachefs, Alan Huang

Since we don't merge compressed extents, uncompressed_size should be
equal to compressed_size, use uncompressed_size to clarify the intention.

Signed-off-by: Alan Huang <mmpgouride@gmail.com>
---
 fs/bcachefs/extents.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/bcachefs/extents.c b/fs/bcachefs/extents.c
index 05d5f71a7ca9..eeea23d09b9a 100644
--- a/fs/bcachefs/extents.c
+++ b/fs/bcachefs/extents.c
@@ -326,7 +326,7 @@ bool bch2_extent_merge(struct bch_fs *c, struct bkey_s l, struct bkey_s_c r)
 			    !bch2_checksum_mergeable(lp.crc.csum_type))
 				return false;
 
-			if (lp.crc.offset + lp.crc.live_size != lp.crc.compressed_size ||
+			if (lp.crc.offset + lp.crc.live_size != lp.crc.uncompressed_size ||
 			    rp.crc.offset)
 				return false;
 
-- 
2.47.0


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

end of thread, other threads:[~2025-02-10 22:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-10  3:04 [PATCH] bcachefs: Use uncompressed_size as the operand Alan Huang
2025-02-10  3:04 ` [PATCH] bcachefs: Fix use after free Alan Huang
2025-02-10 16:28   ` Kent Overstreet
2025-02-10 16:54     ` Alan Huang
2025-02-10 22:20       ` Kent Overstreet
2025-02-10 16:25 ` [PATCH] bcachefs: Use uncompressed_size as the operand Kent Overstreet
2025-02-10 17:02   ` Alan Huang
2025-02-10 22:02     ` Kent Overstreet

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.