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

2014-09-26 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-progs: let btrfs-image actually work on a balanced fs

2014-09-26 Thread Josef Bacik
On 09/25/2014 05:44 PM, Zach Brown wrote: --- a/btrfs-image.c +++ b/btrfs-image.c @@ -1020,6 +1020,9 @@ static int copy_tree_blocks(struct btrfs_root *root, struct extent_buffer *eb, int i = 0; int ret; + if (btrfs_header_bytenr(eb) == 65536) + printf(We

[PATCH] Btrfs-progs: let btrfs-image actually work on a balanced fs V2

2014-09-26 Thread Josef Bacik
We use the read extent buffer infrastructure to read the super block when we are creating a btrfs-image. This works out fine most of the time except when the fs has been balanced, then it fails to map the super block. So we could fix btrfs-image to read in the super in a special way, but thats

Re: 3.16 Managed to ENOSPC with 80% used

2014-09-26 Thread Rich Freeman
On Thu, Sep 25, 2014 at 5:21 PM, Holger Hoffstätte holger.hoffstae...@googlemail.com wrote: That's why I mentioned adding a second device - that will immediately allow cleanup with headroom. An additional 8GB tmpfs volume can works wonders. If you add a single 8GB tmpfs to a RAID1 btrfs

[PATCH] Btrfs: fix race in WAIT_SYNC ioctl

2014-09-26 Thread Sage Weil
We check whether transid is already committed via last_trans_committed and then search through trans_list for pending transactions. If last_trans_committed is updated by btrfs_commit_transaction after we check it (there is no locking), we will fail to find the committed transaction and return

Re: [PATCH v2 2/2] Move BTRFS RCU string to common library

2014-09-26 Thread josh
On Fri, Sep 19, 2014 at 02:01:30AM -0700, Omar Sandoval wrote: The RCU-friendy string API used internally by BTRFS is generic enough for common use. This doesn't add any new functionality, but instead just moves the code and documents the existing API. Signed-off-by: Omar Sandoval

Re: 3.16 Managed to ENOSPC with 80% used

2014-09-26 Thread Duncan
Rich Freeman posted on Fri, 26 Sep 2014 10:18:37 -0400 as excerpted: On Thu, Sep 25, 2014 at 5:21 PM, Holger Hoffstätte holger.hoffstae...@googlemail.com wrote: That's why I mentioned adding a second device - that will immediately allow cleanup with headroom. An additional 8GB tmpfs volume

[PATCH v3 0/2] Move BTRFS RCU string to common library

2014-09-26 Thread Omar Sandoval
This patch series makes the generic RCU string library used internally by BTRFS accessible by anyone. The first patch makes printk_ratelimited pass on the return value from printk. Version 3 gives the temporary return variable a unique name to avoid name clashes. The second patch moves the RCU

[PATCH v3 1/2] Return a value from printk_ratelimited

2014-09-26 Thread Omar Sandoval
printk returns an integer; there's no reason for printk_ratelimited to swallow it. Signed-off-by: Omar Sandoval osan...@osandov.com Acked-by: Paul E. McKenney paul...@linux.vnet.ibm.com --- include/linux/printk.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

Re: [PATCH v3 0/2] Move BTRFS RCU string to common library

2014-09-26 Thread Omar Sandoval
On Fri, Sep 26, 2014 at 10:36:47PM -0700, Omar Sandoval wrote: This patch series makes the generic RCU string library used internally by BTRFS accessible by anyone. The first patch makes printk_ratelimited pass on the return value from printk. Version 3 gives the temporary return variable

Re: [PATCH v3 1/2] Return a value from printk_ratelimited

2014-09-26 Thread Joe Perches
On Fri, 2014-09-26 at 22:36 -0700, Omar Sandoval wrote: printk returns an integer; there's no reason for printk_ratelimited to swallow it. Signed-off-by: Omar Sandoval osan...@osandov.com Acked-by: Paul E. McKenney paul...@linux.vnet.ibm.com --- I'd prefer to keep it the way it is