@@ -390,6 +390,12 @@ void *bch_nvm_alloc_pages(int order, const char *owner_uuid)
}
EXPORT_SYMBOL_GPL(bch_nvm_alloc_pages);
+struct bch_nvm_pages_owner_head *bch_get_allocated_pages(const char *owner_uuid)
+{
+ return find_owner_head(owner_uuid, false);
+}
+EXPORT_SYMBOL_GPL(bch_get_allocated_pages);
+
static int init_owner_info(struct bch_nvm_namespace *ns)
{
struct bch_owner_list_head *owner_list_head = ns->sb->owner_list_head;
@@ -64,6 +64,7 @@ int bch_nvm_init(void);
void bch_nvm_exit(void);
void *bch_nvm_alloc_pages(int order, const char *owner_uuid);
void bch_nvm_free_pages(void *addr, int order, const char *owner_uuid);
+struct bch_nvm_pages_owner_head *bch_get_allocated_pages(const char *owner_uuid);
#else
@@ -81,6 +82,10 @@ static inline void *bch_nvm_alloc_pages(int order, const char *owner_uuid)
return NULL;
}
static inline void bch_nvm_free_pages(void *addr, int order, const char *owner_uuid) { }
+static inline struct bch_nvm_pages_owner_head *bch_get_allocated_pages(const char *owner_uuid)
+{
+ return NULL;
+}
#endif /* CONFIG_BCACHE_NVM_PAGES */