extern struct upcall_cache *rsicache;
struct gss_rsi *rsi_entry_get(struct upcall_cache *cache, struct gss_rsi *rsi);
void rsi_entry_put(struct upcall_cache *cache, struct gss_rsi *rsi);
-void rsi_flush(struct upcall_cache *cache, int hash);
#define RSC_UPCALL_PATH "NONE"
#define UC_RSCCACHE_HASH_SIZE 1024
extern struct upcall_cache_ops rsc_upcall_cache_ops;
extern struct upcall_cache *rsccache;
struct gss_rsc *rsc_entry_get(struct upcall_cache *cache, struct gss_rsc *rsc);
void rsc_entry_put(struct upcall_cache *cache, struct gss_rsc *rsc);
-void rsc_flush(struct upcall_cache *cache, int hash);
void __rsc_free(struct gss_rsc *rsc);
#endif /* __PTLRPC_GSS_GSS_INTERNAL_H_ */
upcall_cache_put_entry(cache, rsi->si_uc_entry);
}
-void rsi_flush(struct upcall_cache *cache, int hash)
-{
- if (hash < 0)
- upcall_cache_flush_idle(cache);
- else
- upcall_cache_flush_one(cache, (__u64)hash, NULL);
-}
-
struct upcall_cache_ops rsi_upcall_cache_ops = {
.init_entry = rsi_entry_init,
.free_entry = rsi_entry_free,
upcall_cache_put_entry(cache, rsc->sc_uc_entry);
}
-void rsc_flush(struct upcall_cache *cache, int hash)
-{
- if (hash < 0)
- upcall_cache_flush_idle(cache);
- else
- upcall_cache_flush_one(cache, (__u64)hash, NULL);
-}
-
struct upcall_cache_ops rsc_upcall_cache_ops = {
.init_entry = rsc_entry_init,
.free_entry = rsc_entry_free,
}
LPROC_SEQ_FOPS(rsi_upcall);
-static ssize_t lprocfs_rsi_flush_seq_write(struct file *file,
- const char __user *buffer,
- size_t count, void *data)
-{
- int hash, rc;
-
- rc = kstrtoint_from_user(buffer, count, 0, &hash);
- if (rc)
- return rc;
-
- rsi_flush(rsicache, hash);
- return count;
-}
-LPROC_SEQ_FOPS_WR_ONLY(gss, rsi_flush);
-
static ssize_t lprocfs_rsi_info_seq_write(struct file *file,
const char __user *buffer,
size_t count, void *data)
}
LPROC_SEQ_FOPS(rsi_acquire_expire);
-static ssize_t lprocfs_rsc_flush_seq_write(struct file *file,
- const char __user *buffer,
- size_t count, void *data)
-{
- int hash, rc;
-
- rc = kstrtoint_from_user(buffer, count, 0, &hash);
- if (rc)
- return rc;
-
- rsc_flush(rsccache, hash);
- return count;
-}
-LPROC_SEQ_FOPS_WR_ONLY(gss, rsc_flush);
-
static ssize_t lprocfs_rsc_info_seq_write(struct file *file,
const char __user *buffer,
size_t count, void *data)
#endif
{ .name = "rsi_upcall",
.fops = &rsi_upcall_fops },
- { .name = "rsi_flush",
- .fops = &gss_rsi_flush_fops },
{ .name = "rsi_info",
.fops = &gss_rsi_info_fops },
{ .name = "rsi_entry_expire",
.fops = &rsi_entry_expire_fops },
{ .name = "rsi_acquire_expire",
.fops = &rsi_acquire_expire_fops },
- { .name = "rsc_flush",
- .fops = &gss_rsc_flush_fops },
{ .name = "rsc_info",
.fops = &gss_rsc_info_fops },
{ NULL }