@@ -539,6 +539,11 @@ unsigned long bch_nvmpg_alloc_pages(int order, const char *uuid)
return nvmpg_offset;
}
+struct bch_nvmpg_head *bch_get_nvmpg_head(const char *uuid)
+{
+ return find_nvmpg_head(uuid, false);
+}
+
static inline void *nvm_end_addr(struct bch_nvmpg_ns *ns)
{
return ns->base_addr + (ns->pages_total << PAGE_SHIFT);
@@ -94,6 +94,7 @@ int bch_nvmpg_init(void);
void bch_nvmpg_exit(void);
unsigned long bch_nvmpg_alloc_pages(int order, const char *uuid);
void bch_nvmpg_free_pages(unsigned long nvmpg_offset, int order, const char *uuid);
+struct bch_nvmpg_head *bch_get_nvmpg_head(const char *uuid);
#else
@@ -116,6 +117,11 @@ static inline unsigned long 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 */