All of lore.kernel.org
 help / color / mirror / Atom feed
* btrfs_qgroup_create unused parameter
@ 2014-07-04 20:04 Kevin Brandstatter
  2014-07-05  2:09 ` Wang Shilong
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin Brandstatter @ 2014-07-04 20:04 UTC (permalink / raw)
  To: linux-btrfs

|The code is pasted below for convenience of reference, but in the function to 
create a qgruop, it taks a 4th parameter (char * name). I assume this is the name
of the path to limit, however, i don't see where its used anywhere in the function.

-Kevin Brandstatter

int btrfs_create_qgroup(struct btrfs_trans_handle *trans,
			struct btrfs_fs_info *fs_info, u64 qgroupid, *char** *****name**)*
{
	struct btrfs_root *quota_root;
	struct btrfs_qgroup *qgroup;
	int ret = 0;

	mutex_lock(&fs_info->qgroup_ioctl_lock);
	quota_root = fs_info->quota_root;
	if (!quota_root) {
		ret = -EINVAL;
		goto out;
	}
	qgroup = find_qgroup_rb(fs_info, qgroupid);
	if (qgroup) {
		ret = -EEXIST;
		goto out;
	}

	ret = add_qgroup_item(trans, quota_root, qgroupid);
	if (ret)
		goto out;

	spin_lock(&fs_info->qgroup_lock);
	qgroup = add_qgroup_rb(fs_info, qgroupid);
	spin_unlock(&fs_info->qgroup_lock);

	if (IS_ERR(qgroup))
		ret = PTR_ERR(qgroup);
out:
	mutex_unlock(&fs_info->qgroup_ioctl_lock);
	return ret;
}|


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: btrfs_qgroup_create unused parameter
  2014-07-04 20:04 btrfs_qgroup_create unused parameter Kevin Brandstatter
@ 2014-07-05  2:09 ` Wang Shilong
  2014-07-24 23:23   ` Kevin Brandstatter
  0 siblings, 1 reply; 4+ messages in thread
From: Wang Shilong @ 2014-07-05  2:09 UTC (permalink / raw)
  To: Kevin Brandstatter; +Cc: linux-btrfs

Hi 

I think you are right,  @name here is unneeded..
You can give a patch for that.^_^

Wang
> |The code is pasted below for convenience of reference, but in the function to 
> create a qgruop, it taks a 4th parameter (char * name). I assume this is the name
> of the path to limit, however, i don't see where its used anywhere in the function.
> 
> -Kevin Brandstatter
> 
> int btrfs_create_qgroup(struct btrfs_trans_handle *trans,
> 			struct btrfs_fs_info *fs_info, u64 qgroupid, *char** *****name**)*
> {
> 	struct btrfs_root *quota_root;
> 	struct btrfs_qgroup *qgroup;
> 	int ret = 0;
> 
> 	mutex_lock(&fs_info->qgroup_ioctl_lock);
> 	quota_root = fs_info->quota_root;
> 	if (!quota_root) {
> 		ret = -EINVAL;
> 		goto out;
> 	}
> 	qgroup = find_qgroup_rb(fs_info, qgroupid);
> 	if (qgroup) {
> 		ret = -EEXIST;
> 		goto out;
> 	}
> 
> 	ret = add_qgroup_item(trans, quota_root, qgroupid);
> 	if (ret)
> 		goto out;
> 
> 	spin_lock(&fs_info->qgroup_lock);
> 	qgroup = add_qgroup_rb(fs_info, qgroupid);
> 	spin_unlock(&fs_info->qgroup_lock);
> 
> 	if (IS_ERR(qgroup))
> 		ret = PTR_ERR(qgroup);
> out:
> 	mutex_unlock(&fs_info->qgroup_ioctl_lock);
> 	return ret;
> }|
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: btrfs_qgroup_create unused parameter
  2014-07-05  2:09 ` Wang Shilong
@ 2014-07-24 23:23   ` Kevin Brandstatter
  2014-07-25  1:17     ` Wang Shilong
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin Brandstatter @ 2014-07-24 23:23 UTC (permalink / raw)
  To: Wang Shilong; +Cc: linux-btrfs

