Re: hard freezes with 3.9.0 during io-intensive loads

2013-05-08 Thread Jan Schmidt
On Wed, May 08, 2013 at 02:24 (+0200), Kai Krakow wrote: Kai Krakow hurikhan77+bt...@gmail.com schrieb: I can reliably reproduce it from two different approaches. I'd like to only apply the commits fixing it. Can you name them here? In git log order: 6ced2666 Btrfs: separate sequence

Re: hard freezes with 3.9.0 during io-intensive loads

2013-05-10 Thread Jan Schmidt
On Fri, May 10, 2013 at 01:30 (+0200), Kai Krakow wrote: Jan Schmidt list.bt...@jan-o-sch.net schrieb: Apparently, it's not fixed. The system does not freeze now but it threw multiple backtraces right in front of my Xorg session. The backtraces look a little bit different now. Here's what I

Re: hard freezes with 3.9.0 during io-intensive loads

2013-05-17 Thread Jan Schmidt
On Thu, May 16, 2013 at 09:19 (+0200), Kai Krakow wrote: 3.9.2 still does not fix anything. I'll go with autodefrag=off for the moment until I hear some news in that regard. With this new information, is it still helpful to get a metadata image from me? It should be reproducable if you

[PATCH 0/3] Btrfs: qgroup rescan fixes for next rc

2013-05-28 Thread Jan Schmidt
change that need not be split artifically in my opinion. Jan Schmidt (3): Btrfs: fix memory patcher through fs_info-qgroup_ulist Btrfs: avoid double free of fs_info-qgroup_ulist Btrfs: fix qgroup rescan resume on mount fs/btrfs/ctree.h |2 + fs/btrfs/disk-io.c |2 + fs/btrfs

[PATCH 1/3] Btrfs: fix memory patcher through fs_info-qgroup_ulist

2013-05-28 Thread Jan Schmidt
for (ret 0) would have been the right choice. This commit fixes the check. Cc: Wang Shilong wangsl-f...@cn.fujitsu.com Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- fs/btrfs/qgroup.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/qgroup.c b/fs/btrfs

[PATCH 3/3] Btrfs: fix qgroup rescan resume on mount

2013-05-28 Thread Jan Schmidt
progress during btrfs_qgroup_account_ref, which is no longer required due to having step 2 from the list above. As a side effect, this commit prepares to move the rescan start code from btrfs_run_qgroups (which is run during commit) to a less time critical section. Signed-off-by: Jan Schmidt

[PATCH 2/3] Btrfs: avoid double free of fs_info-qgroup_ulist

2013-05-28 Thread Jan Schmidt
, turning the ulist_free in btrfs_free_qgroup_config into a noop. Cc: Wang Shilong wangsl-f...@cn.fujitsu.com Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- fs/btrfs/qgroup.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c

Re: [PATCH 0/3] Btrfs: qgroup rescan fixes for next rc

2013-05-28 Thread Jan Schmidt
Hi Wang, Please have a look at these patches, you should have been CCed but I just realized git send-email doesn't care about Cc lines in the patch file. Sigh. Thanks, -Jan -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to

[PATCH] xfstests btrfs/314: test send / receive

2013-06-06 Thread Jan Schmidt
Basic send / receive functionality test for btrfs. Requires current version of fsstress built (-x support). Relies on fssum tool, which is not part of the test suite but can skip the test if it is missing. Signed-off-by: Jan Schmidt list@jan-o-sch.net --- README |3 + common

Re: [PATCH] xfstests btrfs/314: test send / receive

2013-06-07 Thread Jan Schmidt
(cc Arne for far-progs discussion) On Thu, June 06, 2013 at 19:54 (+0200), Eric Sandeen wrote: On 6/6/13 10:20 AM, Jan Schmidt wrote: Basic send / receive functionality test for btrfs. Requires current version of fsstress built (-x support). Relies on fssum tool, which is not part of the test

Re: [PATCH] xfstests btrfs/314: test send / receive

2013-06-07 Thread Jan Schmidt
On Fri, June 07, 2013 at 16:51 (+0200), Arne Jansen wrote: On 07.06.2013 16:50, Eric Sandeen wrote: On 6/7/13 5:29 AM, Dave Chinner wrote: On Fri, Jun 07, 2013 at 09:18:58AM +0200, Jan Schmidt wrote: (cc Arne for far-progs discussion) On Thu, June 06, 2013 at 19:54 (+0200), Eric Sandeen

Re: [PATCH 0/3] Btrfs: qgroup rescan fixes for next rc

2013-06-10 Thread Jan Schmidt
Hi Chris, I know, Linus is turning grumpy again. I'd still feel better if we sent this patch set for the very next rc now. Any particular objections? -Jan On Tue, May 28, 2013 at 17:47 (+0200), Jan Schmidt wrote: Here are three fixes for the new qgroup rescan feature. The first two are quite

