Re: [RFC PATCH v7 1/2] Btrfs: Add a new ioctl to get the label of a mounted file system

2012-12-20 Thread Jeff Liu
Hi Goffredo, On 12/21/2012 04:18 AM, Goffredo Baroncelli wrote: > HI Jeff, > > On 12/20/2012 09:43 AM, Jeff Liu wrote: >> With the new ioctl(2) BTRFS_IOC_GET_FSLABEL we can fetch the label of a >> mounted file system. >> >> Signed-off-by: Jie Liu >> Signed-off-by: Anand Jain >> Cc: Miao Xie >

RE: [PATCH 0/3] Update LZO compression

2012-12-20 Thread Dan Magenheimer
> From: Markus F.X.J. Oberhumer [mailto:mar...@oberhumer.com] > Subject: Re: [PATCH 0/3] Update LZO compression > > Thanks Arnd, > > On 2012-10-11 13:41, Arnd Bergmann wrote: > > On Tuesday 09 October 2012, Markus F.X.J. Oberhumer wrote: > >>> > >>> : This commit updates the kernel LZO code to th

[GIT PULL] Two btrfs reverts

2012-12-20 Thread Chris Mason
Hi Linus, I had missed that for two of the patches in my last pull, we had included different fixes during 3.7. My for-linus has them reverted: git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus Chris Mason (2) commits (+6/-8): Revert "Btrfs: MOD_LOG_KEY_REMOVE_WH

Re: [RFC PATCH v7 2/2] Btrfs: Add a new ioctl to set/change the label of a mounted file system

2012-12-20 Thread Goffredo Baroncelli
On 12/20/2012 09:43 AM, Jeff Liu wrote: > With the new ioctl(2) BTRFS_IOC_SET_FSLABEL, we can set/change the label of a > mounted file system. > > Signed-off-by: Jie Liu > Signed-off-by: Anand Jain > Cc: Miao Xie > Cc: Goffredo Baroncelli > Cc: David Sterba Reviewed-by: Goffredo Baroncelli

Re: [RFC PATCH v7 1/2] Btrfs: Add a new ioctl to get the label of a mounted file system

2012-12-20 Thread Goffredo Baroncelli
HI Jeff, On 12/20/2012 09:43 AM, Jeff Liu wrote: > With the new ioctl(2) BTRFS_IOC_GET_FSLABEL we can fetch the label of a > mounted file system. > > Signed-off-by: Jie Liu > Signed-off-by: Anand Jain > Cc: Miao Xie > Cc: Goffredo Baroncelli > Cc: David Sterba [...] > +static int btrfs_ioct

Re: [PATCH 2/3] Btrfs: use wrapper page_offset

2012-12-20 Thread Zach Brown
> - u64 start = (u64)page->index << PAGE_CACHE_SHIFT; > + u64 start = (u64)page_offset(page); The (u64) cast was presumably to keep from losing high bits during the shift. page_offset() already has that cast internally and returns loff_t, which is always long long. I think that you can d

[josef-btrfs:master 21/21] fs/btrfs/ioctl.c:1436 btrfs_ioctl_resize() error: 'device' dereferencing possible ERR_PTR()

2012-12-20 Thread Dan Carpenter
[ get_avail_device() sometimes returns an ERR_PTR ] Hi Liu, FYI, there are new smatch warnings show up in tree: git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git master head: 3d294381647ab114f525a0ccf3d28f8172ce6a5f commit: 3d294381647ab114f525a0ccf3d28f8172ce6a5f [21/21] B

Re: HIT WARN_ON WARNING: at fs/btrfs/extent-tree.c:6339 btrfs_alloc_free_block+0x126/0x330 [btrfs]()

2012-12-20 Thread Josef Bacik
On Thu, Dec 20, 2012 at 07:46:12AM -0700, Rock Lee wrote: > Is there anyone who are tracking this issue? > Yeah I'm working on it now. It's a problem I've known about for a while but haven't had a good reproducer or a good idea of how to fix it, but now it has my full attention, hopefully I'll h

Re: btrfs warning in 3.7.0 with nfsd

2012-12-20 Thread Chris Mason
On Wed, Dec 19, 2012 at 10:43:28PM -0700, Steve Leung wrote: > > I'm getting some kernel warnings from a btrfs raid1 filesystem that's > serving up nfs4 to a couple of other computers on a small home network. > I ran 3.6.x for several weeks before upgrading and didn't see any warnings > like th

Re: HIT WARN_ON WARNING: at fs/btrfs/extent-tree.c:6339 btrfs_alloc_free_block+0x126/0x330 [btrfs]()

2012-12-20 Thread Rock Lee
It's really easy to get this warning. In my other testing codes, got the same issue again. Detail log: use_block_rsv: 18 callbacks suppressed [ 8444.788581] btrfs: block rsv returned -28 [ 8444.788584] [ cut here ] [ 8444.788621] WARNING: at fs/btrfs/extent-tree.c:6323 b

