Re: [PATCH RFCv4] new ioctl TREE_SEARCH_V2

2014-04-04 Thread David Sterba
that are now 4k by default. The newly added functionality is localized, I don't see huge risks adding it even it was not in -next yet. thanks, david -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info

Re: [PATCH] btrfs: filter invalid arg for btrfs resize

2014-04-04 Thread David Sterba
On Mon, Mar 31, 2014 at 06:03:25PM +0800, Gui Hecheng wrote: Originally following cmds will work: # btrfs fi resize -10A mnt # btrfs fi resize -10Gaha mnt Filter the arg by checking the return pointer of memparse. This should probably also go to stable@ Signed-off-by: Gui

Re: [PATCH 1/2 v2] btrfs: btrfs_rm_device() should zero mirror SB as well

2014-04-04 Thread David Sterba
On Mon, Mar 31, 2014 at 10:13:56PM +0800, Anand Jain wrote: From: Anand Jain anand.j...@oracle.com This fix will ensure all SB copies on the disk is zeroed when the disk is intentionally removed. This helps to better manage disks in the user land. Signed-off-by: Anand Jain

Re: [PATCH RFC v2] Btrfs: device_list_add() should not update list when mounted

2014-04-04 Thread David Sterba
On Wed, Apr 02, 2014 at 05:48:21PM +0800, Anand Jain wrote: Device list add shouldn't update the list when FS is mounted, unless the whole loop w.r.t to bringing back the missing disk is completed. (That is making it to be part of the group profile and the code for this isn't there yet). As

Re: [PATCH] btrfs: fix reversed warning condition in btrfs_delayed_inode_reserve_metadata

2014-04-04 Thread David Sterba
On Fri, Apr 04, 2014 at 11:03:16AM +0800, Liu Bo wrote: On Thu, Apr 03, 2014 at 06:18:40PM +0200, David Sterba wrote: On Thu, Apr 03, 2014 at 01:34:23PM +0800, Liu Bo wrote: On Wed, Apr 02, 2014 at 07:13:00PM +0200, David Sterba wrote: Commit fae7f21cece9a4c181 (btrfs: Use WARN_ON()'s

Re: [PATCH] Btrfs: fix unlock in __start_delalloc_inodes()

2014-04-04 Thread David Sterba
it. Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com Reviewed-by: David Sterba dste...@suse.cz -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH] btrfs-progs: add separate make target to clean docs

2014-04-04 Thread David Sterba
Regenerating the asciidoc takes much longer now and makes quick build tests long. There's separate clean-doc target for that and clean-all that cleans docs and sources. Signed-off-by: David Sterba dste...@suse.cz --- This applies on top of the new asciidoc patches and makes frequent build tests

Re: [RFC PATCH] Btrfs: send, add calculate data size flag to allow for progress estimation

