[075/117] nfsd: Convert to the scsi_status union

Message ID 20210420000845.25873-76-bvanassche@acm.org
State New
Headers show
Series
  • Make better use of static type checking
Related show

Commit Message

Bart Van Assche April 20, 2021, 12:08 a.m.
An explanation of the purpose of this patch is available in the patch
"scsi: Introduce the scsi_status union".

Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 fs/nfsd/blocklayout.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Chuck Lever III April 20, 2021, 2:36 p.m. | #1
> On Apr 19, 2021, at 8:08 PM, Bart Van Assche <bvanassche@acm.org> wrote:
> 
> An explanation of the purpose of this patch is available in the patch
> "scsi: Introduce the scsi_status union".
> 
> Cc: "J. Bruce Fields" <bfields@fieldses.org>
> Cc: Chuck Lever <chuck.lever@oracle.com>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>

Hi Bart, I assume this is going into v5.13 via the SCSI tree?
Do you need an Acked-by: from the NFSD maintainers?


> ---
> fs/nfsd/blocklayout.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/nfsd/blocklayout.c b/fs/nfsd/blocklayout.c
> index 1058659a8d31..f10f559684a6 100644
> --- a/fs/nfsd/blocklayout.c
> +++ b/fs/nfsd/blocklayout.c
> @@ -255,9 +255,9 @@ static int nfsd4_scsi_identify_device(struct block_device *bdev,
> 	req->cmd_len = COMMAND_SIZE(INQUIRY);
> 
> 	blk_execute_rq(NULL, rq, 1);
> -	if (req->result) {
> +	if (req->status.combined) {
> 		pr_err("pNFS: INQUIRY 0x83 failed with: %x\n",
> -			req->result);
> +			req->status.combined);
> 		error = -EIO;
> 		goto out_put_request;
> 	}

--
Chuck Lever

Patch

diff --git a/fs/nfsd/blocklayout.c b/fs/nfsd/blocklayout.c
index 1058659a8d31..f10f559684a6 100644
--- a/fs/nfsd/blocklayout.c
+++ b/fs/nfsd/blocklayout.c
@@ -255,9 +255,9 @@  static int nfsd4_scsi_identify_device(struct block_device *bdev,
 	req->cmd_len = COMMAND_SIZE(INQUIRY);
 
 	blk_execute_rq(NULL, rq, 1);
-	if (req->result) {
+	if (req->status.combined) {
 		pr_err("pNFS: INQUIRY 0x83 failed with: %x\n",
-			req->result);
+			req->status.combined);
 		error = -EIO;
 		goto out_put_request;
 	}