Re: Disk space accounting and subvolume delete

2010-05-11 Thread Yan, Zheng
On Tue, May 11, 2010 at 11:45 PM, Bruce Guenter wrote: > On Tue, May 11, 2010 at 08:10:38AM +0800, Yan, Zheng  wrote: >> This is because the snapshot deleting ioctl only removes the a link. > > Right, I understand that.  That part is not unexpected, as it works just > like unlink would.  However..

Re: [PATCH 3/5] direct-io: honor dio->boundary a little more strictly

2010-05-11 Thread Josef Bacik
On Fri, May 07, 2010 at 01:41:04PM -0400, Josef Bacik wrote: > Because BTRFS needs to be able to lookup checksums when we submit the bio's, > we > need to be able to look up the logical offset in the inode we're submitting > the > bio for. The way we do this is in our get_blocks function is retu

Re: rmdir SubVolume?

2010-05-11 Thread Harshavardhana
On 05/11/2010 08:51 AM, Jay Sullivan wrote: Hi, I'm just experimenting with btrfs (am currently using btrfs-tools v0.19). I'm curious about deleting subvolume (and snapshot) directories. What exactly is the technical reason why we need a special command "btrfsctl -D" to delete these? What's t

rmdir SubVolume?

2010-05-11 Thread Jay Sullivan
Hi, I'm just experimenting with btrfs (am currently using btrfs-tools v0.19). I'm curious about deleting subvolume (and snapshot) directories. What exactly is the technical reason why we need a special command "btrfsctl -D" to delete these? What's the obstacle preventing "rmdir" from being used

Re: Disk space accounting and subvolume delete

2010-05-11 Thread Bruce Guenter
On Tue, May 11, 2010 at 08:10:38AM +0800, Yan, Zheng wrote: > This is because the snapshot deleting ioctl only removes the a link. Right, I understand that. That part is not unexpected, as it works just like unlink would. However... > The corresponding tree is dropped in the background by a ke

Re: [MeeGo-dev] Btrfs as default file system

2010-05-11 Thread Chris Mason
On Tue, May 11, 2010 at 04:15:36PM +0300, Ameya Palande wrote: > Hi Arjan, > > On Tue, 2010-05-11 at 15:03 +0200, ext Arjan van de Ven wrote: > > On 5/11/2010 4:00, Ameya Palande wrote: > > > Hi, > > > > > > I wanted to know why Btrfs is selected as default file system for MeeGo. > > > Following t

Re: [MeeGo-dev] Btrfs as default file system

2010-05-11 Thread Ameya Palande
Hi Arjan, On Tue, 2010-05-11 at 15:03 +0200, ext Arjan van de Ven wrote: > On 5/11/2010 4:00, Ameya Palande wrote: > > Hi, > > > > I wanted to know why Btrfs is selected as default file system for MeeGo. > > Following text is copied from Btrfs kernel Kconfig option: > > > > Btrfs filesystem (EXPER

[PATCH 4/5] btrfs: don't cache empty block groups during mount

2010-05-11 Thread Yan, Zheng
the tree log recover code expects no free space cached before it executes. Signed-off-by: Yan Zheng --- diff -urp 4/fs/btrfs/extent-tree.c 8/fs/btrfs/extent-tree.c --- 4/fs/btrfs/extent-tree.c2010-05-11 14:15:29.174108554 +0800 +++ 8/fs/btrfs/extent-tree.c2010-05-11 13:26:38.036107000 +0

[PATCH 3/5] btrfs: split btrfs_alloc_free_block()

2010-05-11 Thread Yan, Zheng
split btrfs_alloc_free_block() into btrfs_reserved_tree_block() and btrfs_alloc_reserved_tree_block(). Signed-off-by: Yan Zheng --- diff -urp 3/fs/btrfs/ctree.h 4/fs/btrfs/ctree.h --- 3/fs/btrfs/ctree.h 2010-05-11 14:09:45.052107958 +0800 +++ 4/fs/btrfs/ctree.h 2010-05-11 13:15:47.060357000 +0

[PATCH 2/5] btrfs: track changes to tree blocks' key

2010-05-11 Thread Yan, Zheng
update key stored in back-reference after tree block's key changes. Signed-off-by: Yan Zheng --- diff -urp 2/fs/btrfs/ctree.c 3/fs/btrfs/ctree.c --- 2/fs/btrfs/ctree.c 2010-05-11 14:00:04.122357838 +0800 +++ 3/fs/btrfs/ctree.c 2010-05-11 14:09:45.050108153 +0800 @@ -348,10 +348,8 @@ static noi

[RFC] log mode COW

2010-05-11 Thread Yan, Zheng
The aim of log mode COW is solve extent tree performance issue when free metadata space are scarce and fragmented. The basic idea is: when cowing a non-shared block, we insert a log entry that maps the new block to the old block into a special log tree, and do not update the extent tree. After tran

[PATCH 1/5] btrfs: pass buffer extent to btrfs_free_tree_block

2010-05-11 Thread Yan, Zheng
prepare for the log code Signed-off-by: Yan Zheng --- diff -urp 1/fs/btrfs/ctree.c 2/fs/btrfs/ctree.c --- 1/fs/btrfs/ctree.c 2010-04-14 14:49:56.342950744 +0800 +++ 2/fs/btrfs/ctree.c 2010-05-11 14:00:04.122357838 +0800 @@ -279,7 +279,8 @@ int btrfs_block_can_be_shared(struct btr static noinl