Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Liu Bo <liubo2009@cn.fujitsu.com>
To: Karel Zak <kzak@redhat.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Btrfs: do not mount when we have a sectorsize unequal to PAGE_SIZE
Date: Tue, 03 Apr 2012 16:35:28 +0800	[thread overview]
Message-ID: <4F7AB650.3000108@cn.fujitsu.com> (raw)
In-Reply-To: <20120403080659.GF1084@x2.net.home>

On 04/03/2012 04:06 PM, Karel Zak wrote:
> On Tue, Apr 03, 2012 at 09:56:53AM +0800, Liu Bo wrote:
>> Our code is not ready to cope with a sectorsize that's not equal to PAGE_SIZE.
>> It will lead to hanging-on while writing something.
>>
>> Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
>> ---
>>  fs/btrfs/disk-io.c |    6 +++---
>>  1 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
>> index 20196f4..b9866f2 100644
>> --- a/fs/btrfs/disk-io.c
>> +++ b/fs/btrfs/disk-io.c
>> @@ -2254,9 +2254,9 @@ int open_ctree(struct super_block *sb,
>>  		goto fail_sb_buffer;
>>  	}
>>  
>> -	if (sectorsize < PAGE_SIZE) {
>> -		printk(KERN_WARNING "btrfs: Incompatible sector size "
>> -		       "found on %s\n", sb->s_id);
>> +	if (sectorsize != PAGE_SIZE) {
>> +		printk(KERN_WARNING "btrfs: Incompatible sector size(%lu) "
>> +		       "found on %s\n", (unsigned long)sectorsize, sb->s_id);
> 
>  That's strange. Does it mean that if I create the filesystem and then
>  reboot to another kernel with different PAGE_SIZE then the filesystem
>  is unaccessible for me?
> 
>     Karel
> 

I'm afraid yes until we can deal with sectorsize and PAGE_SIZE gracefully.

For now, I didn't test if a read will cause oops or not, but if it's ok, an alternative way is to make FS readonly.

thanks,
liubo

  reply	other threads:[~2012-04-03  8:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-03  1:56 [PATCH] Btrfs: do not mount when we have a sectorsize unequal to PAGE_SIZE Liu Bo
2012-04-03  8:06 ` Karel Zak
2012-04-03  8:35   ` Liu Bo [this message]
2012-04-03 13:18     ` David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F7AB650.3000108@cn.fujitsu.com \
    --to=liubo2009@cn.fujitsu.com \
    --cc=kzak@redhat.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox