Re: How to remount btrfs without compression?

2011-11-09 Thread Dmitry Olenin
On 11/09/2011 04:48 PM, Lubos Kolouch wrote: Sorry for possibly OT question - when I have historical btrfs system mounted with zlib compression, can I remount it with lzo ? What will happen? Will the COW be broken and the files taking duplicate space? Or will the Universe explode and be

Re: How to remount btrfs without compression?

2011-11-09 Thread Fajar A. Nugraha
On Wed, Nov 9, 2011 at 2:48 PM, Lubos Kolouch lubos.kolo...@gmail.com wrote: Sorry for possibly OT question - when I have historical btrfs system mounted with zlib compression, can I remount it with lzo ? yes What will happen? Will the COW be broken and the files taking duplicate space? Or

Re: [PATCH v2 0/3] xfstests: Add a group of reservation space test

2011-11-09 Thread Christoph Hellwig
On Tue, Nov 08, 2011 at 11:38:41AM +0800, WuBo wrote: Changes v1-v2: - Make test-set support generic This patch set add a group of reservation space test. Especailly for btrfs. It includes three parts: copy workload, prealloc and write posix. For test 273, I hope it's usefull for Josef's

Re: [GIT PULL] Btrfs pull request

2011-11-09 Thread Christoph Hellwig
On Wed, Nov 09, 2011 at 10:06:55AM +0100, Arne Jansen wrote: That's... unexpected. I guess this won't change with 3.3? For 3.3 I have to rework that part from scrub to account for Chris' bigblocks. If it can wait that long I'd prefer to fix both at once. Chris? device mapper has always been

Re: [GIT PULL] Btrfs pull request

2011-11-09 Thread Jan Schmidt
Am 09.11.2011 08:48, schrieb Christoph Hellwig: On Tue, Nov 08, 2011 at 08:07:01PM -0500, Chris Mason wrote: Looks like bio_add_page() is failing and we're getting the enomem from there. LVM is only letting us put one page in each bio. Yes, at the moment all bio based DM targets only allow

Re: [GIT PULL] Btrfs pull request

2011-11-09 Thread Christoph Hellwig
On Wed, Nov 09, 2011 at 11:29:31AM +0100, Jan Schmidt wrote: Am 09.11.2011 08:48, schrieb Christoph Hellwig: On Tue, Nov 08, 2011 at 08:07:01PM -0500, Chris Mason wrote: Looks like bio_add_page() is failing and we're getting the enomem from there. LVM is only letting us put one page in each

Re: [GIT PULL] Btrfs pull request

