Re: Sparse Warnings about locks in extent-tree.c

2014-09-23 Thread Liu Bo
On Mon, Sep 22, 2014 at 09:57:35PM -0400, nick wrote: Hello Btfs Developers, I am new so am unsure of how to fix this but we are hitting some sparse warnings about unlock/lock is having a wrong count when exiting certain functions in extent-tree.c. I will paste the warnings below for you

RE: Corrupted metadata. 'btrfs check' fails repair due to an assertion failure: '!(root-ref_cows trans-transid != root-last_trans)'

2014-09-23 Thread Jaap Pieroen
I forgot the attachment. Here it is. # btrfs-debug-tree -b 13415158087680 /dev/sdh leaf 13415158087680 items 90 free space 8577 generation 140065 owner 5007 fs uuid 20ccaf09-54ea-486e-9495-9dc91b933e9c chunk uuid f5a0dea1-b250-4ea4-bf7f-50d30401a708 item 0 key (7516 DIR_INDEX 102) itemoff

Re: [PATCH v4] btrfs-progs: fix page align issue for lzo compress in restore

2014-09-23 Thread Gui Hecheng
On Tue, 2014-09-23 at 10:25 +0800, Gui Hecheng wrote: When runing restore under lzo compression, bad compress length problems are encountered. It is because there is a page align problem with the @decompress_lzo, as follows: |--| ||-| |--|...|--|

[PATCH v4] btrfs-progs: fix page align issue for lzo compress in restore

2014-09-23 Thread Gui Hecheng
When runing restore under lzo compression, bad compress length problems are encountered. It is because there is a page align problem with the @decompress_lzo, as follows: |--| ||-| |--|...|--| page ^page page

Re: [PATCH v4 11/12] security, crypto: LLVMLinux: Remove VLAIS from ima_crypto.c

2014-09-23 Thread Dmitry Kasatkin
On 23/09/14 07:42, beh...@converseincode.com wrote: From: Behan Webster beh...@converseincode.com Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the

Re: [PATCH 1/2] Btrfs: add missing end_page_writeback on submit_extent_page failure

2014-09-23 Thread Liu Bo
On Mon, Sep 22, 2014 at 05:41:04PM +0100, Filipe Manana wrote: If submit_extent_page() fails in write_one_eb(), we end up with the current page not marked dirty anymore, unlocked and marked for writeback. But we never end up calling end_page_writeback() against the page, which will make calls

Re: general thoughts and questions + general and RAID5/6 stability?

2014-09-23 Thread Austin S Hemmelgarn
On 2014-09-22 16:51, Stefan G. Weichinger wrote: Am 20.09.2014 um 11:32 schrieb Duncan: What I do as part of my regular backup regime, is every few kernel cycles I wipe the (first level) backup and do a fresh mkfs.btrfs, activating new optional features as I believe appropriate. Then I boot

mount problem

2014-09-23 Thread Simone Ferretti
Hi all, we're testing BTRFS on our Debian server. After a lot of operations simulating a RAID1 failure, every time I mount my BTRFS RAID1 volume the kernel logs these messages: [73894.436173] BTRFS: bdev /dev/etherd/e30.20 errs: wr 33036, rd 0, flush 0, corrupt 2806, gen 0 [73894.436181]

Re: [PATCH] btrfs: Make btrfs handle security mount options internally to avoid losing security label.

2014-09-23 Thread Chris Mason
On 09/23/2014 01:40 AM, Qu Wenruo wrote: [BUG] Originally when mount btrfs with -o subvol= mount option, btrfs will lose all security lable. And if the btrfs fs is mounted somewhere else, due to the lost of security lable, SELinux will refuse to mount since the same super block is being

Re: [PATCH] xfstests: btrfs: add test regarding clearing compression flag/property

2014-09-23 Thread David Disseldorp
On Thu, 11 Sep 2014 11:45:34 +0100, Filipe Manana wrote: Regression test for btrfs where removing the flag FS_COMPR_FL (chattr -c) from an inode wouldn't clear its compression property. This was fixed in the following linux kernel patch: Btrfs: add missing compression property remove in

