Re: [GIT PULL] Btrfs updates

2011-01-19 Thread Spelic
On 01/18/2011 04:22 PM, C Anthony Risinger wrote: On Tue, Jan 18, 2011 at 4:14 AM, Felix Blankefelixbla...@gmail.com wrote: i don't know about the readonly snapshots, but the LZO stuff is a mount option; should be in the pull. and for the record, i'm totally stoked to run LZO on all my

Re: [BUG] 2.6.35 btrfs oops at extent_range_uptodate

2011-01-19 Thread Liuwenyi
于 2011-1-19 14:27, Yang Ruirui 写道: Boot with meego kernel 2.6.35.9-6.5-adaptation-n900 on n900, an oops happend, I see similar reporting in lkml: https://lkml.org/lkml/2010/8/26/103 I just happened once, so I don't know hot to reproduce it. `addr2line -e vmlinux 0xc0197888` show

Re: [PATCH] Avoid a NULL pointer in btrfs

2011-01-19 Thread Josef Bacik
On Wed, Jan 19, 2011 at 10:08:13PM +0800, Liuwenyi wrote: In Yang Ruirui's mail, the btrfs will create a oops. This is caused by a null pointer in test_range_bit() while lock the spinlock. So, It is necessary to add a pointer check into test_range_bit() NAK, the tree shouldn't be null

[PATCH] Btrfs: remove unneeded allocation in load_free_space_cache()

2011-01-19 Thread Ilya Dryomov
The checksums array is unused, remove it. We only need disk_crcs array to verify checksums. There is no need to allocate first_page_offset bytes for disk_crcs array. It's enough to allocate num_checksums bytes because disk_crcs only holds checksums while gen pointer is computed and used

Re: [PATCH] Avoid a NULL pointer in btrfs

2011-01-19 Thread Chris Mason
Excerpts from Josef Bacik's message of 2011-01-19 09:14:02 -0500: On Wed, Jan 19, 2011 at 10:08:13PM +0800, Liuwenyi wrote: In Yang Ruirui's mail, the btrfs will create a oops. This is caused by a null pointer in test_range_bit() while lock the spinlock. So, It is necessary to add a

Re: [PATCH v2] Btrfs: remove unneeded allocation in load_free_space_cache()

2011-01-19 Thread Josef Bacik
On Wed, Jan 19, 2011 at 06:58:37PM +0200, Ilya Dryomov wrote: I messed up size argument of kzalloc() and consequently memcpy(). Here is an updated version. The checksums array is unused, remove it. We only need disk_crcs array to verify checksums. There is no need to allocate

[PATCH] Btrfs: use checksums_len instead of first_page_offset

2011-01-19 Thread Ilya Dryomov
Minimizes the number of (sizeof(u32) * num_checksums) we have to do, removes now useless first_page_offset variable. Signed-off-by: Ilya Dryomov idryo...@gmail.com --- fs/btrfs/free-space-cache.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git

Re: [PATCH] Btrfs: use checksums_len instead of first_page_offset

2011-01-19 Thread Josef Bacik
On Wed, Jan 19, 2011 at 09:19:24PM +0200, Ilya Dryomov wrote: Minimizes the number of (sizeof(u32) * num_checksums) we have to do, removes now useless first_page_offset variable. Signed-off-by: Ilya Dryomov idryo...@gmail.com Reviewed-by: Josef Bacik jo...@redhat.com Thanks, Josef -- To

Re: btrfs defrag: how does it work?

2011-01-19 Thread Chris Mason
Excerpts from Paul Komkoff's message of 2011-01-19 14:58:28 -0500: Hello. [root@botva incoming]# btrfs fi defrag file-350mb [root@botva incoming]# filefrag file-350mb file-350mb: 132 extents found The defrag code doesn't actually defrag. It opens up the file and recows all the extents and

Re: [PATCH v3 0/5]add new ioctls to do metadata readahead in btrfs

2011-01-19 Thread David Nicol
On Wed, Jan 19, 2011 at 2:34 PM, Andrew Morton a...@linux-foundation.org wrote: It would be much more valuable if those 3.5 seconds were available to devices which really really care about bootup times, but very few of those devices use rotating disks nowadays, I expect? And don't rotating

Re: btrfs defrag: how does it work?

2011-01-19 Thread Paul Komkoff
On Wed, Jan 19, 2011 at 9:25 PM, Chris Mason chris.ma...@oracle.com wrote: The defrag code doesn't actually defrag.  It opens up the file and recows all the extents and then the delayed allocation code jumps in and makes the biggest possible extent that it can. The reason why you're still

Re: [PATCH v3 0/5]add new ioctls to do metadata readahead in btrfs

2011-01-19 Thread Shaohua Li
On Thu, 2011-01-20 at 05:33 +0800, David Nicol wrote: On Wed, Jan 19, 2011 at 2:34 PM, Andrew Morton a...@linux-foundation.org wrote: It would be much more valuable if those 3.5 seconds were available to devices which really really care about bootup times, but very few of those devices

Re: [PATCH v3 1/5] add metadata_incore ioctl in vfs

2011-01-19 Thread Shaohua Li
On Thu, 2011-01-20 at 04:41 +0800, Andrew Morton wrote: On Wed, 19 Jan 2011 09:15:18 +0800 Shaohua Li shaohua...@intel.com wrote: Subject: add metadata_incore ioctl in vfs Add an ioctl to dump filesystem's metadata in memory in vfs. Userspace collects such info and uses it to do

Re: [PATCH v3 1/5] add metadata_incore ioctl in vfs

2011-01-19 Thread Andrew Morton
On Thu, 20 Jan 2011 10:48:33 +0800 Shaohua Li shaohua...@intel.com wrote: On Thu, 2011-01-20 at 10:42 +0800, Andrew Morton wrote: On Thu, 20 Jan 2011 10:30:47 +0800 Shaohua Li shaohua...@intel.com wrote: I don't know if this is worth addressing. Perhaps require that the filp refers

Re: [PATCH v3 1/5] add metadata_incore ioctl in vfs

2011-01-19 Thread Shaohua Li
On Thu, 2011-01-20 at 11:05 +0800, Andrew Morton wrote: On Thu, 20 Jan 2011 10:48:33 +0800 Shaohua Li shaohua...@intel.com wrote: On Thu, 2011-01-20 at 10:42 +0800, Andrew Morton wrote: On Thu, 20 Jan 2011 10:30:47 +0800 Shaohua Li shaohua...@intel.com wrote: I don't know if

[2.6.38-rc1] btrfs potential false-positive lockdep report...

2011-01-19 Thread Daniel J Blueman
I saw a lockdep report with an instrumented 2.6.38-rc1 kernel [1]. Checking the code, it looks more likely a false-positive due to the lock manipulation to satisfy lockdep, since CONFIG_DEBUG_LOCK_ALLOC is defined. Is this the case? Thanks, Daniel --- [1]

Re: [PATCH v3 1/5] add metadata_incore ioctl in vfs

2011-01-19 Thread Andrew Morton
On Thu, 20 Jan 2011 11:21:49 +0800 Shaohua Li shaohua...@intel.com wrote: It seems to return a single offset/length tuple which refers to the btrfs metadata file, with the intent that this tuple later be fed into a btrfs-specific readahead ioctl. I can see how this might be used with

Re: [PATCH v3 1/5] add metadata_incore ioctl in vfs

2011-01-19 Thread Andrew Morton
On Thu, 20 Jan 2011 13:38:18 +0800 Shaohua Li shaohua...@intel.com wrote: ext2, minix and probably others create an address_space for each directory. Heaven knows what xfs does (for example). yes, this is for one directiory, but the all files's metadata are in block_dev address_space. I

Re: [PATCH v3 1/5] add metadata_incore ioctl in vfs

2011-01-19 Thread Wu Fengguang
On Thu, Jan 20, 2011 at 01:44:57PM +0800, Li, Shaohua wrote: On Thu, 2011-01-20 at 12:41 +0800, Dave Chinner wrote: On Wed, Jan 19, 2011 at 08:10:14PM -0800, Andrew Morton wrote: On Thu, 20 Jan 2011 11:21:49 +0800 Shaohua Li shaohua...@intel.com wrote: It seems to return a

Re: [PATCH v3 1/5] add metadata_incore ioctl in vfs

2011-01-19 Thread Shaohua Li
On Thu, 2011-01-20 at 13:55 +0800, Andrew Morton wrote: On Thu, 20 Jan 2011 13:38:18 +0800 Shaohua Li shaohua...@intel.com wrote: ext2, minix and probably others create an address_space for each directory. Heaven knows what xfs does (for example). yes, this is for one directiory, but

Re: [PATCH v3 1/5] add metadata_incore ioctl in vfs

2011-01-19 Thread Andrew Morton
On Thu, 20 Jan 2011 14:12:33 +0800 Shaohua Li shaohua...@intel.com wrote: On Thu, 2011-01-20 at 13:55 +0800, Andrew Morton wrote: On Thu, 20 Jan 2011 13:38:18 +0800 Shaohua Li shaohua...@intel.com wrote: ext2, minix and probably others create an address_space for each directory.

Re: [PATCH v3 1/5] add metadata_incore ioctl in vfs

2011-01-19 Thread Andrew Morton
On Thu, 20 Jan 2011 14:19:50 +0800 Wu Fengguang fengguang...@intel.com wrote: On Thu, Jan 20, 2011 at 02:12:33PM +0800, Li, Shaohua wrote: On Thu, 2011-01-20 at 13:55 +0800, Andrew Morton wrote: On Thu, 20 Jan 2011 13:38:18 +0800 Shaohua Li shaohua...@intel.com wrote: ext2,

Re: [PATCH v3 1/5] add metadata_incore ioctl in vfs

2011-01-19 Thread Shaohua Li
On Thu, 2011-01-20 at 14:19 +0800, Wu, Fengguang wrote: On Thu, Jan 20, 2011 at 02:12:33PM +0800, Li, Shaohua wrote: On Thu, 2011-01-20 at 13:55 +0800, Andrew Morton wrote: On Thu, 20 Jan 2011 13:38:18 +0800 Shaohua Li shaohua...@intel.com wrote: ext2, minix and probably others

Re: [PATCH v3 1/5] add metadata_incore ioctl in vfs

2011-01-19 Thread Wu Fengguang
On Thu, Jan 20, 2011 at 02:37:37PM +0800, Li, Shaohua wrote: On Thu, 2011-01-20 at 14:19 +0800, Wu, Fengguang wrote: On Thu, Jan 20, 2011 at 02:12:33PM +0800, Li, Shaohua wrote: On Thu, 2011-01-20 at 13:55 +0800, Andrew Morton wrote: On Thu, 20 Jan 2011 13:38:18 +0800 Shaohua Li