For the subpagesize-blocksize case make sure that the IO submitted through
submit_extent_page() is at least of PAGE_CACHE_SIZE
Signed-off-by: Chandra Seetharaman <sekharan@xxxxxxxxxx>
---
fs/btrfs/extent_io.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index e1992ed..2cf2a3b 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2647,6 +2647,9 @@ static int submit_extent_page(int rw, struct extent_io_tree *tree,
int old_compressed = prev_bio_flags & EXTENT_BIO_COMPRESSED;
size_t page_size = min_t(size_t, size, PAGE_CACHE_SIZE);
+ if (page->mapping->host->i_sb->s_blocksize < PAGE_CACHE_SIZE)
+ page_size = PAGE_CACHE_SIZE;
+
if (bio_ret && *bio_ret) {
bio = *bio_ret;
if (old_compressed)
--
1.7.12.4
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html