* [PATCH] btrfs: removed unused variable length in btrfs_insert_one_raid_extent
@ 2024-12-12 12:56 Johannes Thumshirn
2024-12-13 12:12 ` Filipe Manana
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Thumshirn @ 2024-12-12 12:56 UTC (permalink / raw)
To: David Sterba, Josef Bacik; +Cc: Naohiro Aota, linux-btrfs, Johannes Thumshirn
From: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Remove the variable length in btrfs_insert_one_raid_extent() as it is
unused.
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
fs/btrfs/raid-stripe-tree.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/fs/btrfs/raid-stripe-tree.c b/fs/btrfs/raid-stripe-tree.c
index 9ffc79f250fb..45b823a0913a 100644
--- a/fs/btrfs/raid-stripe-tree.c
+++ b/fs/btrfs/raid-stripe-tree.c
@@ -199,12 +199,8 @@ int btrfs_insert_one_raid_extent(struct btrfs_trans_handle *trans,
for (int i = 0; i < num_stripes; i++) {
u64 devid = bioc->stripes[i].dev->devid;
u64 physical = bioc->stripes[i].physical;
- u64 length = bioc->stripes[i].length;
struct btrfs_raid_stride *raid_stride = &stripe_extent->strides[i];
- if (length == 0)
- length = bioc->size;
-
btrfs_set_stack_raid_stride_devid(raid_stride, devid);
btrfs_set_stack_raid_stride_physical(raid_stride, physical);
}
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] btrfs: removed unused variable length in btrfs_insert_one_raid_extent
2024-12-12 12:56 [PATCH] btrfs: removed unused variable length in btrfs_insert_one_raid_extent Johannes Thumshirn
@ 2024-12-13 12:12 ` Filipe Manana
0 siblings, 0 replies; 2+ messages in thread
From: Filipe Manana @ 2024-12-13 12:12 UTC (permalink / raw)
To: Johannes Thumshirn
Cc: David Sterba, Josef Bacik, Naohiro Aota, linux-btrfs,
Johannes Thumshirn
On Thu, Dec 12, 2024 at 12:56 PM Johannes Thumshirn <jth@kernel.org> wrote:
>
> From: Johannes Thumshirn <johannes.thumshirn@wdc.com>
>
> Remove the variable length in btrfs_insert_one_raid_extent() as it is
> unused.
>
> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Looks good, thanks.
> ---
> fs/btrfs/raid-stripe-tree.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/fs/btrfs/raid-stripe-tree.c b/fs/btrfs/raid-stripe-tree.c
> index 9ffc79f250fb..45b823a0913a 100644
> --- a/fs/btrfs/raid-stripe-tree.c
> +++ b/fs/btrfs/raid-stripe-tree.c
> @@ -199,12 +199,8 @@ int btrfs_insert_one_raid_extent(struct btrfs_trans_handle *trans,
> for (int i = 0; i < num_stripes; i++) {
> u64 devid = bioc->stripes[i].dev->devid;
> u64 physical = bioc->stripes[i].physical;
> - u64 length = bioc->stripes[i].length;
> struct btrfs_raid_stride *raid_stride = &stripe_extent->strides[i];
>
> - if (length == 0)
> - length = bioc->size;
> -
> btrfs_set_stack_raid_stride_devid(raid_stride, devid);
> btrfs_set_stack_raid_stride_physical(raid_stride, physical);
> }
> --
> 2.43.0
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-12-13 12:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-12 12:56 [PATCH] btrfs: removed unused variable length in btrfs_insert_one_raid_extent Johannes Thumshirn
2024-12-13 12:12 ` Filipe Manana
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox