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....@oracle.com> > ---
Reviewed-by: Josef Bacik <jba...@fusionio.com> Thanks, Josef -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html