Re: [PATCH] fuse: enable larger read buffers for readdir [v2].

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

 



Hi,
         plus = fuse_use_readdirplus(inode, ctx);
         ap->args.out_pages = true;
-       ap->num_pages = 1;
+       ap->num_pages = READDIR_PAGES;

No.  This is the array lenght, which is 1.  This is the hack I guess,
which makes the above trick work.

Hmm, ap->num_pages / ap->pages[] is used in fuse_copy_pages, but so is ap->descs[] - shouldn't the patch caused an out-of-bound access?
Out of interest, would you mind to explain how the hack worked?

Apparently it shouldn't ... my understanding of how pages* worked was all wrong.

I'm guessing since all the data fits in the first page (ap->pages[0] in other words, of length/size desc.length) that the other pages are never accessed.  Looking at fuse_copy_pages this does indeed seem to be the case.  So I ended up just being really, really lucky here.

Kind regards,
Jaco




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

  Powered by Linux