btrfs: switch RCU helper versions to btrfs_info()
authorDavid Sterba <dsterba@suse.com>
Mon, 9 Jun 2025 17:09:27 +0000 (19:09 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jul 2025 21:56:38 +0000 (23:56 +0200)
The RCU protection is now done in the plain helpers, we can remove the
"_in_rcu" and "_rl_in_rcu".

Reviewed-by: Daniel Vacek <neelx@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/bio.c
fs/btrfs/dev-replace.c
fs/btrfs/ioctl.c
fs/btrfs/messages.h
fs/btrfs/volumes.c
fs/btrfs/zoned.c

index 00d274ed2b1fa209668b415c2eca843c2cf8accf..aa970fd41c4b78f1a3cf532f5e585d4c16ded38f 100644 (file)
@@ -839,7 +839,7 @@ int btrfs_repair_io_failure(struct btrfs_fs_info *fs_info, u64 ino, u64 start,
                goto out_bio_uninit;
        }
 
-       btrfs_info_rl_in_rcu(fs_info,
+       btrfs_info_rl(fs_info,
                "read error corrected: ino %llu off %llu (dev %s sector %llu)",
                             ino, start, btrfs_dev_name(smap.dev),
                             smap.physical >> SECTOR_SHIFT);
index f7f024a956cdda8bf6f4dfae00bb14e1340d57dc..bd276179918172377aeb665a4d38d556314927c1 100644 (file)
@@ -647,7 +647,7 @@ static int btrfs_dev_replace_start(struct btrfs_fs_info *fs_info,
        dev_replace->srcdev = src_device;
        dev_replace->tgtdev = tgt_device;
 
-       btrfs_info_in_rcu(fs_info,
+       btrfs_info(fs_info,
                      "dev_replace from %s (devid %llu) to %s started",
                      btrfs_dev_name(src_device),
                      src_device->devid,
@@ -961,7 +961,7 @@ error:
                return scrub_ret;
        }
 
-       btrfs_info_in_rcu(fs_info,
+       btrfs_info(fs_info,
                          "dev_replace from %s (devid %llu) to %s finished",
                          btrfs_dev_name(src_device),
                          src_device->devid,
@@ -1109,7 +1109,7 @@ int btrfs_dev_replace_cancel(struct btrfs_fs_info *fs_info)
                         * btrfs_dev_replace_finishing() will handle the
                         * cleanup part
                         */
-                       btrfs_info_in_rcu(fs_info,
+                       btrfs_info(fs_info,
                                "dev_replace from %s (devid %llu) to %s canceled",
                                btrfs_dev_name(src_device), src_device->devid,
                                btrfs_dev_name(tgt_device));
@@ -1143,7 +1143,7 @@ int btrfs_dev_replace_cancel(struct btrfs_fs_info *fs_info)
                ret = btrfs_commit_transaction(trans);
                WARN_ON(ret);
 
-               btrfs_info_in_rcu(fs_info,
+               btrfs_info(fs_info,
                "suspended dev_replace from %s (devid %llu) to %s canceled",
                        btrfs_dev_name(src_device), src_device->devid,
                        btrfs_dev_name(tgt_device));
@@ -1247,7 +1247,7 @@ static int btrfs_dev_replace_kthread(void *data)
 
        progress = btrfs_dev_replace_progress(fs_info);
        progress = div_u64(progress, 10);
-       btrfs_info_in_rcu(fs_info,
+       btrfs_info(fs_info,
                "continuing dev_replace from %s (devid %llu) to target %s @%u%%",
                btrfs_dev_name(dev_replace->srcdev),
                dev_replace->srcdev->devid,
index 8a60983a697c650922a57201661611ac927935f1..fb5097695f6d8b72057da7e381ef56ec003aa39e 100644 (file)
@@ -1169,7 +1169,7 @@ static noinline int btrfs_ioctl_resize(struct file *file,
        } /* equal, nothing need to do */
 
        if (ret == 0 && new_size != old_size)
-               btrfs_info_in_rcu(fs_info,
+               btrfs_info(fs_info,
                        "resize device %s (devid %llu) from %llu to %llu",
                        btrfs_dev_name(device), device->devid,
                        old_size, new_size);
index 0520081a66f0f6f638fe75ff15c7bbe467b01e7a..9d5330ba02534f6775c785afc3f88e945475811f 100644 (file)
@@ -54,16 +54,12 @@ void _btrfs_printk(const struct btrfs_fs_info *fs_info, const char *fmt, ...);
  */
 #define btrfs_crit_in_rcu(fs_info, fmt, args...) \
        btrfs_printk_in_rcu(fs_info, KERN_CRIT fmt, ##args)
-#define btrfs_info_in_rcu(fs_info, fmt, args...) \
-       btrfs_printk_in_rcu(fs_info, KERN_INFO fmt, ##args)
 
 /*
  * Wrappers that use a ratelimited printk in RCU
  */
 #define btrfs_crit_rl_in_rcu(fs_info, fmt, args...) \
        btrfs_printk_rl_in_rcu(fs_info, KERN_CRIT fmt, ##args)
-#define btrfs_info_rl_in_rcu(fs_info, fmt, args...) \
-       btrfs_printk_rl_in_rcu(fs_info, KERN_INFO fmt, ##args)
 
 /*
  * Wrappers that use a ratelimited printk
index 202c3e044460c13adb32a2df1fc166adea9110dc..ba344c673592ca63428abd5e0fafdaef9e98aab5 100644 (file)
@@ -951,7 +951,7 @@ static noinline struct btrfs_device *device_list_add(const char *path,
                                                  task_pid_nr(current));
                                return ERR_PTR(-EEXIST);
                        }
-                       btrfs_info_in_rcu(NULL,
+                       btrfs_info(NULL,
        "devid %llu device path %s changed to %s scanned by %s (%d)",
                                          devid, btrfs_dev_name(device),
                                          path, current->comm,
@@ -7815,7 +7815,7 @@ static void btrfs_dev_stat_print_on_load(struct btrfs_device *dev)
        if (i == BTRFS_DEV_STAT_VALUES_MAX)
                return; /* all values == 0, suppress message */
 
-       btrfs_info_in_rcu(dev->fs_info,
+       btrfs_info(dev->fs_info,
                "bdev %s errs: wr %u, rd %u, flush %u, corrupt %u, gen %u",
               btrfs_dev_name(dev),
               btrfs_dev_stat_read(dev, BTRFS_DEV_STAT_WRITE_ERRS),
index da1cf75c5ecf27efc84df04db86a09edfa16a1d8..bd987c90a05cfdeeecc670a7ccfe56898c01bdde 100644 (file)
@@ -576,7 +576,7 @@ int btrfs_get_dev_zone_info(struct btrfs_device *device, bool populate_cache)
                emulated = "emulated ";
        }
 
-       btrfs_info_in_rcu(fs_info,
+       btrfs_info(fs_info,
                "%s block device %s, %u %szones of %llu bytes",
                model, rcu_str_deref(device->name), zone_info->nr_zones,
                emulated, zone_info->zone_size);