Re: [PATCH] Btrfs: hold the tree mod lock in __tree_mod_log_rewind

2013-06-30 Thread Jan Schmidt
On 30.06.2013 05:17, Josef Bacik wrote: We need to hold the tree mod log lock in __tree_mod_log_rewind since we walk forward in the tree mod entries, otherwise we'll end up with random entries and trip the BUG_ON() at the front of __tree_mod_log_rewind. This fixes the panics people were

Re: [PATCH] Btrfs: hold the tree mod lock in __tree_mod_log_rewind

2013-07-02 Thread Jan Schmidt
On Sun, June 30, 2013 at 15:55 (+0200), Josef Bacik wrote: On Sun, Jun 30, 2013 at 10:25:05AM +0200, Jan Schmidt wrote: On 30.06.2013 05:17, Josef Bacik wrote: We need to hold the tree mod log lock in __tree_mod_log_rewind since we walk forward in the tree mod entries, otherwise we'll end up

Re: [PATCH] Btrfs: stop using GFP_ATOMIC for the tree mod log allocations

2013-07-02 Thread Jan Schmidt
On Mon, July 01, 2013 at 22:25 (+0200), Josef Bacik wrote: Previously we held the tree mod lock when adding stuff because we use it to check and see if we truly do want to track tree modifications. This is admirable, but GFP_ATOMIC in a critical area that is going to get hit pretty hard and

Re: [PATCH] Btrfs: only do the tree_mod_log_free_eb if this is our last ref

2013-07-02 Thread Jan Schmidt
in __tree_mod_log_rewind. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com Strange that never really popped up largely so far, should be quite easy to hit. Anyway, Reviewed-by: Jan Schmidt list.bt...@jan-o-sch.net --- fs/btrfs/ctree.c |3 ++- 1 files changed, 2 insertions(+), 1

Re: [PATCH] Btrfs: fix extent buffer leak after backref walking

2013-07-03 Thread Jan Schmidt
with extent buffer leak. Signed-off-by: Liu Bo bo.li@oracle.com Reviewed-by: Jan Schmidt list.bt...@jan-o-sch.net --- fs/btrfs/ctree.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 02fae7f..3d790b4 100644 --- a/fs/btrfs

[PATCH v2 0/2] xfstest btrfs/316: test send / receive (was: btrfs/314)

2013-07-24 Thread Jan Schmidt
in the far-progs repository where fssum.c comes from as well. Jan Schmidt (2): xfstests: add fssum tool xfstests btrfs/316: test send / receive .gitignore |1 + README |3 + common/config |2 + src/Makefile| 11 +- src/fssum.c | 819

[PATCH v2 2/2] xfstests btrfs/316: test send / receive

2013-07-24 Thread Jan Schmidt
Basic send / receive functionality test for btrfs. Requires current version of fsstress built (-x support). Relies on fssum tool but can skip the test if it failed to build. Signed-off-by: Jan Schmidt list@jan-o-sch.net --- README |3 + tests/btrfs/316 | 113

Re: Fwd: Cloning a Btrfs partition

2013-07-29 Thread Jan Schmidt
Hi BJ, [original message rewrapped] On Thu, July 25, 2013 at 18:32 (+0200), BJ Quinn wrote: (Apologies for the double post -- forgot to send as plain text the first time around, so the list rejected it.) I see that there's now a btrfs send / receive and I've tried using it, but I'm getting

Re: [PATCH v3] Btrfs: fix crash regarding to ulist_add_merge

2013-07-29 Thread Jan Schmidt
-nodes[ulist-nnodes].aux = aux; Reviewed-by: Jan Schmidt list.bt...@jan-o-sch.net Josef, how about sending this one for the next 3.11 rc and to 3.10 stable? Any objections? -Jan -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord

Re: Cloning a Btrfs partition

2013-07-30 Thread Jan Schmidt
Liu Bo right he's going to send it to 3.10 stable soon. Thanks, -Jan Thanks! -BJ - Original Message - From: Jan Schmidt list.bt...@jan-o-sch.net Sent: Monday, July 29, 2013 3:21:51 AM Hi BJ, [original message rewrapped] On Thu, July 25, 2013 at 18:32 (+0200), BJ

Re: [PATCH v2] Btrfs: add missing error check to find_parent_nodes

