]> git.baikalelectronics.ru Git - kernel.git/commit
fuse: optimize __fuse_direct_io()
authorMaxim Patlasov <mpatlasov@parallels.com>
Fri, 26 Oct 2012 15:50:36 +0000 (19:50 +0400)
committerMiklos Szeredi <mszeredi@suse.cz>
Thu, 24 Jan 2013 15:21:28 +0000 (16:21 +0100)
commit04304a37409e71924d31e23273d808ea2ce693b6
tree936c0ec109cc6c92e1264c33d8cde7ace637f97a
parent40bee325b5f60eb81a9e55dd7de08a22b7bfea53
fuse: optimize __fuse_direct_io()

__fuse_direct_io() allocates fuse-requests by calling fuse_get_req(fc, n). The
patch calculates 'n' based on iov[] array. This is useful because allocating
FUSE_MAX_PAGES_PER_REQ page pointers and descriptors for each fuse request
would be waste of memory in case of iov-s of smaller size.

Signed-off-by: Maxim Patlasov <mpatlasov@parallels.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
fs/fuse/file.c