[PATCH 1/2] Btrfs: cleanup unnecessary clear when freeing a transaction or a trans handle

2012-11-15 Thread Miao Xie
We clear the transaction object and the trans handle when they are about to be freed, it is unnecessary, cleanup it. Signed-off-by: Miao Xie mi...@cn.fujitsu.com --- fs/btrfs/transaction.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index

[PATCH 2/2] Btrfs: use common work instead of delayed work

2012-11-15 Thread Miao Xie
Since we do not want to delay the async transaction commit, we should use common work, not delayed work. Signed-off-by: Miao Xie mi...@cn.fujitsu.com --- fs/btrfs/transaction.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/transaction.c

Re: problem with ceph and btrfs patch: set journal_info in async trans commit worker

2012-11-15 Thread Stefan Priebe - Profihost AG
Hi Miao, Am 15.11.2012 06:18, schrieb Miao Xie: Hi, Stefan On wed, 14 Nov 2012 14:42:07 +0100, Stefan Priebe - Profihost AG wrote: Hello list, i wanted to try out ceph with latest vanilla kernel 3.7-rc5. I was seeing a massive performance degration. I see around 22x btrfs-endio-write

btrfs: corrupt leaf, bad key order

2012-11-15 Thread Olivier Bonvalet
Hi, in my logs I have : [482886.171753] btrfs: corrupt leaf, bad key order: block=5484560384,root=1, slot=39 [482890.537049] btrfs: corrupt leaf, bad key order: block=5484560384,root=1, slot=39 [482940.827007] btrfs: corrupt leaf, bad key order: block=5484560384,root=1, slot=39 [482940.827048]

[PATCH] Btrfs: disable qgroup id 0

2012-11-15 Thread Miao Xie
Qgroup id 0 is a special number, we should set the id of a qgroup to 0. Fix it. Signed-off-by: Miao Xie mi...@cn.fujitsu.com --- fs/btrfs/ioctl.c | 5 + 1 file changed, 5 insertions(+) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 8e5b7fa..922a33a 100644 --- a/fs/btrfs/ioctl.c +++

[PATCH] btrfs-progs: remove unnecessary assignment in btrfs-map-logical.c

2012-11-15 Thread Wang Sheng-Hui
The info_file is set to stdout by default, and we donot need to reassign it to stdout if it's not changed to other values. Signed-off-by: Wang Sheng-Hui shh...@gmail.com --- btrfs-map-logical.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/btrfs-map-logical.c

Re: Cannot list subvolumes with latest git

2012-11-15 Thread Jan Schmidt
On Wed, November 14, 2012 at 19:26 (+0100), Jérôme Poulin wrote: Using Debian experimental kernel, 3.6.4-1~experimental.1, and latest btrfs tools from git master, I am not able to execute btrfs subvolume list. # ./btrfs sub li /mnt/data0/ ERROR: Failed to lookup path for root 0 - No such

Re: Several unhappy btrfs's after RAID meltdown

2012-11-15 Thread Ryan C. Underwood
Finally made some more progress on one of my melted down btrfs from earlier this year. First I hacked find-root.c to not stop scanning the disk when it thinks it has found the real root. I wanted it to print out all possible roots. I saved the stderr output to a logfile. About 1226 possible

[PATCH] btrfs-progs: fix 32bit int/pointer cast warnings

2012-11-15 Thread Zach Brown
This uses uintptr_t to cast pointers to u64 ioctl arguments to silence some 32bit build warnings: cmds-inspect.c: In function ‘__ino_to_path_fd’: cmds-inspect.c:47:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] cmds-inspect.c: In function

Likely mem leak in 3.7

2012-11-15 Thread James Cloos
Starting with 3.7 rc1, my workstation seems to loose ram. Up until (and including) 3.6, used-(buffers+cached) was roughly the same as sum(rss) (taking shared into account). Now there is an approx 6G gap. When the box first starts, it is clearly less swappy than with = 3.6; I can't tell whether