2013-07-31 Thread Jan Schmidt
; } ret = ulist_add_merge(refs, ref-parent, (uintptr_t)ref-inode_list, The only ret 0 I'm seeing is ENOMEM, so that should be safe. Reviewed-by: Jan Schmidt list.bt...@jan-o-sch.net Thanks, -Jan -- To unsubscribe from this list: send

Re: [RFC PATCH v5 4/5] Btrfs: disable qgroups accounting when quota is off

2013-08-05 Thread Jan Schmidt
Nice try hiding this one in a dedup patch set, but I finally found it :-) On Wed, July 31, 2013 at 17:37 (+0200), Liu Bo wrote: So we don't need to do qgroups accounting trick without enabling quota. This reduces my tester's costing time from ~28s to ~23s. Signed-off-by: Liu Bo

Re: [RFC PATCH v5 4/5] Btrfs: disable qgroups accounting when quota is off

2013-08-05 Thread Jan Schmidt
On Mon, August 05, 2013 at 16:18 (+0200), Liu Bo wrote: On Mon, Aug 05, 2013 at 02:34:30PM +0200, Jan Schmidt wrote: Nice try hiding this one in a dedup patch set, but I finally found it :-) A, I didn't mean to ;-) On Wed, July 31, 2013 at 17:37 (+0200), Liu Bo wrote: So we don't

Re: [PATCH] Btrfs: stop using GFP_ATOMIC when allocating rewind ebs

2013-08-08 Thread Jan Schmidt
On Wed, August 07, 2013 at 23:11 (+0200), Josef Bacik wrote: There is no reason we can't just set the path to blocking and then do normal GFP_NOFS allocations for these extent buffers. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- fs/btrfs/ctree.c | 16

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

2013-08-08 Thread Jan Schmidt
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 better? Otherwise, Reviewed-by: Jan Schmidt list@jan-o-sch.net Thanks, -Jan -- To unsubscribe from this list: send the line unsubscribe linux-btrfs

Re: [PATCH] Btrfs: pass gfp_t to __add_prelim_ref() to avoid always using GFP_ATOMIC

2013-08-08 Thread Jan Schmidt
; } default: Reviewed-by: Jan Schmidt list.bt...@jan-o-sch.net Thanks, -Jan -- 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

[PATCH v3 2/2] xfstests btrfs/316: test send / receive

2013-08-08 Thread Jan Schmidt
Basic send / receive functionality test for btrfs. Requires current version of fsstress built (-x support). Relies on fssum tool but can skip the test if it failed to build. Signed-off-by: Jan Schmidt list@jan-o-sch.net Reviewed-by: Josef Bacik jba...@fusionio.com --- tests/btrfs/316

[PATCH v3 1/2] xfstests: add fssum tool

2013-08-08 Thread Jan Schmidt
will just be skipped if fssum wasn't built. Signed-off-by: Jan Schmidt list@jan-o-sch.net --- .gitignore|1 + common/config |2 + src/Makefile | 11 +- src/fssum.c | 819 + 4 files changed, 832 insertions(+), 1 deletions

[PATCH v3 0/2] xfstest btrfs/316: test send / receive

2013-08-08 Thread Jan Schmidt
fssum.c comes from as well. -- v1-v2: - included fssum - test number is now 316 (was 314) v2-v3: - added missing -lcrypto to build fssum - removed obsolete change in README now that fssum is included - fixed comment in test/btrfs/316's header (314 - 316) Jan Schmidt (2): xfstests: add fssum

Re: [PATCH 2/3] Btrfs: catch error return value from find_extent_in_eb()

2013-08-08 Thread Jan Schmidt
On Thu, August 08, 2013 at 12:24 (+0200), Filipe David Manana wrote: On Thu, Aug 8, 2013 at 6:04 AM, Wang Shilong wangsl.f...@cn.fujitsu.com wrote: find_extent_in_eb() may return ENOMEM, catch this error return value. Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com Reviewed-by:

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

2013-08-08 Thread Jan Schmidt
On Thu, August 08, 2013 at 07:04 (+0200), 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: stop using GFP_ATOMIC when allocating rewind ebs

2013-08-08 Thread Jan Schmidt
On Thu, August 08, 2013 at 15:12 (+0200), Josef Bacik wrote: On Thu, Aug 08, 2013 at 09:23:06AM +0200, Jan Schmidt wrote: On Wed, August 07, 2013 at 23:11 (+0200), Josef Bacik wrote: There is no reason we can't just set the path to blocking and then do normal GFP_NOFS allocations

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

2013-08-08 Thread Jan Schmidt
On Thu, August 08, 2013 at 16:28 (+0200), David Sterba wrote: 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

Re: [patch v2 1/2] Btrfs: fix possible memory leak in find_parent_nodes()

2013-08-09 Thread Jan Schmidt
On Fri, August 09, 2013 at 07:25 (+0200), Wang Shilong wrote: The origin code dealt with 'ref' as following steps: |-list_del(ref-list) |-some operations |-kfree(ref) If operations failed, it would goto label 'out' without freeing this 'ref'. and then memory

