Re: [PATCH] Btrfs: do not mount when we have a sectorsize unequal to PAGE_SIZE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
>> ---
>>  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
--
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


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux