Re: [PATCH] btrfs-progs: image: handle superblocks correctly on fs with big blocks

2013-05-10 Thread David Sterba
On Tue, May 07, 2013 at 10:44:05AM +0200, Stefan Behrens wrote: On Mon, 6 May 2013 23:11:20 +0200, David Sterba wrote: Superblock is always 4k, but metadata blocks may be larger. We have to use the appropriate block size when doing checksums, otherwise they're wrong. Signed-off

Re: [PATCH] btrfs-progs: image: handle superblocks correctly on fs with big blocks

2013-05-10 Thread David Sterba
On Fri, May 10, 2013 at 04:26:32PM +0200, Stefan Behrens wrote: On 05/10/2013 13:20, David Sterba wrote: On Tue, May 07, 2013 at 10:44:05AM +0200, Stefan Behrens wrote: On Mon, 6 May 2013 23:11:20 +0200, David Sterba wrote: Superblock is always 4k, but metadata blocks may be larger. We have

Re: [PATCH 0/0] libbtrfs: Set SONAME to libbtrfs.so.0 (instead of libbtrfs.so)

2013-05-13 Thread David Sterba
On Sun, May 12, 2013 at 04:33:43PM +0100, Richard W.M. Jones wrote: In the original version of btrfs-progs: libify some parts of btrfs-progs by Mark Fasheh, the soname field of the internal libbtrfs library was set to libbtrfs.so.1. This doesn't match the filename of the library

Re: [PATCH] Btrfs-progs: add dedup register

