]> git.hungrycats.org Git - linux/commitdiff
Btrfs: subpage-blocksize: Rate limit scrub error message
authorChandan Rajendra <chandan@linux.vnet.ibm.com>
Mon, 4 Jul 2016 04:34:39 +0000 (10:04 +0530)
committerZygo Blaxell <zblaxell@waya.furryterror.org>
Wed, 17 Aug 2016 02:24:05 +0000 (22:24 -0400)
btrfs/073 invokes scrub ioctl in a tight loop. In subpage-blocksize
scenario this results in a lot of "scrub: size assumption sectorsize !=
PAGE_SIZE " messages being printed on the console. To reduce the number
of such messages this commit uses btrfs_err_rl() instead of
btrfs_err().

Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
Signed-off-by: David Sterba <dsterba@suse.com>
(cherry picked from commit 751bebbe0ad261b3ac5d9e75eaec4d5fe9e23160)

fs/btrfs/scrub.c

index 4678f03e878e6b7050e28314432fa120a76f5d67..bf7ba8d318b62b84eadf65ba6352ca4183187fbd 100644 (file)
@@ -3810,7 +3810,7 @@ int btrfs_scrub_dev(struct btrfs_fs_info *fs_info, u64 devid, u64 start,
 
        if (fs_info->chunk_root->sectorsize != PAGE_SIZE) {
                /* not supported for data w/o checksums */
-               btrfs_err(fs_info,
+               btrfs_err_rl(fs_info,
                           "scrub: size assumption sectorsize != PAGE_SIZE "
                           "(%d != %lu) fails",
                       fs_info->chunk_root->sectorsize, PAGE_SIZE);