btrfs send does not work from readonly device

2014-09-23 Thread GEO
Let's say we have a snapshot called snapshot on our device /dev/sdb. Now we boot a qemu machine and attatch the disk read only (since we do not want to put our data at risk in the vm, and read only should be enough to get our snapshot data). I used qemu-system-x86_64 -drive

Re: [PATCH 1/2] Btrfs: add missing end_page_writeback on submit_extent_page failure

2014-09-23 Thread Filipe David Manana
On Tue, Sep 23, 2014 at 11:14 AM, Liu Bo bo.li@oracle.com wrote: On Mon, Sep 22, 2014 at 05:41:04PM +0100, Filipe Manana wrote: If submit_extent_page() fails in write_one_eb(), we end up with the current page not marked dirty anymore, unlocked and marked for writeback. But we never end

Re: general thoughts and questions + general and RAID5/6 stability?

2014-09-23 Thread Stefan G. Weichinger
Am 23.09.2014 um 14:08 schrieb Austin S Hemmelgarn: On 2014-09-22 16:51, Stefan G. Weichinger wrote: Is re-creating btrfs-filesystems *recommended* in any way? Does that actually make a difference in the fs-structure? I would recommend it, there are some newer features that you can only set

Re: general thoughts and questions + general and RAID5/6 stability?

2014-09-23 Thread Austin S Hemmelgarn
On 2014-09-23 09:06, Stefan G. Weichinger wrote: Am 23.09.2014 um 14:08 schrieb Austin S Hemmelgarn: On 2014-09-22 16:51, Stefan G. Weichinger wrote: Is re-creating btrfs-filesystems *recommended* in any way? Does that actually make a difference in the fs-structure? I would recommend it,

Re: [PATCH 1/2] Btrfs: add missing end_page_writeback on submit_extent_page failure

2014-09-23 Thread Liu Bo
On Tue, Sep 23, 2014 at 02:03:07PM +0100, Filipe David Manana wrote: On Tue, Sep 23, 2014 at 11:14 AM, Liu Bo bo.li@oracle.com wrote: On Mon, Sep 22, 2014 at 05:41:04PM +0100, Filipe Manana wrote: If submit_extent_page() fails in write_one_eb(), we end up with the current page not

Re: general thoughts and questions + general and RAID5/6 stability?

2014-09-23 Thread Stefan G. Weichinger
Am 23.09.2014 um 15:38 schrieb Austin S Hemmelgarn: On 2014-09-23 09:06, Stefan G. Weichinger wrote: What features for example? Well, running 'mkfs.btrfs -O list-all' with 3.16 btrfs-progs gives the following list of features: mixed-bg- mixed data and metadata block groups extref

Re: Sparse Warnings about locks in extent-tree.c

2014-09-23 Thread David Sterba
On Tue, Sep 23, 2014 at 02:45:44PM +0800, Liu Bo wrote: On Mon, Sep 22, 2014 at 09:57:35PM -0400, nick wrote: Hello Btfs Developers, I am new so am unsure of how to fix this but we are hitting some sparse warnings about unlock/lock is having a wrong count when exiting certain functions

Re: [PATCH 2/2] Btrfs: be aware of btree inode write errors to avoid fs corruption

2014-09-23 Thread Liu Bo
On Mon, Sep 22, 2014 at 05:41:05PM +0100, Filipe Manana wrote: While we have a transaction ongoing, the VM might decide at any time to call btree_inode-i_mapping-a_ops-writepages(), which will start writeback of dirty pages belonging to btree nodes/leafs. This call might return an error or the

Re: Sparse Warnings about locks in extent-tree.c

2014-09-23 Thread Liu Bo
On Tue, Sep 23, 2014 at 04:01:41PM +0200, David Sterba wrote: On Tue, Sep 23, 2014 at 02:45:44PM +0800, Liu Bo wrote: On Mon, Sep 22, 2014 at 09:57:35PM -0400, nick wrote: Hello Btfs Developers, I am new so am unsure of how to fix this but we are hitting some sparse warnings about

