Thread (38 messages) 38 messages, 7 authors, 2014-03-20

Re: [PATCH v6 06/22] Replace XIP read and write with DAX I/O

From: Matthew Wilcox <hidden>
Date: 2014-03-11 12:53:57
Also in: linux-fsdevel, lkml

On Mon, Mar 10, 2014 at 06:32:38PM -0600, Toshi Kani wrote:
On Tue, 2014-02-25 at 09:18 -0500, Matthew Wilcox wrote:
quoted
Use the generic AIO infrastructure instead of custom read and write
methods.  In addition to giving us support for AIO, this adds the missing
locking between read() and truncate().
 :
quoted
+static void dax_new_buf(void *addr, unsigned size, unsigned first,
+					loff_t offset, loff_t end, int rw)
+{
+	loff_t final = end - offset;	/* The final byte in this buffer */
I may be missing something, but shouldn't it take first into account?

	loff_t final = end - offset + first;
Yes it should.  Thanks!  (Fortunately, this is only a performance problem
as we'll end up zeroing more than we ought to, which is fine as it will
be overwritten by the copy_from_user later)

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help