Skip to content

Commit b42fe98

Browse files
adam900710kdave
authored andcommitted
btrfs: scrub: allow scrub to work with subpage sectorsize
Since btrfs scrub is utilizing its own infrastructure to submit read/write, scrub is independent from all other routines. This brings one very neat feature, allow us to read 4K data into offset 0 of a 64K page. So is the writeback routine. This makes scrub on subpage sector size much easier to implement, and thanks to previous commits which just changed the implementation to always do scrub based on sector size, now scrub can handle subpage filesystem without any problem. This patch will just remove the restriction on (sectorsize != PAGE_SIZE), to make scrub finally work on subpage filesystems. Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent b29dca4 commit b42fe98

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

fs/btrfs/scrub.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3885,14 +3885,6 @@ int btrfs_scrub_dev(struct btrfs_fs_info *fs_info, u64 devid, u64 start,
38853885
return -EINVAL;
38863886
}
38873887

3888-
if (fs_info->sectorsize != PAGE_SIZE) {
3889-
/* not supported for data w/o checksums */
3890-
btrfs_err_rl(fs_info,
3891-
"scrub: size assumption sectorsize != PAGE_SIZE (%d != %lu) fails",
3892-
fs_info->sectorsize, PAGE_SIZE);
3893-
return -EINVAL;
3894-
}
3895-
38963888
if (fs_info->nodesize >
38973889
PAGE_SIZE * SCRUB_MAX_PAGES_PER_BLOCK ||
38983890
fs_info->sectorsize > PAGE_SIZE * SCRUB_MAX_PAGES_PER_BLOCK) {

0 commit comments

Comments
 (0)