I submitted a patch for this a week or two ago
(https://patchwork.kernel.org/patch/4486121/), but latest for-linus
doesn't have it merged, is it just being put of as minor, or is there a
problem with it?

-Kevin

On 07/04/2014 09:09 PM, Wang Shilong wrote:
> Hi 
>
> I think you are right,  @name here is unneeded..
> You can give a patch for that.^_^
>
> Wang
>> |The code is pasted below for convenience of reference, but in the function to 
>> create a qgruop, it taks a 4th parameter (char * name). I assume this is the name
>> of the path to limit, however, i don't see where its used anywhere in the function.
>>
>> -Kevin Brandstatter
>>
>> int btrfs_create_qgroup(struct btrfs_trans_handle *trans,
>> 			struct btrfs_fs_info *fs_info, u64 qgroupid, *char** *****name**)*
>> {
>> 	struct btrfs_root *quota_root;
>> 	struct btrfs_qgroup *qgroup;
>> 	int ret = 0;
>>
>> 	mutex_lock(&fs_info->qgroup_ioctl_lock);
>> 	quota_root = fs_info->quota_root;
>> 	if (!quota_root) {
>> 		ret = -EINVAL;
>> 		goto out;
>> 	}
>> 	qgroup = find_qgroup_rb(fs_info, qgroupid);
>> 	if (qgroup) {
>> 		ret = -EEXIST;
>> 		goto out;
>> 	}
>>
>> 	ret = add_qgroup_item(trans, quota_root, qgroupid);
>> 	if (ret)
>> 		goto out;
>>
>> 	spin_lock(&fs_info->qgroup_lock);
>> 	qgroup = add_qgroup_rb(fs_info, qgroupid);
>> 	spin_unlock(&fs_info->qgroup_lock);
>>
>> 	if (IS_ERR(qgroup))
>> 		ret = PTR_ERR(qgroup);
>> out:
>> 	mutex_unlock(&fs_info->qgroup_ioctl_lock);
>> 	return ret;
>> }|
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: btrfs_qgroup_create unused parameter
  2014-07-24 23:23   ` Kevin Brandstatter
@ 2014-07-25  1:17     ` Wang Shilong
  0 siblings, 0 replies; 4+ messages in thread
From: Wang Shilong @ 2014-07-25  1:17 UTC (permalink / raw)
  To: Kevin Brandstatter, Wang Shilong; +Cc: linux-btrfs

Hi Kevin,

On 07/25/2014 07:23 AM, Kevin Brandstatter wrote:
> I submitted a patch for this a week or two ago
> (https://patchwork.kernel.org/patch/4486121/), but latest for-linus
> doesn't have it merged, is it just being put of as minor, or is there a
> problem with it?
I believe your patch will be picked up by Chris and sent to Linus
when next merge window is open.

Since Chris is sometimes busy, patch merging is always
delayed for some time.

Thanks,
Wang
>
> -Kevin
>
> On 07/04/2014 09:09 PM, Wang Shilong wrote:
>> Hi
>>
>> I think you are right,  @name here is unneeded..
>> You can give a patch for that.^_^
>>
>> Wang
>>> |The code is pasted below for convenience of reference, but in the function to
>>> create a qgruop, it taks a 4th parameter (char * name). I assume this is the name
>>> of the path to limit, however, i don't see where its used anywhere in the function.
>>>
>>> -Kevin Brandstatter
>>>
>>> int btrfs_create_qgroup(struct btrfs_trans_handle *trans,
>>> 			struct btrfs_fs_info *fs_info, u64 qgroupid, *char** *****name**)*
>>> {
>>> 	struct btrfs_root *quota_root;
>>> 	struct btrfs_qgroup *qgroup;
>>> 	int ret = 0;
>>>
>>> 	mutex_lock(&fs_info->qgroup_ioctl_lock);
>>> 	quota_root = fs_info->quota_root;
>>> 	if (!quota_root) {
>>> 		ret = -EINVAL;
>>> 		goto out;
>>> 	}
>>> 	qgroup = find_qgroup_rb(fs_info, qgroupid);
>>> 	if (qgroup) {
>>> 		ret = -EEXIST;
>>> 		goto out;
>>> 	}
>>>
>>> 	ret = add_qgroup_item(trans, quota_root, qgroupid);
>>> 	if (ret)
>>> 		goto out;
>>>
>>> 	spin_lock(&fs_info->qgroup_lock);
>>> 	qgroup = add_qgroup_rb(fs_info, qgroupid);
>>> 	spin_unlock(&fs_info->qgroup_lock);
>>>
>>> 	if (IS_ERR(qgroup))
>>> 		ret = PTR_ERR(qgroup);
>>> out:
>>> 	mutex_unlock(&fs_info->qgroup_ioctl_lock);
>>> 	return ret;
>>> }|
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-07-25  1:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-04 20:04 btrfs_qgroup_create unused parameter Kevin Brandstatter
2014-07-05  2:09 ` Wang Shilong
2014-07-24 23:23   ` Kevin Brandstatter
2014-07-25  1:17     ` Wang Shilong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.