can subvolumes be specified as compressed?

2010-07-29 Thread Wang Shaoyan
Hi. I want a subvolume in root to be compressed, I try to do this: # mkfs.btrfs /dev/sda8 # mount /dev/sda8 /home/usr/btrfs # cd /home/usr/btrfs # btrfs subvolume create mysubvolume # mount -o compress,subvol=mysubvolume /dev/sda8 some_dir_in_root but when I create a file in some_dir_in_root, the

Can I use ionice?

2010-07-29 Thread mukai
Hi Can I use ionice on btrfs? Thanks -- 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 http://vger.kernel.org/majordomo-info.html

Re: Can I use ionice?

2010-07-29 Thread Nikanth Karthikesan
On Thursday 29 July 2010 13:30:13 mukai wrote: Hi Can I use ionice on btrfs? Yes, you can. I/O priorities are honoured by the I/O scheduler, independant of the file-system. And only cfq supports I/O priorities. Thanks Nikanth Thanks -- To unsubscribe from this list: send the line

Re: can subvolumes be specified as compressed?

2010-07-29 Thread Miao Xie
On Thu, 29 Jul 2010 15:50:28 +0800, Wang Shaoyan wrote: Hi. I want a subvolume in root to be compressed, I try to do this: # mkfs.btrfs /dev/sda8 # mount /dev/sda8 /home/usr/btrfs # cd /home/usr/btrfs # btrfs subvolume create mysubvolume # mount -o compress,subvol=mysubvolume /dev/sda8

Re: Intermittent no space errors

2010-07-29 Thread Justin Ossevoort
Hello, Pherhaps it would be a good idea to add a tracepoint before each return ENOSPC? It shouldn't matter too much since a reasonable assumption would be that filesystems aren't running out of space most of the time. And you can use 'perf' for more insight in these cases without recompiling the

Re: can subvolumes be specified as compressed?

2010-07-29 Thread Wang Shaoyan
A prerequisite is: when first mounted file system, not specify '-o compress' options, only on mount subvolume Below is my test: # mkfs.btrfs /dev/sda8 # mount /dev/sda8 btrfs # df Used: 56k # btrfs subvolume create mysubvolume # mkdir some_dir_in_root # mount -o compress,subvol=mysubvolume

[PATCH 7/7] btrfs: fix a wrong error check in add_ra_bio_pages()

2010-07-29 Thread Miao Xie
From: Liu Bo liubo2...@cn.fujitsu.com Only when a page is not found by page_index, we'll go to the error check. Signed-off-by: Liu Bo liubo2...@cn.fujitsu.com Signed-off-by: Miao Xie mi...@cn.fujitsu.com --- fs/btrfs/compression.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-)

[PATCH 6/7] btrfs: check the return value of btrfs_start_workers() in open_ctree()

2010-07-29 Thread Miao Xie
If btrfs_start_workers() failed, we must stop mounting the btrfs, otherwise the btrfs can't run well because there is no kthread to deal with the request submited by it. Signed-off-by: Miao Xie mi...@cn.fujitsu.com --- fs/btrfs/disk-io.c | 33 - 1 files changed,

[PATCH 5/7] btrfs: fix bad exception handling of __btrfs_start_workers()

2010-07-29 Thread Miao Xie
If we stop all of the kthread when creating a new kthread fails, the btrfs will hangup because there is no kthread to deal with the requests submited by the btrfs. And the best way to handle kthread-creating failure is don't do anything, because there are other kthreads in the kthread pool to

[PATCH 4/7] Btrfs: fix increasing num_workers_starting twice

2010-07-29 Thread Miao Xie
num_workers_starting is increased twice when the btrfs uses generic workers to create a new kthread. The reason is following: start_new_worker_func() calls btrfs_start_workers() to start a new kthread, this function will add 1 to -num_workers_starting, but -num_workers_starting has been increased

Re: can subvolumes be specified as compressed?

2010-07-29 Thread Miao Xie
On Thu, 29 Jul 2010 16:55:03 +0800, Wang Shaoyan wrote: A prerequisite is: when first mounted file system, not specify '-o compress' options, only on mount subvolume Below is my test: # mkfs.btrfs /dev/sda8 # mount /dev/sda8 btrfs # df Used: 56k # btrfs subvolume create mysubvolume # mkdir

Re: [PATCH 7/7] btrfs: fix a wrong error check in add_ra_bio_pages()

2010-07-29 Thread Yan, Zheng
2010/7/29 Miao Xie mi...@cn.fujitsu.com: From: Liu Bo liubo2...@cn.fujitsu.com Only when a page is not found by page_index, we'll go to the error check. Signed-off-by: Liu Bo liubo2...@cn.fujitsu.com Signed-off-by: Miao Xie mi...@cn.fujitsu.com ---  fs/btrfs/compression.c |    2 +-  1

