diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2010-07-12 08:41:40 -0400 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2010-07-12 08:41:40 -0400 |
commit | 2d45ba381a74a743eeaa2b06c7c5c0d2bf73ba1a (patch) | |
tree | 8a195d072cab99c088004b74ac5889252f348542 /include/linux/fuse.h | |
parent | a1d75f258230b75d46aecdf28b2e732413028863 (diff) |
fuse: add retrieve request
Userspace filesystem can request data to be retrieved from the inode's
mapping. This request is synchronous and the retrieved data is queued
as a new request. If the write to the fuse device returns an error
then the retrieve request was not completed and a reply will not be
sent.
Only present pages are returned in the retrieve reply. Retrieving
stops when it finds a non-present page and only data prior to that is
returned.
This request doesn't change the dirty state of pages.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'include/linux/fuse.h')
-rw-r--r-- | include/linux/fuse.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/linux/fuse.h b/include/linux/fuse.h index a90bd49834aa..c3c578e09833 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h | |||
@@ -40,6 +40,7 @@ | |||
40 | * | 40 | * |
41 | * 7.15 | 41 | * 7.15 |
42 | * - add store notify | 42 | * - add store notify |
43 | * - add retrieve notify | ||
43 | */ | 44 | */ |
44 | 45 | ||
45 | #ifndef _LINUX_FUSE_H | 46 | #ifndef _LINUX_FUSE_H |
@@ -254,6 +255,7 @@ enum fuse_opcode { | |||
254 | FUSE_DESTROY = 38, | 255 | FUSE_DESTROY = 38, |
255 | FUSE_IOCTL = 39, | 256 | FUSE_IOCTL = 39, |
256 | FUSE_POLL = 40, | 257 | FUSE_POLL = 40, |
258 | FUSE_NOTIFY_REPLY = 41, | ||
257 | 259 | ||
258 | /* CUSE specific operations */ | 260 | /* CUSE specific operations */ |
259 | CUSE_INIT = 4096, | 261 | CUSE_INIT = 4096, |
@@ -264,6 +266,7 @@ enum fuse_notify_code { | |||
264 | FUSE_NOTIFY_INVAL_INODE = 2, | 266 | FUSE_NOTIFY_INVAL_INODE = 2, |
265 | FUSE_NOTIFY_INVAL_ENTRY = 3, | 267 | FUSE_NOTIFY_INVAL_ENTRY = 3, |
266 | FUSE_NOTIFY_STORE = 4, | 268 | FUSE_NOTIFY_STORE = 4, |
269 | FUSE_NOTIFY_RETRIEVE = 5, | ||
267 | FUSE_NOTIFY_CODE_MAX, | 270 | FUSE_NOTIFY_CODE_MAX, |
268 | }; | 271 | }; |
269 | 272 | ||
@@ -579,4 +582,22 @@ struct fuse_notify_store_out { | |||
579 | __u32 padding; | 582 | __u32 padding; |
580 | }; | 583 | }; |
581 | 584 | ||
585 | struct fuse_notify_retrieve_out { | ||
586 | __u64 notify_unique; | ||
587 | __u64 nodeid; | ||
588 | __u64 offset; | ||
589 | __u32 size; | ||
590 | __u32 padding; | ||
591 | }; | ||
592 | |||
593 | /* Matches the size of fuse_write_in */ | ||
594 | struct fuse_notify_retrieve_in { | ||
595 | __u64 dummy1; | ||
596 | __u64 offset; | ||
597 | __u32 size; | ||
598 | __u32 dummy2; | ||
599 | __u64 dummy3; | ||
600 | __u64 dummy4; | ||
601 | }; | ||
602 | |||
582 | #endif /* _LINUX_FUSE_H */ | 603 | #endif /* _LINUX_FUSE_H */ |