[PATCH v4 2/2] xfstests btrfs/316: test send / receive

2013-08-13 Thread Jan Schmidt
Basic send / receive functionality test for btrfs. Requires current version of fsstress built (-x support). Relies on fssum tool but can skip the test if it failed to build. Signed-off-by: Jan Schmidt list@jan-o-sch.net Reviewed-by: Josef Bacik jba...@fusionio.com --- tests/btrfs/316

[PATCH v4 0/2] xfstest btrfs/316: test send / receive

2013-08-13 Thread Jan Schmidt
- fixed comment in test/btrfs/316's header (314 - 316) v3-v4: - build fssum with help of autotools only if libssl is available - removed clumsy OPT_TARGETS in src/Makefile - added #define directives for SEEK_DATA and SEEK_HOLE to fssum.c Jan Schmidt (2): xfstests: add fssum tool xfstests btrfs/316

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

2013-09-27 Thread Jan Schmidt
-by: Jan Schmidt list@jan-o-sch.net -Jan -- 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 0/7] Btrfs: Progs modifications to introduce speed profiles and dedicated log devices

2011-02-01 Thread Jan Schmidt
support device classes. Thus, it is posible to dedicate a device to the log tree (e.g. a fast ssd), or decide another should hold metadata only. Fully configurable speed profiles can be the next step. Jan Schmidt (7): moved parse_size() to utils.c pulled current kernel version of ioctl.h check

[PATCH 2/7] pulled current kernel version of ioctl.h

2011-02-01 Thread Jan Schmidt
Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- ioctl.h | 53 - 1 files changed, 44 insertions(+), 9 deletions(-) diff --git a/ioctl.h b/ioctl.h index 776d7a9..b66cc29 100644 --- a/ioctl.h +++ b/ioctl.h @@ -23,13 +23,33 @@ #define

[PATCH 3/7] check open_ctree() right after it returned