[PATCH] Btrfs: fix crash of btrfs_release_extent_buffer_page

2014-09-23 Thread Liu Bo
This is actually inspired by Filipe's patch. When write_one_eb() fails on submit_extent_page(), it'll give up writing this eb and mark it with EXTENT_BUFFER_IOERR. So if it's not the last page that encounter the failure, there are some left pages which remain DIRTY, and if a later COW on this eb

Re: general thoughts and questions + general and RAID5/6 stability?

2014-09-23 Thread Tobias Holst
If it is unknown, which of these options have been used at btrfs creation time - is it possible to check the state of these options afterwards on a mounted or unmounted filesystem? 2014-09-23 15:38 GMT+02:00 Austin S Hemmelgarn ahferro...@gmail.com: Well, running 'mkfs.btrfs -O list-all' with

Re: [PATCH 2/2] Btrfs: be aware of btree inode write errors to avoid fs corruption

2014-09-23 Thread Filipe David Manana
On Tue, Sep 23, 2014 at 3:05 PM, Liu Bo bo.li@oracle.com wrote: On Mon, Sep 22, 2014 at 05:41:05PM +0100, Filipe Manana wrote: While we have a transaction ongoing, the VM might decide at any time to call btree_inode-i_mapping-a_ops-writepages(), which will start writeback of dirty pages

Re: [PATCH] Btrfs: fix crash of btrfs_release_extent_buffer_page

2014-09-23 Thread Filipe David Manana
On Tue, Sep 23, 2014 at 3:22 PM, Liu Bo bo.li@oracle.com wrote: This is actually inspired by Filipe's patch. When write_one_eb() fails on submit_extent_page(), it'll give up writing this eb and mark it with EXTENT_BUFFER_IOERR. So if it's not the last page that encounter the failure,

Re: general thoughts and questions + general and RAID5/6 stability?

2014-09-23 Thread Austin S Hemmelgarn
On 2014-09-23 10:23, Tobias Holst wrote: If it is unknown, which of these options have been used at btrfs creation time - is it possible to check the state of these options afterwards on a mounted or unmounted filesystem? 2014-09-23 15:38 GMT+02:00 Austin S Hemmelgarn ahferro...@gmail.com

Re: fixes for btrfs check --repair

2014-09-23 Thread David Sterba
Hi, On Sat, Aug 30, 2014 at 01:00:40PM -0300, Alexandre Oliva wrote: Here are the patches. thanks, I've put them into the queue (branch with other fsck fixes). -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More

[PATCH RFC] btrfs-progs: Add simple python front end to the search ioctl

2014-09-23 Thread Chris Mason
This is a starting point for a debugfs style python interface using the search ioctl. For now it can only do one thing, which is to print out all the extents in a file and calculate the compression ratio. Over time it will grow more features, especially for the kinds of things we might run

Re: [PATCH RFC] btrfs-progs: Add simple python front end to the search ioctl

2014-09-23 Thread cwillu
On Tue, Sep 23, 2014 at 10:39 AM, Chris Mason c...@fb.com wrote: This is a starting point for a debugfs style python interface using the search ioctl. For now it can only do one thing, which is to print out all the extents in a file and calculate the compression ratio. Over time it will

Re: [PATCH RFC] btrfs-progs: Add simple python front end to the search ioctl

2014-09-23 Thread cwillu
Damn you gmail... -- 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

Re: [PATCH 1/5] btrfs-progs: scan /proc/partitions not all of /dev with -d

2014-09-23 Thread David Sterba
Hi, all 5 patches will be in the next integration. I haven't tested them yet, seems it's a bit more important to make a more stable devel base for more updates you might want to send. -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to

Re: [PATCH] btrfs: Make btrfs handle security mount options internally to avoid losing security label.

2014-09-23 Thread Eric Sandeen
On 9/23/14 7:49 AM, Chris Mason wrote: On 09/23/2014 01:40 AM, Qu Wenruo wrote: [BUG] Originally when mount btrfs with -o subvol= mount option, btrfs will lose all security lable. And if the btrfs fs is mounted somewhere else, due to the lost of security lable, SELinux will refuse to mount

[PATCH 2/2 v2] Btrfs: be aware of btree inode write errors to avoid fs corruption

2014-09-23 Thread Filipe Manana
While we have a transaction ongoing, the VM might decide at any time to call btree_inode-i_mapping-a_ops-writepages(), which will start writeback of dirty pages belonging to btree nodes/leafs. This call might return an error or the writeback might finish with an error before we attempt to commit

[PATCH 2/2 v3] Btrfs: be aware of btree inode write errors to avoid fs corruption

2014-09-23 Thread Filipe Manana
While we have a transaction ongoing, the VM might decide at any time to call btree_inode-i_mapping-a_ops-writepages(), which will start writeback of dirty pages belonging to btree nodes/leafs. This call might return an error or the writeback might finish with an error before we attempt to commit

Re: [PATCH] btrfs: Make btrfs handle security mount options internally to avoid losing security label.

2014-09-23 Thread Qu Wenruo
Original Message Subject: Re: [PATCH] btrfs: Make btrfs handle security mount options internally to avoid losing security label. From: Eric Sandeen sand...@redhat.com To: Chris Mason c...@fb.com, Qu Wenruo quwen...@cn.fujitsu.com, linux-btrfs@vger.kernel.org Date:

Re: general thoughts and questions + general and RAID5/6 stability?

2014-09-23 Thread Qu Wenruo
Original Message Subject: Re: general thoughts and questions + general and RAID5/6 stability? From: Tobias Holst to...@tobby.eu To: linux-btrfs@vger.kernel.org Date: 2014年09月23日 22:24 If it is unknown, which of these options have been used at btrfs creation time - is it

Help Me Learn Btrfs Code Base

2014-09-23 Thread nick
Hello Guys, I am wondering if anybody here would like to mentor me in the btrfs code base in if they have any free time. I am not asking for much just someone to answer my questions and help me learn the code base well enough to help out. Thanks for Any Help, Nick -- To unsubscribe from this

[PATCH] btrfs-progs: Add human readable incompat flags output for btrfs-show-super

2014-09-23 Thread Qu Wenruo
Add human readable incompat flags output for btrfs-show-super, now no longer needs to calculate the hex flags by hand. Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com --- btrfs-show-super.c | 53 + 1 file changed, 53 insertions(+) diff --git

Re: [PATCH] btrfs: Make btrfs handle security mount options internally to avoid losing security label.

2014-09-23 Thread Eric Sandeen
On 9/23/14 7:31 PM, Qu Wenruo wrote: Original Message Subject: Re: [PATCH] btrfs: Make btrfs handle security mount options internally to avoid losing security label. From: Eric Sandeen sand...@redhat.com To: Chris Mason c...@fb.com, Qu Wenruo quwen...@cn.fujitsu.com,

Re: [PATCH] btrfs: Make btrfs handle security mount options internally to avoid losing security label.

2014-09-23 Thread Qu Wenruo
Original Message Subject: Re: [PATCH] btrfs: Make btrfs handle security mount options internally to avoid losing security label. From: Eric Sandeen sand...@redhat.com To: Qu Wenruo quwen...@cn.fujitsu.com, Chris Mason c...@fb.com, linux-btrfs@vger.kernel.org Date:

[PATCH 2/2 v4] Btrfs: be aware of btree inode write errors to avoid fs corruption

2014-09-23 Thread Filipe Manana
While we have a transaction ongoing, the VM might decide at any time to call btree_inode-i_mapping-a_ops-writepages(), which will start writeback of dirty pages belonging to btree nodes/leafs. This call might return an error or the writeback might finish with an error before we attempt to commit

[PATCH v2] btrfs-progs: Add human readable incompat flags output for btrfs-show-super

2014-09-23 Thread Qu Wenruo
Add human readable incompat flags output for btrfs-show-super, now no longer needs to calculate the hex flags by hand. Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com --- changelog: v2: Add the mising 0x before hex unknown incompat flags --- btrfs-show-super.c | 53