]> git.karo-electronics.de Git - karo-tx-linux.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>
Tue, 6 Nov 2012 12:09:37 +0000 (13:09 +0100)
commit96afac15f38cda787b3f585b0d96d4349113993b
treeb19dadbec393b703ea2ac4dc39b8fe0c41e295ef
parent71fc26737662178568e007d82d7db7ba352a4e6d
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