Re: bug caused by removal of trans_mutex? (Was: Re: kernel BUG at fs/btrfs/extent-tree.c:6164!)

2011-06-13 Thread Yan, Zheng
I found another bug. There are codes (btrfs_save_ino_cache) that modify fs trees after create_pending_snapshots is called. This can corrupt your fs. On Mon, Jun 13, 2011 at 3:13 PM, Li Zefan wrote: > Cc: Josef > > I encountered following panic using 'btrfs-unstable + for-linus' >

Re: bug caused by removal of trans_mutex? (Was: Re: kernel BUG at fs/btrfs/extent-tree.c:6164!)

2011-06-13 Thread Li Zefan
Yan, Zheng wrote: > On Tue, Jun 14, 2011 at 3:55 AM, Chris Mason wrote: >> Excerpts from Yan, Zheng's message of 2011-06-13 10:58:35 -0400: >>> The usage of trans_mutex in relocation code is subtle. It controls >>> interaction of relocation >>> with transaction start, transaction commit and snapsh

Re: bug caused by removal of trans_mutex? (Was: Re: kernel BUG at fs/btrfs/extent-tree.c:6164!)

2011-06-13 Thread Yan, Zheng
On Tue, Jun 14, 2011 at 3:55 AM, Chris Mason wrote: > Excerpts from Yan, Zheng's message of 2011-06-13 10:58:35 -0400: >> The usage of trans_mutex in relocation code is subtle. It controls >> interaction of relocation >> with transaction start, transaction commit and snapshot creation. >> Simple r

Re: bug caused by removal of trans_mutex? (Was: Re: kernel BUG at fs/btrfs/extent-tree.c:6164!)

2011-06-13 Thread Chris Mason
Excerpts from Yan, Zheng's message of 2011-06-13 10:58:35 -0400: > The usage of trans_mutex in relocation code is subtle. It controls > interaction of relocation > with transaction start, transaction commit and snapshot creation. > Simple replacing > trans_mutex with trans_lock is wrong. So, I've

Re: bug caused by removal of trans_mutex? (Was: Re: kernel BUG at fs/btrfs/extent-tree.c:6164!)

2011-06-13 Thread Chris Mason
Excerpts from Chris Mason's message of 2011-06-13 09:12:06 -0400: > Excerpts from Li Zefan's message of 2011-06-13 03:13:13 -0400: > > Cc: Josef > > > > I encountered following panic using 'btrfs-unstable + for-linus' > > kernel. > > > > I ran "btrfs fi bal /tes

Re: bug caused by removal of trans_mutex? (Was: Re: kernel BUG at fs/btrfs/extent-tree.c:6164!)

2011-06-13 Thread Chris Mason
Excerpts from Yan, Zheng's message of 2011-06-13 10:58:35 -0400: > The usage of trans_mutex in relocation code is subtle. It controls > interaction of relocation > with transaction start, transaction commit and snapshot creation. > Simple replacing > trans_mutex with trans_lock is wrong. What requ

Re: bug caused by removal of trans_mutex? (Was: Re: kernel BUG at fs/btrfs/extent-tree.c:6164!)

2011-06-13 Thread Yan, Zheng
The usage of trans_mutex in relocation code is subtle. It controls interaction of relocation with transaction start, transaction commit and snapshot creation. Simple replacing trans_mutex with trans_lock is wrong. On Mon, Jun 13, 2011 at 3:13 PM, Li Zefan wrote: > Cc: Josef > > I encount

Re: bug caused by removal of trans_mutex? (Was: Re: kernel BUG at fs/btrfs/extent-tree.c:6164!)

2011-06-13 Thread Chris Mason
Excerpts from Li Zefan's message of 2011-06-13 03:13:13 -0400: > Cc: Josef > > I encountered following panic using 'btrfs-unstable + for-linus' > kernel. > > I ran "btrfs fi bal /test5" command, and mount option of /test5 > is as follows: > > >

Re: bug caused by removal of trans_mutex? (Was: Re: kernel BUG at fs/btrfs/extent-tree.c:6164!)

2011-06-13 Thread Li Zefan
Yan, Zheng wrote: > Add a mutex to btrfs_init_reloc_root() to prevent the reloc tree > creation from concurrent execution. Thanks! Unfortunately I can still encounter BUG() in difference places in each run: kernel BUG at fs/btrfs/extent-tree.c:6173! kernel BUG at fs/btrfs/volumes.c:2567! > >

Re: bug caused by removal of trans_mutex? (Was: Re: kernel BUG at fs/btrfs/extent-tree.c:6164!)

