[2.6.29-rc2] insert_dir_item hitting assertion during log replay

2011-04-10 Thread Daniel J Blueman
When rebooting from a crash, thus during log replay on 2.6.29-rc2, btrfs_insert_dir_item caused an assertion failure [1]. The fs was being mounted clear_cache on an SSD. Probably it's not so easy to reproduce, but better to report it... --- [1] kernel BUG at fs/btrfs/inode.c:4665! invalid

btrfs does not work on usermode linux

2011-04-10 Thread Sergei Trofimovich
According to https://btrfs.wiki.kernel.org/index.php/Debugging_Btrfs_with_GDB UML did work once. Now it corrupts data and triggers BUG_ON once you start to use it. I tried both 2.6.38 and 2.6.39-rc2 (x86_64) I need some help to track it down. doing 'touch `seq 1 11`; rm 11' kills the kernel:

Re: btrfs does not work on usermode linux

2011-04-10 Thread Sergei Trofimovich
On Sun, 10 Apr 2011 13:37:10 +0300 Sergei Trofimovich sly...@gmail.com wrote: According to https://btrfs.wiki.kernel.org/index.php/Debugging_Btrfs_with_GDB UML did work once. Now it corrupts data and triggers BUG_ON once you start to use it. I tried both 2.6.38 and 2.6.39-rc2 (x86_64) I

Re: btrfs does not work on usermode linux

2011-04-10 Thread Sergei Trofimovich
According to https://btrfs.wiki.kernel.org/index.php/Debugging_Btrfs_with_GDB UML did work once. Now it corrupts data and triggers BUG_ON once you start to use it. I tried both 2.6.38 and 2.6.39-rc2 (x86_64) I need some help to track it down. doing 'touch `seq 1 11`; rm 11'

[PATCH v2] Re: btrfs does not work on usermode linux

2011-04-10 Thread Sergei Trofimovich
On Sun, 10 Apr 2011 23:24:03 +0300 Sergei Trofimovich sly...@gmail.com wrote: Fix data corruption caused by memcpy() usage on overlapping data. I've observed it first when found out usermode linux crash on btrfs. Changes since v1: else src_kaddr = dst_kaddr; +

[PATCH v5 6/8] btrfs: Balance filter for virtual address ranges

2011-04-10 Thread Hugo Mills
Allow the balancing of chunks where some part of the chunk lies within the virtual (i.e. btrfs-internal) address range passed. Signed-off-by: Hugo Mills h...@carfax.org.uk --- fs/btrfs/ioctl.h |9 +++-- fs/btrfs/volumes.c |6 ++ 2 files changed, 13 insertions(+), 2 deletions(-)

[PATCH v5 8/8] btrfs: Balance filter for physical device address

2011-04-10 Thread Hugo Mills
Add a filter for balancing which allows the selection of chunks with data in the given byte range on any block device in the filesystem. On its own, this filter is of little use, but when used with the devid filter, it can be used to rebalance all chunks which lie on a part of a specific device.

[PATCH v5 0/8] Balance mangement

2011-04-10 Thread Hugo Mills
Hi, Chris, Another iteration of the balance management patches. This includes suggestions from David Sterba, who did a fairly comprehensive review of the patch series on IRC. It also includes fixes for comments from Josef, and Li Zefan. The only thing I've not included here is Li's

[PATCH v5 3/8] btrfs: Factor out enumeration of chunks to a separate function

2011-04-10 Thread Hugo Mills
The main balance function has two loops which are functionally identical in their looping mechanism, but which perform a different operation on the chunks they loop over. To avoid repeating code more than necessary, factor this loop out into a separate iterator function which takes a function

[PATCH v5 4/8] btrfs: Implement filtered balance ioctl

2011-04-10 Thread Hugo Mills
The filtered balance ioctl provides a facility to perform a balance operation on a subset of the chunks in the filesystem. This patch implements the base ioctl for this operation, and one filter type. The filter in this patch selects chunks on the basis of their chunk flags field, and can select

[PATCH v5 5/8] btrfs: Balance filter for device ID

2011-04-10 Thread Hugo Mills
Balance filter to take only chunks which have (or had) a stripe on the given device. Useful if a device has been forcibly removed from the filesystem, and the data from that device needs rebuilding. Signed-off-by: Hugo Mills h...@carfax.org.uk --- fs/btrfs/ioctl.h |8 ++--

[PATCH v5 7/8] btrfs: Replication-type information

2011-04-10 Thread Hugo Mills
There are a few places in btrfs where knowledge of the various parameters of a replication type is needed. Factor this out into a single function which can supply all the relevant information. Signed-off-by: Hugo Mills h...@carfax.org.uk --- fs/btrfs/super.c | 16 +++- fs/btrfs/volumes.c

[PATCH v5 1/8] btrfs: Balance progress monitoring

2011-04-10 Thread Hugo Mills
This patch introduces a basic form of progress monitoring for balance operations, by counting the number of block groups remaining. The information is exposed to userspace by an ioctl. Signed-off-by: Hugo Mills h...@carfax.org.uk --- fs/btrfs/ctree.h |9 fs/btrfs/disk-io.c |2

[PATCH v5 2/8] btrfs: Cancel filesystem balance

2011-04-10 Thread Hugo Mills
This patch adds an ioctl for cancelling a btrfs balance operation mid-flight. The ioctl simply sets a flag, and the operation terminates after the current block group move has completed. Signed-off-by: Hugo Mills h...@carfax.org.uk --- fs/btrfs/ctree.h |1 + fs/btrfs/ioctl.c | 28

