Re: [PATCH] Btrfs: fix the same inode id problem when doing auto defragment

2012-05-24 Thread David Sterba
On Thu, May 24, 2012 at 10:42:19AM +0800, Miao Xie wrote: > @@ -87,9 +102,9 @@ static void __btrfs_add_inode_defrag(struct inode *inode, > parent = *p; > entry = rb_entry(parent, struct inode_defrag, rb_node); > > - if (defrag->ino < entry->ino) > +

[PATCH] Btrfs: fix the same inode id problem when doing auto defragment

2012-05-23 Thread Miao Xie
Two files in the different subvolumes may have the same inode id, so The rb-tree which is used to manage the defragment object must take it into account. This patch fix this problem. Signed-off-by: Miao Xie --- fs/btrfs/file.c | 45 +++-- 1 files changed