Re: Very slow samba file transfer speed... any ideas ?

2012-07-20 Thread Martin Steigerwald
Am Freitag, 20. Juli 2012 schrieb Shavi N: On Fri, Jul 20, 2012 at 12:19 AM, Martin Steigerwald mar...@lichtvoll.de wrote: Am Donnerstag, 19. Juli 2012 schrieb Shavi N: Hi, Hi Shavi, Thanks. This is the output: btrfs: $ dd if=/dev/zero of=/mnt/shared/misc/temp_file

Re: Very slow samba file transfer speed... any ideas ?

2012-07-20 Thread Shavi N
Martin, I agree with you 100% that dd does not measure proper performance (and that /dev/zero is not a very good test). Hence I'm asking.. I know that I get fast copy/write speeds on the btrfs volume from real life situations, but NOT with samba. So, is there something I can do to test why samba

Re: [PATCH v3] Btrfs: improve multi-thread buffer read

2012-07-20 Thread Chris Mason
On Wed, Jul 18, 2012 at 08:31:05PM -0600, Liu Bo wrote: On 07/19/2012 10:05 AM, David Sterba wrote: [ pagevec vs array ] Sorry, I see no difference between 16 pages array and pagevec(14 pages), and I have no idea why ext4 use 16 pages array(maybe historical reasons), but IMO it is proper and

Re: Very slow samba file transfer speed... any ideas ?

2012-07-20 Thread Martin Steigerwald
Am Freitag, 20. Juli 2012 schrieb Remco Hosman: 11 really fast 15000rpm FC / SAS disks could possibly do 936 MB/s. But regular 7200rpm SATA disks depending to the on disk location might be as slow as 40-50 MB/s – just try fio disk-zone-profile on one if you do not believe this – and then

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

2012-07-20 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

[PATCH 0/2] LZO INCOMPAT Checking

