All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] btrfs:zoned: Fix comment description for sb_write_pointer logic
       [not found] <CGME20220517082256eucas1p2ccfe36e5fa1b170be1c2feb90e867404@eucas1p2.samsung.com>
@ 2022-05-17  8:22 ` Pankaj Raghav
  2022-05-17 12:13   ` David Sterba
  2022-05-17 14:16   ` Johannes Thumshirn
  0 siblings, 2 replies; 4+ messages in thread
From: Pankaj Raghav @ 2022-05-17  8:22 UTC (permalink / raw)
  To: naohiro.aota, Johannes.Thumshirn, dsterba
  Cc: gost.dev, linux-btrfs, Pankaj Raghav

The comments describing the logic for evaluating the sb write pointer
does not represent what is done in the code. Fix it to represent the
actual logic used.

Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
---
 fs/btrfs/zoned.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c
index 057babaa3e05..c09b1b0208c4 100644
--- a/fs/btrfs/zoned.c
+++ b/fs/btrfs/zoned.c
@@ -94,9 +94,9 @@ static int sb_write_pointer(struct block_device *bdev, struct blk_zone *zones,
 	 * Possible states of log buffer zones
 	 *
 	 *           Empty[0]  In use[0]  Full[0]
-	 * Empty[1]         *          x        0
-	 * In use[1]        0          x        0
-	 * Full[1]          1          1        C
+	 * Empty[1]         *          0        1
+	 * In use[1]        x          x        1
+	 * Full[1]          0          0        C
 	 *
 	 * Log position:
 	 *   *: Special case, no superblock is written
-- 
2.25.1


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

* Re: [PATCH] btrfs:zoned: Fix comment description for sb_write_pointer logic
  2022-05-17  8:22 ` [PATCH] btrfs:zoned: Fix comment description for sb_write_pointer logic Pankaj Raghav
@ 2022-05-17 12:13   ` David Sterba
  2022-05-17 12:25     ` Pankaj Raghav
  2022-05-17 14:16   ` Johannes Thumshirn
  1 sibling, 1 reply; 4+ messages in thread
From: David Sterba @ 2022-05-17 12:13 UTC (permalink / raw)
  To: Pankaj Raghav
  Cc: naohiro.aota, Johannes.Thumshirn, dsterba, gost.dev, linux-btrfs

On Tue, May 17, 2022 at 10:22:55AM +0200, Pankaj Raghav wrote:
> The comments describing the logic for evaluating the sb write pointer
> does not represent what is done in the code. Fix it to represent the
> actual logic used.

It would be good to briefly describe what is the actual mistake in the
comment, so one can have an idea without looking to the code.

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

* Re: [PATCH] btrfs:zoned: Fix comment description for sb_write_pointer logic
  2022-05-17 12:13   ` David Sterba
@ 2022-05-17 12:25     ` Pankaj Raghav
  0 siblings, 0 replies; 4+ messages in thread
From: Pankaj Raghav @ 2022-05-17 12:25 UTC (permalink / raw)
  To: dsterba, naohiro.aota, Johannes.Thumshirn, dsterba, gost.dev,
	linux-btrfs

On 2022-05-17 14:13, David Sterba wrote:
> On Tue, May 17, 2022 at 10:22:55AM +0200, Pankaj Raghav wrote:
>> The comments describing the logic for evaluating the sb write pointer
>> does not represent what is done in the code. Fix it to represent the
>> actual logic used.
> 
> It would be good to briefly describe what is the actual mistake in the
> comment, so one can have an idea without looking to the code.
I should have done that. I will send a v2 with a more descriptive commit
log. Thanks

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

* Re: [PATCH] btrfs:zoned: Fix comment description for sb_write_pointer logic
  2022-05-17  8:22 ` [PATCH] btrfs:zoned: Fix comment description for sb_write_pointer logic Pankaj Raghav
  2022-05-17 12:13   ` David Sterba
@ 2022-05-17 14:16   ` Johannes Thumshirn
  1 sibling, 0 replies; 4+ messages in thread
From: Johannes Thumshirn @ 2022-05-17 14:16 UTC (permalink / raw)
  To: Pankaj Raghav, Naohiro Aota, dsterba; +Cc: gost.dev, linux-btrfs

With the commit log updated,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>

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

end of thread, other threads:[~2022-05-17 14:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20220517082256eucas1p2ccfe36e5fa1b170be1c2feb90e867404@eucas1p2.samsung.com>
2022-05-17  8:22 ` [PATCH] btrfs:zoned: Fix comment description for sb_write_pointer logic Pankaj Raghav
2022-05-17 12:13   ` David Sterba
2022-05-17 12:25     ` Pankaj Raghav
2022-05-17 14:16   ` Johannes Thumshirn

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.