diff mbox series

[1/2] block: document BLK_STS_AGAIN usage

Message ID 20220524055631.85480-2-hare@suse.de (mailing list archive)
State Not Applicable
Headers show
Series block,scsi: BLK_STS_AGAIN clarification | expand

Commit Message

Hannes Reinecke May 24, 2022, 5:56 a.m. UTC
BLK_STS_AGAIN should only be used if RQF_NOWAIT is set and the bio
would block. So we'd better document that to avoid accidental misuse.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 include/linux/blk_types.h | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Christoph Hellwig May 24, 2022, 8:36 a.m. UTC | #1
On Tue, May 24, 2022 at 07:56:30AM +0200, Hannes Reinecke wrote:
> BLK_STS_AGAIN should only be used if RQF_NOWAIT is set and the bio
> would block. So we'd better document that to avoid accidental misuse.

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>

given that nothing in patch 2 depends on this it would be good to just
get this into the block tree ASAP.
Chaitanya Kulkarni May 24, 2022, 3:14 p.m. UTC | #2
On 5/23/22 22:56, Hannes Reinecke wrote:
> BLK_STS_AGAIN should only be used if RQF_NOWAIT is set and the bio
> would block. So we'd better document that to avoid accidental misuse.
> 
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---


Looks good.

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>

-ck
diff mbox series

Patch

diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index 1973ef9bd40f..8fb8f79cb74e 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -105,6 +105,10 @@  typedef u16 blk_short_t;
 /* hack for device mapper, don't use elsewhere: */
 #define BLK_STS_DM_REQUEUE    ((__force blk_status_t)11)
 
+/*
+ * BLK_STS_AGAIN should only be returned if RQF_NOWAIT is set
+ * and the bio would block (cf bio_wouldblock_error())
+ */
 #define BLK_STS_AGAIN		((__force blk_status_t)12)
 
 /*