2011-02-01 Thread Jan Schmidt
Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- mkfs.c | 10 ++ 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/mkfs.c b/mkfs.c index d1dd4a3..0a80d1c 100644 --- a/mkfs.c +++ b/mkfs.c @@ -430,7 +430,13 @@ int main(int ac, char **av) fprintf(stderr

[PATCH 7/7] made btrfs-vol compile. looks unused, so no speed class support here for now.

2011-02-01 Thread Jan Schmidt
Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- btrfs-vol.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/btrfs-vol.c b/btrfs-vol.c index 4ed799d..138c69c 100644 --- a/btrfs-vol.c +++ b/btrfs-vol.c @@ -143,7 +143,8 @@ int main(int ac, char **av

[PATCH v1 0/3] btrfs-progs: scrub interface

2011-03-12 Thread Jan Schmidt
sub-command has a short explanation of options when -h is used instead of a file system. Thanks, Jan Jan Schmidt (3): commands added scrub ioctls added scrub functionality Makefile |4 +- btrfs.c | 12 + btrfs_cmds.c |3 +- btrfs_cmds.h |4 + ctree.h |2

[PATCH v1 1/3] commands added

2011-03-12 Thread Jan Schmidt
- scrub commands added - open_file_or_dir no longer static (needed by scrub.c) Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- Makefile |4 ++-- btrfs.c | 12 btrfs_cmds.c |3 ++- btrfs_cmds.h |4 4 files changed, 20 insertions(+), 3 deletions

[PATCH v1 3/3] added scrub functionality

2011-03-12 Thread Jan Schmidt
is currently ineffective (read: does nothing useful). It was meant to protect against starting multiple scrubs on a filesystem simultaneously. However, to get consistent status files new files are created and renamed all the time. Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- scrub.c

Re: How to implement raid1 repair

2011-03-17 Thread Jan Schmidt
On 03/17/2011 06:09 PM, Andrey Kuzmin wrote: On Thu, Mar 17, 2011 at 5:46 PM, Jan Schmidt list.bt...@jan-o-sch.net mailto:list.bt...@jan-o-sch.net wrote: - Is it acceptable to retry reading a block immediately after the disk said it won't work? Or in case of a successful read followed

Re: How to implement raid1 repair

2011-03-17 Thread Jan Schmidt
On 03/17/2011 06:36 PM, Chris Mason wrote: Excerpts from Jan Schmidt's message of 2011-03-17 10:46:43 -0400: Hello everyone, Currently, btrfs has its own raid1 but no repair mechanism for bad checksums or EIOs. While trying to implement such a repair mechanism, several more or less general

Re: How to implement raid1 repair

2011-03-17 Thread Jan Schmidt
(snipped the parts already commented on in the other mails just sent) On 03/17/2011 06:19 PM, Josef Bacik wrote: On Thu, Mar 17, 2011 at 03:46:43PM +0100, Jan Schmidt wrote: If either of the answers is no, tracking where the initial read came from seems inevitable. Tracking would be very easy

[PATCH v2 0/5] btrfs-progs: scrub interface

2011-03-30 Thread Jan Schmidt
added Jan Schmidt (5): commands added scrub ioctls added check_mounted_where scrub userland implementation scrub added to manpage Makefile |4 +- btrfs.c| 18 +- btrfs_cmds.c |3 +- btrfs_cmds.h |5 + ctree.h|2 +- ioctl.h| 60

[PATCH v2 5/5] scrub added to manpage

2011-03-30 Thread Jan Schmidt
Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- man/btrfs.8.in | 66 +++- 1 files changed, 65 insertions(+), 1 deletions(-) diff --git a/man/btrfs.8.in b/man/btrfs.8.in index 26ef982..35aa44c 100644 --- a/man/btrfs.8.in +++ b/man

[PATCH v2 2/5] scrub ioctls

2011-03-30 Thread Jan Schmidt
- scrub structs added - ioctls for scrub - BTRFS_FSID_SIZE moved Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- ctree.h |2 +- ioctl.h | 60 +++- 2 files changed, 60 insertions(+), 2 deletions(-) diff --git a/ctree.h b

[PATCH v2 4/5] scrub userland implementation

2011-03-30 Thread Jan Schmidt
Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- scrub.c | 1568 +++ 1 files changed, 1568 insertions(+), 0 deletions(-) diff --git a/scrub.c b/scrub.c new file mode 100644 index 000..22052ed --- /dev/null +++ b/scrub.c

[PATCH v2 1/5] commands added

2011-03-30 Thread Jan Schmidt
- scrub commands added - open_file_or_dir no longer static (needed by scrub.c) Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- Makefile |4 ++-- btrfs.c | 18 +- btrfs_cmds.c |3 ++- btrfs_cmds.h |5 + 4 files changed, 26 insertions(+), 4

[PATCH] Btrfs: fix extent state leak on failed nodatasum reads

2011-05-04 Thread Jan Schmidt
: Objects remaining on kmem_cache_close() on rmmod. Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- fs/btrfs/inode.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 870869a..9444551 100644 --- a/fs/btrfs/inode.c +++ b/fs

Re: Backref walking utilities

2011-05-25 Thread Jan Schmidt
On 05/23/2011 12:02 PM, Arne Jansen wrote: Hi liubo, On 23.05.2011 11:53, liubo wrote: As one of my plans, I'm going to take this project over unless someone has been working on it. Jan Schmidt has a patch for scrub nearly ready, that does some ref-walking to report affected files

Re: [PATCH] Btrfs: fix extent state leak on failed nodatasum reads

2011-06-09 Thread Jan Schmidt
Hi Chris, On 04.05.2011 16:18, Jan Schmidt wrote: When encountering an EIO while reading from a nodatasum extent, we insert an error record into the inode's failure tree. btrfs_readpage_end_io_hook returns early for nodatasum inodes. We'd better clear the failure tree in that case, otherwise

[PATCH v1 0/6] Btrfs: scrub: print path to corrupted files and trigger nodatasum fixup

2011-06-13 Thread Jan Schmidt
in the first sentence is on correctly. The second feature mentioned in this patch series will then automatically use that code, too. -Jan Jan Schmidt (6): added helper functions to iterate backrefs scrub: added unverified_errors scrub: print paths of corrupted files scrub: bugfix: mirror_num off

[PATCH v1 1/6] added helper functions to iterate backrefs

2011-06-13 Thread Jan Schmidt
These helper functions iterate back references and call a function for each backref. There is also a function to resolve an inode to a path in the file system. Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- fs/btrfs/Makefile |3 +- fs/btrfs/backref.c | 461

[PATCH v1 3/6] scrub: print paths of corrupted files

2011-06-13 Thread Jan Schmidt
While scrubbing, we may encounter various errors. Previously, a logical address was printed to the log only. Now, all paths belonging to that address are resolved and printed separately. That should work for hardlinks as well as reflinks. Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net

[PATCH v1 5/6] add mirror_num to extent_read_full_page

2011-06-13 Thread Jan Schmidt
Currently, extent_read_full_page always assumes we are trying to read mirror 0, which generally is the best we can do. To add flexibility, pass it as a parameter. This will be needed by scrub fixup code. Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- fs/btrfs/disk-io.c |2 +- fs

[PATCH v1 4/6] scrub: bugfix: mirror_num off by one

2011-06-13 Thread Jan Schmidt
Fix the mirror_num determination in scrub_stripe. The rest of the scrub code did not use mirror_num for anything important and that error went unnoticed. The nodatasum fixup patch of this set depends on a correct mirror_num. Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- fs/btrfs

[PATCH v1 2/6] scrub: added unverified_errors

2011-06-13 Thread Jan Schmidt
carrying such conspicous events to the administrator should already be around. Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- fs/btrfs/scrub.c | 37 ++--- 1 files changed, 26 insertions(+), 11 deletions(-) diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c

[PATCH v1 6/6] scrub: add fixup code for errors on nodatasum files

2011-06-13 Thread Jan Schmidt
is expected to clear the newly introduced EXTENT_DAMAGED flag, making scrub report that error as corrected instead of uncorrectable eventually. Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- fs/btrfs/extent_io.h |1 + fs/btrfs/scrub.c | 174

Re: [PATCH v1 1/6] added helper functions to iterate backrefs

2011-06-18 Thread Jan Schmidt
Lots of quotation removed. All removed comments accepted. On 16.06.2011 23:24, David Sterba wrote: On Mon, Jun 13, 2011 at 09:10:34PM +0200, Jan Schmidt wrote: +/* + * this iterates to turn a btrfs_inode_ref into a full filesystem path. elements + * of the path are separated

Re: [PATCH v1 3/6] scrub: print paths of corrupted files

2011-06-18 Thread Jan Schmidt
Lots of quotation removed. All removed comments accepted. On 16.06.2011 23:26, David Sterba wrote: On Mon, Jun 13, 2011 at 09:10:36PM +0200, Jan Schmidt wrote: +struct scrub_warning { +struct btrfs_path *path; +u64 extent_item_size; +char

Re: [PATCH v1 6/6] scrub: add fixup code for errors on nodatasum files

2011-06-18 Thread Jan Schmidt
Lots of quotation removed. All removed comments accepted. On 16.06.2011 23:27, David Sterba wrote: On Mon, Jun 13, 2011 at 09:10:39PM +0200, Jan Schmidt wrote: +struct scrub_fixup_nodatasum { +struct scrub_dev*sdev; +u64 logical; +struct btrfs_root

[PATCH v2 7/7] scrub: add fixup code for errors on nodatasum files

2011-06-18 Thread Jan Schmidt
is expected to clear the newly introduced EXTENT_DAMAGED flag, making scrub report that error as corrected instead of uncorrectable eventually. Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- fs/btrfs/extent_io.h |1 + fs/btrfs/scrub.c | 185

[PATCH v2 6/7] scrub: use int for mirror_num, not u64

2011-06-18 Thread Jan Schmidt
the rest of the code uses int mirror_num, and so should scrub Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- fs/btrfs/scrub.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index 519bf4b..de918ff 100644 --- a/fs/btrfs

[PATCH v2 5/7] add mirror_num to extent_read_full_page

2011-06-18 Thread Jan Schmidt
Currently, extent_read_full_page always assumes we are trying to read mirror 0, which generally is the best we can do. To add flexibility, pass it as a parameter. This will be needed by scrub fixup code. Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- fs/btrfs/disk-io.c |2 +- fs

[PATCH v2 2/7] scrub: added unverified_errors

2011-06-18 Thread Jan Schmidt
carrying such conspicous events to the administrator should already be around. Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- fs/btrfs/scrub.c | 37 ++--- 1 files changed, 26 insertions(+), 11 deletions(-) diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c

[PATCH v2 4/7] scrub: bugfix: mirror_num off by one

2011-06-18 Thread Jan Schmidt
Fix the mirror_num determination in scrub_stripe. The rest of the scrub code did not use mirror_num for anything important and that error went unnoticed. The nodatasum fixup patch of this set depends on a correct mirror_num. Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- fs/btrfs

[PATCH v2 1/7] added helper functions to iterate backrefs

2011-06-18 Thread Jan Schmidt
These helper functions iterate back references and call a function for each backref. There is also a function to resolve an inode to a path in the file system. Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- fs/btrfs/Makefile |3 +- fs/btrfs/backref.c | 445

[PATCH v2 3/7] scrub: print paths of corrupted files

2011-06-18 Thread Jan Schmidt
While scrubbing, we may encounter various errors. Previously, a logical address was printed to the log only. Now, all paths belonging to that address are resolved and printed separately. That should work for hardlinks as well as reflinks. Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net

[PATCH v2 0/7] Btrfs: scrub: print path to corrupted files and trigger nodatasum fixup

2011-06-18 Thread Jan Schmidt
in the first sentence is on correctly. The second feature mentioned in this patch series will then automatically use that code, too. Changelog v1-v2: - Various cleanup, sensible error codes as suggested by David Sterba -Jan Jan Schmidt (7): added helper functions to iterate backrefs scrub: added

Re: [PATCH v2 1/7] added helper functions to iterate backrefs

2011-06-21 Thread Jan Schmidt
On 21.06.2011 16:37, David Sterba wrote: On Sat, Jun 18, 2011 at 01:45:58PM +0200, Jan Schmidt wrote: +/* + * returns 0 if the path could be dumped (probably truncated) + * returns 0 in case of an error + */ +static int inode_to_path(u64 inum, struct btrfs_inode_ref *iref

Re: [PATCH v2 1/7] added helper functions to iterate backrefs

2011-06-23 Thread Jan Schmidt
On 21.06.2011 17:12, Jan Schmidt wrote: On 21.06.2011 16:37, David Sterba wrote: [...] Something is going wrong here: Example: ipath buffer and scratch are 32K, each, ie. the overly sized ref_name_len will fit there: [ 8766.928232] btrfs: ino2name: 266 p1/ [ 8767.440964] i2p: [4

[BUG] delayed inodes and reflinks

2011-07-05 Thread Jan Schmidt
Hi, I hit this bug an hour ago while executing some cp --reflink: Jul 5 13:54:02 oglaroon kernel: [ 2654.545244] [ cut here ] Jul 5 13:54:02 oglaroon kernel: [ 2654.600508] kernel BUG at fs/btrfs/delayed-inode.c:1637! Jul 5 13:54:02 oglaroon kernel: [ 2654.664052]

[PATCH v3 5/8] add mirror_num to extent_read_full_page

2011-07-07 Thread Jan Schmidt
Currently, extent_read_full_page always assumes we are trying to read mirror 0, which generally is the best we can do. To add flexibility, pass it as a parameter. This will be needed by scrub fixup code. Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- fs/btrfs/disk-io.c |2 +- fs

[PATCH v3 6/8] scrub: use int for mirror_num, not u64

2011-07-07 Thread Jan Schmidt
the rest of the code uses int mirror_num, and so should scrub Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- fs/btrfs/scrub.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index 15fed35..12c08c0 100644 --- a/fs/btrfs

[PATCH v3 8/8] new ioctls to do logical-inode and inode-path resolving

2011-07-07 Thread Jan Schmidt
these ioctls make use of the new functions initially added for scrub. they return all inodes belonging to a logical address (BTRFS_IOC_LOGICAL_INO) and all paths belonging to an inode (BTRFS_IOC_INO_PATHS). Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- fs/btrfs/ioctl.c | 134

[PATCH v3 1/8] added helper functions to iterate backrefs

2011-07-07 Thread Jan Schmidt
These helper functions iterate back references and call a function for each backref. There is also a function to resolve an inode to a path in the file system. Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- fs/btrfs/Makefile |3 +- fs/btrfs/backref.c | 748

[PATCH v3 0/8] Btrfs: scrub: print path to corrupted files and trigger nodatasum fixup

2011-07-07 Thread Jan Schmidt
Jan Schmidt (8): added helper functions to iterate backrefs scrub: added unverified_errors scrub: print paths of corrupted files scrub: bugfix: mirror_num off by one add mirror_num to extent_read_full_page scrub: use int for mirror_num, not u64 scrub: add fixup code for errors

[PATCH v1 0/2] Btrfs-progs: commands resolve inode and resolve logical

2011-07-07 Thread Jan Schmidt
instead -- These patches are based on Hugo's current integration branch. Please try them out and report bugs here. I'll send an update to the manpages later. -Jan Jan Schmidt (2): btrfs-list: split list_subvols added ioctls and commands to resolve inodes and logical addresses btrfs-list.c

[PATCH v1 2/2] added ioctls and commands to resolve inodes and logical addresses

2011-07-07 Thread Jan Schmidt
two new commands that make use of the new path resolving functions implemented for scrub, doing the resolving in-kernel. the result for both commands is a list of files belonging to that inode / logical address. Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- btrfs-list.c | 35

[PATCH] Btrfs-progs: bugfix: bail out when check_mounted_where returns an error

2011-07-07 Thread Jan Schmidt
Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- scrub.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/scrub.c b/scrub.c index 22052ed..8270431 100644 --- a/scrub.c +++ b/scrub.c @@ -942,6 +942,8 @@ static int scrub_fs_info(int fd, char *path

Re: [PATCH v3 8/8] new ioctls to do logical-inode and inode-path resolving

2011-07-07 Thread Jan Schmidt
Hi, On 07/08/2011 12:29 AM, Hugo Mills wrote: Hi, Jan, On Thu, Jul 07, 2011 at 05:48:33PM +0200, Jan Schmidt wrote: these ioctls make use of the new functions initially added for scrub. they return all inodes belonging to a logical address (BTRFS_IOC_LOGICAL_INO) and all paths belonging

Re: [PATCH v1 0/2] Btrfs-progs: commands resolve inode and resolve logical

2011-07-08 Thread Jan Schmidt
On 08.07.2011 01:19, Goffredo Baroncelli wrote: On 07/07/2011 06:01 PM, Jan Schmidt wrote: The kernel patch series just sent (Subject: Btrfs: scrub: print path to corrupted files and trigger nodatasum fixup) introduces two new ioctls to do in-kernel filesystem path construction. This series

Re: [PATCH v2 4/5] scrub userland implementation

2011-07-11 Thread Jan Schmidt
on reviewing the revised version). Things I ripped out are accepted and corrected without resistance. Comments follow. On Wed, Mar 30, 2011 at 06:53:12PM +0200, Jan Schmidt wrote: No commit message at all? Didn't know what to put there. Cover letter says it all. And as mentioned

Re: [PATCH 2/2] add detailed help messages to btrfs command

2011-07-11 Thread Jan Schmidt
Hi Hubert, I have to admit I did not recognize this patch but now Hugo is forcing me to use the detailed help messages and I've got an improvement to suggest: On 23.01.2011 13:42, Hubert Kario wrote: extend the btrfs cmd --help command to print detailed help message if available

[PATCH v2 2/3] Btrfs-progs: added ioctls and commands to resolve inodes and logical addrs

2011-07-11 Thread Jan Schmidt
two new commands that make use of the new path resolving functions implemented for scrub, doing the resolving in-kernel. the result for both commands is a list of files belonging to that inode / logical address. Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- btrfs-list.c | 35

[PATCH v2 3/3] Btrfs-progs: added resolve commands to man page

2011-07-11 Thread Jan Schmidt
Added inspect-internal inode-resolve and inspect-internal logical-resolve to the btrfs(8) man page. Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- man/btrfs.8.in | 29 + 1 files changed, 29 insertions(+), 0 deletions(-) diff --git a/man/btrfs.8.in b/man

[PATCH v2 0/3] Btrfs-progs: add the first inspect-internal commands

2011-07-11 Thread Jan Schmidt
current integration branch. Please try them out and report bugs here. -Jan Jan Schmidt (3): Btrfs-progs: btrfs-list: split list_subvols Btrfs-progs: added ioctls and commands to resolve inodes and logical addrs Btrfs-progs: added resolve commands to man page btrfs-list.c | 139

Re: [PATCH 2/2] add detailed help messages to btrfs command

2011-07-11 Thread Jan Schmidt
On 07/11/2011 08:38 PM, Goffredo Baroncelli wrote: what about generating the man page on the basis of the btrfs help detailed messages ? My idea is the following: before the function source associated to the command we can put a comment with a detailed help. The comment may be: [...]

Re: [PATCH v2 4/5] scrub userland implementation

2011-07-12 Thread Jan Schmidt
On 11.07.2011 22:45, Hugo Mills wrote: OK, here's the remainder of my comments for this file. Not much for this bit -- just one comment about locking, a reminder, and an observation. Again, I ripped out the bits I simply corrected. My comments below. [...] +static int

Re: [PATCH v2 4/5] scrub userland implementation

2011-07-12 Thread Jan Schmidt
On 11.07.2011 22:57, Hugo Mills wrote: On Mon, Jul 11, 2011 at 04:29:24PM +0200, Jan Schmidt wrote: On 10.07.2011 20:23, Hugo Mills wrote: Yes, this is over three months after the initial posting, but since nobody else has looked at it yet, and the patch is in my integration stack

Re: Mis-Design of Btrfs?

2011-07-14 Thread Jan Schmidt
Hi Neil, On 14.07.2011 08:38, NeilBrown wrote: I imagine a new field in 'struct bio' which was normally zero but could be some small integer. It is only meaningful for read. When 0 it means get this data way you like. When non-zero it means get this data using method N, where the different

Re: Broken btrfs?

2011-07-18 Thread Jan Schmidt
On 17.07.2011 16:01, Jan Schubert wrote: Jan Schubert jan.schubert at gmx.li writes: Please find some data and log below. Is there any chance to fix this? After playing around (incl. deleting the log) I get the strong feeling it has something todo with compression=lzo. Dunno why it started

[PATCH v3 0/5] btrfs-progs: scrub interface

2011-07-18 Thread Jan Schmidt
a fresh version. Therefore, I used integration-20110705 from http://git.darksatanic.net/repo/btrfs-progs-unstable.git/ as a base, reverted the scrub patches in the middle and built upon that. -Jan Jan Schmidt (5): btrfs-progs: commands added btrfs-progs: scrub

[PATCH v3 1/5] btrfs-progs: commands added

2011-07-18 Thread Jan Schmidt
- scrub commands added - open_file_or_dir no longer static (needed by scrub.c) Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- Makefile |4 ++-- btrfs.c | 23 +++ btrfs_cmds.c |2 +- btrfs_cmds.h |5 + 4 files changed, 31 insertions(+), 3

  1   2   3   4   5   6   >