[PATCH 1/4] Btrfs: move btrfs_{set,clear}_and_info() to ctree.h

2014-04-23 Thread Wang Shilong
Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com --- fs/btrfs/ctree.h | 14 ++ fs/btrfs/super.c | 14 -- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index ad1a594..e7c9e1c 100644 --- a/fs/btrfs/ctree.h +++

[PATCH 2/4] Btrfs: avoid triggering bug_on() when we fail to start inode caching task

2014-04-23 Thread Wang Shilong
When running stress test(including snapshots,balance,fstress), we trigger the following BUG_ON() which is because we fail to start inode caching task. [ 181.131945] kernel BUG at fs/btrfs/inode-map.c:179! [ 181.137963] invalid opcode: [#1] SMP [ 181.217096] CPU: 11 PID: 2532 Comm: btrfs

[PATCH 4/4] Btrfs: fix inode caching vs tree log

2014-04-23 Thread Wang Shilong
From: Miao Xie mi...@cn.fujitsu.com Currently, with inode cache enabled, we will reuse its inode id immediately after unlinking file, we may hit something like following: |-iput inode |-return inode id into inode cache |-create dir,fsync |-power off An easy way to reproduce this problem is:

[PATCH 3/4] Btrfs: fix possible memory leaks in open_ctree()

2014-04-23 Thread Wang Shilong
Fix possible memory leaks in the following error handling paths: read_tree_block() btrfs_recover_log_trees btrfs_commit_super() btrfs_find_orphan_roots() btrfs_cleanup_fs_roots() Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com --- fs/btrfs/disk-io.c | 10 +- 1 file changed, 5

Re: [PATCH] btrfs-progs: read global reserve size from space infos

2014-04-23 Thread David Sterba
On Tue, Apr 22, 2014 at 05:12:34PM +0200, Xavier Bassery wrote: Global_rsv or GlobalRsv or Globalrsv or something else? Personally, I'd probably go for the camel case GlobalRsv, or possibly GlbReserve. (Assuming that it's going to be only a single token without whitespace to make

[PATCH 001/001] btrfs: Mechanism to modify the permission of a subvolume

2014-04-23 Thread J S, Ajesh
From: Ajesh JS ajesh...@hp.com This patch provides a mechanism to modify the permission of a subvolume in a btrfs file system This helps to apply a policy of having read-write subvolume inside a read-only subvolume. One use case is to have the whole root file system as a read-only subvolume and

Re: [PATCH] btrfs-progs: read global reserve size from space infos

2014-04-23 Thread Chris Mason
On 04/23/2014 09:30 AM, David Sterba wrote: On Tue, Apr 22, 2014 at 05:12:34PM +0200, Xavier Bassery wrote: Global_rsv or GlobalRsv or Globalrsv or something else? Personally, I'd probably go for the camel case GlobalRsv, or possibly GlbReserve. (Assuming that it's going to be only a

Re: Bug: corrupt leaf. slot offset bad: root subvolume unmountable, btrfs check crashes

2014-04-23 Thread Andreas Reis
Ah. Thank you for the replies. I didn't get them as mails and spinics didn't update the thread until yesterday. So I take it that the recommended course of action is not to wait for any more or less unlikely btrfs-progs fix, but to try --repair and be ready to restore from backup, too. Darn,

Re: How to view transaction log chronologically, human-readable?

2014-04-23 Thread Marcel Partap
I am not a dev, but since BTRFS utilizes a COW (Copy On Write) architecture, it doesn't keep a journal or history of transactions that can be unwound. Ok, thanks for making that clear, I wasn't aware of that. But shouldn't the chain of recent root trees kinda allow similar functionality? It

inode cache rebuild problem

2014-04-23 Thread Shridhar Daithankar
Hello, I have a desktop system with 2 disks, all btrfs, single partition. All of these partitions had space_cache,inode_cache enabled. Linux 3.14 has broken resume on my desktop, hence I need to shutdown and restart the machine every time. But even on clean reboot, inode_cache was

Can anyone boot a system using btrfs root with linux 3.14 or newer?

2014-04-23 Thread Пламен Петров
Can anyone boot a system using btrfs root with linux 3.14 or newer? Because I can't. I'm trying to move some 3.13.x based systems to 3.14.x and the kernel panics during boot. It says to append a correct root=sdaX partition, but the one provided is correct, because if use 3.13.x with the same

Re: Can anyone boot a system using btrfs root with linux 3.14 or newer?

2014-04-23 Thread Marc MERLIN
On Wed, Apr 23, 2014 at 08:30:08PM +0300, Пламен Петров wrote: Can anyone boot a system using btrfs root with linux 3.14 or newer? Because I can't. It works fine for me. I'm trying to move some 3.13.x based systems to 3.14.x and the kernel panics during boot. It says to append a correct

Re: Can anyone boot a system using btrfs root with linux 3.14 or newer?

2014-04-23 Thread Hugo Mills
On Wed, Apr 23, 2014 at 11:54:13AM -0700, Marc MERLIN wrote: On Wed, Apr 23, 2014 at 08:30:08PM +0300, Пламен Петров wrote: Can anyone boot a system using btrfs root with linux 3.14 or newer? Because I can't. It works fine for me. I'm trying to move some 3.13.x based systems to

Re: Can anyone boot a system using btrfs root with linux 3.14 or newer?

2014-04-23 Thread Marc MERLIN
On Wed, Apr 23, 2014 at 10:06:12PM +0300, Пламен Петров wrote: Just to clarify - I am using a monolithic kernel built from source, and it has all the stuff it needs to support built-in, and then some. And no modules. The sources I'm using are the vanilla kernels from Linus and Greg KH

Re: Can anyone boot a system using btrfs root with linux 3.14 or newer?

2014-04-23 Thread Kai Krakow
Пламен Петров pla...@petrovi.no-ip.info schrieb: I'm going with the module suggestion from Marc, too. /dev/sda2 / btrfs relatime,compress=zlib 0 0 This line looks kinda useless to me. The compress=zlib option won't be applied at boot and cannot be changed at

RE: Can anyone boot a system using btrfs root with linux 3.14 or newer?

2014-04-23 Thread Пламен Петров
-Original Message- From: Marc MERLIN [mailto:m...@merlins.org] Sent: Wednesday, April 23, 2014 10:16 PM To: Пламен Петров Cc: linux-btrfs@vger.kernel.org Subject: Re: Can anyone boot a system using btrfs root with linux 3.14 or newer? On Wed, Apr 23, 2014 at 10:06:12PM +0300,

Re: Lost /home subvolume after btrfs crash

2014-04-23 Thread Martin Wilck
Chris, OpenSUSE 12.3 is using kernel 3.7 which is also old for this sort of recovery attempt. Even openSUSE 13.1 is at 3.11.6 which might work in a bind, but if it doesn't, inevitably someone will suggest you use something even newer. Thanks for your reply, I appreciate it a lot. Current

Re: [PATCH 001/001] btrfs: Mechanism to modify the permission of a subvolume

2014-04-23 Thread Filipe David Manana
On Wed, Apr 23, 2014 at 2:28 PM, J S, Ajesh ajesh...@hp.com wrote: From: Ajesh JS ajesh...@hp.com This patch provides a mechanism to modify the permission of a subvolume in a btrfs file system This helps to apply a policy of having read-write subvolume inside a read-only subvolume. One

Re: Can anyone boot a system using btrfs root with linux 3.14 or newer?

2014-04-23 Thread Calvin Walton
On Wed, 2014-04-23 at 21:06 +0200, Kai Krakow wrote: Пламен Петров pla...@petrovi.no-ip.info schrieb: I'm going with the module suggestion from Marc, too. /dev/sda2 / btrfs relatime,compress=zlib 0 0 This line looks kinda useless to me. The compress=zlib

hung task timer + btrfs_convert or btrfs balance = OOPS

2014-04-23 Thread Robert White
The first mount of a non-trivial file system after a btrfs_convert, or an ongoing btrfs balance operation containing large files may lead to an oops (and a pathologically damaged file system) if the hang check timer (CONFIG_DETECT_HUNG_TASK=y) is compiled into the linux kernel and not

Re: Can anyone boot a system using btrfs root with linux 3.14 or newer?

2014-04-23 Thread Marc MERLIN
On Wed, Apr 23, 2014 at 10:37:44PM +0300, Пламен Петров wrote: So now, we're kind of guessing. To save us all time, could you capture a serial console boot from the running 3.13 and then the failing 3.14. Well, for the details - see for example here:

raid6, disks of different sizes, ENOSPC errors despite having plenty of space

2014-04-23 Thread Sergey Ivanyuk
Hi, I have a filesystem that I've converted to raid6 from raid1, on 4 drives (I have another copy of the data): Total devices 4 FS bytes used 924.64GiB devid1 size 1.82TiB used 474.00GiB path /dev/sdd devid2 size 465.76GiB used 465.76GiB path /dev/sda

Re: hung task timer + btrfs_convert or btrfs balance = OOPS

2014-04-23 Thread Marc MERLIN
On Wed, Apr 23, 2014 at 01:44:21PM -0700, Robert White wrote: As it is, the two options are not happy together. Be sure to echo 0 /proc/sys/kernel/hung_task_timeout_secs to disable the timer before doing a mount or balance after a But this only removes the messages from syslog, it

Re: Kernel crash triggered by dd to file with memcg, worst on btrfs

2014-04-23 Thread Michal Hocko
[CCing Vladimir] On Wed 16-04-14 18:42:10, Richard Davies wrote: Hi all, I have a test case in which I can often crash an entire machine by running dd to a file with a memcg with relatively generous limits. This is simplified from real world problems with heavy disk i/o inside containers.

Re: Can anyone boot a system using btrfs root with linux 3.14 or newer?

2014-04-23 Thread Marc MERLIN
On Thu, Apr 24, 2014 at 12:54:57AM +0300, Пламен Петров wrote: It may help to look up what error -38 translates into for that mount error. My searches so far failed to return anything useful to solving this problem. Yeah, I searched before you :) this would require reading the kernel source

