Re: How can btrfs take 23sec to stat 23K files from an SSD?

2012-08-01 Thread Marc MERLIN
On Fri, Jul 27, 2012 at 11:42:39AM -0700, Marc MERLIN wrote: https://oss.oracle.com/~mason/latencytop.patch Thanks for the patch, and yes I can confirm I'm definitely not pegged on CPU (not even close and I get the same problem with unencrypted filesystem, actually du -sh is exactly the

Re: How can btrfs take 23sec to stat 23K files from an SSD?

2012-08-01 Thread Fajar A. Nugraha
On Wed, Aug 1, 2012 at 1:01 PM, Marc MERLIN m...@merlins.org wrote: So, clearly, there is something wrong with the samsung 830 SSD with linux It it were a random crappy SSD from a random vendor, I'd blame the SSD, but I have a hard time believing that samsung is selling SSDs that are slower

Re: How can btrfs take 23sec to stat 23K files from an SSD?

2012-08-01 Thread Marc MERLIN
On Wed, Aug 01, 2012 at 01:08:46PM +0700, Fajar A. Nugraha wrote: It it were a random crappy SSD from a random vendor, I'd blame the SSD, but I have a hard time believing that samsung is selling SSDs that are slower than hard drives at random IO and 'seeks'. You'd be surprised on how

Re: How can btrfs take 23sec to stat 23K files from an SSD?

2012-08-01 Thread Chris Samuel
On 01/08/12 16:01, Marc MERLIN wrote: Third, A freshly made ntfs filesystem through fuse is actually FASTER! Could it be that Samsungs FTL has optimisations in it for NTFS ? A horrible thought, but not impossible.. -- Chris Samuel : http://www.csamuel.org/ : Melbourne, VIC -- To

Re: How can btrfs take 23sec to stat 23K files from an SSD?

2012-08-01 Thread Marc MERLIN
On Wed, Aug 01, 2012 at 04:36:22PM +1000, Chris Samuel wrote: On 01/08/12 16:01, Marc MERLIN wrote: Third, A freshly made ntfs filesystem through fuse is actually FASTER! Could it be that Samsungs FTL has optimisations in it for NTFS ? A horrible thought, but not impossible.. Not

[PATCH RESEND] Btrfs: fix that error value is changed by mistake

2012-08-01 Thread Stefan Behrens
In iterate_inodes_from_logical() the error result from extent_from_logical() is patched by mistake. Typically ENOENT is patched to EINVAL because (-ENOENT BTRFS_EXTENT_FLAG_TREE_BLOCK) evaluates to true. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- Resent because of the previously

Re: Questions and notes about send/receive

2012-08-01 Thread Alexander Block
On Tue, Jul 31, 2012 at 6:32 PM, Alex Lyakas alex.bolshoy.bt...@gmail.com wrote: Hi Alexander, I relooked at my list of questions, and it seems that there are more general questions, and more focused questions. So here I list the more focused ones. I really appreciate if you can address them.

Re: [PATCH 3/3] Btrfs-progs: list snapshots by generation

2012-08-01 Thread Liu Bo
On 08/01/2012 05:16 AM, Goffredo Baroncelli wrote: Hi Bo, On 07/31/2012 07:49 AM, Liu Bo wrote: The idea is that we usually use snapshot to backup/restore our data, and the common way can be a cron script which makes lots of snapshots, so we can end up with spending some time to find the

[PATCH v2] Btrfs: remove superblock writing after fatal error

2012-08-01 Thread Stefan Behrens
With commit acce952b0, btrfs was changed to flag the filesystem with BTRFS_SUPER_FLAG_ERROR and switch to read-only mode after a fatal error happened like a write I/O errors of all mirrors. In such situations, on unmount, the superblock is written in btrfs_error_commit_super(). This is done with

Re: [PATCH v2] Btrfs: remove superblock writing after fatal error

2012-08-01 Thread Liu Bo
On 08/01/2012 07:45 PM, Stefan Behrens wrote: With commit acce952b0, btrfs was changed to flag the filesystem with BTRFS_SUPER_FLAG_ERROR and switch to read-only mode after a fatal error happened like a write I/O errors of all mirrors. In such situations, on unmount, the superblock is written

Re: [PATCH] Btrfs: unlock extent when the dio completes for reads

