@@ -990,3 +990,102 @@ type PollOp struct {
990990 Revents fusekernel.PollEvents
991991 OpContext OpContext
992992}
993+
994+ // Notify consumers waiting for poll/epoll that events are incoming
995+ // for the specified kernel handle. The kernel will send a PollOp request
996+ // to get the event mask after receiving this notification
997+ type NotifyPollWakeup struct {
998+ Kh uint64
999+ }
1000+
1001+ // Notify to invalidate cache for an inode.
1002+ //
1003+ // If the filesystem has writeback caching enabled, invalidating an inode
1004+ // will first trigger a writeback of all dirty pages. The call will block
1005+ // until all writeback requests have completed and the inode has been
1006+ // invalidated. It will, however, not wait for completion of pending writeback
1007+ // requests that have been issued before.
1008+ type NotifyInvalInode struct {
1009+ Inode InodeID
1010+ Offset int64
1011+ Length int64
1012+ }
1013+
1014+ // Notify to invalidate parent attributes and the dentry matching parent/name
1015+ //
1016+ // To avoid a deadlock this request must not be sent in the execution path
1017+ // of a related filesytem operation or within any code that could hold a lock
1018+ // that could be needed to execute such an operation. As of kernel 4.18, a
1019+ // "related operation" is a lookup(), symlink(), mknod(), mkdir(), unlink(),
1020+ // rename(), link() or create() request for the parent, and a setattr(),
1021+ // unlink(), rmdir(), rename(), setxattr(), removexattr(), readdir() or
1022+ // readdirplus() request for the inode itself.
1023+ //
1024+ // When called correctly, it will never block.
1025+ type NotifyInvalEntry struct {
1026+ Parent InodeID
1027+ Name string
1028+ }
1029+
1030+ // This request behaves like NotifyInvalEntry with the following additional
1031+ // effect (at least as of Linux kernel 4.8):
1032+ //
1033+ // If the provided child inode matches the inode that is currently associated
1034+ // with the cached dentry, and if there are any inotify watches registered for
1035+ // the dentry, then the watchers are informed that the dentry has been deleted.
1036+ //
1037+ // To avoid a deadlock this request must not be sent while executing a
1038+ // related filesytem operation or while holding a lock that could be needed to
1039+ // execute such an operation.
1040+ type NotifyDelete struct {
1041+ Parent InodeID
1042+ Child InodeID
1043+ Name string
1044+ }
1045+
1046+ // Store data to the kernel buffers
1047+ //
1048+ // Synchronously store data in the kernel buffers belonging to the given inode.
1049+ // The stored data is marked up-to-date (no read will be performed against it,
1050+ // unless it's invalidated or evicted from the cache).
1051+ //
1052+ // If the stored data overflows the current file size, then the size is extended,
1053+ // similarly to a write(2) on the filesystem.
1054+ //
1055+ // If this request returns an error, then the store wasn't fully completed, but
1056+ // it may have been partially completed.
1057+ type NotifyStore struct {
1058+ Inode InodeID
1059+ Offset uint64
1060+ Length uint32
1061+ Data [][]byte
1062+ }
1063+
1064+ // Retrieve data from the kernel buffers belonging to the given inode
1065+ //
1066+ // If successful then the kernel will send a NotifyRetrieveReplyOp as a reply.
1067+ // Only present pages are returned in the retrieve reply. Retrieving stops when it
1068+ // finds a non-present page and only data prior to that is returned.
1069+ //
1070+ // If this request returns an error, then the retrieve will not be completed and
1071+ // no reply will be sent.
1072+ //
1073+ // This request doesn't change the dirty state of pages in the kernel buffer. For
1074+ // dirty pages the write() method will be called regardless of having been retrieved
1075+ // previously.
1076+ type NotifyRetrieve struct {
1077+ Inode InodeID
1078+ Unique uint64
1079+ Offset uint64
1080+ Length uint32
1081+ }
1082+
1083+ // Matches the size of WriteIn
1084+ type NotifyRetrieveReplyOp struct {
1085+ Inode InodeID
1086+ Unique uint64
1087+ Offset uint64
1088+ Length uint32
1089+
1090+ OpContext OpContext
1091+ }
0 commit comments