RE: Can anyone boot a system using btrfs root with linux 3.14 or newer?

2014-04-23 Thread Пламен Петров
-Original Message- From: Marc MERLIN [mailto:m...@merlins.org] Sent: Thursday, April 24, 2014 1:03 AM To: Пламен Петров Cc: linux-btrfs@vger.kernel.org Subject: Re: Can anyone boot a system using btrfs root with linux 3.14 or newer? On Thu, Apr 24, 2014 at 12:54:57AM +0300,

Cycle of send/receive for backup/restore is incomplete...

2014-04-23 Thread Robert White
So the backup/restore system described using snapshots is incomplete because the final restore is a copy operation. As such, the act of restoring from the backup will require restarting the entire backup cycle because the copy operation will scramble the metadata consanguinity. The real

Re: Can anyone boot a system using btrfs root with linux 3.14 or newer?

2014-04-23 Thread Chris Murphy
On Apr 23, 2014, at 1:06 PM, Kai Krakow hurikhan77+bt...@gmail.com wrote: Пламен Петров pla...@petrovi.no-ip.info schrieb: I'm going with the module suggestion from Marc, too. /dev/sda2 / btrfs relatime,compress=zlib 0 0 This line looks kinda useless to

Re: Can anyone boot a system using btrfs root with linux 3.14 or newer?

