diff options
Diffstat (limited to 'cmogstored.h')
-rw-r--r-- | cmogstored.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmogstored.h b/cmogstored.h index 2937049..d9e74fc 100644 --- a/cmogstored.h +++ b/cmogstored.h @@ -142,6 +142,8 @@ struct mog_svc { /* private */ DIR *dir; + pthread_mutex_t by_mog_devid_lock; + Hash_table *by_mog_devid; Hash_table *by_st_dev; pthread_mutex_t devstats_lock; struct mog_queue *queue; @@ -331,8 +333,10 @@ size_t mog_svc_each(Hash_processor processor, void *data); void mog_svc_upgrade_prepare(void); /* dev.c */ -struct mog_dev * mog_dev_new(struct mog_svc *, uint32_t mog_devid); +struct mog_dev * mog_dev_for(struct mog_svc *, uint32_t mog_devid); int mog_dev_mkusage(const struct mog_dev *, struct mog_svc *); +size_t mog_dev_hash(const void *, size_t tablesize); +bool mog_dev_cmp(const void *a, const void *b); /* valid_path.rl */ int mog_valid_path(const char *buf, size_t len); |