@@ -523,6 +523,12 @@ void *bch_nvmpg_alloc_pages(int order, const char *uuid)
}
EXPORT_SYMBOL_GPL(bch_nvmpg_alloc_pages);
+struct bch_nvmpg_head *bch_get_nvmpg_head(const char *uuid)
+{
+ return find_nvmpg_head(uuid, false);
+}
+EXPORT_SYMBOL_GPL(bch_get_nvmpg_head);
+
static inline void *nvm_end_addr(struct bch_nvmpg_ns *ns)
{
return ns->base_addr + (ns->pages_total << PAGE_SHIFT);
@@ -93,6 +93,7 @@ int bch_nvmpg_init(void);
void bch_nvmpg_exit(void);
void *bch_nvmpg_alloc_pages(int order, const char *uuid);
void bch_nvmpg_free_pages(void *addr, int order, const char *uuid);
+struct bch_nvmpg_head *bch_get_nvmpg_head(const char *uuid);
#else
@@ -115,6 +116,11 @@ static inline void *bch_nvmpg_alloc_pages(int order, const char *uuid)
static inline void bch_nvmpg_free_pages(void *addr, int order, const char *uuid) { }
+static inline struct bch_nvmpg_head *bch_get_nvmpg_head(const char *uuid)
+{
+ return NULL;
+}
+
#endif /* CONFIG_BCACHE_NVM_PAGES */
#endif /* _BCACHE_NVM_PAGES_H */