Linux-ext4 Archive on lore.kernel.org
 help / color / Atom feed
From: Andreas Dilger <adilger@dilger.ca>
To: brookxu <brookxu.cn@gmail.com>
Cc: Theodore Ts'o <tytso@mit.edu>,
	Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH 2/2] ext4: rename system_blks to s_system_blks inside ext4_sb_info
Date: Wed, 29 Jul 2020 14:03:23 -0600
Message-ID: <16D764F3-A1C9-4CFB-9151-19562FCA2064@dilger.ca> (raw)
In-Reply-To: <6af737ee-e16f-9d2b-5045-fb5b8995a6d6@gmail.com>


[-- Attachment #1: Type: text/plain, Size: 3409 bytes --]

On Jul 29, 2020, at 12:19 AM, brookxu <brookxu.cn@gmail.com> wrote:
> 
> Rename system_blks to s_system_blks inside ext4_sb_info, keep
> the naming rules consistent with other variables, which is
> convenient for code reading and writing.
> 
> Signed-off-by: Chunguang Xu <brookxu@tencent.com>

Reviewed-by: Andreas Dilger <adilger@dilger.ca>

> ---
>  fs/ext4/block_validity.c | 14 +++++++-------
>  fs/ext4/ext4.h           |  2 +-
>  2 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/fs/ext4/block_validity.c b/fs/ext4/block_validity.c
> index 16e9b2f..69240b4 100644
> --- a/fs/ext4/block_validity.c
> +++ b/fs/ext4/block_validity.c
> @@ -138,7 +138,7 @@ static void debug_print_tree(struct ext4_sb_info *sbi)
> 
>      printk(KERN_INFO "System zones: ");
>      rcu_read_lock();
> -    system_blks = rcu_dereference(sbi->system_blks);
> +    system_blks = rcu_dereference(sbi->s_system_blks);
>      node = rb_first(&system_blks->root);
>      while (node) {
>          entry = rb_entry(node, struct ext4_system_zone, node);
> @@ -263,11 +263,11 @@ int ext4_setup_system_zone(struct super_block *sb)
>      int ret;
> 
>      if (!test_opt(sb, BLOCK_VALIDITY)) {
> -        if (sbi->system_blks)
> +        if (sbi->s_system_blks)
>              ext4_release_system_zone(sb);
>          return 0;
>      }
> -    if (sbi->system_blks)
> +    if (sbi->s_system_blks)
>          return 0;
> 
>      system_blks = kzalloc(sizeof(*system_blks), GFP_KERNEL);
> @@ -308,7 +308,7 @@ int ext4_setup_system_zone(struct super_block *sb)
>       * with ext4_data_block_valid() accessing the rbtree at the same
>       * time.
>       */
> -    rcu_assign_pointer(sbi->system_blks, system_blks);
> +    rcu_assign_pointer(sbi->s_system_blks, system_blks);
> 
>      if (test_opt(sb, DEBUG))
>          debug_print_tree(sbi);
> @@ -333,9 +333,9 @@ void ext4_release_system_zone(struct super_block *sb)
>  {
>      struct ext4_system_blocks *system_blks;
> 
> -    system_blks = rcu_dereference_protected(EXT4_SB(sb)->system_blks,
> +    system_blks = rcu_dereference_protected(EXT4_SB(sb)->s_system_blks,
>                      lockdep_is_held(&sb->s_umount));
> -    rcu_assign_pointer(EXT4_SB(sb)->system_blks, NULL);
> +    rcu_assign_pointer(EXT4_SB(sb)->s_system_blks, NULL);
> 
>      if (system_blks)
>          call_rcu(&system_blks->rcu, ext4_destroy_system_zone);
> @@ -353,7 +353,7 @@ int ext4_data_block_valid(struct ext4_sb_info *sbi, ext4_fsblk_t start_blk,
>       * mount option.
>       */
>      rcu_read_lock();
> -    system_blks = rcu_dereference(sbi->system_blks);
> +    system_blks = rcu_dereference(sbi->s_system_blks);
>      ret = ext4_data_block_valid_rcu(sbi, system_blks, start_blk,
>                      count);
>      rcu_read_unlock();
> diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
> index 8ca9adf..d60a462 100644
> --- a/fs/ext4/ext4.h
> +++ b/fs/ext4/ext4.h
> @@ -1470,7 +1470,7 @@ struct ext4_sb_info {
>      int s_jquota_fmt;            /* Format of quota to use */
>  #endif
>      unsigned int s_want_extra_isize; /* New inodes should reserve # bytes */
> -    struct ext4_system_blocks __rcu *system_blks;
> +    struct ext4_system_blocks __rcu *s_system_blks;
> 
>  #ifdef EXTENTS_STATS
>      /* ext4 extents stats */
> --
> 1.8.3.1
> 


Cheers, Andreas






[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 873 bytes --]

      reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-29  6:19 brookxu
2020-07-29 20:03 ` Andreas Dilger [this message]

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=16D764F3-A1C9-4CFB-9151-19562FCA2064@dilger.ca \
    --to=adilger@dilger.ca \
    --cc=brookxu.cn@gmail.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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

Linux-ext4 Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-ext4/0 linux-ext4/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-ext4 linux-ext4/ https://lore.kernel.org/linux-ext4 \
		linux-ext4@vger.kernel.org
	public-inbox-index linux-ext4

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-ext4


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git