Re: [PATCH v7 02/13] Btrfs: improve the delayed refs process in rm case

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 14, 2013 at 12:59:44PM +0800, Liu Bo wrote:
> While removing a file with dedup extents, we could have a great number of
> delayed refs pending to process, and these refs refer to droping
> a ref of the extent, which is of BTRFS_DROP_DELAYED_REF type.
> 
> But in order to prevent an extent's ref count from going down to zero when
> there still are pending delayed refs, we first select those "adding a ref"
> ones, which is of BTRFS_ADD_DELAYED_REF type.
> 
> So in removing case, all of our delayed refs are of BTRFS_DROP_DELAYED_REF type,
> but we have to walk all the refs issued to the extent to find any
> BTRFS_ADD_DELAYED_REF types and end up there is no such thing, and then start
> over again to find BTRFS_DROP_DELAYED_REF.
> 
> This is really unnecessary, we can improve this by tracking how many
> BTRFS_ADD_DELAYED_REF refs we have and search by the right type.
> 
> Signed-off-by: Liu Bo <bo.li.liu@xxxxxxxxxx>
> ---

Reviewed-by: Josef Bacik <jbacik@xxxxxxxxxxxx>

Thanks,

Josef
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux