linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] btrfs hangup when we run the "sync" command
@ 2010-07-15  3:18 Miao Xie
  2010-07-15  8:14 ` Yan, Zheng
  0 siblings, 1 reply; 10+ messages in thread
From: Miao Xie @ 2010-07-15  3:18 UTC (permalink / raw)
  To: Yan Zheng, Chris Mason; +Cc: Linux Btrfs

Hi, everyone

I found btrfs will hangup when we run the sync command on my
x86_64 box. 

The reproduce steps is following:
# mkfs.btrfs -s 8192 -l 8192 -n 8192 /dev/sda1
# mount /dev/sda1 /mnt
# echo 1234567 > /mnt/aaa
# sync
(btrfs hangs up)

It seems that the btrfs doesn't support the sectorsize which is
greater than the page size just like ext2/3/4, though we can use
mkfs.btrfs to make a filesystem with a big sectorsize. Am I right?

If yes, we must do more check in the mkfs.btrfs.

Thanks
Miao Xie

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [BUG] btrfs hangup when we run the "sync" command
  2010-07-15  3:18 [BUG] btrfs hangup when we run the "sync" command Miao Xie
@ 2010-07-15  8:14 ` Yan, Zheng
  2010-07-15  9:07   ` Miao Xie
  0 siblings, 1 reply; 10+ messages in thread
From: Yan, Zheng @ 2010-07-15  8:14 UTC (permalink / raw)
  To: miaox; +Cc: Chris Mason, Linux Btrfs

2010/7/15 Miao Xie <miaox@cn.fujitsu.com>:
> Hi, everyone
>
> I found btrfs will hangup when we run the sync command on my
> x86_64 box.
>
> The reproduce steps is following:
> # mkfs.btrfs -s 8192 -l 8192 -n 8192 /dev/sda1
> # mount /dev/sda1 /mnt
> # echo 1234567 > /mnt/aaa
> # sync
> (btrfs hangs up)
>
> It seems that the btrfs doesn't support the sectorsize which is
> greater than the page size just like ext2/3/4, though we can use
> mkfs.btrfs to make a filesystem with a big sectorsize. Am I right?
>
> If yes, we must do more check in the mkfs.btrfs.
>

yes, btrfs doesn't support the sectorsize > PAGE_size.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [BUG] btrfs hangup when we run the "sync" command
  2010-07-15  8:14 ` Yan, Zheng
@ 2010-07-15  9:07   ` Miao Xie
  2010-07-15 16:12     ` Chris Mason
  2010-07-21 12:36     ` Hubert Kario
  0 siblings, 2 replies; 10+ messages in thread
From: Miao Xie @ 2010-07-15  9:07 UTC (permalink / raw)
  To: Yan, Zheng; +Cc: Chris Mason, Linux Btrfs

On Thu Jul 15 2010 16:14:31 GMT+0800 (CST), Yan, Zheng wrote:
> 2010/7/15 Miao Xie<miaox@cn.fujitsu.com>:
>> Hi, everyone
>>
>> I found btrfs will hangup when we run the sync command on my
>> x86_64 box.
>>
>> The reproduce steps is following:
>> # mkfs.btrfs -s 8192 -l 8192 -n 8192 /dev/sda1
>> # mount /dev/sda1 /mnt
>> # echo 1234567>  /mnt/aaa
>> # sync
>> (btrfs hangs up)
>>
>> It seems that the btrfs doesn't support the sectorsize which is
>> greater than the page size just like ext2/3/4, though we can use
>> mkfs.btrfs to make a filesystem with a big sectorsize. Am I right?
>>
>> If yes, we must do more check in the mkfs.btrfs.
>>
>
> yes, btrfs doesn't support the sectorsize>  PAGE_size.
>

So we must do more check in the mkfs.btrfs to avoid misuse, and I'll
add some check of the sectorsize into the mkfs.btrfs.

BTW, I sent some patches to the btrfs community recently, but I haven't received
any reply. Could you review them for me? though I have tested them and everything
works well.

[PATCH 1/2] btrfs: restructure try_release_extent_buffer()
[PATCH 2/2] btrfs: fix oops when leafsize is greator than nodesize
[PATCH] btrfs-progs: fix wrong extent buffer size when reading tree block

Thanks
Miao Xie

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [BUG] btrfs hangup when we run the "sync" command
  2010-07-15  9:07   ` Miao Xie
