[PATCH] btrfs: make errors in btrfs_num_copies less noisy

2013-07-11 Thread David Sterba
The log message level 'critical' is verbose enough, 'emergency' beeps on all terminals. Signed-off-by: David Sterba dste...@suse.cz --- fs/btrfs/volumes.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index b2d1eac..1fd7b5d

Re: [PATCH 2/5] Btrfs: add branch prediction hints in the read page end IO function

2013-07-12 Thread David Sterba
it up in the perf top profile. 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

Re: filebench varmail + scrubber = btrfs_update_root bug

2013-07-16 Thread David Sterba
250 which is BTRFS_DEV_REPLACE_KEY, plus the parent transid error this looks like broken/unfinished device replace. Have you used the 'btrfs device replace' recently? david -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org

Re: btrfs: stat(2) and /proc/pid/maps returns different devices

2013-07-31 Thread David Sterba
didn't think we needed all this extra stuff to replicate vfs_gettatr(). I don't remember, probably for code simplicity. The updated version you've sent looks ok to me. david -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org

Re: Is the checkpoint interval adjustable?

2013-08-01 Thread David Sterba
, and storage. Any trouble that you could get in to in 300 seconds some other machine could trivially get in to in 30 with beefier hardware. That's a good point and lowers my worries a bit, though it would be interesting to see in what way a beefy machine blows with 300 seconds set. david

[PATCH] btrfs: add mount option to set commit interval

2013-08-01 Thread David Sterba
I'ts hardcoded to 30 seconds which is fine for most users. Higher values defer data being synced to permanent storage with obvious consequences when the system crashes. The upper bound is not forced, but a warning is printed if it's more than 300 seconds (5 minutes). Signed-off-by: David Sterba

[PATCH v2] btrfs: add mount option to set commit interval

2013-08-01 Thread David Sterba
I'ts hardcoded to 30 seconds which is fine for most users. Higher values defer data being synced to permanent storage with obvious consequences when the system crashes. The upper bound is not forced, but a warning is printed if it's more than 300 seconds (5 minutes). Signed-off-by: David Sterba

Re: [3.10.3] kernel BUG at fs/btrfs/ctree.c:3000

2013-08-01 Thread David Sterba
is set to btrfs. Run btrfsck on your device and attach the output to the bug as well. Thanks, IIRC fsck did not report anything, the changes were only in memory (but we'd like the fsck log anyway). I think we're only left to print more debugging information and wait when it happens again. david

Re: [PATCH] Btrfs: don't bug_on when we fail when cleaning up transactions

2013-08-01 Thread David Sterba
. As the cleaning process is restartable I'm ok with removing the bugon. 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

Re: [PATCH 09/12] Btrfs-progs: Add chunk recover function - using old chunk items

2013-08-01 Thread David Sterba
the name of the namespace: how about _ ? It's short, will never clash with any other command. 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

Re: [PATCH v2] btrfs-progs: fix segfault when listing column OTIME on big endian host

2013-08-01 Thread David Sterba
-archive.com/linux-btrfs@vger.kernel.org/msg25677.html 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

Re: [PATCH] Btrfs-progs: fix closing of opendir()

2013-08-01 Thread David Sterba
On Mon, Jul 15, 2013 at 07:36:50PM +0800, Wang Shilong wrote: valgrind complains open_file_or_dir() causes a memory leak.That is because if we open a directoy by opendir(), and then we should call closedir() to free memory. I've reviewed this and don't see a better way how to fix the leaks

Re: [PATCH] Btrfs-progs: fix closing of opendir()

2013-08-01 Thread David Sterba
--- a/utils.c +++ b/utils.c @@ -1476,11 +1475,11 @@ u64 parse_size(char *s) return strtoull(s, NULL, 10) * mult; } -int open_file_or_dir(const char *fname) +int open_file_or_dir(const char *fname, DIR **dirstream) { int ret; struct stat st; - DIR *dirstream =

Re: Questions about multi-device behavior

2013-08-02 Thread David Sterba
On Thu, Jul 18, 2013 at 02:05:31PM -0600, Chris Murphy wrote: On Jul 18, 2013, at 11:33 AM, David Sterba dste...@suse.cz wrote: The missing data blocks return IO error and the valid data can be read. Sounds like if I have a degraded 'single' volume, I can simply cp or rsync

Re: [PATCH 06/11] btrfs-progs: scan /dev/mapper in filesystem show and device scan

2013-08-05 Thread David Sterba
-visible changes to this command. 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

Re: [PATCH 00/11 v2 (resend)] btrfs-progs: coalesce of patches

2013-08-05 Thread David Sterba
of the previous changes so I'd like to look at them in context of all the other df/show patches. 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

Re: [PATCH v2] btrfs: add mount option to set commit interval

2013-08-05 Thread David Sterba
the mail, a git-friendly way of applying patches is the patchwork.kernel.org interface, see https://btrfs.wiki.kernel.org/index.php/Btrfs_source_repositories#Patches_sent_to_mailinglist how to use it. david -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body

Re: [PATCH 2/2] btrfs-progs: Update the man page of btrfs

2013-08-05 Thread David Sterba
On Tue, Jul 23, 2013 at 10:43:22AM +0800, Qu Wenruo wrote: Update the man page of btrfs command to keep up with new commands. Thanks. Please check if I haven't missed anything, I've used 'wiggle' to guess-apply the patch and fixed a few conflicts myself. david -- To unsubscribe from this list

Re: [PATCH] btrfs-progs: mkfs.btrfs documentation: clarify current restrictions of sectorsize, nodesize and leafsize

2013-08-05 Thread David Sterba
--sectorsize min block allocation (not mountable by current kernel)\n); What if I'm on a ppc64 box? This message will be confusing. I'd stick 'may' into (...) I'll fix the text wording when committing the patch, no need to resend. david -- To unsubscribe from this list: send the line unsubscribe