Re: HIT WARN_ON WARNING: at fs/btrfs/extent-tree.c:6339 btrfs_alloc_free_block+0x126/0x330 [btrfs]()

2012-12-20 Thread Rock Lee
Is there anyone who are tracking this issue? 2012/12/19 Rock Lee : > Hi, > > I just try to write the testcase a few hours before. So there will be > some problems. > > Maybe you can ignore the unimplemented and the ugly parts. > > Welcome any feedback. :) > > I have uploaded the test source fi

Re: btrfs in the kernel 2.6.31

2012-12-20 Thread Valentin QUEQUET
Hi Eugene, You may want to port up-to-date User-Mode-Linux to the ARM platform (at least yours), and then run your custom UML-powered file server with support for all the improved features of BTRFS per Linux 3.7. Hope this helps. Regards, Valentin -- To unsubscribe from this list: send the li

[PATCH 2/3] Btrfs: use wrapper page_offset

2012-12-20 Thread Miao Xie
From: Liu Bo Use wrapper page_offset to get byte-offset into filesystem object for page. Signed-off-by: Liu Bo Signed-off-by: Miao Xie --- fs/btrfs/disk-io.c| 2 +- fs/btrfs/extent_io.c | 20 ++-- fs/btrfs/inode.c | 2 +- fs/btrfs/relocation.c | 2 +- 4 files chan

[PATCH RESEND 1/3] Btrfs: flush all dirty inodes if writeback can not start

2012-12-20 Thread Miao Xie
From: Miao Xie We may try to flush some dirty pages when there is no enough space to reserve. But it is possible that this operation fails, in order to get enough space to reserve successfully, we will sync all the delalloc file. This operation is safe, we needn't worry about the case that the fi

[PATCH RESEND 3/3] Btrfs: resize all devices when we dont assign a specific, device id

2012-12-20 Thread Miao Xie
From: Liu Bo This patch fixes two bugs: When we do not assigne a device id for the resizer, - it will only take one device to resize, which is supposed to apply on all available devices. - it will take 'id 1' device as default, and this will cause a bug as we may have removed the 'id 1' devi

[PATCH RESEND] vfs: re-implement writeback_inodes_sb(_nr)_if_idle() and rename them

2012-12-20 Thread Miao Xie
writeback_inodes_sb(_nr)_if_idle() is re-implemented by replacing down_read() with down_read_trylock() because - If ->s_umount is write locked, then the sb is not idle. That is writeback_inodes_sb(_nr)_if_idle() needn't wait for the lock. - writeback_inodes_sb(_nr)_if_idle() grabs s_umount lock w

[RFC PATCH v7 1/2] Btrfs: Add a new ioctl to get the label of a mounted file system

2012-12-20 Thread Jeff Liu
With the new ioctl(2) BTRFS_IOC_GET_FSLABEL we can fetch the label of a mounted file system. Signed-off-by: Jie Liu Signed-off-by: Anand Jain Cc: Miao Xie Cc: Goffredo Baroncelli Cc: David Sterba --- fs/btrfs/ioctl.c | 15 +++ fs/btrfs/ioctl.h |2 ++ 2 files changed, 17 in

[RFC PATCH v7 2/2] Btrfs: Add a new ioctl to set/change the label of a mounted file system

2012-12-20 Thread Jeff Liu
With the new ioctl(2) BTRFS_IOC_SET_FSLABEL, we can set/change the label of a mounted file system. Signed-off-by: Jie Liu Signed-off-by: Anand Jain Cc: Miao Xie Cc: Goffredo Baroncelli Cc: David Sterba --- fs/btrfs/ioctl.c | 39 +++ fs/btrfs/ioctl.h |

[RFC PATCH v7 0/2] Btrfs: get/set label of a mounted file system

2012-12-20 Thread Jeff Liu
Hello, Per David's comments upon v6, I missed a check up against the return value of btrfs_end_transaction for btrfs_ioctl_fs_setlabel(), it was fixed in this version. v7->v6: - take care of btrfs_end_transaction() in btrfs_ioctl_fs_setlabel() rather than keeping silence. The old versions can

Re: [RFC PATCH V6 2/2] Btrfs: Add a new ioctl to change the label of a mounted file system

2012-12-20 Thread Jeff Liu
On 12/19/2012 10:21 PM, David Sterba wrote: > On Tue, Dec 18, 2012 at 11:06:07AM +0800, Jeff Liu wrote: >> +static int btrfs_ioctl_set_fslabel(struct file *file, void __user *arg) >> +{ >> +struct btrfs_root *root = BTRFS_I(fdentry(file)->d_inode)->root; >> +struct btrfs_super_block *super_