2014-04-23 Thread Hugo Mills
On Wed, Apr 23, 2014 at 03:03:12PM -0700, Marc MERLIN wrote: On Thu, Apr 24, 2014 at 12:54:57AM +0300, Пламен Петров wrote: It may help to look up what error -38 translates into for that mount error. My searches so far failed to return anything useful to solving this problem.

Re: Can anyone boot a system using btrfs root with linux 3.14 or newer?

2014-04-23 Thread Chris Murphy
The screen shot provided makes it clear that one of the following kernel parameters is incorrect: root=/dev/mapper/cryptroot rootflags=subvol=root So either the dmcrypt volume hasn't been opened, thus isn't available; or rootfs isn't on a subvolume named root found at the top level of the

Re: Can anyone boot a system using btrfs root with linux 3.14 or newer?

2014-04-23 Thread Hugo Mills
On Wed, Apr 23, 2014 at 04:40:33PM -0600, Chris Murphy wrote: The screen shot provided makes it clear that one of the following kernel parameters is incorrect: root=/dev/mapper/cryptroot rootflags=subvol=root So either the dmcrypt volume hasn't been opened, thus isn't available; or

Re: Can anyone boot a system using btrfs root with linux 3.14 or newer?

2014-04-23 Thread Marc MERLIN
On Wed, Apr 23, 2014 at 11:43:03PM +0100, Hugo Mills wrote: On Wed, Apr 23, 2014 at 04:40:33PM -0600, Chris Murphy wrote: The screen shot provided makes it clear that one of the following kernel parameters is incorrect: root=/dev/mapper/cryptroot rootflags=subvol=root So

