When the exports table is changed, exportfs will usually write a new time to the "flush" file in the nfsd.export cache procfile. This tells the kernel to flush any entries that are older than that value. This gives us a mechanism to tell whether an unexport might have occurred. Add a new ->flush cache_detail operation that is called after flushing the cache whenever someone writes to a "flush" file.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -87,6 +87,7 @@ struct cache_detail { · 86 unmodified lines | |||
| 87 | int has_died); | 87 | int has_died); |
| 88 | 88 | ||
| 89 | struct cache_head * (*alloc)(void); | 89 | struct cache_head * (*alloc)(void); |
| 90 | void (*flush)(void); | ||
| 90 | int (*match)(struct cache_head *orig, struct cache_head *new); | 91 | int (*match)(struct cache_head *orig, struct cache_head *new); |
| 91 | void (*init)(struct cache_head *orig, struct cache_head *new); | 92 | void (*init)(struct cache_head *orig, struct cache_head *new); |
| 92 | void (*update)(struct cache_head *orig, struct cache_head *new); | 93 | void (*update)(struct cache_head *orig, struct cache_head *new); |