fuse: add support for SEEK_HOLE and SEEK_DATA in lseek

A useful performance improvement for accessing virtual machine images
via FUSE mount.

See https://bugzilla.redhat.com/show_bug.cgi?id=1220173 for a use-case
for glusterFS.

Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
This commit is contained in:
Ravishankar N
2015-06-30 23:40:22 +05:30
committed by Miklos Szeredi
parent 3ca8138f01
commit 0b5da8db14
3 changed files with 84 additions and 9 deletions

View File

@@ -605,6 +605,9 @@ struct fuse_conn {
/** Does the filesystem support asynchronous direct-IO submission? */
unsigned async_dio:1;
/** Is lseek not implemented by fs? */
unsigned no_lseek:1;
/** The number of requests waiting for completion */
atomic_t num_waiting;