summaryrefslogtreecommitdiff
path: root/fs/fuse/dir.c
diff options
context:
space:
mode:
authorMaxim Patlasov <mpatlasov@parallels.com>2012-10-26 19:49:33 +0400
committerMiklos Szeredi <mszeredi@suse.cz>2013-01-24 19:21:27 +0400
commit85f40aec887110ae6bbefa87988def4606a3d583 (patch)
tree1408110166343717d8b2710f337882309451b7af /fs/fuse/dir.c
parentb2430d7567a376b3685627ca7e9d712f6f27d49b (diff)
downloadlinux-85f40aec887110ae6bbefa87988def4606a3d583.tar.xz
fuse: use req->page_descs[] for argpages cases
Previously, anyone who set flag 'argpages' only filled req->pages[] and set per-request page_offset. This patch re-works all cases where argpages=1 to fill req->page_descs[] properly. Having req->page_descs[] filled properly allows to re-work fuse_copy_pages() to copy page fragments described by req->page_descs[]. This will be useful for next patches optimizing direct_IO. Signed-off-by: Maxim Patlasov <mpatlasov@parallels.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'fs/fuse/dir.c')
-rw-r--r--fs/fuse/dir.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index d04bcc5cccd0..ed8f8c55ce10 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -1317,6 +1317,7 @@ static int fuse_readdir(struct file *file, void *dstbuf, filldir_t filldir)
req->out.argpages = 1;
req->num_pages = 1;
req->pages[0] = page;
+ req->page_descs[0].length = PAGE_SIZE;
if (fc->do_readdirplus) {
attr_version = fuse_get_attr_version(fc);
fuse_read_fill(req, file, file->f_pos, PAGE_SIZE,