[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230801172201.1923299-5-hch@lst.de>
Date: Tue, 1 Aug 2023 19:21:59 +0200
From: Christoph Hellwig <hch@....de>
To: Jens Axboe <axboe@...nel.dk>
Cc: "Darrick J. Wong" <djwong@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Matthew Wilcox <willy@...radead.org>,
Christian Brauner <christian@...uner.io>,
linux-block@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-xfs@...r.kernel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, Luis Chamberlain <mcgrof@...nel.org>,
Hannes Reinecke <hare@...e.de>,
Johannes Thumshirn <johannes.thumshirn@....com>
Subject: [PATCH 4/6] block: stop setting ->direct_IO
Direct I/O on block devices now nevers goes through aops->direct_IO.
Stop setting it and set the FMODE_CAN_ODIRECT in ->open instead.
Signed-off-by: Christoph Hellwig <hch@....de>
Reviewed-by: Luis Chamberlain <mcgrof@...nel.org>
Reviewed-by: Hannes Reinecke <hare@...e.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@....com>
---
block/fops.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/block/fops.c b/block/fops.c
index 8a05d99166e3bd..f0b822c28ddfe2 100644
--- a/block/fops.c
+++ b/block/fops.c
@@ -428,7 +428,6 @@ const struct address_space_operations def_blk_aops = {
.writepage = blkdev_writepage,
.write_begin = blkdev_write_begin,
.write_end = blkdev_write_end,
- .direct_IO = blkdev_direct_IO,
.migrate_folio = buffer_migrate_folio_norefs,
.is_dirty_writeback = buffer_check_dirty_writeback,
};
@@ -505,7 +504,7 @@ static int blkdev_open(struct inode *inode, struct file *filp)
* during an unstable branch.
*/
filp->f_flags |= O_LARGEFILE;
- filp->f_mode |= FMODE_BUF_RASYNC;
+ filp->f_mode |= FMODE_BUF_RASYNC | FMODE_CAN_ODIRECT;
/*
* Use the file private data to store the holder for exclusive openes.
--
2.39.2
Powered by blists - more mailing lists