Skip to content

Commit 03131fa

Browse files
committed
btrfs: switch RCU helper versions to btrfs_info()
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>
1 parent 82ba66d commit 03131fa

File tree

6 files changed

+10
-14
lines changed

6 files changed

+10
-14
lines changed

fs/btrfs/bio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ int btrfs_repair_io_failure(struct btrfs_fs_info *fs_info, u64 ino, u64 start,
839839
goto out_bio_uninit;
840840
}
841841

842-
btrfs_info_rl_in_rcu(fs_info,
842+
btrfs_info_rl(fs_info,
843843
"read error corrected: ino %llu off %llu (dev %s sector %llu)",
844844
ino, start, btrfs_dev_name(smap.dev),
845845
smap.physical >> SECTOR_SHIFT);

fs/btrfs/dev-replace.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ static int btrfs_dev_replace_start(struct btrfs_fs_info *fs_info,
647647
dev_replace->srcdev = src_device;
648648
dev_replace->tgtdev = tgt_device;
649649

650-
btrfs_info_in_rcu(fs_info,
650+
btrfs_info(fs_info,
651651
"dev_replace from %s (devid %llu) to %s started",
652652
btrfs_dev_name(src_device),
653653
src_device->devid,
@@ -961,7 +961,7 @@ static int btrfs_dev_replace_finishing(struct btrfs_fs_info *fs_info,
961961
return scrub_ret;
962962
}
963963

964-
btrfs_info_in_rcu(fs_info,
964+
btrfs_info(fs_info,
965965
"dev_replace from %s (devid %llu) to %s finished",
966966
btrfs_dev_name(src_device),
967967
src_device->devid,
@@ -1109,7 +1109,7 @@ int btrfs_dev_replace_cancel(struct btrfs_fs_info *fs_info)
11091109
* btrfs_dev_replace_finishing() will handle the
11101110
* cleanup part
11111111
*/
1112-
btrfs_info_in_rcu(fs_info,
1112+
btrfs_info(fs_info,
11131113
"dev_replace from %s (devid %llu) to %s canceled",
11141114
btrfs_dev_name(src_device), src_device->devid,
11151115
btrfs_dev_name(tgt_device));
@@ -1143,7 +1143,7 @@ int btrfs_dev_replace_cancel(struct btrfs_fs_info *fs_info)
11431143
ret = btrfs_commit_transaction(trans);
11441144
WARN_ON(ret);
11451145

1146-
btrfs_info_in_rcu(fs_info,
1146+
btrfs_info(fs_info,
11471147
"suspended dev_replace from %s (devid %llu) to %s canceled",
11481148
btrfs_dev_name(src_device), src_device->devid,
11491149
btrfs_dev_name(tgt_device));
@@ -1247,7 +1247,7 @@ static int btrfs_dev_replace_kthread(void *data)
12471247

12481248
progress = btrfs_dev_replace_progress(fs_info);
12491249
progress = div_u64(progress, 10);
1250-
btrfs_info_in_rcu(fs_info,
1250+
btrfs_info(fs_info,
12511251
"continuing dev_replace from %s (devid %llu) to target %s @%u%%",
12521252
btrfs_dev_name(dev_replace->srcdev),
12531253
dev_replace->srcdev->devid,

fs/btrfs/ioctl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,7 @@ static noinline int btrfs_ioctl_resize(struct file *file,
11691169
} /* equal, nothing need to do */
11701170

11711171
if (ret == 0 && new_size != old_size)
1172-
btrfs_info_in_rcu(fs_info,
1172+
btrfs_info(fs_info,
11731173
"resize device %s (devid %llu) from %llu to %llu",
11741174
btrfs_dev_name(device), device->devid,
11751175
old_size, new_size);

fs/btrfs/messages.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,12 @@ void _btrfs_printk(const struct btrfs_fs_info *fs_info, const char *fmt, ...);
5454
*/
5555
#define btrfs_crit_in_rcu(fs_info, fmt, args...) \
5656
btrfs_printk_in_rcu(fs_info, KERN_CRIT fmt, ##args)
57-
#define btrfs_info_in_rcu(fs_info, fmt, args...) \
58-
btrfs_printk_in_rcu(fs_info, KERN_INFO fmt, ##args)
5957

6058
/*
6159
* Wrappers that use a ratelimited printk in RCU
6260
*/
6361
#define btrfs_crit_rl_in_rcu(fs_info, fmt, args...) \
6462
btrfs_printk_rl_in_rcu(fs_info, KERN_CRIT fmt, ##args)
65-
#define btrfs_info_rl_in_rcu(fs_info, fmt, args...) \
66-
btrfs_printk_rl_in_rcu(fs_info, KERN_INFO fmt, ##args)
6763

6864
/*
6965
* Wrappers that use a ratelimited printk

fs/btrfs/volumes.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ static noinline struct btrfs_device *device_list_add(const char *path,
951951
task_pid_nr(current));
952952
return ERR_PTR(-EEXIST);
953953
}
954-
btrfs_info_in_rcu(NULL,
954+
btrfs_info(NULL,
955955
"devid %llu device path %s changed to %s scanned by %s (%d)",
956956
devid, btrfs_dev_name(device),
957957
path, current->comm,
@@ -7815,7 +7815,7 @@ static void btrfs_dev_stat_print_on_load(struct btrfs_device *dev)
78157815
if (i == BTRFS_DEV_STAT_VALUES_MAX)
78167816
return; /* all values == 0, suppress message */
78177817

7818-
btrfs_info_in_rcu(dev->fs_info,
7818+
btrfs_info(dev->fs_info,
78197819
"bdev %s errs: wr %u, rd %u, flush %u, corrupt %u, gen %u",
78207820
btrfs_dev_name(dev),
78217821
btrfs_dev_stat_read(dev, BTRFS_DEV_STAT_WRITE_ERRS),

fs/btrfs/zoned.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ int btrfs_get_dev_zone_info(struct btrfs_device *device, bool populate_cache)
576576
emulated = "emulated ";
577577
}
578578

579-
btrfs_info_in_rcu(fs_info,
579+
btrfs_info(fs_info,
580580
"%s block device %s, %u %szones of %llu bytes",
581581
model, rcu_str_deref(device->name), zone_info->nr_zones,
582582
emulated, zone_info->zone_size);

0 commit comments

Comments
 (0)