@ 2010-07-15 16:12     ` Chris Mason
  2010-07-19  1:56       ` Miao Xie
  2010-07-21 12:36     ` Hubert Kario
  1 sibling, 1 reply; 10+ messages in thread
From: Chris Mason @ 2010-07-15 16:12 UTC (permalink / raw)
  To: Miao Xie; +Cc: Yan, Zheng, Linux Btrfs

On Thu, Jul 15, 2010 at 05:07:07PM +0800, Miao Xie wrote:
> On Thu Jul 15 2010 16:14:31 GMT+0800 (CST), Yan, Zheng wrote:
> >2010/7/15 Miao Xie<miaox@cn.fujitsu.com>:
> >>Hi, everyone
> >>
> >>I found btrfs will hangup when we run the sync command on my
> >>x86_64 box.
> >>
> >>The reproduce steps is following:
> >># mkfs.btrfs -s 8192 -l 8192 -n 8192 /dev/sda1
> >># mount /dev/sda1 /mnt
> >># echo 1234567>  /mnt/aaa
> >># sync
> >>(btrfs hangs up)
> >>
> >>It seems that the btrfs doesn't support the sectorsize which is
> >>greater than the page size just like ext2/3/4, though we can use
> >>mkfs.btrfs to make a filesystem with a big sectorsize. Am I right?
> >>
> >>If yes, we must do more check in the mkfs.btrfs.
> >>
> >
> >yes, btrfs doesn't support the sectorsize>  PAGE_size.
> >
> 
> So we must do more check in the mkfs.btrfs to avoid misuse, and I'll
> add some check of the sectorsize into the mkfs.btrfs.

Yes, but this is fixed up with the raid code, we'll allow different page
sizes.

> 
> BTW, I sent some patches to the btrfs community recently, but I haven't received
> any reply. Could you review them for me? though I have tested them and everything
> works well.
> 
> [PATCH 1/2] btrfs: restructure try_release_extent_buffer()
> [PATCH 2/2] btrfs: fix oops when leafsize is greator than nodesize
> [PATCH] btrfs-progs: fix wrong extent buffer size when reading tree block

Thanks, I'll go through these.

-chris

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [BUG] btrfs hangup when we run the "sync" command
  2010-07-15 16:12     ` Chris Mason
@ 2010-07-19  1:56       ` Miao Xie
  2010-07-19  2:01         ` Yan, Zheng
  0 siblings, 1 reply; 10+ messages in thread
From: Miao Xie @ 2010-07-19  1:56 UTC (permalink / raw)
  To: Chris Mason, Yan, Zheng, Linux Btrfs

On Thu, 15 Jul 2010 12:12:13 -0400, Chris Mason <chris.mason@oracle.com> wrote:
>>>> It seems that the btrfs doesn't support the sectorsize which is
>>>> greater than the page size just like ext2/3/4, though we can use
>>>> mkfs.btrfs to make a filesystem with a big sectorsize. Am I right?
>>>>
>>>> If yes, we must do more check in the mkfs.btrfs.
>>>>
>>>
>>> yes, btrfs doesn't support the sectorsize>  PAGE_size.
>>>
>>
>> So we must do more check in the mkfs.btrfs to avoid misuse, and I'll
>> add some check of the sectorsize into the mkfs.btrfs.
> 
> Yes, but this is fixed up with the raid code, we'll allow different page
> sizes.

Is the raid code that you said the initialization code for the block devices?
just like this:

fs/btrfs/volumes.c:1430
int btrfs_init_new_device(struct btrfs_root *root, char *device_path)
{
	[snip]
	set_blocksize(device->bdev, 4096);
	[snip]
}

If yes, it uses a hard-code value to initialize the blocksize of the block device,
not the blocksize of the btrfs, so the btrfs doesn't check the blocksize of the btrfs.