2013-05-13 Thread David Sterba
On Thu, May 02, 2013 at 12:27:39AM +0800, Liu Bo wrote: +static int cmd_dedup(int argc, char **argv) +{ + int fd, res, e; + char*path; + + if (check_argc_exact(argc, 2)) + usage(cmd_dedup_usage); + + path = argv[1]; + + fd =

Re: [PATCH] Btrfs: add ioctl to wait for qgroup rescan completion

2013-05-13 Thread David Sterba
On Tue, May 07, 2013 at 08:17:12AM +0200, Jan Schmidt wrote: On Mon, May 06, 2013 at 23:20 (+0200), David Sterba wrote: On Mon, May 06, 2013 at 09:14:17PM +0200, Jan Schmidt wrote: --- a/include/uapi/linux/btrfs.h +++ b/include/uapi/linux/btrfs.h @@ -530,6 +530,7 @@ struct

Re: BTRFS in laptop-mode

2013-05-14 Thread David Sterba
On Tue, May 14, 2013 at 10:32:43AM +0200, Adam Ryczkowski wrote: What are perspectives on BTRFS complying with laptop-mode and stop writing to disk every 30 sec? Is there any tunable switch, that can delay such writes to, say, 15 minutes, or better yet: until the disk started spinning anyway?

Re: [PATCH] Btrfs: increase the max global reserve size to 1gig

2013-05-15 Thread David Sterba
On Fri, May 03, 2013 at 11:28:35PM +0800, Liu Bo wrote: On Fri, May 03, 2013 at 08:56:54AM -0400, Josef Bacik wrote: Apparently 512mb was too small, with a fs_mark command we could get so much delayed work built up that we'd never trip the lets commit the transaction logic until we'd gotten

Re: [PATCH v2 0/8] Btrfs: introduce a tree for UUID to subvol ID mapping

2013-05-15 Thread David Sterba
On Tue, May 14, 2013 at 07:11:54PM +0200, Stefan Behrens wrote: # of subvols | without| with in filesystem | UUID tree | UUID tree --++-- 2 | 0m00.004s | 0m00.003s 1000 | 0m07.010s | 0m00.004s 2000 | 0m28.210s | 0m00.004s

Re: [PATCH] Btrfs: increase the max global reserve size to 1gig

2013-05-15 Thread David Sterba
On Fri, May 03, 2013 at 08:56:54AM -0400, Josef Bacik wrote: Apparently 512mb was too small, with a fs_mark command we could get so much delayed work built up that we'd never trip the lets commit the transaction logic until we'd gotten too much delayed refs built up. Increasing this to 1 gig

Re: [PATCH] Btrfs-progs: fix missing recow roots when making btrfs filesystem

2013-05-15 Thread David Sterba
On Tue, May 14, 2013 at 07:50:28PM +0800, Wang Shilong wrote: When making btrfs filesystem. we firstly write root leaf to specified filed, and then we recow the root. If we don't recow, some trees are not in the correct block group. Steps to reproduce: dd if=/dev/zero of=test.img

[PATCH] btrfs-progs: restore: use long option for the path regex

2013-05-15 Thread David Sterba
Current way of specifying the path to match is not very comfortable, but the feature itself is very useful. Let's save the short option -m for a more user friendly syntax and keep a long option --path-regex with the current syntax. CC: Peter Stuge pe...@stuge.se Signed-off-by: David Sterba dste

[PATCH] btrfs-progs: mkfs: add -O option to specify fs features

2013-05-16 Thread David Sterba
Extend mkfs options to specify optional or potentially backwards incompatible features. Signed-off-by: David Sterba dste...@suse.cz --- man/mkfs.btrfs.8.in | 9 mkfs.c | 124 +++- 2 files changed, 123 insertions(+), 10 deletions

Re: [PATCH v3 1/4] Btrfs-progs: Support UUID tree and UUID items in btrfs-debug-tree

2013-05-16 Thread David Sterba
On Thu, May 16, 2013 at 04:45:55PM +0200, Stefan Behrens wrote: +struct btrfs_uuid_item { + __le16 type;/* refer to BTRFS_UUID_ITEM_TYPE* defines above */ + __le32 len; /* number of following 64bit values */ + __le64 data[0]; /* data aligned to 64bit */ +} __attribute__

Re: btrfs-tools: debian/patches/09-unaligned-memaccess.patch

2013-05-24 Thread David Sterba
On Wed, May 22, 2013 at 07:08:42AM +0200, Holger Fischer wrote: Dear BTRFS-Community, attached is a patch that probably could be applied upstream: It is ... Fixing unaligned memory accesses ... Details to this patch could be read under http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=656955

Re: [PATCH 4/4] btrfs: offline dedupe

2013-05-24 Thread David Sterba
On Tue, May 21, 2013 at 11:28:28AM -0700, Mark Fasheh wrote: +static noinline int fill_data(struct inode *inode, u64 off, u64 len, + char **cur_buffer) +{ + struct page *page; + void *addr; + char *buffer; + pgoff_t index; + pgoff_t last_index;

Re: [PATCH 1/5] Btrfs: fix use-after-free bug during umount

2013-05-27 Thread David Sterba
On Sun, May 26, 2013 at 09:50:27PM +0800, Liu Bo wrote: Commit be283b2e674a09457d4563729015adb637ce7cc1 (Btrfs: use helper to cleanup tree roots) introduced the following bug, Well, it did not introduce the bug, but made it visible. We've free'ed commit_root before actually getting to

Re: [PATCH] Btrfs-progs: Add missing free() against fs_info-super_copy

2013-05-27 Thread David Sterba
Hi, please don't forget to mention what changed in a revised version On Sat, May 25, 2013 at 03:16:39PM +0100, Filipe David Borba Manana wrote: @@ -228,6 +227,8 @@ out: free(chunk_root); free(dev_root); free(csum_root); + if (fs_info) +

Re: [PATCH] Btrfs-progs: Add missing free() against fs_info-super_copy

2013-05-27 Thread David Sterba
On Mon, May 27, 2013 at 01:31:13PM +0100, Filipe David Manana wrote: Right. Just thought it was better to check if the calloc() for fs_info succeeded before derreferencing it for free'ing its super_copy member (the function's code doesn't check if any of the malloc() / calloc() calls returned

Re: [PATCH 0/6] fix INT_MAX readdir hang, plus cleanups

2013-06-05 Thread David Sterba
On Wed, Jun 05, 2013 at 10:34:08AM +0800, Miao Xie wrote: Ontue, 4 Jun 2013 16:26:57 -0700, Zach Brown wrote: On Tue, Jun 04, 2013 at 07:16:53PM -0400, Chris Mason wrote: Quoting Zach Brown (2013-06-04 18:17:54) Hi gang, I finally sat down to fix that readdir hang that has been in

Re: [PATCH 0/2] introduce list_for_each_entry_del

2013-06-05 Thread David Sterba
On Wed, Jun 05, 2013 at 08:53:50AM +0200, Arne Jansen wrote: On 05.06.2013 04:09, Jörn Engel wrote: On Tue, 4 June 2013 14:44:35 -0400, Jörn Engel wrote: Or while_list_drain? I'm fine with while_list_drain, although a name starting with list_ like all other list macros would be nice.

Re: [PATCH 1/2] list: add while_list_drain_entry

2013-06-05 Thread David Sterba
On Tue, Jun 04, 2013 at 10:03:41PM -0400, Jörn Engel wrote: I have seen a lot of boilerplate code that either follows the pattern of while (!list_empty(head)) { pos = list_entry(head-next, struct foo, list); list_del(pos-list); ... } or

Re: btrfs-tools: debian/patches/02-ftbfs.patch

2013-06-05 Thread David Sterba
On Mon, May 20, 2013 at 02:59:27PM +0200, Holger Fischer wrote: Dear BTRFS-Community, as far as I understand I believe it would make sense to apply that one upstream: Thanks for bringing it up. like described, it ... Fixes FTBFS on alpha and ia64 ... cat 02-ftbfs.patch Authors:

Re: [PATCH 0/6] fix INT_MAX readdir hang, plus cleanups

2013-06-06 Thread David Sterba
On Thu, Jun 06, 2013 at 09:35:07AM +0800, Miao Xie wrote: Onwed, 5 Jun 2013 15:36:36 +0200, David Sterba wrote: On Wed, Jun 05, 2013 at 10:34:08AM +0800, Miao Xie wrote: On tue, 4 Jun 2013 16:26:57 -0700, Zach Brown wrote: On Tue, Jun 04, 2013 at 07:16:53PM -0400, Chris Mason

Re: How do I safely terminate COW on pre-existing files?

2013-06-07 Thread David Sterba
On Thu, Jun 06, 2013 at 07:51:28PM -0700, George Mitchell wrote: I want to eliminate the COW feature on all of my OS files. It is a nice feature for user files, but I don't see a clear benefit for the actual OS files. And I suspect that COW induced fragmentation is causing or aggravating

Re: [PATCH] Btrfs-progs: add option to btrfs-debug-tree to print uuid tree only

2013-06-14 Thread David Sterba
This is a nice debugging help. I'm thinking about introducing a single option to take names of all the trees to print. Something like btrfs-debug-tree --tree uuid,csum,root,extent /dev (or -t for the short option). Fortunatelly the number of trees is quite small so we would not run out of

Re: converting lzo compression to zlib compression?

2013-06-17 Thread David Sterba
On Mon, Jun 17, 2013 at 02:16:53AM +0900, Tomasz Chmielewski wrote: I'd like to see how much space would I save by converting it to zlib. Would it be possible to convert lzo compression to zlib compression with the following: - mount the filesystem with compress=zlib - run defrag on all

Re: [PATCH] Btrfs-progs: do not print uuid 0 when printing root item

2013-06-19 Thread David Sterba
do not print uuid 0 when printing root item Actually I think we should print all the UUIDs unconditionally. This is inside the debug-tree utility and a zero uuid is an information that may be useful, even if only as one of the results 'grep uuid'. I don't see much point in hiding information

Re: [PATCH 5/5] Btrfs-progs: Validate super block checksum

2013-06-21 Thread David Sterba
On Thu, Jun 20, 2013 at 06:08:29PM +0100, Filipe David Manana wrote: Is there any reason why the btrfs progs (except for btrfs-show-super) don't validate the super block's checksum? btrfsck accepts broken filesystems, so open_ctree_broken should possibly detect but skip the checksum mismatch.

Re: why check f_path.mnt is equal for source and dest in btrfs_ioctl_clone()?

2013-07-01 Thread David Sterba
On Sun, Jun 30, 2013 at 09:55:26AM +0200, Stefan Paletta wrote: This gives EXDEV for clone operations that btrfs could otherwise execute and with slight change of circumstances will actually execute fine. Imagine we have a btrfs on /dev/mapper/foobar with subvols /foo and /bar. Let’s also

Re: [PATCH] btrfs-progs: Cleanup for using BTRFS_SETGET_STACK instead of raw convert

2013-07-02 Thread David Sterba
That's a good cleanup, please send the kernel version 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] btrfs-progs: Cleanup for using BTRFS_SETGET_STACK instead of raw convert

2013-07-02 Thread David Sterba
On Wed, Jun 26, 2013 at 01:27:08PM +0800, Qu Wenruo wrote: --- a/btrfs-convert.c +++ b/btrfs-convert.c @@ -1802,7 +1802,7 @@ static int prepare_system_chunk_sb(struct btrfs_super_block *super) btrfs_set_stack_chunk_num_stripes(chunk, 1); btrfs_set_stack_chunk_sub_stripes(chunk,

Re: [PATCH] btrfs-progs: Fix segmentation fault

2013-07-03 Thread David Sterba
On Sat, Jun 22, 2013 at 02:39:21PM +0900, Kusanagi Kouichi wrote: 'btrfs subvolume delete' crashes with segv if it runs in a detached mount. One does not even need to do the lazy unmount. If the there are 2 processes attempting to delete the same snapshot and one deletes the snapshot directory

Re: [PATCH 1/2] Btrfs-progs: make pretty_sizes() works less error prone

2013-07-03 Thread David Sterba
On Thu, Jul 04, 2013 at 12:07:37AM +0800, Wang Shilong wrote: From: Wang Shilong wangsl-f...@cn.fujitsu.com In the original code, pretty_sizes() may return NULL in two cases: 1 Allocating memory dynamically fails Turning it into static allocation looks much better than calling malloc for ~30

Re: [PATCH 1/3] Btrfs-progs: add missing write check for mkfs

2013-07-03 Thread David Sterba
On Wed, Jul 03, 2013 at 06:25:59PM +0100, Filipe David Manana wrote: Also, replacing the BUG_ON with something else would be nice of course. If you don't mind, I would prefer to do that as a different patch, since the BUG_ON() use is what is currently done everywhere in this function at

Re: [PATCH v3] btrfs: clean snapshots one by one

2013-07-04 Thread David Sterba
On Thu, Jul 04, 2013 at 06:29:23PM +0300, Alex Lyakas wrote: @@ -7363,6 +7365,12 @@ int btrfs_drop_snapshot(struct btrfs_root *root, wc-reada_count = BTRFS_NODEPTRS_PER_BLOCK(root); while (1) { + if (!for_reloc btrfs_fs_closing(root-fs_info)) { +

Re: [PATCH] btrfs: Cleanup for using BTRFS_SETGET_STACK instead of raw convert

2013-07-08 Thread David Sterba
btrfs_file_extent_item, type, 8); +BTRFS_SETGET_STACK_FUNCS(stack_file_extent_bytenr, + struct btrfs_file_extent_item, disk_bytenr, 64); Please use the struct member name in the macro name, ie. stack_file_extent_disk_bytenr otherwise ok, Reviewed-by: David Sterba dste...@suse.cz

Re: [PATCH v2] Btrfs-progs: remove incorrect slot decrement

2013-07-08 Thread David Sterba
On Fri, Jul 05, 2013 at 09:43:34PM +0100, Filipe David Borba Manana wrote: In btrfs_set_block_flags() we want to check if the slot in the leaf points to the first item in the leaf - if it doesn't check if the previous item in the leaf is an extent item. By removing this extra slot decrement we

Re: [PATCH] btrfs-progs: Fix automatic prerequisite generation

2013-07-08 Thread David Sterba
On Sat, Jul 06, 2013 at 05:22:31PM +0900, Kusanagi Kouichi wrote: Some files don't compile because of insufficient prerequisite. $ make btrfs ... [CC] btrfs.o btrfs.c:24:21: fatal error: version.h: No such file or directory #include version.h ^ compilation

Re: [PATCH] btrfs-progs: Fix automatic prerequisite generation

2013-07-08 Thread David Sterba
On Mon, Jul 08, 2013 at 06:46:07PM +0200, David Sterba wrote: On Sat, Jul 06, 2013 at 05:22:31PM +0900, Kusanagi Kouichi wrote: Some files don't compile because of insufficient prerequisite. $ make btrfs ... [CC] btrfs.o btrfs.c:24:21: fatal error: version.h: No such file

Re: Does balance implicitly defrag?

2013-07-08 Thread David Sterba
On Tue, Jul 02, 2013 at 02:28:25PM +0100, Paul Richards wrote: When I run btrfs filesystem balance, does this implicitly defragment the filesystem? (Assuming there is plenty free space) In some sense it defragments the filesystem. The blockgroups are moved around based on the balance filter.

Re: Scrub causes oom after removal of failed disk (linux 3.10)

2013-07-08 Thread David Sterba
On Wed, Jul 03, 2013 at 08:35:48PM +0200, Torbjørn wrote: Hi btrfs devs, I have a btrfs raid10 array consisting of 2TB drives. I added a new drive to the array, then balanced. The balance failed after ~50GB was moved to the new drive. The balance fixed lots of errors according to dmesg.

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

2013-07-08 Thread David Sterba
On Thu, Jul 04, 2013 at 01:51:38PM +0400, Andrew Vagin wrote: We are not first who suffer from this problem: https://bugzilla.redhat.com/show_bug.cgi?id=711881 http://marc.info/?l=linux-btrfsm=130074451403261 https://bugzilla.openvz.org/show_bug.cgi?id=2653 And about 2 years ago Mark Fasheh

[PATCH] btrfs-progs: Fix getopt on arm/ppc platforms

2013-07-09 Thread David Sterba
(same as commit bb0eabc383e9a3fde7cdb02591ca88243f3e31fb) There, 'char' is unsigned, so once assigned '-1' from getopt, it gets the value 255. Then, it compared to '-1' gives false. Signed-off-by: David Sterba dste...@suse.cz --- btrfs-crc.c | 2 +- cmds-device.c | 2 +- 2 files changed, 2

[PATCH] btrfs-progs: fix duplicate __[su]* typedefs on ppc64

2013-07-09 Thread David Sterba
be to fix ext2fs/ext2_types.h to not use its own typedefs. Originally observed in btrfs-convert, put the include into kerncompat.h to avoid future problems. Signed-off-by: Michal Marek mma...@suse.cz Signed-off-by: David Sterba dste...@suse.cz --- kerncompat.h | 1 + 1 file changed, 1 insertion(+) diff

[PATCH] btrfs-progs: use accessor macro for otime

2013-07-09 Thread David Sterba
The root_item-otime value must be accessed via the macro otherwise the value is incorrect on big endian machines. Signed-off-by: David Sterba dste...@suse.cz --- btrfs-list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/btrfs-list.c b/btrfs-list.c index c3d35de..7f34237

[PATCH] btrfs-progs: use reentrant localtime

2013-07-09 Thread David Sterba
localtime may return NULL (when an error is detected eg. after setting tzname), followed by a segfault when the values is about to be used. localtime_r works, does not set tzname and does not return NULL. Signed-off-by: David Sterba dste...@suse.cz --- btrfs-list.c | 10 ++ cmds

Re: [PATCH V2 1/2] Btrfs-progs: make pretty_sizes() work less error prone

2013-07-10 Thread David Sterba
On Tue, Jul 09, 2013 at 01:24:43PM -0700, Zach Brown wrote: The original codes don't handle error gracefully and some places forget to free memory. We can allocate memory before calling pretty_sizes(), for example, we can use static memory allocation and we don't have to deal with memory

[PATCH] btrfs-progs: per-thread, per-call pretty buffer

2013-07-10 Thread David Sterba
z...@redhat.com Signed-off-by: David Sterba dste...@suse.cz --- I've updated the rest of pretty_size callers in targets that were not built by default. btrfs-calc-size.c | 13 +++-- btrfs-fragments.c | 2 +- cmds-filesystem.c | 27 +-- cmds-scrub.c | 8

Re: [PATCH] btrfs-progs: per-thread, per-call pretty buffer

2013-07-10 Thread David Sterba
__thread and TLS from gcc and a small amount of static storage. This seems better than the current code or doing something with illegible format specifier macros. Signed-off-by: Zach Brown z...@redhat.com Signed-off-by: David Sterba dste...@suse.cz OK. please add my tag: Acked

Re: [PATCH 1/2] Btrfs-progs: remove duplicated code in cmds-restore.c

2013-07-10 Thread David Sterba
On Tue, Jul 09, 2013 at 07:49:53PM +0100, Filipe David Borba Manana wrote: The module cmds-restore.c was defining its own next_leaf() function, which did exactly the same as btrfs_next_leaf() from ctree.c. This has been removed by Eric's patch present in the integration branches: Btrfs-progs:

Re: [PATCH] btrfs-progs: per-thread, per-call pretty buffer

2013-07-10 Thread David Sterba
On Wed, Jul 10, 2013 at 05:16:23PM +0100, Hugo Mills wrote: Sorry to be a pain in the arse at this late stage of the patch, but I've only just noticed. No worries, good to have this one fixed. david -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a

[PATCH] btrfs-progs: use IEC units for sizes

2013-07-10 Thread David Sterba
As implemented now, we use 1024 based units but reporting 1000 based, let's finally fix that and add optional unit bases later. Signed-off-by: David Sterba dste...@suse.cz --- utils.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/utils.c b/utils.c index bce06f1..2e24cb0

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

2013-07-10 Thread David Sterba
On Wed, Jul 10, 2013 at 10:45:45AM -0700, Mark Fasheh wrote: Well, what do I get when I pretend I don't care any more? The little voice in my head says keep plugging away. Here's another attempt at fixing this problem in a sane manner. Basically, this time we're adding a flag to s_flags which

Re: lz4 status?

2013-07-10 Thread David Sterba
On Sun, Jun 30, 2013 at 12:35:09PM -0500, Mitch Harder wrote: There's been a parallel effort to incorporate a general set of lz4 patches in the kernel. I see these patches are currently queued up in the linux-next tree, so we may see them in the 3.11 kernel. The patches are now merged into

[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
On Thu, Jul 11, 2013 at 10:31:22AM -0400, Chris Mason wrote: Do you have benchmark numbers for how much these help? I hesitate to bring in the likely/unlikely unless we can see it on the benchmarks. Seconded, I doubt that this particular function gets any measurable speed improvement with the

Re: filebench varmail + scrubber = btrfs_update_root bug

2013-07-16 Thread David Sterba
On Mon, Jul 15, 2013 at 12:56:29AM -0400, George Amvrosiadis wrote: I'm trying to run the varmail personality in filebench, on a 50GB btrfs filesystem. I am also starting the scrubber at the same time. I have applied the latest patches for 3.8.13 (hoping to fix log tree issues). There's a

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

2013-07-31 Thread David Sterba
On Fri, Jul 19, 2013 at 01:51:15PM -0700, Mark Fasheh wrote: Ok checking for the operation is definitely needed. I'll check for -getattr(). The rest of the stuff in our suse patch must have been added after my own commit. Do you know why this was added? Since this is all internal to proc I

Re: Is the checkpoint interval adjustable?

2013-08-01 Thread David Sterba
On Wed, Jul 31, 2013 at 03:56:40PM -0700, Zach Brown wrote:  I am NO programmer by any stretch.  Let's say I want them to be once every 5 min (300 sec).  Is the attached patch sane to acheive this? I think it's a reasonable patch to try, yeah. There were a few requests to tune the

[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
On Wed, Jul 31, 2013 at 09:35:00AM -0400, Josef Bacik wrote: On Wed, Jul 31, 2013 at 02:19:25PM +0200, tim wrote: running btrfs on kernel 3.10.3, i got the following two backtraces, first an info about a hung task and a kernel bug. are these known issues? That's a crash that appears

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
On Wed, Jul 03, 2013 at 09:25:17PM +0800, Miao Xie wrote: --- a/btrfs.c +++ b/btrfs.c @@ -247,6 +247,7 @@ const struct cmd_group btrfs_cmd_group = { { device, cmd_device, NULL, device_cmd_group, 0 }, { scrub, cmd_scrub, NULL, scrub_cmd_group, 0 }, {

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

2013-08-01 Thread David Sterba
On Thu, Jul 25, 2013 at 10:12:01PM +0800, Eryu Guan wrote: The second btrfs command segfaults on big endian host(ppc64) btrfs subvolume snapshot /mnt/btrfs /mnt/btrfs/snap btrfs subvolume list -s /mnt/btrfs And ltrace shows localtime(0x10029c482d0) = 0

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
On Mon, Jul 15, 2013 at 01:30:52PM +0800, Anand Jain wrote: This patch adds --mapper option to btrfs device scan and btrfs filesystem show cli, when used will look for btrfs devs under /dev/mapper and will use the links provided under the /dev/mapper. In the long run I want the usage of

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

2013-08-05 Thread David Sterba
On Mon, Jul 15, 2013 at 01:30:46PM +0800, Anand Jain wrote: Anand Jain (11): btrfs-progs: btrfs_scan_for_fsid doesn't need all the arguments btrfs-progs: label option in btrfs filesystem show is not coded btrfs-progs: update device scan usage btrfs-progs: congregate dev scan

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

2013-08-05 Thread David Sterba
On Fri, Aug 02, 2013 at 05:12:49PM -0400, Mike Audia wrote: v2: * Stefan pointed out a missing break and that /proc/mounts does not show  the option. * fixed missing goto and extra printk parameter after failed match_int Forgive my naive question: I am using gmx's webclient which

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
On Thu, Jul 11, 2013 at 10:56:17PM +0200, Koen De Wit wrote: Commit 8d082fb727ac11930ea20bf1612e334ea7c2b697 (Btrfs: do not mount when we have a sectorsize unequal to PAGE_SIZE) requires the sectorsize to be equal to the pagesize for the filesystem to be mountable. The nodesize and leafsize

[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
On Thu, Aug 01, 2013 at 01:35:33PM +0800, Wang Shilong wrote: From: Qu Wenruo quwen...@cn.fujitsu.com The ret variant in the main function is not changed so even problems happen, return value is still 0. The patch fixs the minor bug and return 1 if any problems happen. Please don't mix code

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

2013-08-06 Thread David Sterba
On Thu, Aug 01, 2013 at 01:35:25PM +0800, Wang Shilong wrote: +.SH COPYRIGHT +Copyright \(co 2013 Fujitsu, Inc. +License GPLv3: GNU GPL version 3 http://gnu.org/licenses/gpl.html. +.br +This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the

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

2013-08-06 Thread David Sterba
On Thu, Jun 27, 2013 at 12:38:19AM +0200, Gabriel de Perthuis wrote: Originally from https://github.com/markfasheh/duperemove/blob/master/btrfs-extent-same.c Can you (or Mark) please turn it into a subcommand of dedup? The idea is to merge both in-bound and out-bound dedup into one command, eg.

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 are

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

2013-08-07 Thread David Sterba
On Tue, Aug 06, 2013 at 04:05:50PM -0500, Eric Sandeen wrote: I was thinking (and Josef just suggested too) that making a dir flag, saying everything under this dir gets compressed might make more sense for that scenario than adding a whole slew of on-disk-persistent-mount-option code. We

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

2013-08-07 Thread David Sterba
On Tue, Aug 06, 2013 at 11:01:37AM -0700, Zach Brown wrote: My biggest worry about this is that it complicates the coordination of automated testing, which is already in a terrible state for btrfs-progs. It can't possibly motivate people to write tests if we make the process more cumbersome

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
On Thu, Aug 08, 2013 at 09:33:14AM +0200, Arne Jansen wrote: On 07.08.2013 23:43, Sergei Trofimovich wrote: From: Sergei Trofimovich sly...@gentoo.org Found by uselex.rb: btrfs_reada_detach: [R]: exported from: fs/btrfs/btrfs.o fs/btrfs/built-in.o fs/btrfs/reada.o even though the

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

2013-08-08 Thread David Sterba
On Thu, Aug 08, 2013 at 12:43:20AM +0300, Sergei Trofimovich wrote: From: Sergei Trofimovich sly...@gentoo.org Found by uselex.rb: btrfs_start_transaction_lflush: [R]: exported from: fs/btrfs/btrfs.o fs/btrfs/transaction.o fs/btrfs/built-in.o

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

2013-08-08 Thread David Sterba
On Thu, Aug 08, 2013 at 12:43:19AM +0300, Sergei Trofimovich wrote: From: Sergei Trofimovich sly...@gentoo.org Found by uselex.rb: btrfs_write_and_wait_marked_extents: [R]: exported from: fs/btrfs/btrfs.o fs/btrfs/transaction.o fs/btrfs/built-in.o Signed-off-by: Sergei Trofimovich

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
On Thu, Aug 08, 2013 at 01:04:19PM +0800, Wang Shilong wrote: struct __prelim_ref is allocated and freed frequently when walking backref tree, using slab allocater can not only speed up allocating but also detect memory leaks. Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com

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
On Thu, Aug 08, 2013 at 09:11:01PM +0200, Arne Jansen wrote: On 08/08/13 19:46, Zach Brown wrote: even though 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

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

2013-08-08 Thread David Sterba
-by: Filipe David Borba Manana fdman...@gmail.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

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
On Thu, Aug 08, 2013 at 04:35:46PM +0800, Liu Bo wrote: This aims to add deduplication subcommand, 'btrfs dedup command path', ie. register/unregister'. 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

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

2013-08-09 Thread David Sterba
On Wed, Aug 07, 2013 at 10:17:57AM -0500, Eric Sandeen wrote: And isn't it still a mistake? I think it used to be that subvol_uuid_search_init() would allocate the memory which must be freed, but that's no longer the case, right? So under what circumstances is it correct to call

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 by

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

2013-08-09 Thread David Sterba
On Fri, Aug 09, 2013 at 03:20:47PM -0500, Eric Sandeen wrote: Mark many functions as static, and remove any resulting dead code. Thanks. -struct btrfs_root *link_subvol(struct btrfs_root *root, const char *base, -u64 root_objectid) +static struct btrfs_root *

  1   2   3   4   5   6   7   8   9   10   >