Message ID | 1456160876-14560-6-git-send-email-hch@lst.de (mailing list archive) |
---|---|
State | Superseded, archived |
Delegated to: | Jens Axboe |
Headers | show |
Christoph Hellwig <hch@lst.de> writes: > Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jeff Moyer <jmoyer@redhat.com> > --- > fs/direct-io.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/fs/direct-io.c b/fs/direct-io.c > index d6a9012..0a8d937 100644 > --- a/fs/direct-io.c > +++ b/fs/direct-io.c > @@ -445,7 +445,8 @@ static struct bio *dio_await_one(struct dio *dio) > __set_current_state(TASK_UNINTERRUPTIBLE); > dio->waiter = current; > spin_unlock_irqrestore(&dio->bio_lock, flags); > - if (!blk_poll(bdev_get_queue(dio->bio_bdev), dio->bio_cookie)) > + if (!(dio->iocb->ki_flags & IOCB_HIPRI) || > + !blk_poll(bdev_get_queue(dio->bio_bdev), dio->bio_cookie)) > io_schedule(); > /* wake up sets us TASK_RUNNING */ > spin_lock_irqsave(&dio->bio_lock, flags); -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/fs/direct-io.c b/fs/direct-io.c index d6a9012..0a8d937 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c @@ -445,7 +445,8 @@ static struct bio *dio_await_one(struct dio *dio) __set_current_state(TASK_UNINTERRUPTIBLE); dio->waiter = current; spin_unlock_irqrestore(&dio->bio_lock, flags); - if (!blk_poll(bdev_get_queue(dio->bio_bdev), dio->bio_cookie)) + if (!(dio->iocb->ki_flags & IOCB_HIPRI) || + !blk_poll(bdev_get_queue(dio->bio_bdev), dio->bio_cookie)) io_schedule(); /* wake up sets us TASK_RUNNING */ spin_lock_irqsave(&dio->bio_lock, flags);
Signed-off-by: Christoph Hellwig <hch@lst.de> --- fs/direct-io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)