Thanks
Miao Xie


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [BUG] btrfs hangup when we run the "sync" command
  2010-07-19  1:56       ` Miao Xie
@ 2010-07-19  2:01         ` Yan, Zheng
  2010-07-19  6:17           ` Miao Xie
  0 siblings, 1 reply; 10+ messages in thread
From: Yan, Zheng @ 2010-07-19  2:01 UTC (permalink / raw)
  To: miaox; +Cc: Chris Mason, Linux Btrfs

On 07/19/2010 09:56 AM, Miao Xie wrote:
> On Thu, 15 Jul 2010 12:12:13 -0400, Chris Mason <chris.mason@oracle.com> wrote:
>>>>> It seems that the btrfs doesn't support the sectorsize which is
>>>>> greater than the page size just like ext2/3/4, though we can use
>>>>> mkfs.btrfs to make a filesystem with a big sectorsize. Am I right?
>>>>>
>>>>> If yes, we must do more check in the mkfs.btrfs.
>>>>>
>>>>
>>>> yes, btrfs doesn't support the sectorsize>  PAGE_size.
>>>>
>>>
>>> So we must do more check in the mkfs.btrfs to avoid misuse, and I'll
>>> add some check of the sectorsize into the mkfs.btrfs.
>>
>> Yes, but this is fixed up with the raid code, we'll allow different page
>> sizes.
> 
> Is the raid code that you said the initialization code for the block devices?
> just like this:
> 
> fs/btrfs/volumes.c:1430
> int btrfs_init_new_device(struct btrfs_root *root, char *device_path)
> {
> 	[snip]
> 	set_blocksize(device->bdev, 4096);
> 	[snip]
> }
> 
> If yes, it uses a hard-code value to initialize the blocksize of the block device,
> not the blocksize of the btrfs, so the btrfs doesn't check the blocksize of the btrfs.
> 

This is for btrfs super block, because size of btrfs super block is fixed.

Yan, Zheng


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [BUG] btrfs hangup when we run the "sync" command
  2010-07-19  2:01         ` Yan, Zheng
@ 2010-07-19  6:17           ` Miao Xie
  2010-07-19  6:46             ` Yan, Zheng
  0 siblings, 1 reply; 10+ messages in thread
From: Miao Xie @ 2010-07-19  6:17 UTC (permalink / raw)
  To: Yan, Zheng; +Cc: Chris Mason, Linux Btrfs

On Mon, 19 Jul 2010 10:01:26 +0800, Yan, Zheng <zheng.yan@oracle.com> wrote:
> On 07/19/2010 09:56 AM, Miao Xie wrote:
>> On Thu, 15 Jul 2010 12:12:13 -0400, Chris Mason <chris.mason@oracle.com> wrote:
>>>>>> It seems that the btrfs doesn't support the sectorsize which is
>>>>>> greater than the page size just like ext2/3/4, though we can use
>>>>>> mkfs.btrfs to make a filesystem with a big sectorsize. Am I right?
>>>>>>
>>>>>> If yes, we must do more check in the mkfs.btrfs.
>>>>>>
>>>>>
>>>>> yes, btrfs doesn't support the sectorsize>  PAGE_size.
>>>>>
>>>>
>>>> So we must do more check in the mkfs.btrfs to avoid misuse, and I'll
>>>> add some check of the sectorsize into the mkfs.btrfs.
>>>
>>> Yes, but this is fixed up with the raid code, we'll allow different page
>>> sizes.
>>
>> Is the raid code that you said the initialization code for the block devices?
>> just like this:
>>
>> fs/btrfs/volumes.c:1430
>> int btrfs_init_new_device(struct btrfs_root *root, char *device_path)
>> {
>> 	[snip]
>> 	set_blocksize(device->bdev, 4096);
>> 	[snip]
>> }
>>
>> If yes, it uses a hard-code value to initialize the blocksize of the block device,
>> not the blocksize of the btrfs, so the btrfs doesn't check the blocksize of the btrfs.
>>
> This is for btrfs super block, because size of btrfs super block is fixed.

I don't know how this bug was fixed up. I think if the btrfs doesn't support
the >PAGE_SIZE sectorsize, it should forbid mounting a filesystem with >PAGE_SIZE 
sectorsize. But in fact, we can mount.