Re: raid6, disks of different sizes, ENOSPC errors despite having plenty of space

2014-04-23 Thread Hugo Mills
On Wed, Apr 23, 2014 at 05:04:10PM -0400, Sergey Ivanyuk wrote: Hi, I have a filesystem that I've converted to raid6 from raid1, on 4 drives (I have another copy of the data): Total devices 4 FS bytes used 924.64GiB devid1 size 1.82TiB used 474.00GiB path /dev/sdd

Re: Can anyone boot a system using btrfs root with linux 3.14 or newer?

2014-04-23 Thread Hugo Mills
On Wed, Apr 23, 2014 at 03:50:18PM -0700, Marc MERLIN wrote: On Wed, Apr 23, 2014 at 11:43:03PM +0100, Hugo Mills wrote: On Wed, Apr 23, 2014 at 04:40:33PM -0600, Chris Murphy wrote: The screen shot provided makes it clear that one of the following kernel parameters is incorrect:

Re: hung task timer + btrfs_convert or btrfs balance = OOPS

2014-04-23 Thread Robert White
On 04/23/2014 02:12 PM, Marc MERLIN wrote: On Wed, Apr 23, 2014 at 01:44:21PM -0700, Robert White wrote: As it is, the two options are not happy together. Be sure to echo 0 /proc/sys/kernel/hung_task_timeout_secs to disable the timer before doing a mount or balance after a But this only

Which companies contribute to Btrfs?

2014-04-23 Thread Marc MERLIN
Howdy, I writing slides about btrfs for an upcoming talk (at linuxcon) and I was trying to gather a list of companies that contribute code to btrfs. What I came up with (sorted alphabetically) Couchbase (CouchDB) Facebook Fujitsu Fusion-IO Oracle SGI Suse Are there other companies I missed?

Which companies are using Btrfs in production?

2014-04-23 Thread Marc MERLIN
Oh while we're at it, are there companies that can say they are using btrfs in production? Marc -- A mouse is a device used to point at the xterm you want to type in - A.S.R. Microsoft is to operating systems what McDonalds is to gourmet cooking

Re: Which companies contribute to Btrfs?

2014-04-23 Thread Eric Sandeen
On 4/23/14, 8:18 PM, Marc MERLIN wrote: Howdy, I writing slides about btrfs for an upcoming talk (at linuxcon) and I was trying to gather a list of companies that contribute code to btrfs. What I came up with (sorted alphabetically) Couchbase (CouchDB) Facebook Fujitsu Fusion-IO

Re: Which companies contribute to Btrfs?

2014-04-23 Thread Eric Sandeen
On 4/23/14, 8:18 PM, Marc MERLIN wrote: Howdy, I writing slides about btrfs for an upcoming talk (at linuxcon) and I was trying to gather a list of companies that contribute code to btrfs. Also... What I came up with (sorted alphabetically) Couchbase (CouchDB) Facebook Fujitsu

Re: Lost /home subvolume after btrfs crash

2014-04-23 Thread Chris Murphy
On Apr 23, 2014, at 12:33 PM, Martin Wilck mwi...@arcor.de wrote: Chris, OpenSUSE 12.3 is using kernel 3.7 which is also old for this sort of recovery attempt. Even openSUSE 13.1 is at 3.11.6 which might work in a bind, but if it doesn't, inevitably someone will suggest you use something

