fuse: implement unsolicited notification

Clients always used to write only in response to read requests.  To
implement poll efficiently, clients should be able to issue
unsolicited notifications.  This patch implements basic notification
support.

Zero fuse_out_header.unique is now accepted and considered unsolicited
notification and the error field contains notification code.  This
patch doesn't implement any actual notification.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
This commit is contained in:
Tejun Heo 2008-11-26 12:03:55 +01:00 committed by Miklos Szeredi
parent acf99433d9
commit 8599396b50
2 changed files with 29 additions and 2 deletions

View file

@ -203,6 +203,10 @@ enum fuse_opcode {
FUSE_IOCTL = 39,
};
enum fuse_notify_code {
FUSE_NOTIFY_CODE_MAX,
};
/* The read buffer is required to be at least 8k, but may be much larger */
#define FUSE_MIN_READ_BUFFER 8192