So I think this bug has not been fixed up or the fix is not so good.

Thanks
Miao Xie



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [BUG] btrfs hangup when we run the "sync" command
  2010-07-19  6:17           ` Miao Xie
@ 2010-07-19  6:46             ` Yan, Zheng
  2010-07-19  8:29               ` Miao Xie
  0 siblings, 1 reply; 10+ messages in thread
From: Yan, Zheng @ 2010-07-19  6:46 UTC (permalink / raw)
  To: miaox; +Cc: Chris Mason, Linux Btrfs

On Mon, Jul 19, 2010 at 2:17 PM, Miao Xie <miaox@cn.fujitsu.com> wrote:
> On Mon, 19 Jul 2010 10:01:26 +0800, Yan, Zheng <zheng.yan@oracle.com>=
 wrote:
>> On 07/19/2010 09:56 AM, Miao Xie wrote:
>>> On Thu, 15 Jul 2010 12:12:13 -0400, Chris Mason <chris.mason@oracle=
=2Ecom> wrote:
>>>>>>> It seems that the btrfs doesn't support the sectorsize which is
>>>>>>> greater than the page size just like ext2/3/4, though we can us=
e
>>>>>>> mkfs.btrfs to make a filesystem with a big sectorsize. Am I rig=
ht?
>>>>>>>
>>>>>>> If yes, we must do more check in the mkfs.btrfs.
>>>>>>>
>>>>>>
>>>>>> yes, btrfs doesn't support the sectorsize> =A0PAGE_size.
>>>>>>
>>>>>
>>>>> So we must do more check in the mkfs.btrfs to avoid misuse, and I=
'll
>>>>> add some check of the sectorsize into the mkfs.btrfs.
>>>>
>>>> Yes, but this is fixed up with the raid code, we'll allow differen=
t page
>>>> sizes.
>>>
>>> Is the raid code that you said the initialization code for the bloc=
k devices?
>>> just like this:
>>>
>>> fs/btrfs/volumes.c:1430
>>> int btrfs_init_new_device(struct btrfs_root *root, char *device_pat=
h)
>>> {
>>> =A0 =A0 =A0[snip]
>>> =A0 =A0 =A0set_blocksize(device->bdev, 4096);
>>> =A0 =A0 =A0[snip]
>>> }
>>>
>>> If yes, it uses a hard-code value to initialize the blocksize of th=
e block device,
>>> not the blocksize of the btrfs, so the btrfs doesn't check the bloc=
ksize of the btrfs.
>>>
>> This is for btrfs super block, because size of btrfs super block is =
fixed.
>
> I don't know how this bug was fixed up. I think if the btrfs doesn't =
support
> the >PAGE_SIZE sectorsize, it should forbid mounting a filesystem wit=
h >PAGE_SIZE
> sectorsize. But in fact, we can mount.
>
> So I think this bug has not been fixed up or the fix is not so good.
>

This bug has been fixed up in Chris' raid56 tree.
--
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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [BUG] btrfs hangup when we run the "sync" command
  2010-07-19  6:46             ` Yan, Zheng
