Re: Build failures due to commit 416161db (btrfs: offline dedupe)

2013-09-13 Thread Chris Mason
Quoting Mark Fasheh (2013-09-13 13:58:01) > On Fri, Sep 13, 2013 at 01:00:22PM -0400, Chris Mason wrote: > > Quoting Guenter Roeck (2013-09-13 12:35:35) > > I'm happy to fix this with a bigger put of the info struct, just > > let me know the preferred arch-happy solution. > > In fact old versions

Re: Build failures due to commit 416161db (btrfs: offline dedupe)

2013-09-13 Thread Mark Fasheh
On Fri, Sep 13, 2013 at 01:00:22PM -0400, Chris Mason wrote: > Quoting Guenter Roeck (2013-09-13 12:35:35) > > On Fri, Sep 13, 2013 at 03:52:43PM +0200, Geert Uytterhoeven wrote: > > > On Fri, Sep 13, 2013 at 3:33 PM, Guenter Roeck wrote: > > > > fs/btrfs/ioctl.c: In function 'btrfs_ioctl_file_ext

Re: [PATCH 1/2] btrfs-progs: move out print in cmd_df to another function

2013-09-13 Thread David Sterba
On Fri, Sep 13, 2013 at 07:32:22PM +0800, Anand Jain wrote: > +static int get_df(int fd, struct btrfs_ioctl_space_args **sargs_ret) > +{ This function returns full error codes, that's ok, > @@ -77,89 +98,79 @@ static int cmd_df(int argc, char **argv) > ret = ioctl(fd, BTRFS_IOC_SPACE_INFO,

Re: Build failures due to commit 416161db (btrfs: offline dedupe)

2013-09-13 Thread Chris Mason
Quoting Guenter Roeck (2013-09-13 12:35:35) > On Fri, Sep 13, 2013 at 03:52:43PM +0200, Geert Uytterhoeven wrote: > > On Fri, Sep 13, 2013 at 3:33 PM, Guenter Roeck wrote: > > > fs/btrfs/ioctl.c: In function 'btrfs_ioctl_file_extent_same': > > > fs/btrfs/ioctl.c:2802:3: error: implicit declaration

Re: Build failures due to commit 416161db (btrfs: offline dedupe)

2013-09-13 Thread Guenter Roeck
On Fri, Sep 13, 2013 at 01:00:22PM -0400, Chris Mason wrote: > Quoting Guenter Roeck (2013-09-13 12:35:35) > > On Fri, Sep 13, 2013 at 03:52:43PM +0200, Geert Uytterhoeven wrote: > > > On Fri, Sep 13, 2013 at 3:33 PM, Guenter Roeck wrote: > > > > fs/btrfs/ioctl.c: In function 'btrfs_ioctl_file_ext

Re: [PATCH 2/2] btrfs-progs: use kernel for mounted and lblkid to scan disks

2013-09-13 Thread David Sterba
On Fri, Sep 13, 2013 at 07:32:23PM +0800, Anand Jain wrote: > Further, this patch adds new parameters mounted and > group profile info in the filesystem show output Sorry to bother you, but the 'further' part of the patch should be separated out. The core change of the patch is to use libblkid and

Re: [PATCH] btrfs: Add btrfs: prefix to kernel log output

2013-09-13 Thread David Sterba
On Fri, Sep 13, 2013 at 11:46:50AM -0400, Frank Holton wrote: > The kernel log entries for device label %s and device fsid %pU > are missing the btrfs: prefix. Add those here. > > Signed-off-by: Frank Holton Reviewed-by: David Sterba > - printk(KERN_INFO "device label %s ", disk_sup

Re: [PATCH v2 2/2] btrfs-progs: use kernel for mounted and lblkid to scan disks

2013-09-13 Thread David Sterba
On Fri, Sep 13, 2013 at 05:56:46PM +0200, David Sterba wrote: > Reproduced with today's linus tree (btrfs pull is there), progs contain the > patches in question: Reproduces with the updated patches you sent today. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the bo

Re: Build failures due to commit 416161db (btrfs: offline dedupe)

2013-09-13 Thread Guenter Roeck
On Fri, Sep 13, 2013 at 03:52:43PM +0200, Geert Uytterhoeven wrote: > On Fri, Sep 13, 2013 at 3:33 PM, Guenter Roeck wrote: > > fs/btrfs/ioctl.c: In function 'btrfs_ioctl_file_extent_same': > > fs/btrfs/ioctl.c:2802:3: error: implicit declaration of function > > '__put_user_unaligned' [-Werror=im

Re: [GIT PULL] Btrfs

2013-09-13 Thread Russell King
On Fri, Sep 13, 2013 at 11:38:15AM -0400, Josh Boyer wrote: > On Fri, Sep 13, 2013 at 11:06 AM, Josh Boyer wrote: > > On Fri, Sep 13, 2013 at 8:15 AM, Russell King wrote: > >> On Fri, Sep 13, 2013 at 07:53:21AM -0400, Josh Boyer wrote: > >>> I'm not an ARM expert, so I don't know if ARM should us

Re: [PATCH v2 2/2] btrfs-progs: use kernel for mounted and lblkid to scan disks

2013-09-13 Thread David Sterba
On Fri, Sep 13, 2013 at 06:49:10PM +0800, Anand Jain wrote: > >I wonder if we should keep --all-devices as a last resort fallback eg. > > Any idea whats the real use of --all-devices option anyway > I am unsure. Anyway will restore --all-devices so now. That's when udev breaks or is not present

[PATCH] btrfs: Add btrfs: prefix to kernel log output

2013-09-13 Thread Frank Holton
The kernel log entries for device label %s and device fsid %pU are missing the btrfs: prefix. Add those here. Signed-off-by: Frank Holton --- fs/btrfs/volumes.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index a057735..04311

Re: [PATCH] btrfs-progs: calculate disk space that a subvol could free upon delete

2013-09-13 Thread Wang Shilong
Hello Anand, > (This patch is for review and comments only) > > This patch provides a way to know how much space can be > relinquished if when subvol /snapshot is deleted. With > this sys admin can make better judgments in managing the > filesystem when fs is near full. > I think this is real

[PATCH] btrfs: refuse to remount read-write after abort

2013-09-13 Thread David Sterba
It's still possible to flip the filesystem into RW mode after it's remounted RO due to an abort. There are lots of places that check for the superblock error bit and will not write data, but we should not let the filesystem appear read-write. Signed-off-by: David Sterba --- fs/btrfs/super.c |

Re: [GIT PULL] Btrfs

2013-09-13 Thread Josh Boyer
On Fri, Sep 13, 2013 at 11:06 AM, Josh Boyer wrote: > On Fri, Sep 13, 2013 at 8:15 AM, Russell King wrote: >> On Fri, Sep 13, 2013 at 07:53:21AM -0400, Josh Boyer wrote: >>> I'm not an ARM expert, so I don't know if ARM should use the >>> asm-generic implementations, or just use __get_user/__put_

Re: [GIT PULL] Btrfs

2013-09-13 Thread Josh Boyer
On Fri, Sep 13, 2013 at 8:15 AM, Russell King wrote: > On Fri, Sep 13, 2013 at 07:53:21AM -0400, Josh Boyer wrote: >> I'm not an ARM expert, so I don't know if ARM should use the >> asm-generic implementations, or just use __get_user/__put_user in all >> cases. I've CC'd rmk. > > Why do we have u

Re: [PATCH] Btrfs: btrfs_ioctl_default_subvol: Revert back to toplevel subvolume when arg is 0

2013-09-13 Thread David Sterba
On Fri, Sep 13, 2013 at 07:34:10PM +0530, chandan wrote: > This patch makes it possible to set BTRFS_FS_TREE_OBJECTID as the default > subvolume by passing a subvolume id of 0. > > Signed-off-by: chandan Reviewed-by: David Sterba -- To unsubscribe from this list: send the line "unsubscribe linux

Re: [GIT PULL] Btrfs

2013-09-13 Thread Hugo Mills
On Fri, Sep 13, 2013 at 09:07:36AM -0400, Ric Wheeler wrote: > On 09/12/2013 11:36 AM, Chris Mason wrote: > >Mark Fasheh's offline dedup work is also here. In this case offline > >means the FS is mounted and active, but the dedup work is not done > >inline during file IO. This is a building bloc

Re: [GIT PULL] Btrfs

2013-09-13 Thread Ric Wheeler
On 09/12/2013 11:36 AM, Chris Mason wrote: Mark Fasheh's offline dedup work is also here. In this case offline means the FS is mounted and active, but the dedup work is not done inline during file IO. This is a building block where utilities are able to ask the FS to dedup a series of extents

[PATCH] Btrfs: btrfs_ioctl_default_subvol: Revert back to toplevel subvolume when arg is 0

2013-09-13 Thread chandan
This patch makes it possible to set BTRFS_FS_TREE_OBJECTID as the default subvolume by passing a subvolume id of 0. Signed-off-by: chandan --- fs/btrfs/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 1a5b946..a059c3c 100644 --

[PATCH] Btrfs: improve replacing nocow extents V2

2013-09-13 Thread Josef Bacik
Various people have hit a deadlock when running btrfs/011. This is because when replacing nocow extents we will take the i_mutex to make sure nobody messes with the file while we are replacing the extent. The problem is we are already holding a transaction open, which is a locking inversion, so i

Re: Build failures due to commit 416161db (btrfs: offline dedupe)

2013-09-13 Thread Geert Uytterhoeven
On Fri, Sep 13, 2013 at 3:33 PM, Guenter Roeck wrote: > fs/btrfs/ioctl.c: In function 'btrfs_ioctl_file_extent_same': > fs/btrfs/ioctl.c:2802:3: error: implicit declaration of function > '__put_user_unaligned' [-Werror=implicit-function-declaration] > cc1: some warnings being treated as errors >

Build failures due to commit 416161db (btrfs: offline dedupe)

2013-09-13 Thread Guenter Roeck
fs/btrfs/ioctl.c: In function 'btrfs_ioctl_file_extent_same': fs/btrfs/ioctl.c:2802:3: error: implicit declaration of function '__put_user_unaligned' [-Werror=implicit-function-declaration] cc1: some warnings being treated as errors make[2]: *** [fs/btrfs/ioctl.o] Error 1 make[2]: *** Waiting for

Re: [PATCH] btrfs-progs: btrfs.8.in: Add info about reverting back to root subvolume.

2013-09-13 Thread David Sterba
On Fri, Sep 13, 2013 at 11:02:10AM +0530, chandan wrote: > On Thursday, September 12, 2013 03:29:52 PM David Sterba wrote: > > The number 5 is an implementation detail, we should recommend to use 0. > > > In the current btrfs kernel code if 0 is passed as the subvolume id, > the btrfs_ioctl_default

Re: [GIT PULL] Btrfs

2013-09-13 Thread Geert Uytterhoeven
On Fri, Sep 13, 2013 at 2:15 PM, Russell King wrote: > On Fri, Sep 13, 2013 at 07:53:21AM -0400, Josh Boyer wrote: >> I'm not an ARM expert, so I don't know if ARM should use the >> asm-generic implementations, or just use __get_user/__put_user in all >> cases. I've CC'd rmk. > > Why do we have u

[PATCH] btrfs-progs: calculate disk space that a subvol could free upon delete

2013-09-13 Thread Anand Jain
(This patch is for review and comments only) This patch provides a way to know how much space can be relinquished if when subvol /snapshot is deleted. With this sys admin can make better judgments in managing the filesystem when fs is near full. as shown below the parameter 'sole space' indicate

Re: [GIT PULL] Btrfs

2013-09-13 Thread Russell King
On Fri, Sep 13, 2013 at 07:53:21AM -0400, Josh Boyer wrote: > I'm not an ARM expert, so I don't know if ARM should use the > asm-generic implementations, or just use __get_user/__put_user in all > cases. I've CC'd rmk. Why do we have uaccess-unaligned.h ? Normally, these kinds of things are spaw

Re: [GIT PULL] Btrfs

2013-09-13 Thread Josh Boyer
On Fri, Sep 13, 2013 at 2:44 AM, Geert Uytterhoeven wrote: > On Thu, Sep 12, 2013 at 10:38 PM, Josh Boyer > wrote: >> On Thu, Sep 12, 2013 at 11:36 AM, Chris Mason >> wrote: >>> Mark Fasheh (4): >>> btrfs: offline dedupe >> >> This commit adds calls to __put_user_unaligned, which causes

[PATCH] btrfs-progs: replace fails start but in the background

2013-09-13 Thread Anand Jain
when the balance is running, the replace start ioctl fails (for the right reasons). but since the cli has put ioctl thread to background (for right reasons) the user won't know that cli failed to start. so before cli goes to the background, it should check if mutually_exclusive_operation_running i

[PATCH] btrfs-progs: use btrfs error code for kernel errors

2013-09-13 Thread Anand Jain
Now with the below kernel patch, the excl operations like dev add/replace/resize and balance returns the btrfs error code defined in btrfs.h, this patch will help btrfs-progs (and thus user) to know the error string on the terminal (instead of /var/log/messages as previously kernel did). This patc

[PATCH 2/2] btrfs-progs: use kernel for mounted and lblkid to scan disks

2013-09-13 Thread Anand Jain
As of now btrfs filesystem show reads directly from disks. So sometimes output can be stale, mainly when user wants to cross verify their operation like, label or device delete or add... etc. so this patch will read from the kernel ioctl if it finds that disk is mounted. Further, to scan for the d

[PATCH 1/2] btrfs-progs: move out print in cmd_df to another function

2013-09-13 Thread Anand Jain
This is a prepatory work for the btrfs fi show command fixes. So that we have a function get_df to get the fs sizes v5: rebase on 20130909 accepts Davids review comments v4: fixes checkpatch.pl errors as suggested by Wang v3: accepts Zach review comments v2: combined the other patches as below

[PATCH 0/2 v3] fi show, dev scan and lblkid

2013-09-13 Thread Anand Jain
This patch set is about use of lblkid for the btrfs disk scan and using this lblkid scan for the fi show and dev scan cli This includes the comments from David (to use lblkid) and Zach to show (btrfs fi show) info from kernel when disk is mounted and from the disks directly when disk

Re: [PATCH v2 2/2] btrfs-progs: use kernel for mounted and lblkid to scan disks

2013-09-13 Thread Anand Jain
Thanks for implementing it! I found a few things to fix, comments below. I wonder if we should keep --all-devices as a last resort fallback eg. Any idea whats the real use of --all-devices option anyway I am unsure. Anyway will restore --all-devices so now. all other suggestion were consi

Re: [PATCH 1/2 resend] btrfs-progs: v4, move out print in cmd_df to another function

2013-09-13 Thread Anand Jain
all of them were considered, v5 sent out. Thanks, Anand > - path = argv[1]; > + switch (flag & BTRFS_BLOCK_GROUP_TYPE_MASK) { > + case BTRFS_BLOCK_GROUP_DATA: > + return "data"; > + case BTRFS_BLOCK_GROUP_SYSTEM: > + return "system"; > + case BTRFS_B

[PATCH] xfstests: btrfs/011 improvement for compressed filesystems

2013-09-13 Thread Stefan Behrens
Josef noticed that using /dev/zero to generate most of the test data doesn't work if someone overides the mount options to enable compression. The test that performs a cancelation failed because the replace operation was already finished when the cancel request was executed. Since /dev/urandom is