All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] btrfs: rename btrfs_get_block_group_info and make it static
@ 2018-04-02  9:24 Su Yue
  2018-04-02 10:10 ` Nikolay Borisov
  2018-04-05 17:14 ` David Sterba
  0 siblings, 2 replies; 3+ messages in thread
From: Su Yue @ 2018-04-02  9:24 UTC (permalink / raw)
  To: linux-btrfs; +Cc: suy.fnst

The function btrfs_get_block_group_info() was introduced by the
commit 5af3e8cce8b7 ("Btrfs: make filesystem read-only when submitting
 barrier fails") which used it in disk-io.c.

However, the function is only called in ioctl.c now.
Its parameter type btrfs_ioctl_space_info* is only for ioctl.

So, make it static and rename it to be original name
get_block_group_info.

No functional change.

Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com>
---
 fs/btrfs/ctree.h | 2 --
 fs/btrfs/ioctl.c | 8 ++++----
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 0eb55825862a..e69ef37efbc1 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -3253,8 +3253,6 @@ int btrfs_is_empty_uuid(u8 *uuid);
 int btrfs_defrag_file(struct inode *inode, struct file *file,
 		      struct btrfs_ioctl_defrag_range_args *range,
 		      u64 newer_than, unsigned long max_pages);
-void btrfs_get_block_group_info(struct list_head *groups_list,
-				struct btrfs_ioctl_space_info *space);
 void update_ioctl_balance_args(struct btrfs_fs_info *fs_info, int lock,
 			       struct btrfs_ioctl_balance_args *bargs);
 ssize_t btrfs_dedupe_file_range(struct file *src_file, u64 loff, u64 olen,
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 4ba793f25c3a..184001ffe38c 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -4047,8 +4047,8 @@ static long btrfs_ioctl_default_subvol(struct file *file, void __user *argp)
 	return ret;
 }
 
-void btrfs_get_block_group_info(struct list_head *groups_list,
-				struct btrfs_ioctl_space_info *space)
+static void get_block_group_info(struct list_head *groups_list,
+				 struct btrfs_ioctl_space_info *space)
 {
 	struct btrfs_block_group_cache *block_group;
 
@@ -4164,8 +4164,8 @@ static long btrfs_ioctl_space_info(struct btrfs_fs_info *fs_info,
 		down_read(&info->groups_sem);
 		for (c = 0; c < BTRFS_NR_RAID_TYPES; c++) {
 			if (!list_empty(&info->block_groups[c])) {
-				btrfs_get_block_group_info(
-					&info->block_groups[c], &space);
+				get_block_group_info(&info->block_groups[c],
+						     &space);
 				memcpy(dest, &space, sizeof(space));
 				dest++;
 				space_args.total_spaces++;
-- 
2.16.3




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] btrfs: rename btrfs_get_block_group_info and make it static
  2018-04-02  9:24 [PATCH] btrfs: rename btrfs_get_block_group_info and make it static Su Yue
@ 2018-04-02 10:10 ` Nikolay Borisov
  2018-04-05 17:14 ` David Sterba
  1 sibling, 0 replies; 3+ messages in thread
From: Nikolay Borisov @ 2018-04-02 10:10 UTC (permalink / raw)
  To: Su Yue, linux-btrfs



On  2.04.2018 12:24, Su Yue wrote:
> The function btrfs_get_block_group_info() was introduced by the
> commit 5af3e8cce8b7 ("Btrfs: make filesystem read-only when submitting
>  barrier fails") which used it in disk-io.c.
> 
> However, the function is only called in ioctl.c now.
> Its parameter type btrfs_ioctl_space_info* is only for ioctl.
> 
> So, make it static and rename it to be original name
> get_block_group_info.
> 
> No functional change.
> 
> Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com>

Reviewed-by: Nikolay Borisov <nborisov@suse.com>

> ---
>  fs/btrfs/ctree.h | 2 --
>  fs/btrfs/ioctl.c | 8 ++++----
>  2 files changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
> index 0eb55825862a..e69ef37efbc1 100644
> --- a/fs/btrfs/ctree.h
> +++ b/fs/btrfs/ctree.h
> @@ -3253,8 +3253,6 @@ int btrfs_is_empty_uuid(u8 *uuid);
>  int btrfs_defrag_file(struct inode *inode, struct file *file,
>  		      struct btrfs_ioctl_defrag_range_args *range,
>  		      u64 newer_than, unsigned long max_pages);
> -void btrfs_get_block_group_info(struct list_head *groups_list,
> -				struct btrfs_ioctl_space_info *space);
>  void update_ioctl_balance_args(struct btrfs_fs_info *fs_info, int lock,
>  			       struct btrfs_ioctl_balance_args *bargs);
>  ssize_t btrfs_dedupe_file_range(struct file *src_file, u64 loff, u64 olen,
> diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
> index 4ba793f25c3a..184001ffe38c 100644
> --- a/fs/btrfs/ioctl.c
> +++ b/fs/btrfs/ioctl.c
> @@ -4047,8 +4047,8 @@ static long btrfs_ioctl_default_subvol(struct file *file, void __user *argp)
>  	return ret;
>  }
>  
> -void btrfs_get_block_group_info(struct list_head *groups_list,
> -				struct btrfs_ioctl_space_info *space)
> +static void get_block_group_info(struct list_head *groups_list,
> +				 struct btrfs_ioctl_space_info *space)
>  {
>  	struct btrfs_block_group_cache *block_group;
>  
> @@ -4164,8 +4164,8 @@ static long btrfs_ioctl_space_info(struct btrfs_fs_info *fs_info,
>  		down_read(&info->groups_sem);
>  		for (c = 0; c < BTRFS_NR_RAID_TYPES; c++) {
>  			if (!list_empty(&info->block_groups[c])) {
> -				btrfs_get_block_group_info(
> -					&info->block_groups[c], &space);
> +				get_block_group_info(&info->block_groups[c],
> +						     &space);
>  				memcpy(dest, &space, sizeof(space));
>  				dest++;
>  				space_args.total_spaces++;
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] btrfs: rename btrfs_get_block_group_info and make it static
  2018-04-02  9:24 [PATCH] btrfs: rename btrfs_get_block_group_info and make it static Su Yue
  2018-04-02 10:10 ` Nikolay Borisov
@ 2018-04-05 17:14 ` David Sterba
  1 sibling, 0 replies; 3+ messages in thread
From: David Sterba @ 2018-04-05 17:14 UTC (permalink / raw)
  To: Su Yue; +Cc: linux-btrfs

On Mon, Apr 02, 2018 at 05:24:11PM +0800, Su Yue wrote:
> The function btrfs_get_block_group_info() was introduced by the
> commit 5af3e8cce8b7 ("Btrfs: make filesystem read-only when submitting
>  barrier fails") which used it in disk-io.c.
> 
> However, the function is only called in ioctl.c now.
> Its parameter type btrfs_ioctl_space_info* is only for ioctl.
> 
> So, make it static and rename it to be original name
> get_block_group_info.
> 
> No functional change.
> 
> Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com>

Added to next, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-04-05 17:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-02  9:24 [PATCH] btrfs: rename btrfs_get_block_group_info and make it static Su Yue
2018-04-02 10:10 ` Nikolay Borisov
2018-04-05 17:14 ` David Sterba

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.