Thread (20 messages) 20 messages, 6 authors, 2019-12-18

Re: [PATCH 1/6] fs: add read support for RWF_UNCACHED

From: Jens Axboe <axboe@kernel.dk>
Date: 2019-12-17 16:42:01
Also in: linux-fsdevel, linux-mm

On 12/17/19 8:57 AM, Matthew Wilcox wrote:
On Tue, Dec 17, 2019 at 07:39:43AM -0700, Jens Axboe wrote:
quoted
+static void buffered_put_page(struct page *page, bool clear_mapping)
+{
+	if (clear_mapping)
+		page->mapping = NULL;
+	put_page(page);
+}
I'm not a huge fan of the variable name 'clear_mapping'.  It describes
what it does rather than why it does it.  So maybe 'drop_immediate'?
Or 'uncached'?
I do like 'uncached' a lot better, I've made that change.
I think this needs to be:

				if (!did_dio_begin)
					inode_dio_begin(inode);
				did_dio_begin = true;

otherwise inode->i_dio_count is going to be increased once per uncached
page.  Do you have a test in your test-suite that does I/O to more than
one page at a time?
Good catch! Yes it does, I have fixed that up. Thanks.

-- 
Jens Axboe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help