diff mbox

btrfs: its btrfs_err() instead of btrfs_error()

Message ID 1437147923-23965-1-git-send-email-anand.jain@oracle.com (mailing list archive)
State Accepted
Headers show

Commit Message

Anand Jain July 17, 2015, 3:45 p.m. UTC
sorry I indented to use btrfs_err() and I have no idea
how btrfs_error() got there.
infact I was thinking about these kind of oversights
since these two func are too closely named.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 fs/btrfs/dev-replace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Liu Bo July 19, 2015, 3:25 a.m. UTC | #1
On Fri, Jul 17, 2015 at 11:45:23PM +0800, Anand Jain wrote:
> sorry I indented to use btrfs_err() and I have no idea
> how btrfs_error() got there.
> infact I was thinking about these kind of oversights
> since these two func are too closely named.

Good catch.

Reviewed-by: Liu Bo <bo.li.liu@oracle.com>

Thanks,

-liubo
> 
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> ---
>  fs/btrfs/dev-replace.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c
> index 862fbc2..564a7de 100644
> --- a/fs/btrfs/dev-replace.c
> +++ b/fs/btrfs/dev-replace.c
> @@ -378,7 +378,7 @@ int btrfs_dev_replace_start(struct btrfs_root *root,
>  
>  	ret = btrfs_kobj_add_device(tgt_device->fs_devices, tgt_device);
>  	if (ret)
> -		btrfs_error(root->fs_info, ret, "kobj add dev failed");
> +		btrfs_err(root->fs_info, "kobj add dev failed %d\n", ret);
>  
>  	printk_in_rcu(KERN_INFO
>  		      "BTRFS: dev_replace from %s (devid %llu) to %s started\n",
> -- 
> 1.9.1
> 
> --
> 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
David Sterba July 20, 2015, 11:33 a.m. UTC | #2
On Fri, Jul 17, 2015 at 11:45:23PM +0800, Anand Jain wrote:
> sorry I indented to use btrfs_err() and I have no idea
> how btrfs_error() got there.
> infact I was thinking about these kind of oversights
> since these two func are too closely named.

Indeed, it's confusing. I suggest to convert btrfs_errror to
btrfs_std_error and change the prototype to

#define btrfs_std_error(fs_info, errno, fmt, args...)

and switch all btrfs_error users to pass NULL for 'fmt'.

> Signed-off-by: Anand Jain <anand.jain@oracle.com>

Reviewed-by: David Sterba <dsterba@suse.com>
--
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
diff mbox

Patch

diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c
index 862fbc2..564a7de 100644
--- a/fs/btrfs/dev-replace.c
+++ b/fs/btrfs/dev-replace.c
@@ -378,7 +378,7 @@  int btrfs_dev_replace_start(struct btrfs_root *root,
 
 	ret = btrfs_kobj_add_device(tgt_device->fs_devices, tgt_device);
 	if (ret)
-		btrfs_error(root->fs_info, ret, "kobj add dev failed");
+		btrfs_err(root->fs_info, "kobj add dev failed %d\n", ret);
 
 	printk_in_rcu(KERN_INFO
 		      "BTRFS: dev_replace from %s (devid %llu) to %s started\n",