[PATCH] btrfs: limit fallocate extent reservation to 256MB

2012-11-15 Thread Zach Brown
Very large fallocate requests are cpu bound and result in extents with a repeating pattern of ever decreasing size: $ time fallocate -l 1T file real0m13.039s ( an excerpt of the extents from btrfs-debug-tree: ) prealloc data disk byte 1536292564992 nr 397312 prealloc data disk byte

Re: Cannot list subvolumes with latest git

2012-11-15 Thread Miao Xie
On Thu, 15 Nov 2012 17:05:41 +0100, Jan Schmidt wrote: On Wed, November 14, 2012 at 19:26 (+0100), Jérôme Poulin wrote: Using Debian experimental kernel, 3.6.4-1~experimental.1, and latest btrfs tools from git master, I am not able to execute btrfs subvolume list. # ./btrfs sub li

[Request for review v2] [RFC] Add label support for snapshots and subvols

2012-11-15 Thread Anand jain
From: Anand Jain anand.j...@oracle.com v1-v2: This v2 patch accepts the review comments on the btrfs kernel changes by Jan. and Moved the get and set subvol label to under subvol sub-cmd eg: btrfs subvolume label /btrfs/ss5 btrfs su

[PATCH 1/3] Btrfs-progs: move open_file_or_dir() to utils.c

2012-11-15 Thread Anand jain
From: Anand Jain anand.j...@oracle.com The definition of the function open_file_or_dir() is moved from common.c to utils.c in order to be able to share some common code between scrub and the device stats in the following step. That common code uses open_file_or_dir(). Since open_file_or_dir()

[PATCH v2] Btrfs: add label to snapshot and subvol

2012-11-15 Thread Anand jain
From: Anand Jain anand.j...@oracle.com v1-v2: This adds a new member label in the btrfs_root_item struct, which uses 32 bytes of the reserved 64 bytes. So that btrfs_root_item remains same. Signed-off-by: Anand Jain anand.j...@oracle.com --- fs/btrfs/ctree.h | 12 +++-

[PATCH 3/3] Btrfs-progs: cmd option to show or set the subvol label

2012-11-15 Thread Anand jain
From: Anand Jain anand.j...@oracle.com Signed-off-by: Anand Jain anand.j...@oracle.com --- cmds-subvolume.c | 37 + man/btrfs.8.in |6 ++ 2 files changed, 43 insertions(+), 0 deletions(-) diff --git a/cmds-subvolume.c b/cmds-subvolume.c index

Re: [PATCH] Btrfs: add label to snapshot and subvol

2012-11-15 Thread Anand Jain
Hi Jan, Thanks for the review. Just posted the v2 patch for the btrfs kernel patch. Which, used the btrfs_root_item reserved space and used join_transaction -Anand On 05/11/12 15:39, Jan Schmidt wrote: Hi Anand, Some comments on your kernel patch from a quick jump through: On

Re: [RFC v4+ hot_track 02/19] vfs: initialize and free data structures

2012-11-15 Thread Zhi Yong Wu
On Wed, Nov 7, 2012 at 6:24 AM, David Sterba d...@jikos.cz wrote: On Mon, Oct 29, 2012 at 12:30:44PM +0800, zwu.ker...@gmail.com wrote: +/* Frees the entire hot_range_tree. */ +static void hot_inode_item_free(struct kref *kref) +{ + struct hot_comm_item *comm_item = container_of(kref, +

Re: [PATCH v2] Btrfs: add label to snapshot and subvol

2012-11-15 Thread Miao Xie
Hi, Anand On fri, 16 Nov 2012 12:52:25 +0800, Anand jain wrote: +static int btrfs_ioctl_subvol_getlabel(struct btrfs_root *root, + void __user *arg) +{ + char *label; + + label = btrfs_root_label(root-root_item); + if