Re: [PATCH 4/8] Add strdup in btrfs_add_to_fsid() to track the device path.

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

 



On 2014/12/18 5:14, Goffredo Baroncelli wrote:
> When creating a new btrfs_device, copy the path to track it.
> This path is then used by mkfs.btrfs to list all devices.
> 
> Signed-off-by: Goffredo Baroncelli <kreijack@xxxxxxxxx>

Reviewed-by: Satoru Takeuchi <takeuchi_satoru@xxxxxxxxxxxxxx>

> ---
>   utils.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/utils.c b/utils.c
> index dcb4f74..3f50e4d 100644
> --- a/utils.c
> +++ b/utils.c
> @@ -647,6 +647,7 @@ int btrfs_add_to_fsid(struct btrfs_trans_handle *trans,
>   	device->bytes_used = 0;
>   	device->total_ios = 0;
>   	device->dev_root = root->fs_info->dev_root;
> +	device->name = strdup(path);
>   
>   	ret = btrfs_add_device(trans, root, device);
>   	BUG_ON(ret);
> 

--
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