2011-11-09 Thread Jan Schmidt
On 09.11.2011 11:29, Jan Schmidt wrote: grep bio_add_page fs/btrfs/*.c will make you unhappy. Phew. Actually, not that unhappy. Many of the lines seeming to have no return value check are in fact part of a long or-ed if-statement. Seems okay after a closer look. -Jan -- To unsubscribe from

WARNING: at fs/btrfs/inode.c:2198 btrfs_orphan_commit_root+0xa8/0xc0

2011-11-09 Thread Stefan Kleijkers
Hello, I'm seeing a lot of warnings in dmesg with a BTRFS filesystem. I'm using the 3.1 kernel, I found a patch for these warnings ( http://marc.info/?l=linux-btrfsm=131547325515336w=2) http://marc.info/?l=linux-btrfsm=131547325515336w=2, but that patch has already been included in 3.1. Are

Re: [GIT PULL] Btrfs pull request

2011-11-09 Thread Chris Mason
On Wed, Nov 09, 2011 at 10:06:55AM +0100, Arne Jansen wrote: On 09.11.2011 08:48, Christoph Hellwig wrote: On Tue, Nov 08, 2011 at 08:07:01PM -0500, Chris Mason wrote: Looks like bio_add_page() is failing and we're getting the enomem from there. LVM is only letting us put one page in each

Re: [GIT PULL] Btrfs pull request

2011-11-09 Thread Chris Mason
On Wed, Nov 09, 2011 at 11:29:31AM +0100, Jan Schmidt wrote: Am 09.11.2011 08:48, schrieb Christoph Hellwig: On Tue, Nov 08, 2011 at 08:07:01PM -0500, Chris Mason wrote: Looks like bio_add_page() is failing and we're getting the enomem from there. LVM is only letting us put one page in each

Re: Grow btrfs partition filesystem backwards

2011-11-09 Thread Billy Crook
I think the biggest point of contention is that with all the stuff going on in the background in btrfs, its difficult to be sure that the resize operation has completed. With grows, you don't have to worry. With shrinks, if you truncate the block device too soon, you will corrupt the filesystem.

Re: How to remount btrfs without compression?

2011-11-09 Thread Chris Mason
On Wed, Nov 09, 2011 at 03:04:01PM +0700, Fajar A. Nugraha wrote: On Wed, Nov 9, 2011 at 2:48 PM, Lubos Kolouch lubos.kolo...@gmail.com wrote: Sorry for possibly OT question - when I have historical btrfs system mounted with zlib compression, can I remount it with lzo ? yes What

Re: WARNING: at fs/btrfs/inode.c:2198 btrfs_orphan_commit_root+0xa8/0xc0

2011-11-09 Thread Christian Brunner
2011/11/9 Stefan Kleijkers ste...@unilogicnetworks.net: Hello, I'm seeing a lot of warnings in dmesg with a BTRFS filesystem. I'm using the 3.1 kernel, I found a patch for these warnings ( http://marc.info/?l=linux-btrfsm=131547325515336w=2)

Re: corrupted btrfs after suspend2ram uncorrectable with scrub

2011-11-09 Thread Gustavo Sverzut Barbieri
On Tue, Nov 8, 2011 at 3:20 PM, Chris Mason chris.ma...@oracle.com wrote: On Tue, Nov 08, 2011 at 03:08:41PM -0200, Gustavo Sverzut Barbieri wrote: On Tue, Nov 1, 2011 at 9:20 PM, Gustavo Sverzut Barbieri barbi...@gmail.com wrote: On Tue, Nov 1, 2011 at 7:57 PM, Alexandre Oliva

Re: corrupted btrfs after suspend2ram uncorrectable with scrub

2011-11-09 Thread Chris Mason
On Wed, Nov 09, 2011 at 12:19:58PM -0200, Gustavo Sverzut Barbieri wrote: On Tue, Nov 8, 2011 at 3:20 PM, Chris Mason chris.ma...@oracle.com wrote: On Tue, Nov 08, 2011 at 03:08:41PM -0200, Gustavo Sverzut Barbieri wrote: On Tue, Nov 1, 2011 at 9:20 PM, Gustavo Sverzut Barbieri

Re: corrupted btrfs after suspend2ram uncorrectable with scrub

2011-11-09 Thread Gustavo Sverzut Barbieri
On Wed, Nov 9, 2011 at 12:27 PM, Chris Mason chris.ma...@oracle.com wrote: On Wed, Nov 09, 2011 at 12:19:58PM -0200, Gustavo Sverzut Barbieri wrote: On Tue, Nov 8, 2011 at 3:20 PM, Chris Mason chris.ma...@oracle.com wrote: On Tue, Nov 08, 2011 at 03:08:41PM -0200, Gustavo Sverzut Barbieri

[PATCH 0/5] Btrfs: mount error handling fixes

2011-11-09 Thread Ilya Dryomov
A bunch of fixes (memory leaks, NULL pointer dereferences and devices hanging in busy state) to sanitize error handling during mount sequence. This is on top of for-linus + slyfox's double-free fix. Thanks, Ilya Ilya Dryomov (5): Btrfs: fix memory leak in

[PATCH 1/5] Btrfs: fix memory leak in btrfs_parse_early_options()

2011-11-09 Thread Ilya Dryomov
Don't leak subvol_name string in case multiple subvol= options are given. The lastest option is effective behavior (consistent with subvolid= and subvolrootid= options) is preserved. Signed-off-by: Ilya Dryomov idryo...@gmail.com --- fs/btrfs/super.c |1 + 1 files changed, 1 insertions(+),

[PATCH 2/5] Btrfs: fix subvol_name leak on error in btrfs_mount()

2011-11-09 Thread Ilya Dryomov
btrfs_parse_early_options() can fail due to error while scanning devices (-o device= option), but still strdup() subvol_name string: mount -o subvol=SUBV,device=BAD_DEVICE dev mnt So free subvol_name string on error. Signed-off-by: Ilya Dryomov idryo...@gmail.com --- fs/btrfs/super.c |4

[PATCH 3/5] Btrfs: avoid null dereference and leaks when bailing from open_ctree()

2011-11-09 Thread Ilya Dryomov
Fix bugs introduced by 6c41761f. Firstly, after failing to allocate any of the tree roots (first 'goto fail' in open_ctree()) we would dereference a NULL fs_info pointer in free_fs_info(). Secondly, after failures from init_srcu_struct(), setup_bdi() and new_inode() we would leak all earlier

[PATCH 4/5] Btrfs: close devices on all error paths in open_ctree()

2011-11-09 Thread Ilya Dryomov
Fix a bug introduced by 7e662854 where we would leave devices busy on certain error paths in open_ctree(). fs_info is guaranteed to be non-NULL now so it's safe to dereference it on all error paths. Signed-off-by: Ilya Dryomov idryo...@gmail.com --- fs/btrfs/disk-io.c |7 +++ 1 files

[PATCH 5/5] Btrfs: rework error handling in btrfs_mount()

2011-11-09 Thread Ilya Dryomov
Commits 6c41761f and 45ea6095 introduced the possibility of NULL pointer dereference on error paths, also we would leave all devices busy and leak fs_info with all sub-structures on error when trying to mount an already mounted fs to a different directory. Fix this by doing all allocations before

[PATCH] Btrfs: only map pages if we know we need them when reading the space cache

2011-11-09 Thread Josef Bacik
People have been running into a warning when loading space cache because the page is already mapped when trying to read in a bitmap. The way we read in entries and pages is kind of convoluted, so fix it so that io_ctl_read_entry maps the entries if it needs to, and if it hits the end of the page

Re: WARNING: at fs/btrfs/free-space-cache.c:305

2011-11-09 Thread Josef Bacik
On Thu, Nov 03, 2011 at 10:25:23AM +0900, Tsutomu Itoh wrote: In integration-scrub branch, following warning messages were displayed by running xfstests. # btrfs fi sh /dev/sdd4 Label: none uuid: 8f28d85c-e37c-4c1b-adef-2627ca59be78 Total devices 2 FS bytes used 31.49MB

[PATCH 3/4] Btrfs: Makefile changes to optionally include btrfs integrity check

2011-11-09 Thread Stefan Behrens
If the btrfs integrity check is enabled, the files required to implement the checks are included in the build. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/Makefile |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/fs/btrfs/Makefile

[PATCH 0/4] Btrfs: runtime integrity check tool

2011-11-09 Thread Stefan Behrens
This patch series adds a new module to the btrfs kernel mode code. This new module can be used to catch cases when the btrfs kernel code executes write requests to the disk that bring the file system in an inconsistent state. In such a state, a power-loss or kernel panic event would cause that the

[PATCH 4/4] Btrfs: integrate integrity check module into btrfs

2011-11-09 Thread Stefan Behrens
This is the last part of the patch series. It modifies the btrfs code to use the integrity check module if configured to do so with the define BTRFS_FS_CHECK_INTEGRITY. If this define is not set, the only effective change is that code is added that handles the mount option to activate the

[PATCH 2/4] Btrfs: add config option to enable btrfs integrity check

2011-11-09 Thread Stefan Behrens
Added the BTRFS_FS_CHECK_INTEGRITY option to Kconfig. It depends on BTRFS_FS. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/Kconfig | 33 + 1 files changed, 33 insertions(+), 0 deletions(-) diff --git a/fs/btrfs/Kconfig b/fs/btrfs/Kconfig

Re: WARNING: at fs/btrfs/inode.c:2198 btrfs_orphan_commit_root+0xa8/0xc0

2011-11-09 Thread Josef Bacik
On Wed, Nov 09, 2011 at 11:24:50AM +0100, Stefan Kleijkers wrote: Hello, I'm seeing a lot of warnings in dmesg with a BTRFS filesystem. I'm using the 3.1 kernel, I found a patch for these warnings ( http://marc.info/?l=linux-btrfsm=131547325515336w=2)

Re: btrfs: could not do orphan cleanup -116

2011-11-09 Thread Maciej Marcin Piechotka
On Mon, 2011-11-07 at 14:01 -0500, Josef Bacik wrote: On Mon, Nov 07, 2011 at 06:41:44PM +, Maciej Marcin Piechotka wrote: On Mon, 2011-11-07 at 10:29 -0500, Josef Bacik wrote: On Mon, Nov 07, 2011 at 01:17:04PM +, Maciej Marcin Piechotka wrote: Hello, When I booted my

Re: btrfs: could not do orphan cleanup -116

2011-11-09 Thread Josef Bacik
On Wed, Nov 09, 2011 at 03:43:37PM +, Maciej Marcin Piechotka wrote: On Mon, 2011-11-07 at 14:01 -0500, Josef Bacik wrote: On Mon, Nov 07, 2011 at 06:41:44PM +, Maciej Marcin Piechotka wrote: On Mon, 2011-11-07 at 10:29 -0500, Josef Bacik wrote: On Mon, Nov 07, 2011 at 01:17:04PM

Re: btrfs: could not do orphan cleanup -116

2011-11-09 Thread Maciej Marcin Piechotka
On Wed, 2011-11-09 at 11:14 -0500, Josef Bacik wrote: On Wed, Nov 09, 2011 at 03:43:37PM +, Maciej Marcin Piechotka wrote: On Mon, 2011-11-07 at 14:01 -0500, Josef Bacik wrote: On Mon, Nov 07, 2011 at 06:41:44PM +, Maciej Marcin Piechotka wrote: On Mon, 2011-11-07 at 10:29

Re: BTRFS and power loss ~= corruption?

2011-11-09 Thread Stefan Behrens
On 8/26/2011 1:01 AM, Gregory Maxwell wrote: On Wed, Aug 24, 2011 at 9:11 AM, Berend Dekens bt...@cyberwizzard.nl wrote: [snip] I thought the idea of COW was that whatever happens, you can always mount in a semi-consistent state? [snip] It seems to me that if someone created a block

Re: Grow btrfs partition filesystem backwards

2011-11-09 Thread Goffredo Baroncelli
On Wednesday, 09 November, 2011 08:36:24 Chris Mason wrote: The only choice for an online operation is to make a new partition in front of the old one and just add that as a second disk in btrfs. The slow method of shifting the bytes down is probably a better long term choice. -chris Hi

Re: Grow btrfs partition filesystem backwards

2011-11-09 Thread Chris Mason
On Wed, Nov 09, 2011 at 07:58:44PM +0100, Goffredo Baroncelli wrote: On Wednesday, 09 November, 2011 08:36:24 Chris Mason wrote: The only choice for an online operation is to make a new partition in front of the old one and just add that as a second disk in btrfs. The slow method of

Re: BTRFS and power loss ~= corruption?

2011-11-09 Thread Martin Steigerwald
Hi Maciej, Am Freitag, 26. August 2011 schrieb Maciej Marcin Piechotka: On Thu, 2011-08-25 at 19:55 +0200, Martin Steigerwald wrote: That said I also do not have any issues with BTRFS on a ThinkPad T23 for / and /home. But then the machine has an hibernate-to-disk-and-resume uptime of

Re: [PATCH 0/5] Btrfs: mount error handling fixes

2011-11-09 Thread Ilya Dryomov
Hi Chris, You call pull at: git://github.com/idryomov/btrfs-unstable.git mount-fixes Thanks, Ilya -- 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

Re: WARNING: at fs/btrfs/free-space-cache.c:305

2011-11-09 Thread Tsutomu Itoh
Hi, Josef, (2011/11/10 0:17), Josef Bacik wrote: On Thu, Nov 03, 2011 at 10:25:23AM +0900, Tsutomu Itoh wrote: In integration-scrub branch, following warning messages were displayed by running xfstests. # btrfs fi sh /dev/sdd4 Label: none uuid: 8f28d85c-e37c-4c1b-adef-2627ca59be78

Re: How to remount btrfs without compression?

2011-11-09 Thread dima
On 11/10/2011 09:11 AM, David Sterba wrote: On Wed, Nov 09, 2011 at 10:01:13AM +0900, dima wrote: Just for the record - I could find a solution thanks to the btrfs wiki being online again. In Gotchas it says mount -o nodatacow also disables compression and indeed it does. Remounting with this

[PATCH 3/6] Btrfs: fix unreleased path in btrfs_orphan_cleanup()

2011-11-09 Thread Miao Xie
When we did stress test for the space relocation, the deadlock happened. By debugging, We found it was caused by the carelessness that we forgot to unlock the read lock of the extent buffers in btrfs_orphan_cleanup() before we end the transaction handle, so the transaction commit task waited the

[PATCH 1/6] Btrfs: Abstract similar code for btrfs_block_rsv_add{, _noflush}()

2011-11-09 Thread Miao Xie
btrfs_block_rsv_add{, _noflush}() have similar code, so abstract that code. Signed-off-by: Miao Xie mi...@cn.fujitsu.com --- fs/btrfs/extent-tree.c | 28 1 files changed, 12 insertions(+), 16 deletions(-) diff --git a/fs/btrfs/extent-tree.c

[PATCH 2/6] Btrfs: fix no reserved space for writing out inode cache

2011-11-09 Thread Miao Xie
I-node cache forgets to reserve the space when writing out it. And when we do some stress test, such as synctest, it will trigger WARN_ON() in use_block_rsv(). WARNING: at fs/btrfs/extent-tree.c:5718 btrfs_alloc_free_block+0xbf/0x281 [btrfs]() ... Call Trace: [8104df86]

[PATCH 5/6] Btrfs: fix deadlock caused by the race between relocation and snapshot creation

2011-11-09 Thread Miao Xie
We can not do flushable reservation for the relocation when we create snapshot, because it may make the transaction commit task and the flush task wait for each other and the deadlock happens. Signed-off-by: Miao Xie mi...@cn.fujitsu.com --- fs/btrfs/transaction.c |4 ++-- 1 files changed, 2

[PATCH 6/6] Btrfs: fix orphan backref nodes

2011-11-09 Thread Miao Xie
If the root node of a fs/file tree is in the block group that is being relocated, but the others are not in the other block groups. when we create a snapshot for this tree between the relocation tree creation ends and -create_reloc_tree is set to 0, Btrfs will create some backref nodes that are

[PATCH 4/6] Btrfs: fix nocow when deleting the item

2011-11-09 Thread Miao Xie
btrfs_previous_item() just search the b+ tree, do not COW the nodes or leaves, if we modify the result of it, the meta-data will be broken. fix it. Signed-off-by: Miao Xie mi...@cn.fujitsu.com --- fs/btrfs/volumes.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git

Re: How to remount btrfs without compression?

2011-11-09 Thread Lubos Kolouch
Dmitry Olenin, Wed, 09 Nov 2011 17:03:39 +0900: On 11/09/2011 04:48 PM, Lubos Kolouch wrote: Sorry for possibly OT question - when I have historical btrfs system mounted with zlib compression, can I remount it with lzo ? What will happen? Will the COW be broken and the files taking

Re: How to remount btrfs without compression?

2011-11-09 Thread Dmitry Olenin
On 11/10/2011 03:57 PM, Lubos Kolouch wrote: Dmitry Olenin, Wed, 09 Nov 2011 17:03:39 +0900: On 11/09/2011 04:48 PM, Lubos Kolouch wrote: Sorry for possibly OT question - when I have historical btrfs system mounted with zlib compression, can I remount it with lzo ? What will happen? Will the

Re: [PATCH 1/6] Btrfs: Abstract similar code for btrfs_block_rsv_add{, _noflush}()

2011-11-09 Thread Miao Xie
The mail of PATCH 0 was always rejected, so I try to send it as the reply of PATCH 1. Title: [PATCH 0/6] Random fix of the space relocation This patchset fixes 5 bugs of the space relocation, one fixes the problem that we forgot to reserve space for writing out i-node cache,