Re: [PATCH] btrfs-progs: Cleanup for using BTRFS_SETGET_STACK instead of raw convert

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

 



On Wed, Jun 26, 2013 at 01:27:08PM +0800, Qu Wenruo wrote:
> --- a/btrfs-convert.c
> +++ b/btrfs-convert.c
> @@ -1802,7 +1802,7 @@ static int prepare_system_chunk_sb(struct btrfs_super_block *super)
>  	btrfs_set_stack_chunk_num_stripes(chunk, 1);
>  	btrfs_set_stack_chunk_sub_stripes(chunk, 0);
>  	chunk->stripe.devid = super->dev_item.devid;

This should use the btrfs_set_* accessors too, right?

> -	chunk->stripe.offset = cpu_to_le64(0);
> +	btrfs_set_stack_stripe_offset(&chunk->stripe, 0);
>  	memcpy(chunk->stripe.dev_uuid, super->dev_item.uuid, BTRFS_UUID_SIZE);
>  	btrfs_set_super_sys_array_size(super, sizeof(*key) + sizeof(*chunk));
>  	return 0;

> --- a/btrfs-image.c
> +++ b/btrfs-image.c
> @@ -1332,7 +1332,7 @@ static void update_super_old(u8 *buffer)
>  	btrfs_set_stack_chunk_num_stripes(chunk, 1);
>  	btrfs_set_stack_chunk_sub_stripes(chunk, 0);
>  	chunk->stripe.devid = super->dev_item.devid;

same here, and there's one more in update_super().

> -	chunk->stripe.offset = cpu_to_le64(0);
> +	btrfs_set_stack_stripe_offset(&chunk->stripe, 0);
>  	memcpy(chunk->stripe.dev_uuid, super->dev_item.uuid, BTRFS_UUID_SIZE);
>  	btrfs_set_super_sys_array_size(super, sizeof(*key) + sizeof(*chunk));
>  	csum_block(buffer, 4096);
--
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