Re: Can anyone boot a system using btrfs root with linux 3.14 or newer?

2014-04-23 Thread Chris Murphy
It sounds like either a grub.cfg misconfiguration, or a failure to correctly build the initrd/initramfs. So I'd post the grub.cfg kernel command line for the boot entry that works and the entry that fails, for comparison. And then also check and see if whatever utility builds your initrd has

[PATCH 1/3] Btrfs-progs: fsck: clear out log tree in repair mode

2014-04-23 Thread Wang Shilong
Repair mode will commit transaction which will make us fail to load log tree anymore. Give a warning to common users, if they really want to coninue, we will clear out log tree. Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com --- cmds-check.c | 33 + 1

[PATCH 2/3] Btrfs-progs: fsck: avoid pinning same block several times

2014-04-23 Thread Wang Shilong
This can not only give some speedups but also avoid forever loop with a really broken filesystem. Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com --- cmds-check.c | 9 + 1 file changed, 9 insertions(+) diff --git a/cmds-check.c b/cmds-check.c index 15806a4..e6fb380 100644 ---

[PATCH 3/3] Btrfs-progs: fsck: add ability to check reloc roots

2014-04-23 Thread Wang Shilong
When encountering system crash or balance enospc errors, there maybe still some reloc roots left. The way we store reloc root is different from fs root: reloc root's root key(BTRFS_RELOC_TREE_OBJECTID, ROOT_ITEM, objectid) fs root's root key(objectid, ROOT_ITEM, -1) reloc data's root

[PATCH] btrfs-progs: prevent close_root if the root to close is potentially NULL

2014-04-23 Thread Gui Hecheng
Originally only if 'block_only' is specified, the 'fs_root == NULL' will be checked. But if 'block_only' is not specified and close_root will be called blindly without checking 'fs_root == NULL', which is unsafe. Signed-off-by: Gui Hecheng guihc.f...@cn.fujitsu.com --- btrfs-debug-tree.c | 9

Re: Which companies contribute to Btrfs?

2014-04-23 Thread Marc MERLIN
On Wed, Apr 23, 2014 at 09:30:24PM -0500, Eric Sandeen wrote: On 4/23/14, 8:18 PM, Marc MERLIN wrote: Howdy, I writing slides about btrfs for an upcoming talk (at linuxcon) and I was trying to gather a list of companies that contribute code to btrfs. Also... What I came up with

Re: Cycle of send/receive for backup/restore is incomplete...

2014-04-23 Thread Brendan Hide
Replied inline: On 2014/04/24 12:30 AM, Robert White wrote: So the backup/restore system described using snapshots is incomplete because the final restore is a copy operation. As such, the act of restoring from the backup will require restarting the entire backup cycle because the copy

[PATCH V2 1/2] Btrfs: output warning instead of error when loading free space cache failed

2014-04-23 Thread Miao Xie
If we fail to load a free space cache, we can rebuild it from the extent tree, so it is not a serious error, we should not output a error message that would make the users uncomfortable. This patch uses warning message instead of it. Signed-off-by: Miao Xie mi...@cn.fujitsu.com --- Changelog v1 -

[PATCH V2 2/2] Btrfs: fix broken free space cache after the system crashed

2014-04-23 Thread Miao Xie
When we mounted the filesystem after the crash, we got the following message: BTRFS error (device xxx): block group has wrong amount of free space BTRFS error (device xxx): failed to load free space cache for block group xxx It is because we didn't update the metadata of the allocated

Re: Which companies contribute to Btrfs?

2014-04-23 Thread Eric Sandeen
On Apr 23, 2014, at 10:45 PM, Marc MERLIN m...@merlins.org wrote: On Wed, Apr 23, 2014 at 09:30:24PM -0500, Eric Sandeen wrote: On 4/23/14, 8:18 PM, Marc MERLIN wrote: Howdy, I writing slides about btrfs for an upcoming talk (at linuxcon) and I was trying to gather a list of companies