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

2012-07-23 Thread Marc MERLIN
I just realized that the older thread got a bit confusing, so I'll keep problems separate and make things simpler :) On an _unencrypted_ partition on the SSD, running du -sh on a directory with 15K files, takes 23 seconds on unencrypted SSD and 4 secs on encrypted spinning drive, both with a

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

2012-07-23 Thread Alex Lyakas
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 enabled. So first I just tested some differential sends, where parent and root are unrelated

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

2012-07-23 Thread Alex Lyakas
Hi Arne, (pls don't take this as if I pretend to have understood the code better than you, because I have a list of questions for Alexander too). +/* + * Helper function to generate a file name that is unique in the root of + * send_root and parent_root. This is used to generate names for

Re: [PATCH] Btrfs-progs: detect if the disk we are formatting is a ssd V2

2012-07-23 Thread Goffredo Baroncelli
On 07/23/2012 02:46 PM, Josef Bacik wrote: On Fri, Jul 20, 2012 at 04:38:59PM -0600, Wendy Cheng wrote: However, this should have been a task for the admin (or whoever types this mkfs command). It is not a filesystem's job to assume how the firmware works and silently ignore the DUP request,

Re: [PATCH] Btrfs-progs: detect if the disk we are formatting is a ssd V2

2012-07-23 Thread Josef Bacik
On Mon, Jul 23, 2012 at 11:01:17AM -0600, Goffredo Baroncelli wrote: On 07/23/2012 02:46 PM, Josef Bacik wrote: On Fri, Jul 20, 2012 at 04:38:59PM -0600, Wendy Cheng wrote: However, this should have been a task for the admin (or whoever types this mkfs command). It is not a filesystem's

[PATCH] Btrfs-progs: detect if the disk we are formatting is a ssd V2

2012-07-23 Thread Josef Bacik
SSD's do not gain anything by having metadata DUP turned on. The underlying file system that is a part of all SSD's could easily map duplicate metadat blocks into the same erase block which effectively eliminates the benefit of duplicating the metadata on disk. So detect if we are formatting a

Re: [RFC PATCH 4/7] Btrfs: introduce subvol uuids and times

2012-07-23 Thread Alexander Block
On Mon, Jul 16, 2012 at 4:56 PM, Arne Jansen sensi...@gmx.net wrote: On 04.07.2012 15:38, Alexander Block wrote: This patch introduces uuids for subvolumes. Each subvolume has it's own uuid. In case it was snapshotted, it also contains parent_uuid. In case it was received, it also contains

Re: [RFC PATCH 4/7] Btrfs: introduce subvol uuids and times

2012-07-23 Thread Arne Jansen
On 23.07.2012 21:41, Alexander Block wrote: On Mon, Jul 16, 2012 at 4:56 PM, Arne Jansen sensi...@gmx.net wrote: On 04.07.2012 15:38, Alexander Block wrote: + + ret = btrfs_update_root(trans, root-fs_info-tree_root, + root-root_key, root-root_item); + if