From: Hannes Reinecke <hare@suse.de>
To: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
James Bottomley <james.bottomley@hansenpartnership.com>,
linux-block@vger.kernel.org, linux-scsi@vger.kernel.org,
Hannes Reinecke <hare@suse.de>
Subject: [PATCH 1/2] block: document BLK_STS_AGAIN usage
Date: Tue, 24 May 2022 07:56:30 +0200 [thread overview]
Message-ID: <20220524055631.85480-2-hare@suse.de> (raw)
In-Reply-To: <20220524055631.85480-1-hare@suse.de>
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(+)
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)
/*
--
2.29.2
next prev parent reply other threads:[~2022-05-24 5:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-24 5:56 [PATCH 0/2] block,scsi: BLK_STS_AGAIN clarification Hannes Reinecke
2022-05-24 5:56 ` Hannes Reinecke [this message]
2022-05-24 8:36 ` [PATCH 1/2] block: document BLK_STS_AGAIN usage Christoph Hellwig
2022-05-24 15:14 ` Chaitanya Kulkarni
2022-05-24 5:56 ` [PATCH 2/2] scsi: return BLK_STS_TRANSPORT for ALUA transitioning Hannes Reinecke
2022-05-24 15:15 ` Chaitanya Kulkarni
2022-06-02 2:39 ` Martin K. Petersen
2022-05-28 2:38 ` (subset) [PATCH 0/2] block,scsi: BLK_STS_AGAIN clarification Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220524055631.85480-2-hare@suse.de \
--to=hare@suse.de \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=james.bottomley@hansenpartnership.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.