Re: [PATCH 7/7] btrfs: fix a wrong error check in add_ra_bio_pages()

2010-07-29 Thread Miao Xie
On Thu, 29 Jul 2010 18:38:39 +0800, Yan, Zheng wrote: 2010/7/29 Miao Xiemi...@cn.fujitsu.com: From: Liu Boliubo2...@cn.fujitsu.com Only when a page is not found by page_index, we'll go to the error check. Signed-off-by: Liu Boliubo2...@cn.fujitsu.com Signed-off-by: Miao

[PATCH] Btrfs: compressed file size ioctl

2010-07-29 Thread Ulrich Hecht
Returns a file's size on disk. Based on a patch by Chris Ball, improved following suggestions by Chris Mason and Miao Xie. Minimal example: #include sys/ioctl.h #include fcntl.h #include stdint.h #include stdio.h #define BTRFS_IOCTL_MAGIC 0x94 #define BTRFS_IOC_COMPR_SIZE

Re: [PATCH] Btrfs: compressed file size ioctl

2010-07-29 Thread Ulrich Hecht
On Tuesday 27 July 2010, Miao Xie wrote: Why don't you use btrfs_get_extent() to implement it? Because I didn't know about it. :) Thanks, that simplifies things a lot. CU Uli -- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe from this list: send the line

Re: [PATCH] Btrfs: compressed file size ioctl

2010-07-29 Thread liubo
On 07/29/2010 07:27 PM, Ulrich Hecht wrote: Returns a file's size on disk. Based on a patch by Chris Ball, improved following suggestions by Chris Mason and Miao Xie. Minimal example: #include sys/ioctl.h #include fcntl.h #include stdint.h #include stdio.h #define BTRFS_IOCTL_MAGIC

wanted X found X-1 but you got X-2

2010-07-29 Thread Adi
hi, i have a problem with mounting a btrfspartition. i think it corrupted somehow. btrfsck also didn't work. here is the demesg output, if i try to btrfsck it: *** device-mapper: ioctl: unable to remove open device temporary-cryptsetup-2466 device fsid

Re: kernel BUG at fs/btrfs/extent-tree.c:1353

2010-07-29 Thread Johannes Hirte
Am Donnerstag 22 Juli 2010, 20:07:23 schrieb Johannes Hirte: Am Montag 19 Juli 2010, 10:01:46 schrieb Miao Xie: On Thu, 15 Jul 2010 20:14:51 +0200, Johannes Hirte wrote: Am Donnerstag 15 Juli 2010, 02:11:04 schrieb Dave Chinner: On Wed, Jul 14, 2010 at 05:25:23PM +0200, Johannes Hirte

Re: kernel BUG at fs/btrfs/extent-tree.c:1353

2010-07-29 Thread Jens Axboe
On 07/29/2010 07:09 PM, Johannes Hirte wrote: Am Donnerstag 22 Juli 2010, 20:07:23 schrieb Johannes Hirte: Am Montag 19 Juli 2010, 10:01:46 schrieb Miao Xie: On Thu, 15 Jul 2010 20:14:51 +0200, Johannes Hirte wrote: Am Donnerstag 15 Juli 2010, 02:11:04 schrieb Dave Chinner: On Wed, Jul 14,

[Bug] check return of kmalloc()

2010-07-29 Thread Vasiliy Kulikov
Hi, I've discovered that some btrfs code doesn't check whether kmalloc() call succeeded. I poorly understand what this code does and how it can be changed, maybe it would be happy with __GFP_NOFAIL. Also there are BUG_ON() after kmalloc()'s, if they could be changed not to panic it would be

Re: can subvolumes be specified as compressed?

2010-07-29 Thread Chris Ball
Hi, So, is there such a method: in a specified directory, the compression feature is enabled, and the file in this directory will be compressed automatically, while the others don't enable compression. I don't think so, but it wouldn't be difficult -- you'd just set a per-inode

no space left on device

2010-07-29 Thread Lubos Kolouch
Hello, kerner 2.6.35-rc6 btrfs filesystem df /home Data: total=1.68TB, used=987.62GB Metadata: total=56.01GB, used=48.16GB System: total=12.00MB, used=200.00KB touch: cannot touch `/home/x': No space left on device Any ideas what I should do? Thank you Lubos -- To unsubscribe from this

Re: wanted X found X-1 but you got X-2

2010-07-29 Thread liubo
On 07/29/2010 09:11 PM, Adi wrote: hi, i have a problem with mounting a btrfspartition. i think it corrupted somehow. btrfsck also didn't work. here is the demesg output, if i try to btrfsck it: Hi, Adi can you give us some steps with which the bug can be reproduced? Thanks, liubo