Re: [PATCH v4 3/7] btrfs: relocation: Delay reloc tree deletion after merge_reloc_roots()

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

 



On Tue, Jan 15, 2019 at 04:16:00PM +0800, Qu Wenruo wrote:
> And to co-operate this, also delayed btrfs_drop_snapshot() call on reloc
> tree, btrfs_drop_snapshot() call will also be delayed to
> clean_dirty_subvs().

Can you please rephrase this paragraph?

> This patch will increase the size of btrfs_root by 16 bytes.
> 
> Signed-off-by: Qu Wenruo <wqu@xxxxxxxx>

> +static int clean_dirty_subvs(struct reloc_control *rc)
> +{
> +	struct btrfs_root *root;
> +	struct btrfs_root *next;
> +	int err = 0;
> +	int ret;
> +
> +	list_for_each_entry_safe(root, next, &rc->dirty_subv_roots,
> +				 reloc_dirty_list) {
> +		struct btrfs_root *reloc_root = root->reloc_root;
> +
> +		clear_bit(BTRFS_ROOT_DEAD_RELOC_TREE, &root->state);
> +		list_del_init(&root->reloc_dirty_list);
> +		root->reloc_root = NULL;
> +		if (reloc_root) {
> +			ret = btrfs_drop_snapshot(reloc_root, NULL, 0, 1);
> +			if (ret < 0 && !err)
> +				err = ret;
> +		}
> +		btrfs_put_fs_root(root);
> +	}
> +	return err;

Please dont use the err/ret style but 'ret' that matches function return
type and for the temporary return values ret2 etc.

> +}



[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