Re: [PATCH v4 1/9] btrfs: calculate @physical_end using @dev_extent_len directly in scrub_stripe()

Christoph Hellwig
2022-03-23T06:26:29Z

On Fri, Mar 11, 2022 at 03:38:41PM +0800, Qu Wenruo wrote:
> @@ -3183,10 +3183,10 @@ static noinline_for_stack int scrub_stripe(struct scrub_ctx *sctx,
> int slot;
> u64 nstripes;
> struct extent_buffer *l;
> - u64 physical;
> + u64 physical = map->stripes[stripe_index].physical;
> u64 logical;
> u64 logic_end;
> - u64 physical_end;
> + const u64 physical_end = physical + dev_extent_len;

There isn't really much of a point in marking local variables const.
A a nitpick I'd also move the physical and physical_end declarations
next to other as that helps readability a bit.

Otherwise looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>