From: Jens Axboe <axboe@fb.com>
To: <linux-block@vger.kernel.org>
Cc: <ming.lei@redhat.com>, <hch@lst.de>, Jens Axboe <axboe@fb.com>
Subject: [PATCH 2/6] mtip32xx: kill atomic argument to mtip_quiesce_io()
Date: Thu, 27 Apr 2017 16:51:30 -0600 [thread overview]
Message-ID: <1493333494-600-3-git-send-email-axboe@fb.com> (raw)
In-Reply-To: <1493333494-600-1-git-send-email-axboe@fb.com>
All callers now pass in GFP_KERNEL, get rid of the argument.
Signed-off-by: Jens Axboe <axboe@fb.com>
---
drivers/block/mtip32xx/mtip32xx.c | 20 +++++---------------
1 file changed, 5 insertions(+), 15 deletions(-)
diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c
index d81d797ee65d..36f3d34f2156 100644
--- a/drivers/block/mtip32xx/mtip32xx.c
+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -1035,14 +1035,12 @@ static bool mtip_pause_ncq(struct mtip_port *port,
*
* @port Pointer to port data structure
* @timeout Max duration to wait (ms)
- * @atomic gfp_t flag to indicate blockable context or not
*
* return value
* 0 Success
* -EBUSY Commands still active
*/
-static int mtip_quiesce_io(struct mtip_port *port, unsigned long timeout,
- gfp_t atomic)
+static int mtip_quiesce_io(struct mtip_port *port, unsigned long timeout)
{
unsigned long to;
unsigned int n;
@@ -1053,18 +1051,12 @@ static int mtip_quiesce_io(struct mtip_port *port, unsigned long timeout,
to = jiffies + msecs_to_jiffies(timeout);
do {
if (test_bit(MTIP_PF_SVC_THD_ACTIVE_BIT, &port->flags) &&
- test_bit(MTIP_PF_ISSUE_CMDS_BIT, &port->flags) &&
- atomic == GFP_KERNEL) {
+ test_bit(MTIP_PF_ISSUE_CMDS_BIT, &port->flags)) {
msleep(20);
continue; /* svc thd is actively issuing commands */
}
- if (atomic == GFP_KERNEL)
- msleep(100);
- else {
- cpu_relax();
- udelay(100);
- }
+ msleep(100);
if (mtip_check_surprise_removal(port->dd->pdev))
goto err_fault;
@@ -1142,8 +1134,7 @@ static int mtip_exec_internal_command(struct mtip_port *port,
if (fis->command != ATA_CMD_STANDBYNOW1) {
/* wait for io to complete if non atomic */
- if (mtip_quiesce_io(port,
- MTIP_QUIESCE_IO_TIMEOUT_MS, GFP_KERNEL) < 0) {
+ if (mtip_quiesce_io(port, MTIP_QUIESCE_IO_TIMEOUT_MS) < 0) {
dev_warn(&dd->pdev->dev, "Failed to quiesce IO\n");
mtip_put_int_command(dd, int_cmd);
clear_bit(MTIP_PF_IC_ACTIVE_BIT, &port->flags);
@@ -4106,8 +4097,7 @@ static int mtip_block_remove(struct driver_data *dd)
* Explicitly wait here for IOs to quiesce,
* as mtip_standby_drive usually won't wait for IOs.
*/
- if (!mtip_quiesce_io(dd->port, MTIP_QUIESCE_IO_TIMEOUT_MS,
- GFP_KERNEL))
+ if (!mtip_quiesce_io(dd->port, MTIP_QUIESCE_IO_TIMEOUT_MS))
mtip_standby_drive(dd);
}
else
--
2.7.4
next prev parent reply other threads:[~2017-04-27 22:51 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-27 22:51 [PATCH 0/6] Fixup mtip32xx for scheduling Jens Axboe
2017-04-27 22:51 ` [PATCH 1/6] mtip32xx: get rid of 'atomic' argument to mtip_exec_internal_command() Jens Axboe
2017-04-27 23:19 ` Bart Van Assche
2017-04-27 22:51 ` Jens Axboe [this message]
2017-04-27 23:20 ` [PATCH 2/6] mtip32xx: kill atomic argument to mtip_quiesce_io() Bart Van Assche
2017-04-27 22:51 ` [PATCH 3/6] mtip32xx: abstract out "are any commands active" helper Jens Axboe
2017-04-27 23:21 ` Bart Van Assche
2017-04-27 22:51 ` [PATCH 4/6] blk-mq: don't bypass scheduler for reserved requests Jens Axboe
2017-04-28 4:04 ` Ming Lei
2017-04-28 4:13 ` Jens Axboe
2017-04-27 22:51 ` [PATCH 5/6] mtip32xx: convert internal command issue to block IO path Jens Axboe
2017-04-27 23:29 ` Bart Van Assche
2017-04-27 23:35 ` Jens Axboe
2017-04-27 22:51 ` [PATCH 6/6] Revert "mtip32xx: pass BLK_MQ_F_NO_SCHED" Jens Axboe
2017-04-28 4:06 ` Ming Lei
2017-04-27 23:12 ` [PATCH 0/6] Fixup mtip32xx for scheduling Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2017-04-28 14:01 [PATCH v2 " Jens Axboe
2017-04-28 14:01 ` [PATCH 2/6] mtip32xx: kill atomic argument to mtip_quiesce_io() Jens Axboe
2017-04-28 14:31 [PATCH v2a 0/6]: Fixup mtip32xx for scheduling Jens Axboe
2017-04-28 14:31 ` [PATCH 2/6] mtip32xx: kill atomic argument to mtip_quiesce_io() Jens Axboe
2017-04-28 14:38 ` Christoph Hellwig
2017-04-28 16:54 [PATCH v4 0/6] Fixup mtip32xx for scheduling Jens Axboe
2017-04-28 16:54 ` [PATCH 2/6] mtip32xx: kill atomic argument to mtip_quiesce_io() 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=1493333494-600-3-git-send-email-axboe@fb.com \
--to=axboe@fb.com \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=ming.lei@redhat.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 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).