2012-08-01 Thread Josef Bacik
On Tue, Jul 31, 2012 at 03:30:49PM -0600, Zach Brown wrote: +static void btrfs_direct_read_iodone(struct kiocb *iocb, loff_t offset, +ssize_t bytes, void *private, int ret, +bool is_async) +{ + struct inode *inode =

Re: [patch] Btrfs: fix some endian bugs handling the root times

2012-08-01 Thread Alexander Block
On Mon, Jul 30, 2012 at 10:10 AM, Dan Carpenter dan.carpen...@oracle.com wrote: trans-transid is cpu endian but we want to store the data as little endian. item-ctime.nsec is only 32 bits, not 64. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- Applies to linux-next. diff --git

Re: [PATCH] add crtime to the snapshot list

2012-08-01 Thread Liu Bo
On 08/01/2012 08:01 PM, Anand jain wrote: From: Anand anand.j...@oracle.com This patch adds creation-time to the snapshot list display, which would help user to better manage the snapshots when number of snapshots grow substantially. This patch is developed and on top of the

Re: [RFC PATCH 7/7] Btrfs: introduce BTRFS_IOC_SEND for btrfs send/receive (part 2)

2012-08-01 Thread Alexander Block
On Mon, Jul 23, 2012 at 5:17 PM, Alex Lyakas alex.bolshoy.bt...@gmail.com wrote: Hi Alexander, I did some testing of the case where same inode, but with a different generation, exists both in send_root and in parent_root. I know that this can happen primarily when inode_cache option is

Re: [PATCH v2] Btrfs: remove superblock writing after fatal error

2012-08-01 Thread Liu Bo
On 08/01/2012 09:07 PM, Jan Schmidt wrote: On Wed, August 01, 2012 at 14:02 (+0200), Liu Bo wrote: On 08/01/2012 07:45 PM, Stefan Behrens wrote: With commit acce952b0, btrfs was changed to flag the filesystem with BTRFS_SUPER_FLAG_ERROR and switch to read-only mode after a fatal error

Re: [PATCH v2] Btrfs: remove superblock writing after fatal error

2012-08-01 Thread Arne Jansen
On 01.08.2012 15:31, Liu Bo wrote: On 08/01/2012 09:07 PM, Jan Schmidt wrote: On Wed, August 01, 2012 at 14:02 (+0200), Liu Bo wrote: On 08/01/2012 07:45 PM, Stefan Behrens wrote: With commit acce952b0, btrfs was changed to flag the filesystem with BTRFS_SUPER_FLAG_ERROR and switch to

Re: [PATCH] add crtime to the snapshot list

2012-08-01 Thread anand jain
Eg output: #btrfs su list -s 1 /btrfs ID 258 gen 39 cgen 6 top level 5 crtime 2012-07-27 17:43:55 path ss1 ID 260 gen 8 cgen 8 top level 5 crtime 2012-07-27 17:47:51 path ss2 ID 263 gen 16 cgen 16 top level 5 crtime 2012-07-29 00:50:19 path ss3 ID 264 gen 25 cgen 25 top

[PATCH] Btrfs: unlock extent when the dio completes for reads V2

2012-08-01 Thread Josef Bacik
A deadlock in xfstests 113 was uncovered by commit d187663ef24cd3d033f0cbf2867e70b36a3a90b8 This is because we would not return EIOCBQUEUED for short AIO reads, instead we'd wait for the DIO to complete and then return the amount of data we transferred, which would allow our stuff to unlock the

Re: Questions and notes about send/receive

2012-08-01 Thread Alex Lyakas
Alexander, thanks for addressing the issues. __get_cur_name_and_parent() if we decided to call get_first_ref() on the send_root (due to ino sctx-send_progress), do we really need to call did_overwrite_ref()? Because it will just lookup the send root again. I mean if we know that this inode

kernel BUG at fs/btrfs/extent-tree.c:5038 (linux 3.4.7)

2012-08-01 Thread Olivier Bonvalet
Hi, I have some trouble with a btrfs filesystem. As you can see in logs, there is lines which are from btrfs (I supposed), then some warnings at fs/btrfs/extent-tree.c, and finally a kernel BUG at fs/btrfs/extent-tree.c:5038. Do you need more informations ? Aug 1 21:23:10 backup2 kernel: [

[PATCH] Btrfs: barrier before waitqueue_active

2012-08-01 Thread Josef Bacik
We need an smb_mb() before waitqueue_active to avoid missing wakeups. Before Mitch was hitting a deadlock between the ordered flushers and the transaction commit because the ordered flushers were waiting for more refs and were never woken up, so those smp_mb()'s are the most important. Everything

Re: How can btrfs take 23sec to stat 23K files from an SSD?

2012-08-01 Thread Martin Steigerwald
Hi Marc, Am Mittwoch, 1. August 2012 schrieb Marc MERLIN: On Wed, Aug 01, 2012 at 01:08:46PM +0700, Fajar A. Nugraha wrote: It it were a random crappy SSD from a random vendor, I'd blame the SSD, but I have a hard time believing that samsung is selling SSDs that are slower than hard

Re: [PATCH] Btrfs: barrier before waitqueue_active

2012-08-01 Thread Mitch Harder
On Wed, Aug 1, 2012 at 3:25 PM, Josef Bacik jba...@fusionio.com wrote: We need an smb_mb() before waitqueue_active to avoid missing wakeups. Before Mitch was hitting a deadlock between the ordered flushers and the transaction commit because the ordered flushers were waiting for more refs and

[josef-btrfs:master 9/11] fs/btrfs/transaction.c:1118:6: warning: 'parent' may be used uninitialized in this function

2012-08-01 Thread Fengguang Wu
Hi Miao, There are new compile warnings show up in tree: git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git master head: 8e1163044779e90662e96887cdd692c1594146ad commit: dd817e81e81bbb83b63317b169d0e57a5d7ae0e1 [9/11] Btrfs: fix error path in create_pending_snapshot()

Re: [josef-btrfs:master 9/11] fs/btrfs/transaction.c:1118:6: warning: 'parent' may be used uninitialized in this function

2012-08-01 Thread Miao Xie
On Thu, 2 Aug 2012 10:31:23 +0800, Fengguang Wu wrote: There are new compile warnings show up in tree: git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git master head: 8e1163044779e90662e96887cdd692c1594146ad commit: dd817e81e81bbb83b63317b169d0e57a5d7ae0e1 [9/11] Btrfs:

[PATCH V3 2/2] Btrfs: fix the snapshot that should not exist

2012-08-01 Thread Miao Xie
The snapshot should be the image of the fs tree before it was created, so the metadata of the snapshot should not exist in the its tree. But now, we found the directory item and directory name index is in both the snapshot tree and the fs tree. It introduces some problems and makes the users feel