Re: [PATCH v4] btrfs: Fix memory leakage in the tree-log.c

2013-10-10 Thread Stefan Behrens
On Wed, 9 Oct 2013 23:01:35 -0300, Geyslan G. Bem wrote: When 'dir' is NULL, after calling extref_get_fields(), add_inode_ref() can be returning without freeing the 'name' pointer. Added kfree when necessary. Signed-off-by: Geyslan G. Bem geys...@gmail.com --- fs/btrfs/tree-log.c | 5

Re: BUG relating to fstrim on btrfs partitions

2013-10-10 Thread Duncan
Mike Audia posted on Thu, 10 Oct 2013 06:20:42 -0400 as excerpted: I think I found a bug affecting btrfs filesystems and users invoking fstrim to discard unused blocks: if I execute a `fstrim -v /` twice, the amount trimmed does not change on the 2nd invocation AND it takes just as long as

[PATCH] Btrfs: nuke a bogus rw_devices decrement in __btrfs_close_devices

2013-10-10 Thread Ilya Dryomov
On mount failures, __btrfs_close_devices can be called well before dev-replace state is read and -is_tgtdev_for_dev_replace is set. This leads to a bogus decrement of -rw_devices and sets off a WARN_ON in __btrfs_close_devices if replace target device happens to be on the lists and we fail early

[PATCH] Btrfs: don't leak ioctl args in btrfs_ioctl_dev_replace

2013-10-10 Thread Ilya Dryomov
struct btrfs_ioctl_dev_replace_args memory is leaked if replace is requested on a read-only filesystem. Fix it. Signed-off-by: Ilya Dryomov idryo...@gmail.com --- fs/btrfs/ioctl.c |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c

[PATCH] Btrfs: disallow 'btrfs {balance,replace} cancel' on ro mounts

2013-10-10 Thread Ilya Dryomov
For both balance and replace, cancelling involves changing the on-disk state and committing a transaction, which is not a good thing to do on read-only filesystems. Cc: Stefan Behrens sbehr...@giantdisaster.de Signed-off-by: Ilya Dryomov idryo...@gmail.com --- fs/btrfs/dev-replace.c |3 +++

Will btrfs scrub clear corrupt filesystem trees?

2013-10-10 Thread Martin
I have 1.5TB of data on a single disk formatted with defaults. There appears to be only two directory trees of a few MBytes that have suffered corruption (due to in the past too high a sata speed causing corruption). The filesystem mounts fine. But how to clear out the corrupt trees? At the

Re: Will btrfs scrub clear corrupt filesystem trees?

2013-10-10 Thread Chris Murphy
On Oct 10, 2013, at 12:27 PM, Martin m_bt...@ml1.co.uk wrote: I have 1.5TB of data on a single disk formatted with defaults. There appears to be only two directory trees of a few MBytes that have suffered corruption (due to in the past too high a sata speed causing corruption). The

Re: Handful of btrfs fixes for 3.11.x stable

2013-10-10 Thread Greg KH
On Mon, Oct 07, 2013 at 04:34:43PM -0400, Josef Bacik wrote: On Sat, Oct 05, 2013 at 04:52:18PM -0700, Greg KH wrote: On Fri, Sep 20, 2013 at 09:53:02AM -0700, Greg KH wrote: On Fri, Sep 20, 2013 at 06:34:39PM +0200, David Sterba wrote: Hi stable team, please add the following

[PATCH] Btrfs: add tests for find_lock_delalloc_range

2013-10-10 Thread Josef Bacik
So both Liu and I made huge messes of find_lock_delalloc_range trying to fix stuff, me first by fixing extent size, then him by fixing something I broke and then me again telling him to fix it a different way. So this is obviously a candidate for some testing. This patch adds a pseudo fs so we

Re: [PATCH] Btrfs: disallow 'btrfs {balance,replace} cancel' on ro mounts

2013-10-10 Thread Wang Shilong
On 10/11/2013 01:40 AM, Ilya Dryomov wrote: I have a question in my mind. Can we reach a state that there is operation in progress when filesystem has been readonly?If we do cancel operations on a ro filesystem, we should get No operations in progress . Thanks, Wang For both balance and

Re: [PATCH] Btrfs: add tests for find_lock_delalloc_range

2013-10-10 Thread Liu Bo
On Thu, Oct 10, 2013 at 09:02:57PM -0400, Josef Bacik wrote: So both Liu and I made huge messes of find_lock_delalloc_range trying to fix stuff, me first by fixing extent size, then him by fixing something I broke and then me again telling him to fix it a different way. So this is obviously