[PATCH 0/2] btrfs-progs: Introduce devel namespace

2013-08-06 Thread David Sterba
Add namespace for features under development and the first user. David Sterba (2): btrfs-progs: introduce command namespace for development features btrfs-progs: move chunk-recover command to devel namespace btrfs.c | 26 +- 1 file changed, 25 insertions(+), 1

[PATCH 1/2] btrfs-progs: introduce command namespace for development features

2013-08-06 Thread David Sterba
and the only way to get the commands is btrfs _ --help The commands appear as if they are in the 1st level, but have to be used from inside _, eg. btrfs _ newcommand Once the interface is stable, the command will be moved to the right place. Signed-off-by: David Sterba dste...@suse.cz

[PATCH 2/2] btrfs-progs: move chunk-recover command to devel namespace

2013-08-06 Thread David Sterba
Signed-off-by: David Sterba dste...@suse.cz --- btrfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/btrfs.c b/btrfs.c index dff0d70..4bbce48 100644 --- a/btrfs.c +++ b/btrfs.c @@ -252,6 +252,7 @@ const struct cmd_group devel_features_cmd_group = { NOTE: you have

Re: [PATCH 09/10] btrfs-progs: Fix the return value of btrfs-map-logical

2013-08-06 Thread David Sterba
fixes into documentation updates next time (unless you're testing my attention). 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

Re: [PATCH 01/10] Btrfs-progs: add missing man page information for btrfsck

2013-08-06 Thread David Sterba
v2 vs v3, so for ease of maintenance please either drop the section or change it to gplv2. You're free to insist on v3, then I'm not going to merge the patches. thanks, david -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org

Re: [PROGS PATCH] Import btrfs-extent-same

2013-08-06 Thread David Sterba
. btrfs dedup files dir/* Liu Bo's dedup patch is in today's integration snapshot http://repo.or.cz/w/btrfs-progs-unstable/devel.git/shortlog/refs/heads/integration-20130806-2 you can use it as a base. thanks, david -- To unsubscribe from this list: send the line unsubscribe linux-btrfs

Re: [PATCH RFC] Btrfs: add support for persistent mount options

2013-08-07 Thread David Sterba
On Tue, Aug 06, 2013 at 07:27:20PM +0100, Filipe David Borba Manana wrote: This change allows for most mount options to be persisted in the filesystem, and be applied when the filesystem is mounted. If the same options are specified at mount time, the persisted values for those options

Re: [PATCH RFC] Btrfs: add support for persistent mount options

2013-08-07 Thread David Sterba
have this dir flag stored in the attributes, chattr +c dir/, but this cannot be tuned further - no way to specify the compression algorithm (or for example the target ratio as compression hint), or we can't say never compress files in this dir (even if mounted with compression) etc. david

Re: [PATCH 1/2] btrfs-progs: introduce command namespace for development features

2013-08-07 Thread David Sterba
, possibly always in a pullable state. On top of that a bunch of topic branches with the _ features. Let me know if I missed to answer something important. 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

Re: [PATCH 1/2] btrfs-progs: introduce command namespace for development features

2013-08-07 Thread David Sterba
On Wed, Aug 07, 2013 at 01:26:58PM +0200, David Sterba wrote: I have to re-organize integration branch(es) better, so there is eg. a branch without unstable stuff, possibly always in a pullable state. On top of that a bunch of topic branches with the _ features. ... but then there's no point

Re: [PATCH 6/7] btrfs: cleanup: removed unused 'btrfs_reada_detach'

2013-08-08 Thread David Sterba
the function is currently unused, I'm hesitating to remove it as it's part of the reada-API and might be handy for anyone going to use the API in the future. I agree. As replied here, http://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg24047.html please keep the function. david

Re: [PATCH 4/7] btrfs: cleanup: removed unused 'btrfs_start_transaction_lflush'

2013-08-08 Thread David Sterba
@vger.kernel.org/msg24047.html btrfs_start_transaction_lflush() Transcaction API, removing the func does not make sense without removing BTRFS_RESERVE_FLUSH_LIMIT at the same time. Miao introduced this function in 08e007d2e57744472a9424735a to enhance flushing logic to avoid deadlocks. david

Re: [PATCH 3/7] btrfs: cleanup: mark 'btrfs_write_and_wait_marked_extents' as static

2013-08-08 Thread David Sterba
violations (line too long). 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

Re: [PATCH 7/7] btrfs: cleanup: removed unused 'btrfs_get_inode_ref_index'

2013-08-08 Thread David Sterba
...@gentoo.org Safe to remove. 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

Re: [PATCH 3/3] Btrfs: allocate prelim_ref with a slab allocater

2013-08-08 Thread David Sterba
, + sizeof(struct __prelim_ref), Would be nice to give it a name that matches the slab cache, btrfs_prelim_ref. 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

Re: [PATCH] Btrfs: deal with enomem in the rewind path V3

2013-08-08 Thread David Sterba
On Thu, Aug 08, 2013 at 09:36:52AM +0200, Jan Schmidt wrote: Weird patch formatting concerning extent_io.c, I assume there are no changes in extent_buffer_under_io and btrfs_release_extent_buffer_page, you just moved btrfs_clone_extent_buffer, right? Perhaps --patience or --minimal could do

Re: [PATCH 0/4] btrfs: out-of-band (aka offline) dedupe v4

2013-08-08 Thread David Sterba
On Tue, Aug 06, 2013 at 11:42:47AM -0700, Mark Fasheh wrote: The following series of patches implements in btrfs an ioctl to do out-of-band deduplication of file extents. Reviewed-by: David Sterba dste...@suse.cz -- To unsubscribe from this list: send the line unsubscribe linux-btrfs

Re: [PATCH 6/7] btrfs: cleanup: removed unused 'btrfs_reada_detach'

2013-08-08 Thread David Sterba
be it. 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

Re: [PATCH] Btrfs: set default max_inline to 8KiB instead of 8MiB

2013-08-08 Thread David Sterba
On Thu, Aug 08, 2013 at 10:45:48PM +0100, Filipe David Borba Manana wrote: 8MiB is way too large and likely set by mistake. This is not a significant issue as in practice the max amount of data added to an inline extent is also limited by the page cache and btree leaf sizes. Signed-off

Re: [PATCH RFC] Btrfs: add support for persistent mount options

2013-08-08 Thread David Sterba
On Wed, Aug 07, 2013 at 03:46:20PM +0200, Martin Steigerwald wrote: Because really, the motivation sounds like it's primarily for significant on-disk format changes controlled by mount options. I understand that motivation more than being able to persist something like noatime. For a

Re: [v2 2/8] Btrfs-progs: add missing man information for btrfs-debug-tree

2013-08-08 Thread David Sterba
Thanks for updating the license. One comment that's applicable to all patches: On Wed, Aug 07, 2013 at 01:54:03PM +0800, Wang Shilong wrote: +.SH AVAILABILITY +.B btrfs-debug-tree +is part of btrfs-progs. Btrfs is currently under heavy development, +and not suitable for any uses other than

Re: [PATCH RFC] Btrfs: track compression algorithm on inodes

2013-08-08 Thread David Sterba
On Wed, Aug 07, 2013 at 12:29:44PM +0100, Filipe David Borba Manana wrote: Currently the compression settings (algorithm and force mode) need to be specified at mount time in order to have newly created files compressed. [...] I think we should take the top-down approach and start with UI how

Re: [PATCH RFC] Btrfs: add support for persistent mount options

2013-08-08 Thread David Sterba
On Wed, Aug 07, 2013 at 12:33:09PM +0100, Filipe David Manana wrote: Thanks, I missed to find that before. The implementation is very different from the one I proposed. That's one of the fundaental questions how to store the information: inside existing structures, via xattrs, under new tree

Re: [PATCH v2] Btrfs-progs: add dedup subcommand

2013-08-09 Thread David Sterba
respective command. Please post a list of the other commands if there are any, and the expected usage. thanks, david +\fBbtrfs dedup register\fP \fIpath\fP +Enable data deduplication support for a filesystem. ^ +.TP + +\fBbtrfs dedup unregister\fP \fIpath\fP +Disable data

Re: [PATCH 2/2] btrfs-progs: mark static remove unused from non-kernel code

2013-08-09 Thread David Sterba
() calls and put a don't use comment. 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

Re: [PATCH] Btrfs: set default max_inline to 8KiB instead of 8MiB

2013-08-09 Thread David Sterba
On Fri, Aug 09, 2013 at 01:47:24PM +0800, Miao Xie wrote: On thu, 8 Aug 2013 22:45:48 +0100, Filipe David Borba Manana wrote: 8MiB is way too large and likely set by mistake. This is not a significant issue as in practice the max amount of data added to an inline extent is also limited

Re: [PATCH 2/2 V2] btrfs-progs: mark static remove unused from non-kernel code

2013-08-09 Thread David Sterba
* +link_subvol(struct btrfs_root *root, const char *base, u64 root_objectid) Please keep the function defintion style if possible. I've fixed that at commit time, no need to resend. david -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord

Re: [PATCH] Btrfs: add support for asserts

2013-08-28 Thread David Sterba
On Mon, Aug 26, 2013 at 04:56:06PM -0400, Josef Bacik wrote: +#ifdef BTRFS_ASSERT + +static inline void assfail(char *expr, char *file, int lin) typo: lin instead of line -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to

Re: How btrfs resize should work ?

2013-08-28 Thread David Sterba
On Fri, Aug 16, 2013 at 02:11:23PM -0600, Chris Murphy wrote: On Aug 16, 2013, at 12:02 PM, Chris Murphy li...@colorremedies.com wrote: When a Btrfs multiple device volume is shrunk resized, it directly affects the partition sizeā€¦ Oops, this obviously happens with single or multiple

Re: bug

2013-08-29 Thread David Sterba
of raid5/6 is not completely crash-safe, as was mentioned in the announcement (eg. here http://lwn.net/Articles/536038/). The mount could fail if the parity of metadata blocks is corrupted due to crash. david -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body

Re: [PATCH] Btrfs: allocate the free space by the existed max extent size when ENOSPC

2013-08-29 Thread David Sterba
like a good improvement! Can you please post the test? Fragmented free space is nothing uncommon, so I guess aging the filesystem for a while works as well and there the improvement would show up in reduced cpu time. Patch looks ok. david -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH] xfstests: btrfs/003: regression test for subvol delete V2

2013-08-29 Thread David Sterba
Flags: readonly Snapshot(s): Though it involves grep as well. 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

Re: [PATCH v4] Btrfs: optimize key searches in btrfs_search_slot

2013-08-30 Thread David Sterba
On Thu, Aug 29, 2013 at 08:21:51PM +0100, Filipe David Borba Manana wrote: Count: 5013 Range: 25.000 - 497.000; Mean: 82.767; Median: 64.000; Stddev: 49.972 Percentiles: 90th: 141.000; 95th: 182.000; 99th: 287.000 25.000 - 33.930: 211 ## 33.930 - 45.927: 277

Re: [PATCH v4] Btrfs: optimize key searches in btrfs_search_slot

2013-08-30 Thread David Sterba
On Fri, Aug 30, 2013 at 03:47:21PM +0100, Filipe David Manana wrote: Sure. They're actually better now :) Thanks. The numbers changed in both samples, but the relative difference is still 2x improvement in this particular test. david -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH v3 1/8] Btrfs-progs: add missing man page information for btrfsck

2013-08-30 Thread David Sterba
the series into integration. Note for future: The manpages document the current state, ie. there are numerous separate utilities which we would like to move under the main tool. When it happens the man contents shall be moved as well. david -- To unsubscribe from this list: send the line

Re: [PATCH 07/15] btrfs-progs: fix endian bugs in chunk rebuilding

2013-08-30 Thread David Sterba
On Wed, Aug 14, 2013 at 04:16:37PM -0700, Zach Brown wrote: I *think* the second one is just a typo. The chunk's num_stripes was already initialized from the record, but it's le16. So we'll set the item's size based on the record's native num_stripes. @@ -1117,7 +1117,7 @@ static int

Re: [PATCH 15/15] btrfs-progs: use NULL instead of 0

2013-08-30 Thread David Sterba
On Wed, Aug 14, 2013 at 04:16:45PM -0700, Zach Brown wrote: + { NULL, 0, NULL, 0} + NULL_CMD_STRUCT, It's always the last item, so I think the comma should go away, currently it's mixed. I'll fix it during commit, too trivial to bother you. david -- To unsubscribe from

Re: [RFC] btrfs-progs: fix sparse checking and warnings

2013-08-30 Thread David Sterba
I went through the actual fixes and they're selfcontained and now in integration. Actually, the compilation fail in 1/1 might be caused by a old sparse utility on my box, I'll check again later. thanks, david -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body

Re: [PATCH 01/15] btrfs-progs: get C=1 sparse checking working again

2013-08-30 Thread David Sterba
-20130425 and it worked. 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

Re: [PATCH] Btrfs: add support for asserts V2

2013-08-30 Thread David Sterba
On Thu, Aug 29, 2013 at 02:09:57PM -0400, Josef Bacik wrote: +#define ASSERT(expr) \ + (likely(expr) ? (void)0 : assfail(#expr, __FILE__, __LINE__)) +#else +#define ASSERT(expr) ((void)0) +#endif + +#define btrfs_assert() This is unused and without any ifdef-ed alternatives, should go

[PATCH] btrfs: commit transaction after deleting a subvolume

2013-08-30 Thread David Sterba
it. There is a performance penalty incured by the change, but deleting a subvolume is not a frequent operation and the tradeoff seems justified by getting the guarantee stated above. CC: Alex Lyakas alex.bt...@zadarastorage.com CC: Josef Bacik jba...@fusionio.com Signed-off-by: David Sterba dste...@suse.cz --- fs/btrfs

Re: [PATCH] Btrfs-progs: setup framework to corrupt specific fields of an inode

2013-08-30 Thread David Sterba
On Mon, Aug 19, 2013 at 11:48:32AM -0400, Josef Bacik wrote: @@ -344,10 +442,12 @@ int main(int ac, char **av) ac = ac - optind; if (ac == 0) print_usage(); - if (logical == 0 !extent_tree) + if (logical == 0 (!extent_tree !inode)) There's a conflict

Re: [PATCH 0/2] btrfs-progs: prevent mkfs from aborting with small volume

2013-08-30 Thread David Sterba
on practically every fs and the one at 64k can be retored from it. 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

Re: [PATCH v2] btrfs-progs: mkfs should check for small vol well before

2013-08-30 Thread David Sterba
; + } + if (size 1024 * 1024 * 1024) { Would be good to use a properly named constant instead of the magic number. 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 at http

Re: [PATCH] btrfs-progs: device add should check existing FS before adding

2013-08-30 Thread David Sterba
they hit the mailinglist/integration. 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

Re: [PATCH v7] Btrfs: optimize key searches in btrfs_search_slot

2013-09-02 Thread David Sterba
On Sun, Sep 01, 2013 at 11:39:28AM +0100, Filipe David Borba Manana wrote: +#ifdef CONFIG_BTRFS_ASSERT +static int key_search_validate(struct extent_buffer *b, +struct btrfs_key *key, +int level) +{ ... +} +#endif + +static int

Re: [PATCH 1/3] Btrfs-progs: Add Makefile infrastructure for subdirs

2013-09-02 Thread David Sterba
under 'move files to tests/' patch. 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

Re: [PATCH 3/3 V2] Btrfs-progs: move btrfs cmd files to cmd/ subdir

2013-09-02 Thread David Sterba
On Tue, Jun 11, 2013 at 07:38:03PM -0500, Eric Sandeen wrote: Move btrfs cmd files to cmd/ subdir Are you ok with naming the subdirectory 'cmds'? 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

Re: [PATCH v7] Btrfs: optimize key searches in btrfs_search_slot

2013-09-02 Thread David Sterba
On Mon, Sep 02, 2013 at 03:40:39PM +0100, Filipe David Manana wrote: Between patch versions v5 to v7, I don't have any strong preference. All have correct, small and simple code. I'm ok with v7. -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message

Re: [RFC PATCH v6 5/5] Btrfs: online data deduplication

2013-09-02 Thread David Sterba
I wanted to only comment on the ioctl and interface to userspace bits, but found more things to comment in the kernel code. On Thu, Aug 08, 2013 at 04:35:45PM +0800, Liu Bo wrote: --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -94,6 +95,9 @@ struct btrfs_ordered_sum; /* for storing balance

Re: [PATCH v2] Btrfs-progs: add dedup subcommand

2013-09-02 Thread David Sterba
On Mon, Aug 12, 2013 at 10:45:55AM +0800, Liu Bo wrote: On Fri, Aug 09, 2013 at 02:51:35PM +0200, David Sterba wrote: I'm not sure that calling it register/unregister is the right thing, IMO it's more enable/disable as you write in the documentation under each respective command. Both

Re: [PROGS PATCH] Import btrfs-extent-same

2013-09-02 Thread David Sterba
something like the syhntax of btrfs-extent-same.c: btrfs dedupe files len file1 loff1 file2 loff2 ... I'm not sure I see what 'len' means here, length of the dedup block? david -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org

Re: [PATCH] btrfs: return btrfs error code for dev excl ops err

2013-09-02 Thread David Sterba
in progress; default: return NULL; This is an unnecessary change. Thanks, Though having the whole message on one line makes errors greppable. david -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord

Re: Recovering from csum errors

2013-09-03 Thread David MacKinnon
if you had a recovery option might be acceptable. As mentioned, nocow is probably best for VM images anyhow, but still :) -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

[PATCH 3/3] btrfs: set FIEMAP_EXTENT_DATA_COMPRESSED for compressed extents

2013-09-03 Thread David Sterba
Set the EXTENT_DATA_COMPRESSED flag together with EXTENT_ENCODED as defined by fiemap spec. Signed-off-by: David Sterba dste...@suse.cz --- fs/btrfs/extent_io.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index fe443fe

Re: [PROGS PATCH] Import btrfs-extent-same

2013-09-03 Thread David Sterba
On Mon, Sep 02, 2013 at 05:53:42PM +0100, Simon Farnsworth wrote: On Monday 2 September 2013 18:43:58 David Sterba wrote: Yes that's what I meant and that's what dupremove in your git tree does, right? Using the EXTENT_SAME ioctl without any checks is dangerous, and that's what btrfs

Re: [PROGS PATCH] Import btrfs-extent-same

2013-09-03 Thread David Sterba
On Mon, Sep 02, 2013 at 06:43:58PM +0200, David Sterba wrote: So I would suggest maybe something like the syhntax of btrfs-extent-same.c: btrfs dedupe files len file1 loff1 file2 loff2 ... I'm not sure I see what 'len' means here, length of the dedup block? Now I'm reading more

[PATCH] btrfs: add lockdep and tracing annotations for uuid tree

2013-09-03 Thread David Sterba
Signed-off-by: David Sterba dste...@suse.cz --- fs/btrfs/disk-io.c |1 + include/trace/events/btrfs.h |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 4cbb00a..72cf08b 100644 --- a/fs/btrfs/disk-io.c +++ b/fs

Re: [PATCH] btrfs: show compiled-in config features at module load time

2013-09-03 Thread David Sterba
On Tue, Sep 03, 2013 at 03:25:27PM +0200, Stefan Behrens wrote: We want to know if there are debugging features compiled in, this may affect performance. The message is printed before the sanity checks. Agreed. Reviewed-by: David Sterba dste...@suse.cz -- To unsubscribe from this list: send

Re: [PATCH RESEND] Btrfs-progs: fix restore command leaving corrupted files

2013-09-03 Thread David Sterba
On Tue, Sep 03, 2013 at 12:19:58PM +0100, Filipe David Borba Manana wrote: This patch is based on top of branch integration-20130902. It used to be present in older integration branches, but it suddenly disappeared in more recent integration branches. My bad sorry, I hope I haven't lost more

Re: [PATCH v2] btrfs-progs: mkfs should check for small vol well before

2013-09-03 Thread David Sterba
On Sat, Aug 31, 2013 at 01:29:53PM +0800, Anand Jain wrote: Thanks for taking care of this David. Let me know if anywhere needs more explanation. I have been introducing series of device related changes in btrfs-progs/mkfs which were/is essential bug fix. Fixes looks complex since

Re: [PATCH] xfstests: fix device lookup in btrfs/003

2013-09-06 Thread David Sterba
the tests have to do more fine grained checks of the devices in SCRATCH_DEV_POOL because eg. the 'device replace' test btrfs/011 is just fine with partitions. david -- 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 00/20] fix magic return value in btrfs-progs

2013-09-09 Thread David Sterba
commands.h, others utils.h. If you find more appropriate locations, feel free to use them. 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

Re: [PATCH 2/5] btrfs-progs:local variable memory freed

2013-09-09 Thread David Sterba
On Thu, Sep 05, 2013 at 10:38:55AM +0800, Gui Hecheng wrote: The local probe variable in is_ssd() freed upon unsuccessful return; FYI, I've applied a patch from Wang Shilong Btrfs-progs: fix compile warning in is_ssd() instead of the hunk below and will remove the respective changelog line. The

Re: [PATCH 2/5] btrfs-progs:local variable memory freed

2013-09-09 Thread David Sterba
On Mon, Sep 09, 2013 at 04:18:55PM +0200, David Sterba wrote: On Thu, Sep 05, 2013 at 10:38:55AM +0800, Gui Hecheng wrote: The local probe variable in is_ssd() freed upon unsuccessful return; FYI, I've applied a patch from Wang Shilong Btrfs-progs: fix compile warning in is_ssd() instead

Re: [PATCH 5/5] btrfs-progs:free strdup()s that are not freed

2013-09-09 Thread David Sterba
On Thu, Sep 05, 2013 at 09:10:51AM +0200, Stefan Behrens wrote: Just noticed that you had already sent a V2 with the things fixed that I have commented, but you sent the 5/5 as a 1/5 and added the changelog v1-v2 none which made it difficult to recognize :). But maybe David Sterba is smart

Re: [PATCH] Btrfs-progs: setup framework to corrupt specific fields of an inode V2

2013-09-09 Thread David Sterba
= root-sectorsize; All fixed and patch replaced in the middle of the branch, feel free to review that I did not mess it up. 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

Re: [PATCH] btrfs: add ability to query/change feature bits online

2013-09-09 Thread David Sterba
On Tue, Aug 27, 2013 at 03:17:54PM -0400, Jeff Mahoney wrote: +static int btrfs_ioctl_add_features(struct file *file, void __user *arg) +{ ... spin_lock(fs_info-super_lock); + flags = btrfs_super_compat_flags(super_block); + flags |=

Re: [PATCH] Btrfs-progs: add make test framework

2013-09-09 Thread David Sterba
On Fri, Sep 06, 2013 at 02:50:56PM -0400, Josef Bacik wrote: We need to start adding some sanity tests to btrfs-progs to make sure we aren't breaking things with our patches. The most important of these tools is btrfsck. This patch gets things started by adding a basic btrfsck test that

Re: btrfs.h and btrfs-progs licensing

2013-09-09 Thread David Sterba
might also be construed to need to be GPLv2. Looking at nm libbtrfs.a there are rbtree and crc32c symbols included in the library, licensed under GPLv2, the rest is pure userspace code and the people are around to ask about relicensing. david -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH] Btrfs-progs: add make test framework

2013-09-09 Thread David Sterba
On Mon, Sep 09, 2013 at 03:57:17PM -0400, Josef Bacik wrote: On Mon, Sep 09, 2013 at 02:07:43PM -0500, Eric Sandeen wrote: On 9/9/13 12:13 PM, Josef Bacik wrote: David might have meant 001-bad-file-extent-bytenr.img though. Oh yeah that may be good then. Yes that's what I meant. I thought

Re: [PATCH 3/3] btrfs-progs: ctree: widen int-long due to PTR_ERR()

2013-09-09 Thread David Sterba
int, there is no loss. Did you turn on some extra compiler warnings? 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

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

2013-09-12 Thread David Sterba
On Wed, Sep 11, 2013 at 02:34:05PM +0530, chandan wrote: --- a/man/btrfs.8.in +++ b/man/btrfs.8.in @@ -244,7 +244,8 @@ is similar to \fBsubvolume list\fR command. \fBsubvolume set-default\fR\fI id path\fR Set the subvolume of the filesystem \fIpath\fR which is mounted as \fIdefault\fR.

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

2013-09-12 Thread David Sterba
On Fri, Sep 06, 2013 at 05:37:53PM +0800, Anand Jain wrote: Further, to scan for the disks this patch will use lblkid, so that we don't have to manually scan the /dev or /dev/mapper which means we don't need the all-devices options. Thanks for implementing it! I found a few things to fix,

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

2013-09-12 Thread David Sterba
On Fri, Sep 06, 2013 at 05:37:52PM +0800, Anand Jain wrote: +static char *group_type_str(u64 flag) { - struct btrfs_ioctl_space_args *sargs, *sargs_orig; - u64 count = 0, i; - int ret; - int fd; - int e; - char *path; - DIR *dirstream = NULL; - - if

Re: [PATCH v2 0/9] btrfs: Replace the btrfs_workers with kernel workqueue

2013-09-12 Thread David Sterba
can use the same files for the new helpers, instead of bwq.[ch] * btrfs_workqueue_struct can drop the _struct suffix * WQ_MEM_RECLAIM for the scrub thread does not seem right * WQ_FREEZABLE should be probably set david -- To unsubscribe from this list: send the line unsubscribe linux-btrfs

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

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 chan...@linux.vnet.ibm.com Reviewed-by: David Sterba dste...@suse.cz -- To unsubscribe from

[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 dste...@suse.cz --- fs

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 on

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 fhol...@gmail.com Reviewed-by: David Sterba dste...@suse.cz - printk(KERN_INFO

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