[RESEND,2/3] ublk: mention WRITE_ZEROES in comment of ublk_complete_rq()

Message ID 20230207070839.370817-3-ZiyangZhang@linux.alibaba.com
State New
Headers
Series cleanup for ublk |

Commit Message

Ziyang Zhang Feb. 7, 2023, 7:08 a.m. UTC
  WRITE_ZEROES won't return bytes returned just like FLUSH and DISCARD,
and we can end it directly. Add missing comment for it in
ublk_complete_rq().

Signed-off-by: Ziyang Zhang <ZiyangZhang@linux.alibaba.com>
---
 drivers/block/ublk_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Ming Lei Feb. 7, 2023, 2:07 p.m. UTC | #1
On Tue, Feb 07, 2023 at 03:08:38PM +0800, Ziyang Zhang wrote:
> WRITE_ZEROES won't return bytes returned just like FLUSH and DISCARD,
> and we can end it directly. Add missing comment for it in
> ublk_complete_rq().
> 
> Signed-off-by: Ziyang Zhang <ZiyangZhang@linux.alibaba.com>
> ---
>  drivers/block/ublk_drv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c
> index 55fccce68a9c..06eddefdf02a 100644
> --- a/drivers/block/ublk_drv.c
> +++ b/drivers/block/ublk_drv.c
> @@ -665,7 +665,7 @@ static void ublk_complete_rq(struct request *req)
>  	}
>  
>  	/*
> -	 * FLUSH or DISCARD usually won't return bytes returned, so end them
> +	 * FLUSH, DISCARD or WRITE_ZEROES usually won't return bytes returned, so end them
>  	 * directly.
>  	 *
>  	 * Both the two needn't unmap.

Reviewed-by: Ming Lei <ming.lei@redhat.com>


Thanks, 
Ming
  

Patch

diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c
index 55fccce68a9c..06eddefdf02a 100644
--- a/drivers/block/ublk_drv.c
+++ b/drivers/block/ublk_drv.c
@@ -665,7 +665,7 @@  static void ublk_complete_rq(struct request *req)
 	}
 
 	/*
-	 * FLUSH or DISCARD usually won't return bytes returned, so end them
+	 * FLUSH, DISCARD or WRITE_ZEROES usually won't return bytes returned, so end them
 	 * directly.
 	 *
 	 * Both the two needn't unmap.