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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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:
> > 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().
> > 
>  :
> > +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 from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux