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 Filipe David Manana
On Mon, May 27, 2013 at 1:12 PM, David Sterba dste...@suse.cz wrote: Hi, please don't forget to mention what changed in a revised version Yeah, sorry, it was my first usage of git send-email (as described in the wiki). On Sat, May 25, 2013 at 03:16:39PM +0100, Filipe David Borba Manana

Is move/rename operation atomic?

2013-05-27 Thread Yevhen Kyriukha
Hi! Could you say is move/rename operation atomic? I want to create a snapshot of subvolume and then rename it using mv. Is it safe on power failure? Best regards, Yevhen -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org

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

2013-05-27 Thread Liu Bo
On Mon, May 27, 2013 at 02:07:00PM +0200, David Sterba wrote: 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

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

2013-05-27 Thread Stefan Behrens
Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- debug-tree.c | 31 ++- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/debug-tree.c b/debug-tree.c index 0fc0ecd..dce1d81 100644 --- a/debug-tree.c +++ b/debug-tree.c @@ -30,13 +30,14 @@

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

systemd journalctl is 1.89sec on ext4, 1.49 min on btrfs

2013-05-27 Thread Szőts Ákos
Dear list, I have two openSUSE 12.3 systems with kernel 3.9. On one of them there's an ext4 partition, while on the other there's a btrfs. I issued a time journalctl -b --no-pager command on both systems. This shows the logs from the current boot without passing them to less. On ext4 (3.9.3):

Re: systemd journalctl is 1.89sec on ext4, 1.49 min on btrfs

2013-05-27 Thread Clemens Eisserer
Hi, Journalctl on btrfs was always this slow, some btrfsck were made on the file system too, but I don't think it was corrupted. On just the first run it's sluggish, after it's fast as the ext4 one. Most likely the file is heavily fragmented due to COW. Have you tried to manually defrag the

Re: systemd journalctl is 1.89sec on ext4, 1.49 min on btrfs

2013-05-27 Thread George Mitchell
I have gotten what appear to be large increases in speed out of btrfs by defragmentation of meta data. The manual defragmentation process takes forever as you have to defragment incrementally directory by directory. I was at the point where KDE startup times were getting abysmal (along with

Re: systemd journalctl is 1.89sec on ext4, 1.49 min on btrfs

2013-05-27 Thread Sergei Trofimovich
On Mon, 27 May 2013 18:21:21 +0200 Szőts Ákos szots...@gmail.com wrote: Dear list, I have two openSUSE 12.3 systems with kernel 3.9. On one of them there's an ext4 partition, while on the other there's a btrfs. I issued a time journalctl -b --no-pager command on both systems. This

Kernel BUG at ctree.c:1144 and soft lockup while defragging

2013-05-27 Thread Szőts Ákos
Dear list, While I was trying to defrag a specified directory I got kernel BUGs and warnings about CPUx stucked for twenty-some seconds. The specified warnings were: BUG at ctree.c:1144. Invalid opcode: command: btrfs-endio-wri Call trace top: btrfs_search_old_slot The executed command in

Re: systemd journalctl is 1.89sec on ext4, 1.49 min on btrfs

2013-05-27 Thread Szőts Ákos
Thank you very much for you suggestions! I ran `filefrag` on /var/log/journal/ and the most fragmented files were: /var/log/journal/[...]/faa9e41c6.journal: 11136 extents found /var/log/journal/[...]/e9f8e1346c.journal: 633 extents found /var/log/journal/[...]/59ec50b631.journal: 3585 extents