Re: [PATCH 37/63] xfs: cancel CoW reservations and clear inode reflink flag when freeing blocks

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

 



On Tue, Sep 27, 2016 at 07:57:35PM -0700, Darrick J. Wong wrote:
> +	/* Remove all pending CoW reservations. */
> +	error = xfs_reflink_cancel_cow_blocks(ip, &tp, first_unmap_block,
> +			last_block);
> +	if (error)
> +		goto out;
> +
> +	/*
> +	 * Clear the reflink flag if we truncated everything.
> +	 */
> +	if (ip->i_d.di_nblocks == 0 && xfs_is_reflink_inode(ip))
> +		ip->i_d.di_flags2 &= ~XFS_DIFLAG2_REFLINK;

Shouldn't this (and the later added clearing of the cowblocks tag)
be moved into xfs_reflink_cancel_cow_blocks?
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux