Re: BUG at fs/btrfs/locking.c:265

2012-12-27 Thread Liu Bo
On Thu, Dec 27, 2012 at 08:27:11AM +0400, Slava Barinov wrote: Hello, Twice for past two days I caught an error with btrfs, you can see a fragment of dmesg on http://paste.org.ru/?kz4x31 and http://paste.org.ru/?lwdeu3 It's a buildserver with jenkins that several times an hour starts

[PATCH 1/8] Btrfs: remove deprecated comments

2012-12-27 Thread Liu Bo
commit d53ba47484ed6245e640ee4bfe9d21e9bfc15765 (Btrfs: use commit root when loading free space cache) has remove the deadlock check, and the related comments can be removed as well. Signed-off-by: Liu Bo bo.li@oracle.com --- fs/btrfs/extent-tree.c |6 -- 1 files changed, 0

[PATCH 2/8] Btrfs: kill unused arguments of cache_block_group

2012-12-27 Thread Liu Bo
Argument 'trans' and 'root' are not used any more. Signed-off-by: Liu Bo bo.li@oracle.com --- fs/btrfs/extent-tree.c | 13 + 1 files changed, 5 insertions(+), 8 deletions(-) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 8540f94..b57c233 100644 ---

[PATCH 3/8] Btrfs: kill unused argument of update_block_group

2012-12-27 Thread Liu Bo
Argument 'trans' is not used any more. Signed-off-by: Liu Bo bo.li@oracle.com --- fs/btrfs/extent-tree.c | 12 +--- 1 files changed, 5 insertions(+), 7 deletions(-) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index b57c233..6f71a7a 100644 ---

[PATCH 4/8] Btrfs: kill unused argument of btrfs_pin_extent_for_log_replay

2012-12-27 Thread Liu Bo
Argument 'trans' is not used any more. Signed-off-by: Liu Bo bo.li@oracle.com --- fs/btrfs/ctree.h |3 +-- fs/btrfs/extent-tree.c |3 +-- fs/btrfs/tree-log.c|3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index

[PATCH 5/8] Btrfs: use token to avoid times mapping extent buffer

2012-12-27 Thread Liu Bo
The API in tree log code has done sort of changes, and it proves that we can benifit from using token, so do the same thing here. function_graph tracer's timer shows that it costs nearly half time of before(39.788us - 22.391us). Signed-off-by: Liu Bo bo.li@oracle.com --- fs/btrfs/inode.c |

[PATCH 6/8] Btrfs: save us a read_lock

2012-12-27 Thread Liu Bo
This does not change the logic of code, but can save us a read_lock. Signed-off-by: Liu Bo bo.li@oracle.com --- fs/btrfs/locking.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/locking.c b/fs/btrfs/locking.c index 2a1762c..e95df43 100644 ---

[PATCH 7/8] Btrfs: record first logical byte in memory

2012-12-27 Thread Liu Bo
This'd save us a rbtree search which may become expensive in large filesystem. Signed-off-by: Liu Bo bo.li@oracle.com --- fs/btrfs/ctree.h |1 + fs/btrfs/disk-io.c |1 + fs/btrfs/extent-tree.c | 19 ++- 3 files changed, 20 insertions(+), 1 deletions(-)

[PATCH 8/8] Btrfs: let allocation start from the right raid type

2012-12-27 Thread Liu Bo
This'd avoid us empty looping. Say we have only one disk and the metadata raid type will be defaultly DUP, and we do not need to start from index=0(RAID10) and get over two empty loops to index=2(DUP). Signed-off-by: Liu Bo bo.li@oracle.com --- fs/btrfs/extent-tree.c |2 +- 1 files

btrfs df confusion

2012-12-27 Thread Brendan Hide
Hi I've made some updates on the wiki and I'd like a technical review for correctness. This particular topic is already confusing - some unnecessary sarcasm made it even more so: https://btrfs.wiki.kernel.org/index.php/FAQ#Why_does_df_show_incorrect_free_space_for_my_RAID_volume.3F Due to

Re: BUG at fs/btrfs/locking.c:265

2012-12-27 Thread David Sterba
On Thu, Dec 27, 2012 at 04:07:31PM +0800, Liu Bo wrote: On Thu, Dec 27, 2012 at 08:27:11AM +0400, Slava Barinov wrote: And there's nothing in dmesg that could help user to understand what happened. I've lost about ten minutes trying to understand what does it want from me. Could you

Another novice question comment

2012-12-27 Thread Gene Czarcinski
OK, this is from inside a shell. I have a btrfs volume or a btrfs subvolume on some arbitrary mount mount. Is there some way to tell if it is a btrfs volume or a btrfs subvolume that is mounted? Comment: It sure would be nice if the btrfs man page corresponded better to the btrfs code.

Re: Another novice question comment

2012-12-27 Thread Hugo Mills
On Thu, Dec 27, 2012 at 09:29:37AM -0500, Gene Czarcinski wrote: OK, this is from inside a shell. I have a btrfs volume or a btrfs subvolume on some arbitrary mount mount. Is there some way to tell if it is a btrfs volume or a btrfs subvolume that is mounted? nitpick It's always a

Re: Another novice question comment

2012-12-27 Thread Chris Murphy
On Dec 27, 2012, at 7:29 AM, Gene Czarcinski g...@czarc.net wrote: OK, this is from inside a shell. I have a btrfs volume or a btrfs subvolume on some arbitrary mount mount. Is there some way to tell if it is a btrfs volume or a btrfs subvolume that is mounted? cat /proc/self/mountinfo |

Re: Another novice question comment

2012-12-27 Thread Swâmi Petaramesh
Le 27/12/2012 16:03, Hugo Mills a écrit : Right now, no, there isn't any way of telling which subvolume is mounted at a given location. Er... Check subvol= here... root@tethys:/# mount | grep btrfs /dev/mapper/VG1-BTR_POOL on / type btrfs

Re: Another novice question comment

2012-12-27 Thread Chris Murphy
On Dec 27, 2012, at 9:47 AM, Swâmi Petaramesh sw...@petaramesh.org wrote: Le 27/12/2012 16:03, Hugo Mills a écrit : Right now, no, there isn't any way of telling which subvolume is mounted at a given location. Er... Check subvol= here... root@tethys:/# mount | grep btrfs

Re: btrfs df confusion

2012-12-27 Thread Goffredo Baroncelli
On 12/27/2012 12:59 PM, Brendan Hide wrote: Hi Hi, I've made some updates on the wiki and I'd like a technical review for correctness. This particular topic is already confusing - some unnecessary sarcasm made it even more so:

Re: [RFC PATCH v7 2/2] Btrfs: Add a new ioctl to set/change the label of a mounted file system

2012-12-27 Thread David Sterba
On Thu, Dec 20, 2012 at 04:43:06PM +0800, Jeff Liu wrote: With the new ioctl(2) BTRFS_IOC_SET_FSLABEL, we can set/change the label of a mounted file system. Signed-off-by: Jie Liu jeff@oracle.com Signed-off-by: Anand Jain anand.j...@oracle.com Cc: Miao Xie mi...@cn.fujitsu.com Cc:

Re: Another novice question comment

2012-12-27 Thread Gene Czarcinski
On 12/27/2012 11:07 AM, Chris Murphy wrote: On Dec 27, 2012, at 7:29 AM, Gene Czarcinski g...@czarc.net wrote: OK, this is from inside a shell. I have a btrfs volume or a btrfs subvolume on some arbitrary mount mount. Is there some way to tell if it is a btrfs volume or a btrfs subvolume

Re: Another novice question comment

2012-12-27 Thread Chris Murphy
On Dec 27, 2012, at 10:04 AM, Swâmi Petaramesh sw...@petaramesh.org wrote: Le 27/12/2012 17:55, Chris Murphy a écrit : /dev/sda2 on /boot type btrfs (rw,relatime,subvol=UBUNTU/ @boot,autodefrag) That would only seem to work with btrfs on LVM which I'd think is uncommon and complicated.

Re: Another novice question comment

2012-12-27 Thread Gene Czarcinski
On 12/27/2012 11:55 AM, Chris Murphy wrote: On Dec 27, 2012, at 9:47 AM, Swâmi Petaramesh sw...@petaramesh.org wrote: Le 27/12/2012 16:03, Hugo Mills a écrit : Right now, no, there isn't any way of telling which subvolume is mounted at a given location. Er... Check subvol= here...

Re: Another novice question comment

2012-12-27 Thread Swâmi Petaramesh
Le 27/12/2012 20:25, Chris Murphy a écrit : For whatever reason, our mount command behaviors differ. When I use mount, I do not get a subvol entry at all in parenthesis like you are. I can only see this information in /proc/self/mountinfo. I get this on vanilla Ubuntu 12.10 Quantal... --

Re: Another novice question comment

2012-12-27 Thread Swâmi Petaramesh
Le 27/12/2012 20:27, Gene Czarcinski a écrit : Oh thanks for that little reminder that you can put btrfs on an LV. That's an installation over a LUKS-encrypted LVM for everything except for /boot, which lies on a separate ordinary partition... -- Swâmi Petaramesh sw...@petaramesh.org

Re: Another novice question comment

2012-12-27 Thread Chris Murphy
On Dec 27, 2012, at 12:27 PM, Swâmi Petaramesh sw...@petaramesh.org wrote: Le 27/12/2012 20:25, Chris Murphy a écrit : For whatever reason, our mount command behaviors differ. When I use mount, I do not get a subvol entry at all in parenthesis like you are. I can only see this information

Re: Another novice question comment

2012-12-27 Thread Chris Murphy
On Dec 27, 2012, at 12:27 PM, Gene Czarcinski g...@czarc.net wrote: Oh thanks for that little reminder that you can put btrfs on an LV. I find it's more trouble than it's worth. It doesn't bring much to the table. I am trying to see if I can get grub2 and os-prober to handle btrfs. There

Re: btrfs df confusion

2012-12-27 Thread Brendan Hide
Thanks, duplicate effort averted :) On 2012/12/27 07:04 PM, Goffredo Baroncelli wrote: On 12/27/2012 12:59 PM, Brendan Hide wrote: Hi Hi, I've made some updates on the wiki and I'd like a technical review for correctness. This particular topic is already confusing - some unnecessary sarcasm

problems with dracut mounting subvols

2012-12-27 Thread Chris Murphy
I've just tried putting usr in a subvol. Installation proceeds normally, no errors, but I'm dropped to a dracut prompt which indicates mount of /usr failed. dmesg follows: [ 14.025215] systemd[1]: Starting dracut initqueue hook... [ 14.077890] Btrfs loaded [ 14.129987] device label

Re: Another novice question comment

2012-12-27 Thread David Sterba
On Thu, Dec 27, 2012 at 02:14:43PM -0500, Gene Czarcinski wrote: On 12/27/2012 11:07 AM, Chris Murphy wrote: On Dec 27, 2012, at 7:29 AM, Gene Czarcinski g...@czarc.net wrote: OK, this is from inside a shell. I have a btrfs volume or a btrfs subvolume on some arbitrary mount mount. Is

Re: Another novice question comment

2012-12-27 Thread Russell Coker
On Fri, 28 Dec 2012, Chris Murphy li...@colorremedies.com wrote: On Dec 27, 2012, at 12:27 PM, Gene Czarcinski g...@czarc.net wrote: Oh thanks for that little reminder that you can put btrfs on an LV. I find it's more trouble than it's worth. It doesn't bring much to the table. I've tried

Re: problems with dracut mounting subvols

2012-12-27 Thread dima
I've just tried putting usr in a subvol. Installation proceeds normally, no errors, but I'm dropped to a dracut prompt which indicates mount of /usr failed. dmesg follows: [ 14.025215] systemd[1]: Starting dracut initqueue hook... [ 14.077890] Btrfs loaded [ 14.129987] device label

Re: problems with dracut mounting subvols

2012-12-27 Thread Chris Murphy
On Dec 27, 2012, at 6:13 PM, dima dole...@parallels.com wrote: /dev/disk/by-uuid/64383cfe-c31d-4d25-97c4-4e6b7e788b26 /sysroot/usr btrfs subvol=usr,subvol=root,ro 1 2 I'd say that the problem is definitely with this line having two subvolumes listed. Maybe you should boot from a live

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

2012-12-27 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 2/8] Btrfs-progs: Move printing outside of btrfs_list_subvols

2012-12-27 Thread Anand jain
From: Anand Jain anand.j...@oracle.com its better to have btrfs_list_subvols just return witout printing so that btrfs_list_subvols can be reused. Signed-off-by: Anand Jain anand.j...@oracle.com --- btrfs-list.c | 28 ++-- btrfs-list.h |2 +-

[PATCH 4/8] Btrfs-progs: move struct root_info to btrfs-list.h

2012-12-27 Thread Anand jain
From: Anand Jain anand.j...@oracle.com Signed-off-by: Anand Jain anand.j...@oracle.com --- btrfs-list.c | 47 --- btrfs-list.h | 47 ++- 2 files changed, 46 insertions(+), 48 deletions(-) diff --git

[PATCH 5/8] Btrfs-progs: function to get root_info of a subvol

2012-12-27 Thread Anand jain
From: Anand Jain anand.j...@oracle.com Signed-off-by: Anand Jain anand.j...@oracle.com --- btrfs-list.c | 37 + btrfs-list.h |1 + 2 files changed, 38 insertions(+), 0 deletions(-) diff --git a/btrfs-list.c b/btrfs-list.c index 1851f3e..cb458f1 100644

[PATCH 7/8] Btrfs-progs: add method to filter snapshots by parent uuid

2012-12-27 Thread Anand jain
From: Anand Jain anand.j...@oracle.com Signed-off-by: Anand Jain anand.j...@oracle.com --- btrfs-list.c |6 ++ btrfs-list.h |1 + 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/btrfs-list.c b/btrfs-list.c index 308b54c..efce966 100644 --- a/btrfs-list.c +++

[PATCH 3/8] Btrfs-progs: add parent uuid for snapshots

2012-12-27 Thread Anand jain
From: Anand Jain anand.j...@oracle.com Signed-off-by: Anand Jain anand.j...@oracle.com --- btrfs-list.c | 32 +++- btrfs-list.h |1 + cmds-subvolume.c |6 +- 3 files changed, 33 insertions(+), 6 deletions(-) diff --git a/btrfs-list.c

[RFC PATCH v8 1/2] Btrfs: Add a new ioctl to get the label of a mounted file system

2012-12-27 Thread Jeff Liu
Add a new ioctl(2) BTRFS_IOC_GET_FSLABLE, so that we can get the label upon a mounted file system. Signed-off-by: Jie Liu jeff@oracle.com Signed-off-by: Anand Jain anand.j...@oracle.com Cc: Miao Xie mi...@cn.fujitsu.com Cc: Goffredo Baroncelli kreij...@inwind.it Cc: David Sterba

[RFC PATCH v8 0/2] Btrfs: get/set label of a mounted file system

2012-12-27 Thread Jeff Liu
Hello, Here is the updated version of introduce get/set_or_change label upon a mounted filesystem. v8-v7: btrfs_ioc_fs_getlabel(): - Examine the label length with strnlen(). - Tweak up warn() info if the label is not NUL terminated according to Goffredo's suggestions. The old versions can be

[RFC PATCH v8 2/2] Btrfs: Add a new ioctl to set/change the label of a mounted file system

2012-12-27 Thread Jeff Liu
With this new ioctl(2) BTRFS_IOC_SET_FSLABEL, we can set/change the label of a mounted file system. Signed-off-by: Jie Liu jeff@oracle.com Signed-off-by: Anand Jain anand.j...@oracle.com Reviewed-by: Miao Xie mi...@cn.fujitsu.com Reviewed-by: Goffredo Baroncelli kreij...@inwind.it

Re: Another novice question comment

2012-12-27 Thread Chris Murphy
On Dec 27, 2012, at 5:34 PM, Russell Coker russ...@coker.com.au wrote: On Fri, 28 Dec 2012, Chris Murphy li...@colorremedies.com wrote: On Dec 27, 2012, at 12:27 PM, Gene Czarcinski g...@czarc.net wrote: Oh thanks for that little reminder that you can put btrfs on an LV. I find it's more