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 | * 7.43 | 233 | * 7.43 |
| 234 | * - add FUSE_REQUEST_TIMEOUT | 234 | * - add FUSE_REQUEST_TIMEOUT |
| 235 | * | ||
| 236 | * 7.44 | ||
| 237 | * - add FUSE_NOTIFY_INC_EPOCH | ||
| 235 | */ | 238 | */ |
| 236 | 239 | ||
| 237 | #ifndef _LINUX_FUSE_H | 240 | #ifndef _LINUX_FUSE_H |
| @@ -267,7 +270,7 @@ · 29 unmodified lines | |||
| 267 | #define FUSE_KERNEL_VERSION 7 | 270 | #define FUSE_KERNEL_VERSION 7 |
| 268 | 271 | ||
| 269 | /** Minor version number of this interface */ | 272 | /** Minor version number of this interface */ |
| 270 | #define FUSE_KERNEL_MINOR_VERSION 43 | 273 | #define FUSE_KERNEL_MINOR_VERSION 44 |
| 271 | 274 | ||
| 272 | /** The node ID of the root inode */ | 275 | /** The node ID of the root inode */ |
| 273 | #define FUSE_ROOT_ID 1 | 276 | #define FUSE_ROOT_ID 1 |
| @@ -671,6 +674,7 @@ enum fuse_notify_code { · 397 unmodified lines | |||
| 671 | FUSE_NOTIFY_RETRIEVE = 5, | 674 | FUSE_NOTIFY_RETRIEVE = 5, |
| 672 | FUSE_NOTIFY_DELETE = 6, | 675 | FUSE_NOTIFY_DELETE = 6, |
| 673 | FUSE_NOTIFY_RESEND = 7, | 676 | FUSE_NOTIFY_RESEND = 7, |
| 677 | FUSE_NOTIFY_INC_EPOCH = 8, | ||
| 674 | FUSE_NOTIFY_CODE_MAX, | 678 | FUSE_NOTIFY_CODE_MAX, |
| 675 | }; | 679 | }; |
| 676 | 680 | ||