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, liub

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 list

Re: can subvolumes be specified as compressed?

2010-07-29 Thread Chris Ball
Hi, > I don't know whether this demand, which specified some subvolumes > or directories to be compressed, conflict with the design of > btrfs's compression feature, may be they want to do this thing > well, and everyone will enable the compression feature, rather > than throw the d

Re: can subvolumes be specified as compressed?

2010-07-29 Thread Wang Shaoyan
I don't know whether this demand, which specified some subvolumes or directories to be compressed, conflict with the design of btrfs's compression feature, may be they want to do this thing well, and everyone will enable the compression feature, rather than throw the decision to user to determine w

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-inod

Re: can subvolumes be specified as compressed?

2010-07-29 Thread Wang Shaoyan
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. thanks. 2010/7/29 Wang Shaoyan : > A prerequisite is: when first mounted file system, not specify '

Re: [Bug] check return of kmalloc()

2010-07-29 Thread Dan Carpenter
On Thu, Jul 29, 2010 at 11:15:57PM +0400, Vasiliy Kulikov wrote: > 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 BU

[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 great

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 W

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

Re: Hardlinks-per-directory limit?

2010-07-29 Thread Josef Bacik
On Thu, Jul 29, 2010 at 12:35:59AM -0400, Ken D'Ambrosio wrote: > Hello, all. I'm thinking of rolling out a BackupPC server, and -- based > on the strength of the recent Phoronix benchmarks > (http://benchmarkreviews.com/index.php?option=com_content&task=view&id=11156&Itemid=23) > -- had been stro

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 184f65b363e

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 > #include > #include > #include > #define BTRFS_IOCTL_MAGIC 0x94 > #define BTRFS_IO

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 "

[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 #include #include #include #define BTRFS_IOCTL_MAGIC 0x94 #define BTRFS_IOC_COMPR_SIZE _IOR(BTRFS_IOCTL_MAGIC, 21, uint64_t) int main(in

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 Xie: From: Liu Bo Only when a page is not found by page_index, we'll go to the error check. Signed-off-by: Liu Bo Signed-off-by: Miao Xie --- fs/btrfs/compression.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(

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 : > From: Liu Bo > > Only when a page is not found by page_index, we'll go to the error check. > > Signed-off-by: Liu Bo > Signed-off-by: Miao Xie > --- >  fs/btrfs/compression.c |    2 +- >  1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/fs/btrfs/compressio

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 s

[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 increase

[PATCH 1/7] btrfs/acl: adjust logical path of btrfs_get_acl()

2010-07-29 Thread Miao Xie
From: Liu Bo - There exists a memory leak. - More checks of returned "size" are needed. According to ext3_get_acl()'s style, we do some adjustments here. Signed-off-by: Liu Bo Signed-off-by: Miao Xie --- fs/btrfs/acl.c | 17 - 1 files changed, 8 insertions(+), 9 deletions(-

[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 de

[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 --- fs/btrfs/disk-io.c | 33 - 1 files changed, 24 insertions(+), 9

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

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

[PATCH 2/7] btrfs/acl: fix btrfs_xattr_acl_set()

2010-07-29 Thread Miao Xie
- cleanup unnecessary code - add validity check for acl Signed-off-by: Miao Xie --- fs/btrfs/acl.c | 11 ++- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c index 2f4f65a..bb35580 100644 --- a/fs/btrfs/acl.c +++ b/fs/btrfs/acl.c @@ -169,16

[PATCH 3/7] btrfs/acl: add noacl check for btrfs_get_acl()

2010-07-29 Thread Miao Xie
btrfs returned the acl info though it was mounted with "noacl" option. Steps to reproduce: # mkfs.btrfs /dev/sda2 # mount /dev/sda2 /mnt # touch /mnt/file0 # setfacl -m 'u:root:x,g::x,o::x' /mnt/file0 # umount /mnt # mount /dev/sda2 -o noacl /mnt # getfacl /mnt/file0 we add a noacl check f

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 /dev

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 k

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 some_dir_i

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

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

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 f