Re: [PATCH] Btrfs-progs: added btrfs filesystem label [label] [path] support V2

2011-09-02 Thread Jeff liu
在 2011-9-2,下午11:48, David Sterba 写道: > On Fri, Sep 02, 2011 at 09:13:34PM +0800, Jeff Liu wrote: >> --- a/ioctl.h >> +++ b/ioctl.h >> @@ -140,6 +140,8 @@ struct btrfs_ioctl_space_args { >>struct btrfs_ioctl_vol_args) >> #define BTRFS_IOC_SCAN_DEV _IOW(BTRFS_IOCTL_MAGIC, 4, \ >

[PATCH] btrfs: fix warning in iput for bad-inode

2011-09-02 Thread slyich
From: Sergei Trofimovich iput() shouldn't be called for inodes in I_NEW state. We need to mark inode as constructed first. WARNING: at fs/inode.c:1309 iput+0x20b/0x210() Call Trace: [] warn_slowpath_common+0x7a/0xb0 [] warn_slowpath_null+0x15/0x20 [] iput+0x20b/0x210 [] btrfs_iget+0x1eb/0x4a

Re: [PATCH] Btrfs-progs: added btrfs filesystem label [label] [path] support V2

2011-09-02 Thread David Sterba
On Fri, Sep 02, 2011 at 09:13:34PM +0800, Jeff Liu wrote: > --- a/ioctl.h > +++ b/ioctl.h > @@ -140,6 +140,8 @@ struct btrfs_ioctl_space_args { > struct btrfs_ioctl_vol_args) > #define BTRFS_IOC_SCAN_DEV _IOW(BTRFS_IOCTL_MAGIC, 4, \ > struct btrfs_ioctl_vol_

Re: [PATCH] Btrfs-progs: added btrfs filesystem label [label] [path] support V2

2011-09-02 Thread Jeff Liu
Hi David, On 09/02/2011 08:52 PM, David Sterba wrote: Hi, are you aware that there is a label support already? Though only for unmounted system, but please have a look at these patches: https://patchwork.kernel.org/patch/381141/ https://patchwork.kernel.org/patch/842602/ and the patches are p

Re: [PATCH] Btrfs-progs: added btrfs filesystem label [label] [path] support V2

2011-09-02 Thread David Sterba
Hi, are you aware that there is a label support already? Though only for unmounted system, but please have a look at these patches: https://patchwork.kernel.org/patch/381141/ https://patchwork.kernel.org/patch/842602/ and the patches are part of Hugo's integration for a long time, rather check l

Re: [BUG] umount command doesn't end forever

2011-09-02 Thread Ilya Dryomov
On Fri, Sep 02, 2011 at 05:33:57PM +0900, Tsutomu Itoh wrote: > In current for-linus branch, I encountered the problem that the > umount command doesn't end forever. (snipped) > umount acquires down_write(&s->s_umount) by deactivate_super() and > waits for the end of btrfs-cleaner. > But, btrfs-c

Re: kernel BUG at fs/btrfs/inode.c:2299

2011-09-02 Thread Maciej Marcin Piechotka
On Tue, 2011-08-30 at 09:47 +0100, Maciej Marcin Piechotka wrote: > On Tue, 2011-08-30 at 14:27 +0800, Miao Xie wrote: > > On mon, 29 Aug 2011 02:45:07 +0100, Maciej Marcin Piechotka wrote: > > > I receive the bug when I try to snapshot from fcron: > > > > > > 2011-08-29T02:00:46.529238+01:00 pica

Re: [PATCH 3/3] Added test case 259 for the btrfs raid features

2011-09-02 Thread Christoph Hellwig
On Fri, Aug 12, 2011 at 04:01:33AM +0800, Anand Jain wrote: > Added test case 259 for the btrfs raid features. SCRATCH_DEV_POOL must > be set to 2 or more disks. Any chance you can document how SCRATCH_DEV_POOL is supposed to be used in the README file? An addition patch is fine, no need to updat

Re: [PATCH 1/3] Added test case 257 for btrfs extended snapshot tests

2011-09-02 Thread Christoph Hellwig
Dave, Alex: any objections to these patches? I not I'm going to put them in this weekend. On Fri, Aug 12, 2011 at 04:01:08AM +0800, Anand Jain wrote: > This adds the test case 257 to test the snapshot feature in:wq btrfs. > This also added a new user set variable SCRATCH_DEV_POOL, which should >

Re: [PATCH 1/4] Btrfs: fix defragmentation regression

2011-09-02 Thread Christoph Hellwig
On Fri, Sep 02, 2011 at 03:56:25PM +0800, Li Zefan wrote: > There's an off-by-one bug: > > # create a file with lots of 4K file extents > # btrfs fi defrag /mnt/file > # sync > # filefrag -v /mnt/file > Filesystem type is: 9123683e > File size of /mnt/file is 1228800 (300 blocks, block

[BUG] umount command doesn't end forever

2011-09-02 Thread Tsutomu Itoh
In current for-linus branch, I encountered the problem that the umount command doesn't end forever. = # mount ... /dev/sdc9 on /test9 type btrfs (rw,space_cache,compress=lzo,autodefrag) # umount /test9 crash> ps | grep umount 13107 6558 0 8801257296c0

[PATCH 4/4] Btrfs: honor extent thresh during defragmentation

2011-09-02 Thread Li Zefan
We won't defrag an extent, if it's bigger than the threshold we specified and there's no small extent before it, but actually the code doesn't work this way. There are three bugs: - When should_defrag_range() decides we should keep on defragmenting an extent, last_len is not incremented. (old b

[PATCH 3/4] Btrfs: fix wrong max_to_defrag in btrfs_defrag_file()

2011-09-02 Thread Li Zefan
It's off-by-one, and thus we may skip the last page while defragmenting. An example case: # create /mnt/file with 2 4K file extents # btrfs fi defrag /mnt/file # sync # filefrag /mnt/file /mnt/file: 2 extents found So it's not defragmented. Signed-off-by: Li Zefan --- fs/btrfs/ioctl

[PATCH 2/4] Btrfs: use i_size_read() in btrfs_defrag_file()

2011-09-02 Thread Li Zefan
Don't use inode->i_size directly, since we're not holding i_mutex. This also fixes another bug, that i_size can change after it's checked against 0 and then (i_size - 1) can be negative. Signed-off-by: Li Zefan --- fs/btrfs/ioctl.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-

[PATCH 1/4] Btrfs: fix defragmentation regression

2011-09-02 Thread Li Zefan
There's an off-by-one bug: # create a file with lots of 4K file extents # btrfs fi defrag /mnt/file # sync # filefrag -v /mnt/file Filesystem type is: 9123683e File size of /mnt/file is 1228800 (300 blocks, blocksize 4096) ext logical physical expected length flags 0 0