Required Kernel version to compile git btrfs with DKMS? Problems with Ubuntu 10.10

2011-04-10 Thread Christian Aßfalg
Hi all, I'd like to look into btrfs code and try some things, so I followed the instructions on the wiki (link below) to setup git and get a dkms build against my kernel. I'm using Ubuntu 10.10 with a 2.6.35 Kernel, which I assume is too old. What version do I need?

[PATCH v5 0/8] Balance management, userspace

2011-04-10 Thread Hugo Mills
Hi, Chris, These patches form the userspace side of the balance management work. This includes two patches to add one-off and polled monitoring, a fork-to-background patch, and a sequence implementing the user interface to handle the various types of balance filtering implemented in the

[PATCH v5 3/8] User-space tool for cancelling balance operations.

2011-04-10 Thread Hugo Mills
Add an option to the btrfs tool to use the ioctl for cancelling balance operations. Signed-off-by: Hugo Mills h...@carfax.org.uk --- btrfs.c|4 btrfs_cmds.c | 41 + btrfs_cmds.h |1 + ioctl.h|1 + man/btrfs.8.in |

[PATCH v5 1/8] Balance progress monitoring.

2011-04-10 Thread Hugo Mills
This patch introduces a basic form of progress monitoring for balance operations, by counting the number of block groups remaining. The information is exposed to userspace by an ioctl. We also add btrfs balance start as an alias for btrfs filesystem balance, so that all balance-related functions

[PATCH v5 2/8] Add --monitor option to btrfs balance progress.

2011-04-10 Thread Hugo Mills
For the impatient, this patch introduces the pot-watching --monitor option, which checks the balance progress at regular intervals, and updates a single status line with the current progress and an estimated completion time. Signed-off-by: Hugo Mills h...@carfax.org.uk --- btrfs_cmds.c | 102

[PATCH v5 5/8] Initial implementation of userspace interface for filtered balancing.

2011-04-10 Thread Hugo Mills
It is useful to be able to balance a subset of the full filesystem. This patch implements the infrastructure for filtering block groups on different criteria when balancing the filesystem. Signed-off-by: Hugo Mills h...@carfax.org.uk --- btrfs.c|4 +- btrfs_cmds.c | 169

[PATCH v5 4/8] Run userspace tool in background for balances.

2011-04-10 Thread Hugo Mills
This patch makes a balance operation fork and detach from the current terminal, to run the userspace side of the balance in the background. Introduce a --wait switch so that a synchronous balance can be done if the user requires. Signed-off-by: Hugo Mills h...@carfax.org.uk --- btrfs.c|

[PATCH v5 7/8] Balance filter for virtual address range

2011-04-10 Thread Hugo Mills
Implement the userspace side of the virtual address range filter. Signed-off-by: Hugo Mills h...@carfax.org.uk --- btrfs_cmds.c | 22 ++ ioctl.h|9 +++-- man/btrfs.8.in |9 + 3 files changed, 38 insertions(+), 2 deletions(-) diff --git

[PATCH v5 8/8] Interface for device range balance filter

2011-04-10 Thread Hugo Mills
Implement the userspace side of the balance filter for a range of bytes on any device. Note that this will match the same range on any device, so the use of the devid filter is recommended where this filter is used. Signed-off-by: Hugo Mills h...@carfax.org.uk --- btrfs_cmds.c | 22

[PATCH v5 6/8] Balance filter by device ID

2011-04-10 Thread Hugo Mills
Add the userspace implementation for filtering balances by device ID. Signed-off-by: Hugo Mills h...@carfax.org.uk --- btrfs_cmds.c | 13 + ioctl.h|8 ++-- man/btrfs.8.in |7 +++ 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/btrfs_cmds.c

Re: [PATCH v5 3/8] btrfs: Factor out enumeration of chunks to a separate function

2011-04-10 Thread David Sterba
On Sun, Apr 10, 2011 at 10:06:06PM +0100, Hugo Mills wrote: diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index cf019af..20c2772 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -2029,6 +2029,97 @@ static u64 div_factor(u64 num, int factor) +static void

Re: [PATCH] Btrfs: fix memory leaks in btrfs_new_inode()

2011-04-10 Thread Li Zefan
Yoshinori Sano wrote: This patch fixes memory leaks in btrfs_new_inode(). Signed-off-by: Yoshinori Sano yoshinori.s...@gmail.com --- fs/btrfs/inode.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index aa116dc..d8c93c1

Re: [PATCH] Btrfs: cleanup btrfs_alloc_path()'s caller code

2011-04-10 Thread Tsutomu Itoh
(2011/04/09 11:23), Yoshinori Sano wrote: This patch checks return value of btrfs_alloc_path() and removes BUG_ON(). Signed-off-by: Yoshinori Sano yoshinori.s...@gmail.com --- fs/btrfs/dir-item.c|2 ++ fs/btrfs/extent-tree.c | 12 fs/btrfs/file-item.c |6

Re: [PATCH v5 1/8] btrfs: Balance progress monitoring

2011-04-10 Thread Helmut Hullen
Hallo, Hugo, Du meintest am 10.04.11: This patch introduces a basic form of progress monitoring for balance operations, by counting the number of block groups remaining. The information is exposed to userspace by an ioctl. Just for curiosity: If I remember correct then btrfs device delete

Re: [PATCH v5 4/8] Run userspace tool in background for balances.

2011-04-10 Thread Helmut Hullen
Hallo, Hugo, Du meintest am 10.04.11: This patch makes a balance operation fork and detach from the current terminal, to run the userspace side of the balance in the background. Fine! Viele Gruesse! Helmut -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of