2012-07-20 Thread Mitch Harder
The following patches are against Josef's btrfs-next repository, and depend on Arnd Hannemann's Btrfs: allow mount -o remount,compress=no patch. The method was based on a previous example of checking for lzo INCOMPAT used by Li Zefan when defragmenting with explicit compression (btrfs: Allow to

[PATCH 1/2] Btrfs: Check INCOMPAT flags on remount with lzo compression

2012-07-20 Thread Mitch Harder
In support of the recently added capability to remount with lzo compression, check the compression INCOMPAT flags when remounting with lzo compression, and set the flags if necessary. Signed-off-by: Mitch Harder mitch.har...@sabayonlinux.org --- fs/btrfs/ctree.h |1 + fs/btrfs/super.c | 21

[PATCH 2/2] Btrfs: Use common function to check lzo INCOMPAT on defrag.

2012-07-20 Thread Mitch Harder
When defragmenting with explicit lzo compression, simplify the check for lzo INCOMPAT by using the new common function introduced to support remounting with lzo compression. Signed-off-by: Mitch Harder mitch.har...@sabayonlinux.org --- fs/btrfs/ioctl.c |7 +-- 1 files changed, 1

Re: [PATCH 1/2] Btrfs: Check INCOMPAT flags on remount with lzo compression

2012-07-20 Thread Josef Bacik
On Fri, Jul 20, 2012 at 11:36:20AM -0600, Mitch Harder wrote: In support of the recently added capability to remount with lzo compression, check the compression INCOMPAT flags when remounting with lzo compression, and set the flags if necessary. Signed-off-by: Mitch Harder

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

2012-07-20 Thread Zach Brown
+static int is_ssd(const char *file) +{ + char *dev = strrchr(file, '/'); [ ... ] + snprintf(path, PATH_MAX, /sys/block/%s/queue/rotational, dev); + fd = open(path, O_RDONLY); Hmm, this doesn't seem right. The last path component can have nothing to do with the underlying

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

2012-07-20 Thread Josef Bacik
On Fri, Jul 20, 2012 at 12:18:59PM -0600, Zach Brown wrote: +static int is_ssd(const char *file) +{ + char *dev = strrchr(file, '/'); [ ... ] + snprintf(path, PATH_MAX, /sys/block/%s/queue/rotational, dev); + fd = open(path, O_RDONLY); Hmm, this doesn't seem right. The

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

2012-07-20 Thread Zach Brown
On Fri, Jul 20, 2012 at 02:20:56PM -0400, Josef Bacik wrote: Partitions are for losers. *fist bump* - z -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at

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

2012-07-20 Thread Chris Mason
On Fri, Jul 20, 2012 at 12:20:56PM -0600, Josef Bacik wrote: On Fri, Jul 20, 2012 at 12:18:59PM -0600, Zach Brown wrote: +static int is_ssd(const char *file) +{ + char *dev = strrchr(file, '/'); [ ... ] + snprintf(path, PATH_MAX, /sys/block/%s/queue/rotational, dev); + fd

Re: [PATCH v4] Btrfs: improve multi-thread buffer read

2012-07-20 Thread Zach Brown
+ struct page *page; + int i = 0; + int nr = 0; i doesn't need to be initialized. for (page_idx = 0; page_idx nr_pages; page_idx++) { - struct page *page = list_entry(pages-prev, struct page, lru); + page = list_entry(pages-prev, struct page,

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

2012-07-20 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

[PATCH v2 1/2] Btrfs: Check INCOMPAT flags on remount with lzo compression

2012-07-20 Thread Mitch Harder
In support of the recently added capability to remount with lzo compression, check the compression INCOMPAT flags when remounting with lzo compression, and set the flags if necessary. Signed-off-by: Mitch Harder mitch.har...@sabayonlinux.org --- v1-v2: - Remove extraneous formatting change.

[PATCH v2 2/2] Btrfs: Use common function to check lzo INCOMPAT on defrag.

2012-07-20 Thread Mitch Harder
When defragmenting with explicit lzo compression, simplify the check for lzo INCOMPAT by using the new common function introduced to support remounting with lzo compression. Signed-off-by: Mitch Harder mitch.har...@sabayonlinux.org --- fs/btrfs/ioctl.c |7 +-- 1 files changed, 1

[PATCH] Btrfs: lock the transition from dirty to writeback for an eb

2012-07-20 Thread Josef Bacik
There is a small window where an eb can have no IO bits set on it, which could potentially result in extent_buffer_under_io() returning false when we want it to return true, which could result in not fun things happening. So in order to protect this case we need to hold the refs_lock when we make

[PATCH v3 0/1] LZO INCOMPAT Checking

2012-07-20 Thread Mitch Harder
The following patch is against Josef's btrfs-next repository, and depends on Arnd Hannemann's patch: Btrfs: allow mount -o remount,compress=no The method was based on a previous example of checking for lzo INCOMPAT used by Li Zefan when defragmenting with explicit compression (btrfs: Allow to

[PATCH v3 1/1] Btrfs: Check INCOMPAT flags on remount and add helper function

2012-07-20 Thread Mitch Harder
In support of the recently added capability to remount with lzo compression, provide a helper function to check the compression INCOMPAT flags when remounting with lzo compression, and set the flags if necessary. Also, implement the new helper function when defragmenting with explicit lzo

Re: [PATCH v4] Btrfs: improve multi-thread buffer read

2012-07-20 Thread Liu Bo
On 07/21/2012 02:42 AM, Zach Brown wrote: +struct page *page; +int i = 0; +int nr = 0; i doesn't need to be initialized. for (page_idx = 0; page_idx nr_pages; page_idx++) { -struct page *page = list_entry(pages-prev, struct page, lru); +page =

[PATCH v5] Btrfs: improve multi-thread buffer read

2012-07-20 Thread Liu Bo
While testing with my buffer read fio jobs[1], I find that btrfs does not perform well enough. Here is a scenario in fio jobs: We have 4 threads, t1 t2 t3 t4, starting to buffer read a same file, and all of them will race on add_to_page_cache_lru(), and if one thread successfully puts its page

[PATCH] Xfstests: add btrfs snapshot function test

2012-07-20 Thread Liu Bo
From: Zhou Bo zhoub-f...@cn.fujitsu.com This patch adds btrfs snapshot function test to xfstests. Signed-off-by: Zhou Bo zhoub-f...@cn.fujitsu.com --- 285 | 365 +++ 285.out |2 + group |1 + 3 files changed, 368