Re: [PATCH] Btrfs: extended inode refs support for send mechanism

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

 



Hi Mark,

On Thu, October 11, 2012 at 23:39 (+0200), Mark Fasheh wrote:
> On Wed, Oct 10, 2012 at 01:21:31PM +0200, Jan Schmidt wrote:
>> @@ -1574,11 +1599,22 @@ static int get_first_ref(struct send_ctx *sctx,
>>  		goto out;
>>  	}
>>  
>> -	iref = btrfs_item_ptr(path->nodes[0], path->slots[0],
>> -			struct btrfs_inode_ref);
>> -	len = btrfs_inode_ref_name_len(path->nodes[0], iref);
>> -	ret = fs_path_add_from_extent_buffer(name, path->nodes[0],
>> -			(unsigned long)(iref + 1), len);
>> +	if (key.type == BTRFS_INODE_REF_KEY) {
>> +		struct btrfs_inode_ref *iref;
>> +		iref = btrfs_item_ptr(path->nodes[0], path->slots[0],
>> +				      struct btrfs_inode_ref);
>> +		len = btrfs_inode_ref_name_len(path->nodes[0], iref);
>> +		ret = fs_path_add_from_extent_buffer(name, path->nodes[0],
>> +						     (unsigned long)(iref + 1),
>> +						     len);
>> +	} else {
>> +		struct btrfs_inode_extref *extref;
>> +		extref = btrfs_item_ptr(path->nodes[0], path->slots[0],
>> +					struct btrfs_inode_extref);
>> +		len = btrfs_inode_extref_name_len(path->nodes[0], extref);
>> +		ret = fs_path_add_from_extent_buffer(name, path->nodes[0],
>> +					(unsigned long)&extref->name, len);
>> +	}
>>  	if (ret < 0)
>>  		goto out;
>>  	btrfs_release_path(path);
> 
> Ok there's the following line in get_first_ref() which I believe was missed:
> 
> 	*dir = found_key.offset;
> 
> that will have to account for an extended ref.

Oops. I will fix that.

> The rest of the patch looks pretty good to me. Thanks for writing this up!

Thanks for taking a look!
-Jan
--
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