Re: [RFC PATCH 6/8] bcache: get allocated pages from specific owner

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/3/20 6:53 PM, Qiaowei Ren wrote:
> This patch implements get_allocated_pages() of the buddy to be used to
> get allocated pages from specific owner.
> 
> Signed-off-by: Jianpeng Ma <jianpeng.ma@xxxxxxxxx>
> Signed-off-by: Qiaowei Ren <qiaowei.ren@xxxxxxxxx>
> ---
>  drivers/md/bcache/nvm-pages.c | 36 +++++++++++++++++++++++++++++++++++
>  drivers/md/bcache/nvm-pages.h |  7 +++++++
>  2 files changed, 43 insertions(+)
> 

[snipped]

> diff --git a/drivers/md/bcache/nvm-pages.h b/drivers/md/bcache/nvm-pages.h
> index 1e435ce0ddf4..4f0374459459 100644
> --- a/drivers/md/bcache/nvm-pages.h
> +++ b/drivers/md/bcache/nvm-pages.h
> @@ -80,6 +80,8 @@ extern void bch_nvm_exit(void);
>  extern void *nvm_alloc_pages(int order, const char *owner_uuid);
>  extern void nvm_free_pages(void *addr, int order, const char *owner_uuid);
>  
> +extern struct extent *get_allocated_pages(const char *owner_uuid);
> +


We should have a bch_ prefix for the above function name, and maybe
"extern" can be removed here too.


>  #else
>  
>  static inline struct nvm_namespace *register_namespace(const char *dev_path)
> @@ -95,6 +97,11 @@ static inline void bch_nvm_exit(void) { }
>  static inline void *nvm_alloc_pages(int order, const char *owner_uuid) { }
>  static inline void nvm_free_pages(void *addr, int order, const char *owner_uuid) { }
>  
> +static inline struct extent *get_allocated_pages(const char *owner_uuid)
> +{
> +	return NULL;
> +}
> +
>  #endif /* CONFIG_BCACHE_NVM_PAGES */
>  
>  #endif /* _BCACHE_NVM_PAGES_H */

Thanks

Coly Li




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux