diff mbox

[7/7] btrfs: subpagesize-blocksize: Allow mounting filesystems where sectorsize != PAGE_SIZE

Message ID 1386805122-23972-8-git-send-email-sekharan@us.ibm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Chandra Seetharaman Dec. 11, 2013, 11:38 p.m. UTC
This is the final patch of the series that allows filesystems with
blocksize smaller than the PAGE_SIZE.

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
---
 fs/btrfs/disk-io.c | 6 ------
 1 file changed, 6 deletions(-)

Comments

David Sterba Dec. 13, 2013, 1:07 a.m. UTC | #1
On Wed, Dec 11, 2013 at 05:38:42PM -0600, Chandra Seetharaman wrote:
> This is the final patch of the series that allows filesystems with
> blocksize smaller than the PAGE_SIZE.

> -	if (sectorsize != PAGE_SIZE) {

You've implemented the sectorsize < PAGE_SIZE part (multiple extent
buffers per page), so the check should stay as:

	if (sectorsize > PAGE_SIZE) {

> -		printk(KERN_WARNING "btrfs: Incompatible sector size(%lu) "
> -		       "found on %s\n", (unsigned long)sectorsize, sb->s_id);
> -		goto fail_sb_buffer;
> -	}
> -
>  	mutex_lock(&fs_info->chunk_mutex);
>  	ret = btrfs_read_sys_array(tree_root);
>  	mutex_unlock(&fs_info->chunk_mutex);
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
saeed bishara Dec. 16, 2013, 12:50 p.m. UTC | #2
On Fri, Dec 13, 2013 at 3:07 AM, David Sterba <dsterba@suse.cz> wrote:
> On Wed, Dec 11, 2013 at 05:38:42PM -0600, Chandra Seetharaman wrote:
>> This is the final patch of the series that allows filesystems with
>> blocksize smaller than the PAGE_SIZE.
>
>> -     if (sectorsize != PAGE_SIZE) {
>
> You've implemented the sectorsize < PAGE_SIZE part (multiple extent
> buffers per page), so the check should stay as:
>
>         if (sectorsize > PAGE_SIZE) {
>
please add a check that PAGE_SIZE/sectorsize <= MAX_EXTENT_BUFFERS_PER_PAGE
also, can you please add kernel log message when you have subpage block size?

>> -             printk(KERN_WARNING "btrfs: Incompatible sector size(%lu) "
>> -                    "found on %s\n", (unsigned long)sectorsize, sb->s_id);
>> -             goto fail_sb_buffer;
>> -     }
>> -
>>       mutex_lock(&fs_info->chunk_mutex);
>>       ret = btrfs_read_sys_array(tree_root);
>>       mutex_unlock(&fs_info->chunk_mutex);
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index ca1526d..d9bd450 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -2615,12 +2615,6 @@  int open_ctree(struct super_block *sb,
 		goto fail_sb_buffer;
 	}
 
-	if (sectorsize != PAGE_SIZE) {
-		printk(KERN_WARNING "btrfs: Incompatible sector size(%lu) "
-		       "found on %s\n", (unsigned long)sectorsize, sb->s_id);
-		goto fail_sb_buffer;
-	}
-
 	mutex_lock(&fs_info->chunk_mutex);
 	ret = btrfs_read_sys_array(tree_root);
 	mutex_unlock(&fs_info->chunk_mutex);