From: Liu Bo <bo.li.liu@oracle.com>
To: David Sterba <dsterba@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 06/29] btrfs: merge two superblock writing helpers
Date: Wed, 15 Feb 2017 13:05:53 -0800 [thread overview]
Message-ID: <20170215210553.GA12445@localhost.localdomain> (raw)
In-Reply-To: <616929b18253874e8ad87b6b0667b20e7ce58832.1486977712.git.dsterba@suse.com>
On Mon, Feb 13, 2017 at 10:33:39AM +0100, David Sterba wrote:
> write_all_supers and write_ctree_super are almost equal, the parameter
> 'trans' is unused so we can drop it and have just one helper.
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Thanks,
-liubo
>
> Signed-off-by: David Sterba <dsterba@suse.com>
> ---
> fs/btrfs/disk-io.c | 8 +-------
> fs/btrfs/disk-io.h | 3 +--
> fs/btrfs/transaction.c | 2 +-
> fs/btrfs/tree-log.c | 2 +-
> 4 files changed, 4 insertions(+), 11 deletions(-)
>
> diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
> index 43e71457c193..441a62cd0351 100644
> --- a/fs/btrfs/disk-io.c
> +++ b/fs/btrfs/disk-io.c
> @@ -3695,7 +3695,7 @@ int btrfs_calc_num_tolerated_disk_barrier_failures(
> return num_tolerated_disk_barrier_failures;
> }
>
> -static int write_all_supers(struct btrfs_fs_info *fs_info, int max_mirrors)
> +int write_all_supers(struct btrfs_fs_info *fs_info, int max_mirrors)
> {
> struct list_head *head;
> struct btrfs_device *dev;
> @@ -3789,12 +3789,6 @@ static int write_all_supers(struct btrfs_fs_info *fs_info, int max_mirrors)
> return 0;
> }
>
> -int write_ctree_super(struct btrfs_trans_handle *trans,
> - struct btrfs_fs_info *fs_info, int max_mirrors)
> -{
> - return write_all_supers(fs_info, max_mirrors);
> -}
> -
> /* Drop a fs root from the radix tree and free it. */
> void btrfs_drop_and_free_fs_root(struct btrfs_fs_info *fs_info,
> struct btrfs_root *root)
> diff --git a/fs/btrfs/disk-io.h b/fs/btrfs/disk-io.h
> index 1864e7ce9c70..0be2d4fe705b 100644
> --- a/fs/btrfs/disk-io.h
> +++ b/fs/btrfs/disk-io.h
> @@ -57,8 +57,7 @@ int open_ctree(struct super_block *sb,
> struct btrfs_fs_devices *fs_devices,
> char *options);
> void close_ctree(struct btrfs_fs_info *fs_info);
> -int write_ctree_super(struct btrfs_trans_handle *trans,
> - struct btrfs_fs_info *fs_info, int max_mirrors);
> +int write_all_supers(struct btrfs_fs_info *fs_info, int max_mirrors);
> struct buffer_head *btrfs_read_dev_super(struct block_device *bdev);
> int btrfs_read_dev_one_super(struct block_device *bdev, int copy_num,
> struct buffer_head **bh_ret);
> diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
> index 48aabb367f73..7d1d71259cd0 100644
> --- a/fs/btrfs/transaction.c
> +++ b/fs/btrfs/transaction.c
> @@ -2261,7 +2261,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans)
> goto scrub_continue;
> }
>
> - ret = write_ctree_super(trans, fs_info, 0);
> + ret = write_all_supers(fs_info, 0);
> if (ret) {
> mutex_unlock(&fs_info->tree_log_mutex);
> goto scrub_continue;
> diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
> index cea93ba1f099..62dd138018b5 100644
> --- a/fs/btrfs/tree-log.c
> +++ b/fs/btrfs/tree-log.c
> @@ -2961,7 +2961,7 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans,
> * the running transaction open, so a full commit can't hop
> * in and cause problems either.
> */
> - ret = write_ctree_super(trans, fs_info, 1);
> + ret = write_all_supers(fs_info, 1);
> if (ret) {
> btrfs_set_log_full_commit(fs_info, trans);
> btrfs_abort_transaction(trans, ret);
> --
> 2.10.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-02-15 21:07 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-13 9:33 [PATCH 00/29] Cleanup of unused parameters David Sterba
2017-02-13 9:33 ` [PATCH 01/29] btrfs: remove unused parameter from read_block_for_search David Sterba
2017-02-14 0:59 ` Liu Bo
2017-02-14 1:03 ` Qu Wenruo
2017-02-14 1:09 ` Liu Bo
2017-02-13 9:33 ` [PATCH 02/29] btrfs: remove unused parameter from check_async_write David Sterba
2017-02-15 20:41 ` Liu Bo
2017-02-13 9:33 ` [PATCH 03/29] btrfs: remove unused parameter from clean_tree_block David Sterba
2017-02-15 21:12 ` Liu Bo
2017-02-13 9:33 ` [PATCH 04/29] btrfs: remove unused parameter from split_item David Sterba
2017-02-15 20:43 ` Liu Bo
2017-02-13 9:33 ` [PATCH 05/29] btrfs: remove unused parameter from write_dev_supers David Sterba
2017-02-14 1:59 ` Liu Bo
2017-02-13 9:33 ` [PATCH 06/29] btrfs: merge two superblock writing helpers David Sterba
2017-02-15 21:05 ` Liu Bo [this message]
2017-02-13 9:33 ` [PATCH 07/29] btrfs: remove unused parameter from __push_leaf_right David Sterba
2017-02-15 21:14 ` Liu Bo
2017-02-13 9:33 ` [PATCH 08/29] btrfs: remove unused parameter from __push_leaf_left David Sterba
2017-02-15 21:18 ` Liu Bo
2017-02-13 9:33 ` [PATCH 09/29] btrfs: remove unused parameter from btrfs_subvolume_release_metadata David Sterba
2017-02-15 21:17 ` Liu Bo
2017-02-13 9:33 ` [PATCH 10/29] btrfs: remove unused parameter from btrfs_prepare_extent_commit David Sterba
2017-02-15 21:20 ` Liu Bo
2017-02-13 9:33 ` [PATCH 11/29] btrfs: remove unused parameter from btrfs_check_super_valid David Sterba
2017-02-14 2:11 ` Liu Bo
2017-02-14 11:42 ` David Sterba
2017-02-14 18:44 ` Liu Bo
2017-02-13 9:33 ` [PATCH 12/29] btrfs: remove unused parameter from tree_move_down David Sterba
2017-02-15 21:21 ` Liu Bo
2017-02-13 9:34 ` [PATCH 13/29] btrfs: remove unused parameter from tree_move_next_or_upnext David Sterba
2017-02-15 21:22 ` Liu Bo
2017-02-13 9:34 ` [PATCH 14/29] btrfs: remove unused parameter from submit_extent_page David Sterba
2017-02-14 19:10 ` Liu Bo
2017-02-15 15:17 ` David Sterba
2017-02-13 9:34 ` [PATCH 15/29] btrfs: remove unused parameter from update_nr_written David Sterba
2017-02-15 21:22 ` Liu Bo
2017-02-13 9:34 ` [PATCH 16/29] btrfs: remove unused parameter from add_pending_csums David Sterba
2017-02-15 21:23 ` Liu Bo
2017-02-13 9:34 ` [PATCH 17/29] btrfs: remove unused parameter from extent_write_cache_pages David Sterba
2017-02-14 19:35 ` Liu Bo
2017-02-15 15:30 ` David Sterba
2017-02-15 20:38 ` Liu Bo
2017-02-13 9:34 ` [PATCH 18/29] btrfs: remove unused parameter from btrfs_fill_super David Sterba
2017-02-15 21:27 ` Liu Bo
2017-02-13 9:34 ` [PATCH 19/29] btrfs: remove unused parameter from __btrfs_alloc_chunk David Sterba
2017-02-15 21:28 ` Liu Bo
2017-02-13 9:34 ` [PATCH 20/29] btrfs: remove unused parameter from init_first_rw_device David Sterba
2017-02-15 21:30 ` Liu Bo
2017-02-13 9:34 ` [PATCH 21/29] btrfs: remove unused parameter from create_snapshot David Sterba
2017-02-14 19:36 ` Liu Bo
2017-02-13 9:34 ` [PATCH 22/29] btrfs: remove unused parameters from scrub_setup_wr_ctx David Sterba
2017-02-15 21:29 ` Liu Bo
2017-02-13 9:34 ` [PATCH 23/29] btrfs: remove unused parameter from __add_inline_refs David Sterba
2017-02-15 21:32 ` Liu Bo
2017-02-13 9:34 ` [PATCH 24/29] btrfs: remove unused parameters from btrfs_cmp_data David Sterba
2017-02-14 19:40 ` Liu Bo
2017-02-13 9:34 ` [PATCH 25/29] btrfs: remove unused parameter from clone_copy_inline_extent David Sterba
2017-02-16 0:10 ` Liu Bo
2017-02-13 9:34 ` [PATCH 26/29] btrfs: remove unused parameter from __add_inode_ref David Sterba
2017-02-16 0:08 ` Liu Bo
2017-02-13 9:34 ` [PATCH 27/29] btrfs: remove unused parameter from cleanup_write_cache_enospc David Sterba
2017-02-15 21:33 ` Liu Bo
2017-02-13 9:34 ` [PATCH 28/29] btrfs: remove unused parameters from __btrfs_write_out_cache David Sterba
2017-02-14 20:19 ` Liu Bo
2017-02-13 9:34 ` [PATCH 29/29] btrfs: remove unused parameter from adjust_slots_upwards David Sterba
2017-02-16 0:12 ` Liu Bo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170215210553.GA12445@localhost.localdomain \
--to=bo.li.liu@oracle.com \
--cc=dsterba@suse.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).