possible bug with space_cache 2.6.37-rc2

2010-11-19 Thread Xavier Nicollet
Hi, today I accidentally shut my laptop down (batteries were empty). It is a / btrfs partition, on ubuntu 10.10, kernel 2.6.37-rc2 from kernel.org. It is mounted with: rw,relatime,compress,space_cache Init could not be found on reboot (repeated twice). I rebooted to 2.6.36, which made the

Re: [patch] fix up lock order reversal in writeback

2010-11-19 Thread Theodore Tso
On Nov 19, 2010, at 12:10 AM, Nick Piggin wrote: But asynch writeout needs a mutex rather than refcount so the umount has something to block against and not just fail. Or we use a completion handler instead of a mutex for umount? - Ted -- To unsubscribe from this list: send the line

Re: Btrfs_truncate ?

2010-11-19 Thread Chris Mason
Excerpts from Smets, Jan (Jan)'s message of 2010-11-19 02:21:21 -0500: Hi list This happened when running an iozone test over ceph, it was doing lots of random reads. I have no idea how to properly interpret this, I should find it out. Let me know if you need something else. Thanks!

[PATCH] Btrfs: handle the space_cache option properly

2010-11-19 Thread Josef Bacik
So when I added the clear_cache option I screwed up and took the break out of the space_cache case statement, so whenever you mount with space_cache you also get clear_cache, which does you no good if you say set space_cache in fstab so it always gets set. This patch adds the break back in

Re: ls flush-btrfs-1 sit at 100% sys

2010-11-19 Thread Chris Mason
Excerpts from Brian Sullivan's message of 2010-11-18 13:30:51 -0500: Yep actually, with noatime,nodiratime ls is fine. I didn't try ro but I assume that'll work too. So with noatime,nodiratime I can go around in tree and ls works. If I try to touch a new file, touch doesn't return. If I

[PATCH] Btrfs: do not loop through raid types when looking for free extent V2

2010-11-19 Thread Josef Bacik
There is a bug in find_free_extent where if we don't find a free extent in the raid type we are looking for, we loop through to the next raid type. This is not ok since we need to make sure we honor the raid types we are given. So instead kill this check and get the proper index for the raid

Re: ls flush-btrfs-1 sit at 100% sys

2010-11-19 Thread Josef Bacik
On Fri, Nov 19, 2010 at 09:32:46AM -0500, Chris Mason wrote: Excerpts from Brian Sullivan's message of 2010-11-18 13:30:51 -0500: Yep actually, with noatime,nodiratime ls is fine. I didn't try ro but I assume that'll work too. So with noatime,nodiratime I can go around in tree and ls

[PATCH] mkfs should initialize unused fields properly

2010-11-19 Thread Jan Schmidt
we discovered speed setting is (probably unintentionally) initialized to 1 in make_btrfs(), while being initialized to 0 in btrfs_add_to_fsid(). initialization in make_btrfs() is due to reuse of buf after pwrite() without clearing it. consequently, code like

[PATCH] Btrfs: setup blank root and fs_info for mount time

2010-11-19 Thread Josef Bacik
There is a problem with how we use sget, it searches through the list of supers attached to the fs_type looking for a super with the same fs_devices as what we're trying to mount. This depends on sb-s_fs_info being filled, but we don't fill that in until we get to btrfs_fill_super, so we could

Re: ls flush-btrfs-1 sit at 100% sys

2010-11-19 Thread Brian Sullivan
On Fri, Nov 19, 2010 at 6:46 AM, Josef Bacik jo...@redhat.com wrote: On Fri, Nov 19, 2010 at 09:32:46AM -0500, Chris Mason wrote: I just wanted to confirm, you're seeing this with 2.6.37-rc?  I thought I had fixed up this delalloc hammering. I installed 2.6.37-rc2 from an Ubuntu PPA. Also

Btrfs: fix dentry-d_parent abuses V2

2010-11-19 Thread Josef Bacik
Christoph pointed out that my original d_parent cleanup patch was big and hard to review since it really did 3 seperate things. The cleanup is broke up like this 1) For places we have to use dentry-d_parent, use dget_parent/dput 2) For places where we already have the parent inode anyway, use

[PATCH 1/3] Btrfs: use dget_parent where we can

2010-11-19 Thread Josef Bacik
There are lots of places where we do dentry-d_parent-d_inode without holding the dentry-d_lock. This could cause problems with rename. So instead we need to use dget_parent() and hold the reference to the parent as long as we are going to use it's inode and then dput it at the end.

[PATCH 2/3] Btrfs: hold i_mutex when calling btrfs_log_dentry_safe

2010-11-19 Thread Josef Bacik
Since we walk up the path logging all of the parts of the inode's path, we need to hold i_mutex to make sure that the inode is not renamed while we're logging everything. btrfs_log_dentry_safe does dget_parent and all of that jazz, but we may get unexpected results if the rename changes the

Re: Poor performance unlinking hard-linked files (repost)

2010-11-19 Thread Bron Gondwana
On Fri, Nov 19, 2010 at 09:10:08AM -0500, Chris Mason wrote: Excerpts from Bron Gondwana's message of 2010-11-18 16:46:31 -0500: On Thu, Nov 18, 2010 at 10:30:47AM -0500, Chris Mason wrote: http://pastebin.com/Tg7agv42 Ok, we're mixing unlinks and fsyncs. If it fsyncing directories