linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/4] btrfs: add_missing_dev() should return the actual error
@ 2017-10-09  3:07 Anand Jain
  2017-10-09  3:07 ` [PATCH v2 2/4] btrfs: fix EIO misuse to report missing degraded option Anand Jain
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Anand Jain @ 2017-10-09  3:07 UTC (permalink / raw)
  To: linux-btrfs

add_missing_dev() can return device pointer so that IS_ERR/
PTR_ERR can be used to check for the actual error occurred
in the function.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
v2: This patch is a split from
    [PATCH 1/2] btrfs: fix read_one_chunk() return error code

 fs/btrfs/volumes.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 0e8f16c305df..2f500a32089e 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -6249,7 +6249,7 @@ static struct btrfs_device *add_missing_dev(struct btrfs_fs_devices *fs_devices,
 
 	device = btrfs_alloc_device(NULL, &devid, dev_uuid);
 	if (IS_ERR(device))
-		return NULL;
+		return device;
 
 	list_add(&device->dev_list, &fs_devices->devices);
 	device->fs_devices = fs_devices;
@@ -6454,9 +6454,12 @@ static int read_one_chunk(struct btrfs_fs_info *fs_info, struct btrfs_key *key,
 			map->stripes[i].dev =
 				add_missing_dev(fs_info->fs_devices, devid,
 						uuid);
-			if (!map->stripes[i].dev) {
+			if (IS_ERR(map->stripes[i].dev)) {
 				free_extent_map(em);
-				return -EIO;
+				btrfs_err(fs_info,
+					"failed to init missing dev %llu %ld",
+					devid, PTR_ERR(map->stripes[i].dev));
+				return PTR_ERR(map->stripes[i].dev);
 			}
 			btrfs_report_missing_device(fs_info, devid, uuid);
 		}
@@ -6582,8 +6585,8 @@ static int read_one_dev(struct btrfs_fs_info *fs_info,
 		}
 
 		device = add_missing_dev(fs_devices, devid, dev_uuid);
-		if (!device)
-			return -ENOMEM;
+		if (IS_ERR(device))
+			return PTR_ERR(device);
 		btrfs_report_missing_device(fs_info, devid, dev_uuid);
 	} else {
 		if (!device->bdev) {
-- 
2.7.0


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

* [PATCH v2 2/4] btrfs: fix EIO misuse to report missing degraded option
  2017-10-09  3:07 [PATCH v2 1/4] btrfs: add_missing_dev() should return the actual error Anand Jain
@ 2017-10-09  3:07 ` Anand Jain
  2017-10-13 12:16   ` David Sterba
  2017-10-09  3:07 ` [PATCH v2 3/4] btrfs: declare btrfs_report_missing_device() static Anand Jain
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Anand Jain @ 2017-10-09  3:07 UTC (permalink / raw)
  To: linux-btrfs

