* [PATCH] block: add back plugging in __blkdev_direct_IO
@ 2016-12-22 18:20 Christoph Hellwig
2016-12-22 18:22 ` Jens Axboe
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2016-12-22 18:20 UTC (permalink / raw)
To: axboe; +Cc: loberman, linux-block
This allows sending larger than 1 MB requess to devices that support
large I/O sizes.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Laurence Oberman <loberman@redhat.com>
---
fs/block_dev.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 7c45072..206a92a 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -328,6 +328,7 @@ __blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter, int nr_pages)
struct file *file = iocb->ki_filp;
struct inode *inode = bdev_file_inode(file);
struct block_device *bdev = I_BDEV(inode);
+ struct blk_plug plug;
struct blkdev_dio *dio;
struct bio *bio;
bool is_read = (iov_iter_rw(iter) == READ);
@@ -353,6 +354,7 @@ __blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter, int nr_pages)
dio->multi_bio = false;
dio->should_dirty = is_read && (iter->type == ITER_IOVEC);
+ blk_start_plug(&plug);
for (;;) {
bio->bi_bdev = bdev;
bio->bi_iter.bi_sector = pos >> 9;
@@ -394,6 +396,7 @@ __blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter, int nr_pages)
submit_bio(bio);
bio = bio_alloc(GFP_KERNEL, nr_pages);
}
+ blk_finish_plug(&plug);
if (!dio->is_sync)
return -EIOCBQUEUED;
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] block: add back plugging in __blkdev_direct_IO
2016-12-22 18:20 [PATCH] block: add back plugging in __blkdev_direct_IO Christoph Hellwig
@ 2016-12-22 18:22 ` Jens Axboe
2016-12-22 18:29 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: Jens Axboe @ 2016-12-22 18:22 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: loberman, linux-block
On 12/22/2016 11:20 AM, Christoph Hellwig wrote:
> This allows sending larger than 1 MB requess to devices that support
> large I/O sizes.
Thanks, I'll queue it up for this series.
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] block: add back plugging in __blkdev_direct_IO
2016-12-22 18:22 ` Jens Axboe
@ 2016-12-22 18:29 ` Christoph Hellwig
2016-12-22 18:31 ` Jens Axboe
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2016-12-22 18:29 UTC (permalink / raw)
To: Jens Axboe; +Cc: Christoph Hellwig, loberman, linux-block
On Thu, Dec 22, 2016 at 11:22:25AM -0700, Jens Axboe wrote:
> On 12/22/2016 11:20 AM, Christoph Hellwig wrote:
> > This allows sending larger than 1 MB requess to devices that support
> > large I/O sizes.
>
> Thanks, I'll queue it up for this series.
btw, s/requess/request/ above as just pointed out off-list.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] block: add back plugging in __blkdev_direct_IO
2016-12-22 18:29 ` Christoph Hellwig
@ 2016-12-22 18:31 ` Jens Axboe
0 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2016-12-22 18:31 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Christoph Hellwig, loberman, linux-block
On 12/22/2016 11:29 AM, Christoph Hellwig wrote:
> On Thu, Dec 22, 2016 at 11:22:25AM -0700, Jens Axboe wrote:
>> On 12/22/2016 11:20 AM, Christoph Hellwig wrote:
>>> This allows sending larger than 1 MB requess to devices that support
>>> large I/O sizes.
>>
>> Thanks, I'll queue it up for this series.
>
> btw, s/requess/request/ above as just pointed out off-list.
I fixed it up.
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-12-22 18:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-22 18:20 [PATCH] block: add back plugging in __blkdev_direct_IO Christoph Hellwig
2016-12-22 18:22 ` Jens Axboe
2016-12-22 18:29 ` Christoph Hellwig
2016-12-22 18:31 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox