Re: [PATCH v4 1/3] btrfs: zoned: reset zones of relocated block groups

2021-04-16 Thread Johannes Thumshirn
On 16/04/2021 11:30, Filipe Manana wrote: > The comment refers to deleting the device extent items from the device > tree, not really extents on disk. > I.e. it's all about the items from the block group in the chunk and > device trees. OK I'll move it back where it was.

Re: [PATCH v4 1/3] btrfs: zoned: reset zones of relocated block groups

2021-04-16 Thread Filipe Manana
On Fri, Apr 16, 2021 at 10:14 AM Johannes Thumshirn wrote: > > On 16/04/2021 11:12, Filipe Manana wrote: > > On Thu, Apr 15, 2021 at 3:00 PM Johannes Thumshirn > > wrote: > >> > >> When relocating a block group the freed up space is not discarded in one > >> big block, but each extent is discarde

Re: [PATCH v4 1/3] btrfs: zoned: reset zones of relocated block groups

2021-04-16 Thread Johannes Thumshirn
On 16/04/2021 11:12, Filipe Manana wrote: > On Thu, Apr 15, 2021 at 3:00 PM Johannes Thumshirn > wrote: >> >> When relocating a block group the freed up space is not discarded in one >> big block, but each extent is discarded on it's own with -odisard=sync. >> >> For a zoned filesystem we need to

Re: [PATCH v4 1/3] btrfs: zoned: reset zones of relocated block groups

2021-04-16 Thread Filipe Manana
On Thu, Apr 15, 2021 at 3:00 PM Johannes Thumshirn wrote: > > When relocating a block group the freed up space is not discarded in one > big block, but each extent is discarded on it's own with -odisard=sync. > > For a zoned filesystem we need to discard the whole block group at once, > so btrfs_d

Re: [PATCH v4 1/3] btrfs: zoned: reset zones of relocated block groups

2021-04-15 Thread Johannes Thumshirn
On 15/04/2021 20:26, Josef Bacik wrote: > On 4/15/21 9:58 AM, Johannes Thumshirn wrote: >> When relocating a block group the freed up space is not discarded in one >> big block, but each extent is discarded on it's own with -odisard=sync. >> >> For a zoned filesystem we need to discard the whole bl

Re: [PATCH v4 1/3] btrfs: zoned: reset zones of relocated block groups

2021-04-15 Thread Josef Bacik
On 4/15/21 9:58 AM, Johannes Thumshirn wrote: When relocating a block group the freed up space is not discarded in one big block, but each extent is discarded on it's own with -odisard=sync. For a zoned filesystem we need to discard the whole block group at once, so btrfs_discard_extent() will t