@ 2010-07-19  8:29               ` Miao Xie
  0 siblings, 0 replies; 10+ messages in thread
From: Miao Xie @ 2010-07-19  8:29 UTC (permalink / raw)
  To: Yan, Zheng; +Cc: Chris Mason, Linux Btrfs

On Mon, 19 Jul 2010 14:46:17 +0800, Yan, Zheng wrote:
>>>>>> So we must do more check in the mkfs.btrfs to avoid misuse, and I'll
>>>>>> add some check of the sectorsize into the mkfs.btrfs.
>>>>>
>>>>> Yes, but this is fixed up with the raid code, we'll allow different page
>>>>> sizes.
>>>>
>>>> Is the raid code that you said the initialization code for the block devices?
>>>> just like this:
>>>>
>>>> fs/btrfs/volumes.c:1430
>>>> int btrfs_init_new_device(struct btrfs_root *root, char *device_path)
>>>> {
>>>>       [snip]
>>>>       set_blocksize(device->bdev, 4096);
>>>>       [snip]
>>>> }
>>>>
>>>> If yes, it uses a hard-code value to initialize the blocksize of the block device,
>>>> not the blocksize of the btrfs, so the btrfs doesn't check the blocksize of the btrfs.
>>>>
>>> This is for btrfs super block, because size of btrfs super block is fixed.
>>
>> I don't know how this bug was fixed up. I think if the btrfs doesn't support
>> the>PAGE_SIZE sectorsize, it should forbid mounting a filesystem with>PAGE_SIZE
>> sectorsize. But in fact, we can mount.
>>
>> So I think this bug has not been fixed up or the fix is not so good.
>>
>
> This bug has been fixed up in Chris' raid56 tree.

I see, thanks!

BTW: could you tell us the URL of Chris' raid56 tree? I just find the raid56 tree
      that is managed by David Woodhouse.
      http://git.infradead.org/users/dwmw2/btrfs-raid56.git

Regards
Miao Xie

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [BUG] btrfs hangup when we run the "sync" command
  2010-07-15  9:07   ` Miao Xie
  2010-07-15 16:12     ` Chris Mason
@ 2010-07-21 12:36     ` Hubert Kario
  1 sibling, 0 replies; 10+ messages in thread
From: Hubert Kario @ 2010-07-21 12:36 UTC (permalink / raw)
  To: miaox; +Cc: Yan, Zheng, Chris Mason, Linux Btrfs

On Thursday 15 July 2010 11:07:07 Miao Xie wrote:
> On Thu Jul 15 2010 16:14:31 GMT+0800 (CST), Yan, Zheng wrote:
> > 2010/7/15 Miao Xie<miaox@cn.fujitsu.com>:
> >> Hi, everyone
> >>=20
> >> I found btrfs will hangup when we run the sync command on my
> >> x86_64 box.
> >>=20
> >> The reproduce steps is following:
> >> # mkfs.btrfs -s 8192 -l 8192 -n 8192 /dev/sda1
> >> # mount /dev/sda1 /mnt
> >> # echo 1234567>  /mnt/aaa
> >> # sync
> >> (btrfs hangs up)
> >>=20
> >> It seems that the btrfs doesn't support the sectorsize which is
> >> greater than the page size just like ext2/3/4, though we can use
> >> mkfs.btrfs to make a filesystem with a big sectorsize. Am I right?
> >>=20
> >> If yes, we must do more check in the mkfs.btrfs.
> >=20
> > yes, btrfs doesn't support the sectorsize>  PAGE_size.
>=20
> So we must do more check in the mkfs.btrfs to avoid misuse, and I'll
> add some check of the sectorsize into the mkfs.btrfs.

I don't think that denying of creation of FSs with sectorsize > pagesiz=
e is a=20
good idea. A warning would be better:

Warning: The filesystem you are about to create won't be usable on your=
=20
computer architecture. Do you want to continue? y/n:

Unless the FS created in such way is unusabe in any circumstances...

> BTW, I sent some patches to the btrfs community recently, but I haven=
't
> received any reply. Could you review them for me? though I have teste=
d
> them and everything works well.
>=20
> [PATCH 1/2] btrfs: restructure try_release_extent_buffer()
> [PATCH 2/2] btrfs: fix oops when leafsize is greator than nodesize
> [PATCH] btrfs-progs: fix wrong extent buffer size when reading tree b=
lock
>=20
> Thanks
> Miao Xie

--=20
Hubert Kario
QBS - Quality Business Software
ul. Ksawer=F3w 30/85
02-656 Warszawa
POLAND
tel. +48 (22) 646-61-51, 646-74-24
fax +48 (22) 646-61-50
--
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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-07-21 12:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-15  3:18 [BUG] btrfs hangup when we run the "sync" command Miao Xie
2010-07-15  8:14 ` Yan, Zheng
2010-07-15  9:07   ` Miao Xie
2010-07-15 16:12     ` Chris Mason
2010-07-19  1:56       ` Miao Xie
2010-07-19  2:01         ` Yan, Zheng
2010-07-19  6:17           ` Miao Xie
2010-07-19  6:46             ` Yan, Zheng
2010-07-19  8:29               ` Miao Xie
2010-07-21 12:36     ` Hubert Kario

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).