2014-04-04 Thread David Sterba
On Fri, Apr 04, 2014 at 04:20:41PM +0100, Filipe David Borba Manana wrote: @@ -4307,6 +4348,22 @@ out: return num_read; } +static int send_total_data_size(struct send_ctx *sctx, u64 data_size) +{ + int ret; + + ret = begin_cmd(sctx, BTRFS_SEND_C_TOTAL_DATA_SIZE

Re: [RFC PATCH] Btrfs: send, add calculate data size flag to allow for progress estimation

2014-04-04 Thread David Sterba
On Fri, Apr 04, 2014 at 05:01:41PM +0100, Filipe David Manana wrote: * Send a clone command to user space. */ --- a/fs/btrfs/send.h +++ b/fs/btrfs/send.h @@ -87,6 +87,7 @@ enum btrfs_send_cmd { BTRFS_SEND_C_END, BTRFS_SEND_C_UPDATE_EXTENT

Re: btrfs: lock inversion between delayed_node-mutex and found-groups_sem

2014-04-07 Thread David Sterba
On Fri, Apr 04, 2014 at 05:15:23PM -0400, Sasha Levin wrote: On 03/26/2014 01:01 PM, Jeff Mahoney wrote: On 3/17/14, 9:05 AM, David Sterba wrote: On Fri, Mar 14, 2014 at 08:12:16PM -0400, Sasha Levin wrote: While fuzzing with trinity inside a KVM tools guest running the latest -next

[PATCH] btrfs/035: update clone test to expect EOPNOTSUPP

2014-04-09 Thread David Disseldorp
With kernel commit 00fdf13a2e9f313a044288aa59d3b8ec29ff904a, the first clone-range overwrite attempt now fails with EOPNOTSUPP. FIXME: The second clone-range causes EIO on subsequent read attempts. Signed-off-by: David Disseldorp dd...@suse.de --- tests/btrfs/035 | 10 ++ tests

[PATCH] Btrfs: fix a crash of clone with inline extents's split

2014-04-09 Thread David Disseldorp
Thanks for the BUG_ON() fix here. Strangely, I'm now seeing EIO returned for reads following the second clone-range. Please see the subsequent xfstests patch. Cheers, David -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord

Re: [PATCH 1/2] btrfs-progs: Add device management related paragraph.

2014-04-11 Thread David Sterba
On Fri, Apr 11, 2014 at 05:16:22PM +0800, Liu Bo wrote: +DEVICE MANAGEMENT +- +Btrfs filesystem is capable to manage multiple devices. + +Btrfs filesystem use different profiles to manage different RAID level, and +use balance to rebuild chunks, also devices can be

Re: [PATCH 1/2] btrfs-progs: Add device management related paragraph.

2014-04-11 Thread David Sterba
On Thu, Apr 10, 2014 at 11:10:48PM -0700, Marc MERLIN wrote: --- a/Documentation/btrfs-replace.txt +++ b/Documentation/btrfs-replace.txt @@ -13,6 +13,9 @@ DESCRIPTION --- 'btrfs replace' is used to replace btrfs managed devices with other device. I would add a quick line

Re: [PATCH] Btrfs-progs: update btrfs_file_extent_inline_len to match kernel version

2014-04-11 Thread David Sterba
On Tue, Apr 08, 2014 at 06:25:43PM +0100, Filipe David Borba Manana wrote: The following kernel commit changed the definition of the inline function btrfs_file_extent_inline_len(): commit 514ac8ad8793a097c0c9d89202c642479d6dfa34 Author: Chris Mason c...@fb.com Date: Fri Jan 3

Re: [PATCH] Btrfs-progs: update btrfs_file_extent_inline_len to match kernel version

2014-04-11 Thread David Sterba
On Fri, Apr 11, 2014 at 06:51:58PM +0100, Filipe David Manana wrote: Thanks David. Can you add it please? I was using an older version of the integration branch. Yes, fixed. The patch flux in the integration can cause minor issues and I try to fix them myself if possible, sometimes with a note

Re: btrfs: allow mounting btrfs subvolumes with different ro/rw options

2014-04-14 Thread David Sterba
On Mon, Apr 14, 2014 at 09:39:02AM -0400, Chris Mason wrote: On 04/14/2014 09:10 AM, Dan Carpenter wrote: Hello Harald Hoyer, The patch 0723a0473fb4: btrfs: allow mounting btrfs subvolumes with different ro/rw options from Nov 19, 2013, leads to the following static checker warning:

Re: [PATCH] btrfs-progs: Force 'btrfs dev scan' not using old libblkid cache

2014-04-14 Thread David Sterba
On Thu, Apr 10, 2014 at 03:30:21PM +0800, Qu Wenruo wrote: 'btrfs scan' uses libblkid to scan devices by default, and libblkid uses cache to reduce the probe. But if operations below is done in less than 2 seconds(BLKID_PROBE_MIN), 'btrfs scan' will still use the uncorrect cache and scan on

Re: [PATCH] Btrfs: make sure there are not any read requests before stopping workers

2014-04-14 Thread David Sterba
! By hacking codes, i can reproduce this problem with one cpu available. We fix this potential problem by invalidating all btree inode pages before stopping all workers. Thanks to Miao for pointing out this problem. Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com Reviewed-by: David Sterba

Re: [PATCH] Btrfs: check if items are ordered when a leaf is marked dirty

2014-04-14 Thread David Sterba
On Wed, Apr 09, 2014 at 03:37:06PM +0100, Filipe David Borba Manana wrote: To ease finding bugs during development related to modifying btree leaves in such a way that it makes its items not sorted by key anymore. Since this is an expensive check, it's only enabled

Re: [PATCH] btrfs: fix lockdep warning with reclaim lock inversion

2014-04-14 Thread David Sterba
On Wed, Apr 09, 2014 at 05:23:23PM -0400, Jeff Mahoney wrote: 2 locks held by kswapd0/169: #0: (shrinker_rwsem){..}, at: [81159e8a] shrink_slab+0x3a/0x160 #1: (type-s_umount_key#27){..}, at: [811bac6f] grab_super_passive+0x3f/0x90 Signed-off-by: Jeff Mahoney

[PATCH 0/2] Snapshot deletion vs send (for 3.15)

2014-04-15 Thread David Sterba
I lost track of these patches at 3.14 development cycle, they accompany the subvolume RO protections during send. Would be good to get them to 3.15 but I understand this may be too late. David Sterba (2): btrfs: protect snapshots from deleting during send btrfs: assert that send

[PATCH 2/2] btrfs: assert that send is not in progres before root deletion

2014-04-15 Thread David Sterba
CC: Miao Xie mi...@cn.fujitsu.com CC: Wang Shilong wangsl.f...@cn.fujitsu.com Signed-off-by: David Sterba dste...@suse.cz --- fs/btrfs/ioctl.c |1 + fs/btrfs/transaction.c | 13 - 2 files changed, 1 insertions(+), 13 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs

[PATCH 1/2] btrfs: protect snapshots from deleting during send

2014-04-15 Thread David Sterba
btrfs_read_fs_root_no_name will check if the root is really dead or not. If it is, ENOENT, aborted send. If it's alive, it's protected by send_in_progress, send can continue. CC: Miao Xie mi...@cn.fujitsu.com CC: Wang Shilong wangsl.f...@cn.fujitsu.com Signed-off-by: David Sterba dste...@suse.cz

Re: [PATCH 1/2] btrfs: protect snapshots from deleting during send

2014-04-15 Thread David Sterba
On Tue, Apr 15, 2014 at 10:52:14AM -0400, Chris Mason wrote: On 04/15/2014 10:41 AM, David Sterba wrote: The patch Btrfs: fix protection between send and root deletion (18f687d538449373c37c) does not actually prevent to delete the snapshot and just takes care during background cleaning

Re: What does scrub do?

2014-04-15 Thread David Sterba
On Fri, Apr 11, 2014 at 11:23:31AM +, Alex wrote: People: for auto snapshots use Snapper (a la SUSE) which is now in Debian et al. Only peculiarity is that clear-down of daily snapshots only happens in the night so you don't need to put many/any hourly snapshots in. Can be fixed by copying

Re: [PATCH 1/2] btrfs: protect snapshots from deleting during send

2014-04-15 Thread David Sterba
On Tue, Apr 15, 2014 at 12:00:49PM -0400, Chris Mason wrote: I'm worried about the use case where we have: * periodic automated snapshots * periodic automated deletion of old snapshots * periodic send for backup The automated deletion doesn't want to error out if send is in

[PATCH 3.15-rc2] btrfs: replace error code from btrfs_drop_extents

2014-04-15 Thread David Sterba
. This does not affect the common reflink operation. Signed-off-by: David Sterba dste...@suse.cz --- fs/btrfs/file.c |6 +++--- fs/btrfs/ioctl.c |4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index eb742c07e7a4..bdd0b17150dd 100644

Re: [PATCH 3/4] btrfs-progs: Add btrfs wiki reference to man pages.

2014-04-15 Thread David Sterba
On Tue, Apr 15, 2014 at 03:04:51PM +0800, Qu Wenruo wrote: Add btrfs wiki page reference to btrfs-check/btrfsck, btrfs-restore and btrfs-device as supplement. I'd rather avoid any references to 'btrfsck', it's been deprecated and 'btrfs check' should be used, thouth I'm sure there are enough

Re: [PATCH 1/2] btrfs: protect snapshots from deleting during send

2014-04-16 Thread David Sterba
On Tue, Apr 15, 2014 at 01:21:46PM -0400, Chris Mason wrote: On 04/15/2014 12:27 PM, David Sterba wrote: On Tue, Apr 15, 2014 at 12:00:49PM -0400, Chris Mason wrote: I'm worried about the use case where we have: * periodic automated snapshots * periodic automated deletion of old

[PATCH v2] btrfs: replace error code from btrfs_drop_extents

2014-04-16 Thread David Sterba
. This does not affect the common reflink operation. Signed-off-by: David Sterba dste...@suse.cz --- v2: fix error code typo in changelog, pointed out by Mitch fs/btrfs/file.c |6 +++--- fs/btrfs/ioctl.c |4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/file.c b

Re: [PATCH 1/2] btrfs: protect snapshots from deleting during send

2014-04-16 Thread David Sterba
On Wed, Apr 16, 2014 at 09:40:41AM -0400, Chris Mason wrote: It makes more sense now, 'll queue this up for 3.16 and we can try it out in -next. Thanks. 3.16 is fine for me. -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to

Re: [PATCH 1/2] btrfs: protect snapshots from deleting during send

2014-04-16 Thread David Sterba
On Wed, Apr 16, 2014 at 04:59:09PM +0200, Brendan Hide wrote: On 2014/04/16 03:40 PM, Chris Mason wrote: So in my example with the automated tool, the tool really shouldn't be deleting a snapshot where send is in progress. The tool should be told that snapshot is busy and try to delete it

Re: [PATCH 00/27] Replace the old man page with asciidoc and man page for each btrfs subcommand.

2014-04-16 Thread David Sterba
On Wed, Apr 02, 2014 at 04:29:11PM +0800, Qu Wenruo wrote: Convert the old btrfs man pages to new asciidoc and split the huge btrfs man page into subcommand man page. I'm merging this patchset into the base series of integration because several patches need to update the docs and it's no longer

[PATCH] btrfs-progs: doc: link btrfsck to btrfs-check

2014-04-16 Thread David Sterba
The 'btrfsck' command has been deprecated in favor of 'btrfs check'. For compatibility install a symlink to the btrfs-check.8 manpage. CC: Qu Wenruo quwen...@cn.fujitsu.com Signed-off-by: David Sterba dste...@suse.cz --- Documentation/Makefile| 2 ++ Documentation/btrfs-check.txt | 3

Re: [PATCH 2/4 v2] Btrfs-progs: send, implement total data size callback and progress report

2014-04-16 Thread David Sterba
On Wed, Apr 16, 2014 at 03:56:15PM +0100, Filipe David Borba Manana wrote: V2: Added new send ioctl flag BTRFS_SEND_FLAG_SUPPORT_FALLOCATE. A version 2 stream is now only produced is the ioctl caller specifies at least one of the new send flags (BTRFS_SEND_FLAG_SUPPORT_FALLOCATE

[PATCH] btrfs-progs: fix typo in subvol list usage

2014-04-16 Thread David Disseldorp
Signed-off-by: David Disseldorp dd...@suse.de --- cmds-subvolume.c | 2 +- man/btrfs.8.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmds-subvolume.c b/cmds-subvolume.c index 5e821c7..75a7385 100644 --- a/cmds-subvolume.c +++ b/cmds-subvolume.c @@ -390,7 +390,7

Re: [PATCH] btrfs-progs: doc: link btrfsck to btrfs-check

2014-04-18 Thread David Sterba
On Thu, Apr 17, 2014 at 08:47:28AM +0800, Qu Wenruo wrote: @@ -73,6 +74,7 @@ install: install-man install-man: man $(INSTALL) -d -m 755 $(DESTDIR)$(man8dir) $(INSTALL) -m 644 $(GZ_MAN8) $(DESTDIR)$(man8dir) +$(LNS) btrfs-check.txt $(DESTDIR)$(man8dir) Shouldn't the source of

Re: [PATCH 1/4] Btrfs: send, bump stream version

2014-04-18 Thread David Sterba
On Tue, Apr 15, 2014 at 08:49:52PM +0100, Filipe David Manana wrote: On Tue, Apr 15, 2014 at 8:35 PM, Mark Fasheh mfas...@suse.de wrote: On Tue, Apr 15, 2014 at 07:30:51PM +0100, Filipe David Manana wrote: On Tue, Apr 15, 2014 at 7:10 PM, Josef Bacik jba...@fb.com wrote: Just make

Re: [PATCH 3/4 v3] Btrfs-progs: send, implement fallocate command callback

2014-04-18 Thread David Sterba
On Wed, Apr 16, 2014 at 08:58:14PM +0100, Filipe David Borba Manana wrote: The fallocate send stream command, added in stream version 2, is used to pre-allocate space for files and punch file holes. This change implements the callback for that new command, using the fallocate function from

Re: [PATCH v2 4/4] btrfs-progs: Fix the return value when executing 'btrfs pro get' on a uncompress file.

2014-04-22 Thread David Sterba
On Tue, Apr 15, 2014 at 05:22:24PM +0800, Qu Wenruo wrote: When executing 'btrfs pro get' on a file which is not compressed, return value will always be 50 since prop_compress() return -ENOATTR. But the codes have already check the errno to avoid unnecessary error message, so the return

[PATCH] btrfs-progs: read global reserve size from space infos

2014-04-22 Thread David Sterba
Kernels 3.15 export the global block reserve as a space info presented by 'btrfs fi df' but would display 'unknown' instead of some meaningful string. Signed-off-by: David Sterba dste...@suse.cz --- Global_rsv or GlobalRsv or Globalrsv or something else? cmds-filesystem.c | 2 ++ ctree.h

[PATCH] btrfs-progs: move arg_strtou64 to a separate file for library

2014-04-22 Thread David Sterba
Linking with libbtrfs fails because arg_strtou64 is not defined and we cannot just add utils.o to library objects because it's not library-clean. Reported-by: Arvin Schnell aschn...@suse.com Reported-by: Anton Farygin ri...@altlinux.org Signed-off-by: David Sterba dste...@suse.cz --- Makefile

[PATCH v2] btrfs-progs: move arg_strtou64 to a separate file for library

2014-04-22 Thread David Sterba
Linking with libbtrfs fails because arg_strtou64 is not defined and we cannot just add utils.o to library objects because it's not library-clean. Reported-by: Arvin Schnell aschn...@suse.com Reported-by: Anton Farygin ri...@altlinux.org Signed-off-by: David Sterba dste...@suse.cz --- v2: (thanks

Re: btrfs send/receive still gets out of sync in 3.14.0

2014-04-22 Thread David Brown
provide before killing my snapshot and doing a full sync again? I have been able to work around this by hacking up btrfs receive to ignore the rmdir. As far as I can tell (tree comparison) the resulting tree is correct. David diff --git a/cmds-receive.c b/cmds-receive.c index d6cd3da..5bd4161

Re: [PATCH] btrfs-progs: read global reserve size from space infos

2014-04-23 Thread David Sterba
On Tue, Apr 22, 2014 at 05:12:34PM +0200, Xavier Bassery wrote: Global_rsv or GlobalRsv or Globalrsv or something else? Personally, I'd probably go for the camel case GlobalRsv, or possibly GlbReserve. (Assuming that it's going to be only a single token without whitespace to make

Re: Which companies contribute to Btrfs?

2014-04-24 Thread David Sterba
On Wed, Apr 23, 2014 at 06:18:34PM -0700, Marc MERLIN wrote: I writing slides about btrfs for an upcoming talk (at linuxcon) and I was trying to gather a list of companies that contribute code to btrfs. https://btrfs.wiki.kernel.org/index.php/Main_Page [...] Jointly developed at Oracle, Red

[PATCH] btrfs: make DEV_INFO ioctl available to anyone

2014-04-24 Thread David Sterba
This ioctl provides basic info about the devices that can be obtained in other ways (eg. sysfs), there's no reason to restrict it to CAP_SYSADMIN. Signed-off-by: David Sterba dste...@suse.cz --- fs/btrfs/ioctl.c |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/fs/btrfs

[PATCH] btrfs: make FS_INFO ioctl available to anyone

2014-04-24 Thread David Sterba
This ioctl provides basic info about the filesystem that can be obtained in other ways (eg. sysfs), there's no reason to restrict it to CAP_SYSADMIN. Signed-off-by: David Sterba dste...@suse.cz --- fs/btrfs/ioctl.c |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/fs

Re: Which companies are using Btrfs in production?

2014-04-25 Thread David Sterba
On Thu, Apr 24, 2014 at 04:14:56PM -0700, Marc MERLIN wrote: Netgear uses BTRFS as the filesystem in their refreshed ReadyNAS line. They apparently use Oracle's linux distro so I assume they're relying on them to do most of the heavy lifting as far as support BTRFS and backporting goes

Re: Which companies are using Btrfs in production?

2014-04-28 Thread David Sterba
On Fri, Apr 25, 2014 at 08:20:45AM -0700, Marc MERLIN wrote: There are lots of contributors with the same small amout of patches contributed and are not listed there. This is first time I hear about Netgear being a contributor and it looks strange to see that name among the major

[PATCH 00/14] Enhanced df - followup

2014-04-29 Thread David Sterba
the previous iteration of the patches for the suggested UI tweaks and probably missed some, but IMO in a state that can go to git and be scheduled for a near release. The major UI changes are there, we can tweak it further of course. David Sterba (14): btrfs-progs: read global reserve size from

[PATCH 01/14] btrfs-progs: read global reserve size from space infos

2014-04-29 Thread David Sterba
Kernels = 3.15 export the global block reserve as a space info presented by 'btrfs fi df' but would display 'unknown' instead of some meaningful string. Signed-off-by: David Sterba dste...@suse.cz --- ctree.h | 6 ++ utils.c | 7 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff

[PATCH 02/14] btrfs-progs: add original 'df' and rename 'disk_usage' to 'usage'

2014-04-29 Thread David Sterba
Add back the original output of the 'btrfs fi df' command for backward compatibility. The rich output is moved from 'disk_usage' to 'usage'. Agreed in http://www.spinics.net/lists/linux-btrfs/msg31698.html Signed-off-by: David Sterba dste...@suse.cz --- cmds-fi-disk_usage.c | 85

[PATCH 03/14] btrfs-progs: move device usage to cmds-device, more cleanups

2014-04-29 Thread David Sterba
Move the command definitions where they belong, keep common 'usage' functions in cmds-fi-disk_usage.c and add exports. Rename structures containing 'disk' to 'device'. Fix whitespace in the modified code. Signed-off-by: David Sterba dste...@suse.cz --- cmds-device.c| 96

[PATCH 04/14] btrfs-progs: check if we can't get info from ioctls due to permissions

2014-04-29 Thread David Sterba
The TREE_SEARCH ioctl is root-only, FS_INFO will be available for non-root users with an updated kernel, let the user know. Signed-off-by: David Sterba dste...@suse.cz --- cmds-fi-disk_usage.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/cmds-fi-disk_usage.c b/cmds-fi

[PATCH 06/14] btrfs-progs: print B for bytes

2014-04-29 Thread David Sterba
This arguably helps parsers. Signed-off-by: David Sterba dste...@suse.cz --- utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.c b/utils.c index ca150404ea6f..159abf8bd0e4 100644 --- a/utils.c +++ b/utils.c @@ -1252,7 +1252,7 @@ out: return ret

[PATCH 07/14] btrfs-progs: Print more info about device sizes

2014-04-29 Thread David Sterba
:10.00GiB FS occuppied:5.00GiB Data,RAID10: 512.00MiB Metadata,RAID10: 512.00MiB System,RAID10: 4.00MiB Unallocated: 9.00GiB Signed-off-by: David Sterba dste...@suse.cz --- cmds-device.c| 6 +++--- cmds-fi

[PATCH 09/14] btrfs-progs: add section of overall filesystem usage

2014-04-29 Thread David Sterba
(Estimated): 17.57GiB (Max: 30.98GiB, min: 17.52GiB) Data to device ratio: 50 % ... Signed-off-by: David Sterba dste...@suse.cz --- cmds-fi-disk_usage.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/cmds-fi

[PATCH 11/14] btrfs-progs: extend pretty printers with unit mode

2014-04-29 Thread David Sterba
The functionality of pretty unit printing was duplicated by df_pretty_sizes, merge it with pretty_size and enhance the interface with more suffix mode. Raw, binary or decimal. Signed-off-by: David Sterba dste...@suse.cz --- cmds-fi-disk_usage.c | 9 ++- utils.c | 71

[PATCH 05/14] btrfs-progs: zero out structures before calling ioctl

2014-04-29 Thread David Sterba
Signed-off-by: David Sterba dste...@suse.cz --- cmds-fi-disk_usage.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmds-fi-disk_usage.c b/cmds-fi-disk_usage.c index 64c85acafd51..067c60078710 100644 --- a/cmds-fi-disk_usage.c +++ b/cmds-fi-disk_usage.c @@ -248,7 +248,7

[PATCH 10/14] btrfs-progs: cleanup filesystem/device usage code

2014-04-29 Thread David Sterba
usage' prints only the overall stats and warns about RAID5/6. The sole cleanup changes affect mostly the modified code and the related functions, should be reasonably small. Signed-off-by: David Sterba dste...@suse.cz --- cmds-device.c| 31 +- cmds-fi-disk_usage.c | 163

[PATCH 08/14] btrfs-progs: compare unallocated space against the correct value

2014-04-29 Thread David Sterba
The device may not be fully occupied by the filesystem, the value of Unallocated should not be calculated against the device size but the size provided by DEV_INFO. Signed-off-by: David Sterba dste...@suse.cz --- cmds-device.c| 6 ++ cmds-fi-disk_usage.c | 9 - cmds-fi

[PATCH 12/14] btrfs-progs: replace df_pretty_sizes with pretty_size_mode

2014-04-29 Thread David Sterba
Signed-off-by: David Sterba dste...@suse.cz --- cmds-device.c| 8 +++ cmds-fi-disk_usage.c | 63 ++-- cmds-fi-disk_usage.h | 3 --- 3 files changed, 30 insertions(+), 44 deletions(-) diff --git a/cmds-device.c b/cmds-device.c index

[PATCH 14/14] btrfs-progs: move global reserve to overall summary

2014-04-29 Thread David Sterba
): 17.57GiB (Max: 30.98GiB, min: 17.52GiB) Data to device ratio: 50 % Global reserve: 16.00MiB (used: 0.00B) ... Signed-off-by: David Sterba dste...@suse.cz --- cmds-fi-disk_usage.c | 22 -- 1 file changed, 20 insertions(+), 2 deletions

Re: [PATCH 07/14] btrfs-progs: Print more info about device sizes

2014-04-30 Thread David Sterba
On Tue, Apr 29, 2014 at 08:23:08PM +0100, Mike Fleetwood wrote: /dev/sda7, ID: 3 Device size:10.00GiB FS occuppied:5.00GiB Spelling mistake. s/occuppied/occupied/. +void print_device_sizes(int fd, struct device_info *devinfo, int mode) +{ +

Re: [PATCH 07/14] btrfs-progs: Print more info about device sizes

2014-04-30 Thread David Sterba
On Wed, Apr 30, 2014 at 01:39:27PM +0200, Goffredo Baroncelli wrote: Sample: /dev/sda7, ID: 3 Device size:10.00GiB FS occuppied:5.00GiB Spelling mistake. s/occuppied/occupied/. I found a bit unclear the FS occupied terms. We're running out of terms

Re: [PATCH 00/14] Enhanced df - followup

2014-04-30 Thread David Sterba
On Tue, Apr 29, 2014 at 08:14:30PM +0100, Mike Fleetwood wrote: On 29 April 2014 16:56, David Sterba dste...@suse.cz wrote: Changes: * btrfs filesystem disk_usage - renamed to usage * added a section of overall filesystem usage, that used to be in the 'fi df' output * btrfs device

Re: [PATCH 00/14] Enhanced df - followup

2014-04-30 Thread David Sterba
On Wed, Apr 30, 2014 at 10:15:11AM +0200, Martin Steigerwald wrote: [keeping dropped CC although not customary on this list] Am Mittwoch, 30. April 2014, 00:42:44 schrieb Duncan: * btrfs filesystem disk_usage - renamed to usage [On the CLI, usage is often used to print a briefer

Re: [PATCH 00/14] Enhanced df - followup

2014-04-30 Thread David Sterba
On Tue, Apr 29, 2014 at 05:10:31PM +, Duncan wrote: To users familiar with Unix/POSIX/Linux CLI, usage (as --usage) is most often seen as a rather less common and generally briefer form of --help, usually with the distinction being that --help may be a screen or more of output, while

Re: [PATCH 07/14] btrfs-progs: Print more info about device sizes

2014-04-30 Thread David Taylor
On Wed, 30 Apr 2014, Frank Kingswood wrote: On 30/04/14 13:11, David Sterba wrote: On Wed, Apr 30, 2014 at 01:39:27PM +0200, Goffredo Baroncelli wrote: I found a bit unclear the FS occupied terms. We're running out of terms to describe and distinguish the space that the filesystem uses

Re: [PATCH 07/14] btrfs-progs: Print more info about device sizes

2014-05-02 Thread David Sterba
On Wed, Apr 30, 2014 at 07:38:00PM +0200, Goffredo Baroncelli wrote: On 04/30/2014 03:37 PM, David Taylor wrote: On Wed, 30 Apr 2014, Frank Kingswood wrote: On 30/04/14 13:11, David Sterba wrote: On Wed, Apr 30, 2014 at 01:39:27PM +0200, Goffredo Baroncelli wrote: I found a bit unclear

Re: [PATCH 1/4] Btrfs-progs: send, bump stream version

2014-05-02 Thread David Sterba
On Tue, Apr 15, 2014 at 05:40:48PM +0100, Filipe David Borba Manana wrote: This increases the send stream version from version 1 to version 2, adding 2 new commands: 1) total data size - used to tell the receiver how much file data the stream will add or update; 2) fallocate - used

Re: [PATCH 6/6 v2] Btrfs: add send_stream_version attribute to sysfs

2014-05-02 Thread David Sterba
On Sun, Apr 20, 2014 at 10:40:03PM +0100, Filipe David Borba Manana wrote: So that applications can find out what's the highest send stream version supported/implemented by the running kernel: $ cat /sys/fs/btrfs/send/stream_version 2 Signed-off-by: Filipe David Borba Manana fdman

Re: [PATCH] Btrfs: do not increment on bio_index one by one

2014-05-02 Thread David Sterba
On Tue, Apr 29, 2014 at 01:07:58PM +0800, Liu Bo wrote: 'bio_index' is just a index, it's really not necessary to do increment one by one. Signed-off-by: Liu Bo bo.li@oracle.com Reviewed-by: David Sterba dste...@suse.cz -- To unsubscribe from this list: send the line unsubscribe linux

[PATCH] btrfs-progs: doc: fix symlink target for btrfsck.8

2014-05-05 Thread David Sterba
The manpage of btrfsck.8 is supposed to link to btrfs-check.8 . Reported-by: WorMzy Tykashi wormzy.tyka...@gmail.com Signed-off-by: David Sterba dste...@suse.cz --- Documentation/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/Makefile b/Documentation

Re: [PATCH] btrfs-progs: doc: link btrfsck to btrfs-check

2014-05-05 Thread David Sterba
On Wed, Apr 30, 2014 at 01:14:59PM +0100, WorMzy Tykashi wrote: $(LNS) btrfs-check.8.gz $(DESTDIR)$(man8dir) should be $(LNS) btrfs-check.8.gz $(DESTDIR)$(man8dir)/btrfsck.8.gz Thank you, fix sent. -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body

Re: metadata vs data errors

2014-05-05 Thread David Sterba
On Sun, May 04, 2014 at 11:19:15AM +1000, Russell Coker wrote: To discover whether there were any metadata errors I grepped for metadata in the kernel message log and found lots of lines like the above. Will all errors that involve metadata match a grep for metadata in the kernel message

Re: Very high load when reading/writing

2014-05-05 Thread David Sterba
On Thu, May 01, 2014 at 07:50:11PM +0200, Hendrik Friedel wrote: I have very high load when writing/reading from/to two of my btrfs volumes. One sda1, mounted as /mnt/BTRFS, the other, sdd2/sde2 (raid) as / sda1 is a 3TB disc, whereas the sdd2/sde2 are small SSDs of 16GB. I wrote a small

Re: 3.14.0rc3: did not find backref in send_root

2014-05-06 Thread David Brown
from them. Scrub reports no errors, but I don't seem to be able to back up anything now. David -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH] btrfs/035: update clone test to expect EOPNOTSUPP

2014-05-07 Thread David Disseldorp
-off-by: David Disseldorp dd...@suse.de --- tests/btrfs/035 | 11 +++ tests/btrfs/035.out | 5 + 2 files changed, 16 insertions(+) diff --git a/tests/btrfs/035 b/tests/btrfs/035 index 6808179..c9530f6 100755 --- a/tests/btrfs/035 +++ b/tests/btrfs/035 @@ -57,21 +57,32 @@ src_str

Re: Please review and comment, dealing with btrfs full issues

2014-05-07 Thread David Sterba
On Tue, May 06, 2014 at 05:43:24PM +0100, Hugo Mills wrote: So in my case when I hit that case, I had to use dusage=0 to recover. Anything above that just didn't work. I suspect when using more than zero the first chunk it wanted to balance wasn't empty - and it had nowhere to put it.

Re: Smallest-n balance filter (was Re: Please review and comment, dealing with btrfs full issues)

2014-05-07 Thread David Sterba
On Wed, May 07, 2014 at 03:23:01PM +0100, Hugo Mills wrote: N=n F=0 while (N 0) { balance -dusage=F,limit=N N -= number of balanced chunks F++ } The patch is in branch dev/balance-limit in my git repos. We can then implement the n-least-full as a synthetic

[PATCH] btrfs-progs: balance filter: add limit of processed chunks

2014-05-07 Thread David Sterba
. The limit filter applies last, the value of 0 means no limiting. CC: Ilya Dryomov idryo...@gmail.com CC: Hugo Mills h...@carfax.org.uk Signed-off-by: David Sterba dste...@suse.cz --- cmds-balance.c | 14 ++ ioctl.h| 4 +++- volumes.h | 1 + 3 files changed, 18 insertions(+), 1

[PATCH] btrfs: balance filter: add limit of processed chunks

2014-05-07 Thread David Sterba
+devid or vrange filters that allow to work with a specific chunk or even with a chunk on a given device. The limit filter applies last, the value of 0 means no limiting. CC: Ilya Dryomov idryo...@gmail.com CC: Hugo Mills h...@carfax.org.uk Signed-off-by: David Sterba dste...@suse.cz --- The name

[PATCH] btrfs: retrieve more info from FS_INFO ioctl

2014-05-07 Thread David Sterba
ignore them. Signed-off-by: David Sterba dste...@suse.cz --- fs/btrfs/ioctl.c |4 include/uapi/linux/btrfs.h |6 +- 2 files changed, 9 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 2ad7de94efef..74530f226e50 100644 --- a/fs/btrfs

[PATCH] btrfs: export more from FS_INFO to sysfs

2014-05-07 Thread David Sterba
Similar to the FS_INFO updates, export the basic filesystem info through sysfs: node size, sector size and clone alignment. Signed-off-by: David Sterba dste...@suse.cz --- fs/btrfs/sysfs.c | 40 1 files changed, 40 insertions(+), 0 deletions(-) diff

Re: Back from leave

2014-05-07 Thread David Sterba
Hi back, On Mon, May 05, 2014 at 10:28:13AM -0400, Josef Bacik wrote: I had way too much email so I just deleted it all, if there was something you wanted my specific attention on then bounce it back at me and I'll look at it. Thanks, it would be really great if you resurrect btrfs-next.

Re: [PATCH] btrfs/035: update clone test to expect EOPNOTSUPP

2014-05-08 Thread David Disseldorp
Hi liubo, On Thu, 8 May 2014 12:11:24 +0800, Liu Bo wrote: Something different here, I didn't get EIO on 3.15.0-rc4. Strange, I'm able to consistently reproduce this on a vanilla v3.15-rc4-202-g30321c7 kernel. Does that mean the updated test passes successfully for you? Cheers, David

Re: btrfs snapshot sizes

2014-05-09 Thread David Pottage
of you disc is taken up by snapshots. NB: I am not a btrfs developer, just an interested user, and lurker on this list. -- David Pottage -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http

Re: [PATCH 1/3] btrfs: return errno instead of -1 from compression

2014-05-09 Thread David Sterba
On Thu, May 08, 2014 at 07:16:17PM -0400, Zach Brown wrote: The compression layer seems to have been built to return -1 and have callers make up errors that make sense. This isn't great because there are different classes of errors that originate down in the compression layer. Allocation

Re: [PATCH 2/3] btrfs: return ptr error from compression workspace

2014-05-09 Thread David Sterba
. This helps a future patch return errors from the compression wrappers. Signed-off-by: Zach Brown z...@redhat.com Reviewed-by: David Sterba dste...@suse.cz -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More

Re: [PATCH 3/3] btrfs: fix inline compressed read err corruption

2014-05-09 Thread David Sterba
in the code that introduced it. The changes that could have affected that are in the error handling, but even with that in mind, the silent error does not make sense. Signed-off-by: Zach Brown z...@redhat.com Reviewed-by: David Sterba dste...@suse.cz And future ACK if you're going to kill the memset

Re: Fwd: [suggestion] Add verbose notification about inode-cache rebuild to kernel log

2014-05-09 Thread David Sterba
On Thu, May 08, 2014 at 04:22:13PM +0200, Tomáš Pružina wrote: I ran into some troubles with inode-cache rebuilding on root fs after filesystem was mounted without inode_cache, which stalls boot of my box by several minutes. I boot from commandline like: root=/dev/sda4 rootfstype=btrfs

Re: superfluous else if ()

2014-05-09 Thread David Sterba
On Sat, Apr 26, 2014 at 08:57:00PM +0200, Toralf Förster wrote: /me wonders if this if (ret = 0) { /* Add an item for the type for the first time */ eb = path-nodes[0]; slot = path-slots[0]; offset =

Re: File capabilities are lost when sending/receiving a btrfs subvolume

2014-05-09 Thread David Sterba
On Wed, Apr 30, 2014 at 10:00:29AM -0600, Chris Murphy wrote: On Apr 29, 2014, at 1:21 PM, Juan Orti Alcaine juan.o...@miceliux.com wrote: Hello, I noticed that file capabilites are lost on received subvolumes, so I opened the bug report #68891 [1]. I don't know if other xattrs are

Re: 3.14.0rc3: did not find backref in send_root

2014-05-10 Thread David Brown
On Mon, May 05, 2014 at 11:10:54PM -0700, David Brown wrote: On Mon, Feb 24, 2014 at 10:36:52PM -0800, Marc MERLIN wrote: I got this during a btrfs send: BTRFS error (device dm-2): did not find backref in send_root. inode=22672, offset=524288, disk_byte=1490517954560 found extent=1490517954560

Re: 3.15-rc5 btrfs send/receive corruption errors? Does scrub

2014-05-10 Thread David Brown
scrub was mostly about making sure the data match the checksums. Just curious, the future online filesystem check, will that be part of scrub, or another command. It seems like it would be common to want a faster integrity check that doesn't have to read all of the data as well. David

Re: [PATCH] btrfs: replace simple_strtoul() with kstrtoul()

2014-05-12 Thread David Taylor
appears to take its arguments in a different order: unsigned long long simple_strtoull(const char * cp, char ** endp, unsigned int base); int kstrtoul(const char *s, unsigned int base, unsigned long *res); -- David Taylor -- To unsubscribe from this list: send the line unsubscribe linux-btrfs

Re: [PATCH] btrfs-progs: doc: link btrfsck to btrfs-check

2014-05-12 Thread David Sterba
On Thu, May 08, 2014 at 09:40:03AM +0800, Qu Wenruo wrote: Original Message Subject: Re: [PATCH] btrfs-progs: doc: link btrfsck to btrfs-check From: David Sterba dste...@suse.cz To: Qu Wenruo quwen...@cn.fujitsu.com Date: 2014年04月18日 22:48 On Thu, Apr 17, 2014 at 08:47:28AM

<    2   3   4   5   6   7   8   9   10   11   >