Currently userspace is able to notify the kernel to invalidate the cache for an inode. This means that, if all the inodes in a filesystem need to be invalidated, then userspace needs to iterate through all of them and do this kernel notification separately. This patch adds the concept of 'epoch': each fuse connection will have the current epoch initialized and every new dentry will have it's d_time set to the current epoch value. A new operation will then allow userspace to increment the epoch value. Every time a dentry is d_revalidate()'ed, it's epoch is compared with the current connection epoch and invalidated if it's value is different.
Showing the changes to include/uapi/linux (1 of 6 files). Show all
Unified · Split
| @@ -232,6 +232,9 @@ · 231 unmodified lines | ||
| 232 | 232 | * |
| 233 | 233 | * 7.43 |
| 234 | 234 | * - add FUSE_REQUEST_TIMEOUT |
| 235 | + * | |
| 236 | + * 7.44 | |
| 237 | + * - add FUSE_NOTIFY_INC_EPOCH | |
| 235 | 238 | */ |
| 236 | 239 | |
| 237 | 240 | #ifndef _LINUX_FUSE_H |
| @@ -267,7 +270,7 @@ · 29 unmodified lines | ||
| 267 | 270 | #define FUSE_KERNEL_VERSION 7 |
| 268 | 271 | |
| 269 | 272 | /** Minor version number of this interface */ |
| 270 | −#define FUSE_KERNEL_MINOR_VERSION 43 | |
| 273 | +#define FUSE_KERNEL_MINOR_VERSION 44 | |
| 271 | 274 | |
| 272 | 275 | /** The node ID of the root inode */ |
| 273 | 276 | #define FUSE_ROOT_ID 1 |
| @@ -671,6 +674,7 @@ enum fuse_notify_code { · 397 unmodified lines | ||
| 671 | 674 | FUSE_NOTIFY_RETRIEVE = 5, |
| 672 | 675 | FUSE_NOTIFY_DELETE = 6, |
| 673 | 676 | FUSE_NOTIFY_RESEND = 7, |
| 677 | + FUSE_NOTIFY_INC_EPOCH = 8, | |
| 674 | 678 | FUSE_NOTIFY_CODE_MAX, |
| 675 | 679 | }; |
| 676 | 680 | |