EIO is only for the IO failure to the device, avoid it.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
v2: This patch is renamed from
     [PATCH 1/2] btrfs: fix read_one_chunk() return error code

 fs/btrfs/volumes.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 2f500a32089e..844ae25cff9e 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -6448,7 +6448,7 @@ static int read_one_chunk(struct btrfs_fs_info *fs_info, struct btrfs_key *key,
 		    !btrfs_test_opt(fs_info, DEGRADED)) {
 			free_extent_map(em);
 			btrfs_report_missing_device(fs_info, devid, uuid);
-			return -EIO;
+			return -ENOENT;
 		}
 		if (!map->stripes[i].dev) {
 			map->stripes[i].dev =
@@ -6581,7 +6581,7 @@ static int read_one_dev(struct btrfs_fs_info *fs_info,
 	if (!device) {
 		if (!btrfs_test_opt(fs_info, DEGRADED)) {
 			btrfs_report_missing_device(fs_info, devid, dev_uuid);
-			return -EIO;
+			return -ENOENT;
 		}
 
 		device = add_missing_dev(fs_devices, devid, dev_uuid);
@@ -6592,7 +6592,7 @@ static int read_one_dev(struct btrfs_fs_info *fs_info,
 		if (!device->bdev) {
 			btrfs_report_missing_device(fs_info, devid, dev_uuid);
 			if (!btrfs_test_opt(fs_info, DEGRADED))
-				return -EIO;
+				return -ENOENT;
 		}
 
 		if(!device->bdev && !device->missing) {
-- 
2.7.0


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

* [PATCH v2 3/4] btrfs: declare btrfs_report_missing_device() static
  2017-10-09  3:07 [PATCH v2 1/4] btrfs: add_missing_dev() should return the actual error Anand Jain
  2017-10-09  3:07 ` [PATCH v2 2/4] btrfs: fix EIO misuse to report missing degraded option Anand Jain
@ 2017-10-09  3:07 ` Anand Jain
  2017-10-09  3:07 ` [PATCH v2 4/4] btrfs: fix use of error or warning for missing device Anand Jain
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Anand Jain @ 2017-10-09  3:07 UTC (permalink / raw)
  To: linux-btrfs

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
v2: This patch is a split from
    [PATCH 2/2] btrfs: clean up btrfs_report_missing_device() usage

 fs/btrfs/volumes.c | 12 ++++++------
 fs/btrfs/volumes.h |  2 --
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 844ae25cff9e..6a041bef112c 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -6377,6 +6377,12 @@ static int btrfs_check_chunk_valid(struct btrfs_fs_info *fs_info,
 	return 0;
 }
 
+static void btrfs_report_missing_device(struct btrfs_fs_info *fs_info,
+						u64 devid, u8 *uuid)
+{
+	btrfs_warn_rl(fs_info, "devid %llu uuid %pU is missing", devid, uuid);
+}
+
 static int read_one_chunk(struct btrfs_fs_info *fs_info, struct btrfs_key *key,
 			  struct extent_buffer *leaf,
 			  struct btrfs_chunk *chunk)
@@ -6759,12 +6765,6 @@ int btrfs_read_sys_array(struct btrfs_fs_info *fs_info)
 	return -EIO;
 }
 
-void btrfs_report_missing_device(struct btrfs_fs_info *fs_info, u64 devid,
-				 u8 *uuid)
-{
-	btrfs_warn_rl(fs_info, "devid %llu uuid %pU is missing", devid, uuid);
-}
-
 /*
  * Check if all chunks in the fs are OK for read-write degraded mount
  *
diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h
index 6108fdfec67f..ff15208344a7 100644
--- a/fs/btrfs/volumes.h
+++ b/fs/btrfs/volumes.h
@@ -542,7 +542,5 @@ void btrfs_set_fs_info_ptr(struct btrfs_fs_info *fs_info);
 void btrfs_reset_fs_info_ptr(struct btrfs_fs_info *fs_info);
 
 bool btrfs_check_rw_degradable(struct btrfs_fs_info *fs_info);
-void btrfs_report_missing_device(struct btrfs_fs_info *fs_info, u64 devid,
-				 u8 *uuid);
 
 #endif
-- 
2.7.0


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

* [PATCH v2 4/4] btrfs: fix use of error or warning for missing device
  2017-10-09  3:07 [PATCH v2 1/4] btrfs: add_missing_dev() should return the actual error Anand Jain
  2017-10-09  3:07 ` [PATCH v2 2/4] btrfs: fix EIO misuse to report missing degraded option Anand Jain
  2017-10-09  3:07 ` [PATCH v2 3/4] btrfs: declare btrfs_report_missing_device() static Anand Jain
@ 2017-10-09  3:07 ` Anand Jain
  2017-10-11  0:52 ` [PATCH v2 1/4] btrfs: add_missing_dev() should return the actual error Liu Bo
  2017-10-13 12:28 ` [PATCH v2 " David Sterba
  4 siblings, 0 replies; 10+ messages in thread
From: Anand Jain @ 2017-10-09  3:07 UTC (permalink / raw)
  To: linux-btrfs

When device is missing without the -o degraded option then
its an error so report it as an error instead of warning.
And when -o degraded option is provided, log the missing
device as warning.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
v2: Rename from
    [PATCH 2/2] btrfs: clean up btrfs_report_missing_device() usage
    Also drop the idea of moving the DEGRADED option checking
    into the function btrfs_report_missing_device() and further
    renaming it to check_report_degraded(). If its such a thing
    is good idea it can be added on top of this patch. Thxs.
 fs/btrfs/volumes.c | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 6a041bef112c..c76a81938766 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -6378,9 +6378,14 @@ static int btrfs_check_chunk_valid(struct btrfs_fs_info *fs_info,
 }
 
 static void btrfs_report_missing_device(struct btrfs_fs_info *fs_info,
-						u64 devid, u8 *uuid)
+					u64 devid, u8 *uuid, int error)
 {
-	btrfs_warn_rl(fs_info, "devid %llu uuid %pU is missing", devid, uuid);
+	if (error)
+		btrfs_err_rl(fs_info, "devid %llu uuid %pU is missing",
+			      devid, uuid);
+	else
+		btrfs_warn_rl(fs_info, "devid %llu uuid %pU is missing",
+			      devid, uuid);
 }
 
 static int read_one_chunk(struct btrfs_fs_info *fs_info, struct btrfs_key *key,
@@ -6453,7 +6458,7 @@ static int read_one_chunk(struct btrfs_fs_info *fs_info, struct btrfs_key *key,
 		if (!map->stripes[i].dev &&
 		    !btrfs_test_opt(fs_info, DEGRADED)) {
 			free_extent_map(em);
-			btrfs_report_missing_device(fs_info, devid, uuid);
+			btrfs_report_missing_device(fs_info, devid, uuid, 1);
 			return -ENOENT;
 		}
 		if (!map->stripes[i].dev) {
@@ -6467,7 +6472,7 @@ static int read_one_chunk(struct btrfs_fs_info *fs_info, struct btrfs_key *key,
 					devid, PTR_ERR(map->stripes[i].dev));
 				return PTR_ERR(map->stripes[i].dev);
 			}
-			btrfs_report_missing_device(fs_info, devid, uuid);
+			btrfs_report_missing_device(fs_info, devid, uuid, 0);
 		}
 		map->stripes[i].dev->in_fs_metadata = 1;
 	}
@@ -6586,19 +6591,24 @@ static int read_one_dev(struct btrfs_fs_info *fs_info,
 	device = btrfs_find_device(fs_info, devid, dev_uuid, fs_uuid);
 	if (!device) {
 		if (!btrfs_test_opt(fs_info, DEGRADED)) {
-			btrfs_report_missing_device(fs_info, devid, dev_uuid);
+			btrfs_report_missing_device(fs_info, devid,
+							dev_uuid, 1);
 			return -ENOENT;
 		}
 
 		device = add_missing_dev(fs_devices, devid, dev_uuid);
 		if (IS_ERR(device))
 			return PTR_ERR(device);
-		btrfs_report_missing_device(fs_info, devid, dev_uuid);
+		btrfs_report_missing_device(fs_info, devid, dev_uuid, 0);
 	} else {
 		if (!device->bdev) {
-			btrfs_report_missing_device(fs_info, devid, dev_uuid);
-			if (!btrfs_test_opt(fs_info, DEGRADED))
+			if (!btrfs_test_opt(fs_info, DEGRADED)) {
+				btrfs_report_missing_device(fs_info,
+						devid, dev_uuid, 1);
 				return -ENOENT;
+			}
+			btrfs_report_missing_device(fs_info, devid,
+							dev_uuid, 0);
 		}
 
 		if(!device->bdev && !device->missing) {
-- 
2.7.0


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

* Re: [PATCH v2 1/4] btrfs: add_missing_dev() should return the actual error
  2017-10-09  3:07 [PATCH v2 1/4] btrfs: add_missing_dev() should return the actual error Anand Jain
                   ` (2 preceding siblings ...)
  2017-10-09  3:07 ` [PATCH v2 4/4] btrfs: fix use of error or warning for missing device Anand Jain
@ 2017-10-11  0:52 ` Liu Bo
  2017-10-11  4:34   ` [PATCH v2.1 " Anand Jain
  2017-10-11  4:46   ` [PATCH v3 " Anand Jain
  2017-10-13 12:28 ` [PATCH v2 " David Sterba
  4 siblings, 2 replies; 10+ messages in thread
From: Liu Bo @ 2017-10-11  0:52 UTC (permalink / raw)
  To: Anand Jain; +Cc: linux-btrfs

On Mon, Oct 09, 2017 at 11:07:43AM +0800, Anand Jain wrote:
> add_missing_dev() can return device pointer so that IS_ERR/
> PTR_ERR can be used to check for the actual error occurred
> in the function.
> 
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> ---
> v2: This patch is a split from
>     [PATCH 1/2] btrfs: fix read_one_chunk() return error code
> 
>  fs/btrfs/volumes.c | 13 ++++++++-----
>  1 file changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
> index 0e8f16c305df..2f500a32089e 100644
> --- a/fs/btrfs/volumes.c
> +++ b/fs/btrfs/volumes.c
> @@ -6249,7 +6249,7 @@ static struct btrfs_device *add_missing_dev(struct btrfs_fs_devices *fs_devices,
>  
>  	device = btrfs_alloc_device(NULL, &devid, dev_uuid);
>  	if (IS_ERR(device))
> -		return NULL;
> +		return device;
>  
>  	list_add(&device->dev_list, &fs_devices->devices);
>  	device->fs_devices = fs_devices;
> @@ -6454,9 +6454,12 @@ static int read_one_chunk(struct btrfs_fs_info *fs_info, struct btrfs_key *key,
>  			map->stripes[i].dev =
>  				add_missing_dev(fs_info->fs_devices, devid,
>  						uuid);
> -			if (!map->stripes[i].dev) {
> +			if (IS_ERR(map->stripes[i].dev)) {
>  				free_extent_map(em);
> -				return -EIO;
> +				btrfs_err(fs_info,
> +					"failed to init missing dev %llu %ld",
> +					devid, PTR_ERR(map->stripes[i].dev));
> +				return PTR_ERR(map->stripes[i].dev);
>  			}
>  			btrfs_report_missing_device(fs_info, devid, uuid);
>  		}
> @@ -6582,8 +6585,8 @@ static int read_one_dev(struct btrfs_fs_info *fs_info,
>  		}
>  
>  		device = add_missing_dev(fs_devices, devid, dev_uuid);
> -		if (!device)
> -			return -ENOMEM;
> +		if (IS_ERR(device))
> +			return PTR_ERR(device);

Could you please also add a btrfs_err() like above?

With that,

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

-liubo

>  		btrfs_report_missing_device(fs_info, devid, dev_uuid);
>  	} else {
>  		if (!device->bdev) {
> -- 
> 2.7.0
> 
> --
> 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] 10+ messages in thread

* [PATCH v2.1 1/4] btrfs: add_missing_dev() should return the actual error
  2017-10-11  0:52 ` [PATCH v2 1/4] btrfs: add_missing_dev() should return the actual error Liu Bo
@ 2017-10-11  4:34   ` Anand Jain
  2017-10-11  4:46   ` [PATCH v3 " Anand Jain
  1 sibling, 0 replies; 10+ messages in thread
From: Anand Jain @ 2017-10-11  4:34 UTC (permalink / raw)
  To: linux-btrfs

add_missing_dev() can return device pointer so that IS_ERR/
PTR_ERR can be used to check for the actual error occurred
in the function.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>

---
 fs/btrfs/volumes.c | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 0e8f16c305df..1fb98c2ab9c0 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -6249,7 +6249,7 @@ static struct btrfs_device *add_missing_dev(struct btrfs_fs_devices *fs_devices,
 
 	device = btrfs_alloc_device(NULL, &devid, dev_uuid);
 	if (IS_ERR(device))
-		return NULL;
+		return device;
 
 	list_add(&device->dev_list, &fs_devices->devices);
 	device->fs_devices = fs_devices;
@@ -6454,9 +6454,12 @@ static int read_one_chunk(struct btrfs_fs_info *fs_info, struct btrfs_key *key,
 			map->stripes[i].dev =
 				add_missing_dev(fs_info->fs_devices, devid,
 						uuid);
-			if (!map->stripes[i].dev) {
+			if (IS_ERR(map->stripes[i].dev)) {
 				free_extent_map(em);
-				return -EIO;
+				btrfs_err(fs_info,
+					"failed to init missing dev %llu %ld",
+					devid, PTR_ERR(map->stripes[i].dev));
+				return PTR_ERR(map->stripes[i].dev);
 			}
 			btrfs_report_missing_device(fs_info, devid, uuid);
 		}
@@ -6582,8 +6585,12 @@ static int read_one_dev(struct btrfs_fs_info *fs_info,
 		}
 
 		device = add_missing_dev(fs_devices, devid, dev_uuid);
-		if (!device)
-			return -ENOMEM;
+		if (IS_ERR(device)) {
+			btrfs_err(fs_info,
+				"failed to add missing dev %llu %ld",
+				devid, PTR_ERR(device));
+			return PTR_ERR(device);
+		}
 		btrfs_report_missing_device(fs_info, devid, dev_uuid);
 	} else {
 		if (!device->bdev) {
-- 
2.13.1


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

* [PATCH v3 1/4] btrfs: add_missing_dev() should return the actual error
  2017-10-11  0:52 ` [PATCH v2 1/4] btrfs: add_missing_dev() should return the actual error Liu Bo
  2017-10-11  4:34   ` [PATCH v2.1 " Anand Jain
@ 2017-10-11  4:46   ` Anand Jain
  2017-10-13 12:14     ` David Sterba
  1 sibling, 1 reply; 10+ messages in thread
From: Anand Jain @ 2017-10-11  4:46 UTC (permalink / raw)
  To: linux-btrfs

add_missing_dev() can return device pointer so that IS_ERR/
PTR_ERR can be used to check for the actual error occurred
in the function.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
---
v2: add btrfs_err in read_one_dev too
v3: fix wrong commit id used for git send and
    add missing change log

 fs/btrfs/volumes.c | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 0e8f16c305df..1fb98c2ab9c0 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -6249,7 +6249,7 @@ static struct btrfs_device *add_missing_dev(struct btrfs_fs_devices *fs_devices,
 
 	device = btrfs_alloc_device(NULL, &devid, dev_uuid);
 	if (IS_ERR(device))
-		return NULL;
+		return device;
 
 	list_add(&device->dev_list, &fs_devices->devices);
 	device->fs_devices = fs_devices;
@@ -6454,9 +6454,12 @@ static int read_one_chunk(struct btrfs_fs_info *fs_info, struct btrfs_key *key,
 			map->stripes[i].dev =
 				add_missing_dev(fs_info->fs_devices, devid,
 						uuid);
-			if (!map->stripes[i].dev) {
+			if (IS_ERR(map->stripes[i].dev)) {
 				free_extent_map(em);
-				return -EIO;
+				btrfs_err(fs_info,
+					"failed to init missing dev %llu %ld",
+					devid, PTR_ERR(map->stripes[i].dev));
+				return PTR_ERR(map->stripes[i].dev);
 			}
 			btrfs_report_missing_device(fs_info, devid, uuid);
 		}
@@ -6582,8 +6585,12 @@ static int read_one_dev(struct btrfs_fs_info *fs_info,
 		}
 
 		device = add_missing_dev(fs_devices, devid, dev_uuid);
-		if (!device)
-			return -ENOMEM;
+		if (IS_ERR(device)) {
+			btrfs_err(fs_info,
+				"failed to add missing dev %llu %ld",
+				devid, PTR_ERR(device));
+			return PTR_ERR(device);
+		}
 		btrfs_report_missing_device(fs_info, devid, dev_uuid);
 	} else {
 		if (!device->bdev) {
-- 
2.13.1


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

* Re: [PATCH v3 1/4] btrfs: add_missing_dev() should return the actual error
  2017-10-11  4:46   ` [PATCH v3 " Anand Jain
@ 2017-10-13 12:14     ` David Sterba
  0 siblings, 0 replies; 10+ messages in thread
From: David Sterba @ 2017-10-13 12:14 UTC (permalink / raw)
  To: Anand Jain; +Cc: linux-btrfs

On Wed, Oct 11, 2017 at 12:46:18PM +0800, Anand Jain wrote:
> add_missing_dev() can return device pointer so that IS_ERR/
> PTR_ERR can be used to check for the actual error occurred
> in the function.
> 
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> Reviewed-by: Liu Bo <bo.li.liu@oracle.com>

Reviewed-by: David Sterba <dsterba@suse.com>

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

* Re: [PATCH v2 2/4] btrfs: fix EIO misuse to report missing degraded option
  2017-10-09  3:07 ` [PATCH v2 2/4] btrfs: fix EIO misuse to report missing degraded option Anand Jain
@ 2017-10-13 12:16   ` David Sterba
  0 siblings, 0 replies; 10+ messages in thread
From: David Sterba @ 2017-10-13 12:16 UTC (permalink / raw)
  To: Anand Jain; +Cc: linux-btrfs

On Mon, Oct 09, 2017 at 11:07:44AM +0800, Anand Jain wrote:
> EIO is only for the IO failure to the device, avoid it.
> 
> Signed-off-by: Anand Jain <anand.jain@oracle.com>

Updated changelog.

Reviewed-by: David Sterba <dsterba@suse.com>

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

* Re: [PATCH v2 1/4] btrfs: add_missing_dev() should return the actual error
  2017-10-09  3:07 [PATCH v2 1/4] btrfs: add_missing_dev() should return the actual error Anand Jain
                   ` (3 preceding siblings ...)
  2017-10-11  0:52 ` [PATCH v2 1/4] btrfs: add_missing_dev() should return the actual error Liu Bo
@ 2017-10-13 12:28 ` David Sterba
  4 siblings, 0 replies; 10+ messages in thread
From: David Sterba @ 2017-10-13 12:28 UTC (permalink / raw)
  To: Anand Jain; +Cc: linux-btrfs

On Mon, Oct 09, 2017 at 11:07:43AM +0800, Anand Jain wrote:
> add_missing_dev() can return device pointer so that IS_ERR/
> PTR_ERR can be used to check for the actual error occurred
> in the function.
> 
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> ---

1-4 added, with some tweaks. Thanks.

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

end of thread, other threads:[~2017-10-13 12:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-09  3:07 [PATCH v2 1/4] btrfs: add_missing_dev() should return the actual error Anand Jain
2017-10-09  3:07 ` [PATCH v2 2/4] btrfs: fix EIO misuse to report missing degraded option Anand Jain
2017-10-13 12:16   ` David Sterba
2017-10-09  3:07 ` [PATCH v2 3/4] btrfs: declare btrfs_report_missing_device() static Anand Jain
2017-10-09  3:07 ` [PATCH v2 4/4] btrfs: fix use of error or warning for missing device Anand Jain
2017-10-11  0:52 ` [PATCH v2 1/4] btrfs: add_missing_dev() should return the actual error Liu Bo
2017-10-11  4:34   ` [PATCH v2.1 " Anand Jain
2017-10-11  4:46   ` [PATCH v3 " Anand Jain
2017-10-13 12:14     ` David Sterba
2017-10-13 12:28 ` [PATCH v2 " David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).