2011-06-13 Thread Yan, Zheng
Add a mutex to btrfs_init_reloc_root() to prevent the reloc tree creation from concurrent execution. On Mon, Jun 13, 2011 at 3:13 PM, Li Zefan wrote: > Cc: Josef > > I encountered following panic using 'btrfs-unstable + for-linus' > kernel. > > I ran "btrfs fi bal

bug caused by removal of trans_mutex? (Was: Re: kernel BUG at fs/btrfs/extent-tree.c:6164!)

2011-06-13 Thread Li Zefan
Cc: Josef I encountered following panic using 'btrfs-unstable + for-linus' kernel. I ran "btrfs fi bal /test5" command, and mount option of /test5 is as follows: /dev/sdc3 on /test5 type btrfs (rw,space_cache,compress=lzo,in

Re: kernel BUG at fs/btrfs/extent-tree.c:6164!

2011-06-07 Thread Tsutomu Itoh
(2011/06/08 0:46), Chris Mason wrote: > Excerpts from liubo's message of 2011-06-07 04:36:56 -0400: >> On 06/07/2011 04:24 PM, Tsutomu Itoh wrote: >>> (2011/06/07 15:17), Tsutomu Itoh wrote: (2011/06/07 14:59), Tsutomu Itoh wrote: > Hi liubo, > > (2011/06/07 14:31), liubo wrote: >>

Re: kernel BUG at fs/btrfs/extent-tree.c:6164!

2011-06-07 Thread Chris Mason
Excerpts from liubo's message of 2011-06-07 04:36:56 -0400: > On 06/07/2011 04:24 PM, Tsutomu Itoh wrote: > > (2011/06/07 15:17), Tsutomu Itoh wrote: > >> (2011/06/07 14:59), Tsutomu Itoh wrote: > >>> Hi liubo, > >>> > >>> (2011/06/07 14:31), liubo wrote: > On 06/06/2011 04:33 PM, Tsutomu Itoh

Re: kernel BUG at fs/btrfs/extent-tree.c:6164!

2011-06-07 Thread liubo
; I guess maybe I miss something to reproduce it? >>>> >>>> thanks, >>>> liubo >>>> >>>>> Thanks, >>>>> Tsutomu >>>>> >>>>> ========================= >

Re: kernel BUG at fs/btrfs/extent-tree.c:6164!

2011-06-07 Thread Tsutomu Itoh
emand >>>> acpi_cpufr >>>> eq freq_table mperf ipv6 btrfs zlib_deflate crc32c libcrc32c ext3 jbd >>>> dm_mirror >>>> dm_region_hash dm_log dm_mod kvm uinput ppdev parport_pc parport sg pcspkr >>>> i2c_i >>>> 801 i2c_core iTCO_wdt

Re: kernel BUG at fs/btrfs/extent-tree.c:6164!

2011-06-06 Thread Tsutomu Itoh
iput+0xe2/0x1a0 >>> [] btrfs_remove_block_group+0x141/0x3c0 [btrfs] >>> [] btrfs_relocate_chunk+0x54a/0x670 [btrfs] >>> [] ? read_extent_buffer+0xd8/0x1d0 [btrfs] >>> [] ? btrfs_previous_item+0xb1/0x150 [btrfs] >>> [] btrfs_balance+0x21a/0x2b0 [bt

Re: kernel BUG at fs/btrfs/extent-tree.c:6164!

2011-06-06 Thread Tsutomu Itoh
> [] ? btrfs_previous_item+0xb1/0x150 [btrfs] >> [] btrfs_balance+0x21a/0x2b0 [btrfs] >> [] ? path_openat+0x101/0x3d0 >> [] btrfs_ioctl+0x51c/0xc40 [btrfs] >> [] ? handle_mm_fault+0x148/0x270 >> [] ? do_page_fault+0x1d8/0x4b0 >> [] do_vfs_ioctl+0x9a/

Re: kernel BUG at fs/btrfs/extent-tree.c:6164!

2011-06-06 Thread liubo
th+0x16/0x1b > ---[ end trace e5c5cb2e98a3cd1a ]--- > btrfs: relocating block group 20971520 flags 18 > btrfs: relocating block group 34925969408 flags 18 > btrfs: found 1 extents > [ cut here ] > kernel BUG at fs/btrfs/extent-tree.c:6164! > invalid opcode: [

kernel BUG at fs/btrfs/extent-tree.c:6164!

2011-06-06 Thread Tsutomu Itoh
sys_ioctl+0xa1/0xb0 [] system_call_fastpath+0x16/0x1b ---[ end trace e5c5cb2e98a3cd1a ]--- btrfs: relocating block group 20971520 flags 18 btrfs: relocating block group 34925969408 flags 18 btrfs: found 1 extents [ cut here ]------------ kernel BUG at fs/btrfs/extent-tree.c:6164! invalid opcode