Re: about btrfs quota issues

2013-03-19 Thread Wang
OK, thanks.

Re: corruption of active mmapped files in btrfs snapshots

2013-03-19 Thread Alexandre Oliva
On Mar 19, 2013, Alexandre Oliva wrote: >> that is being processed inside the snapshot. > This doesn't explain why the master database occasionally gets similarly > corrupted, does it? Actually, scratch this bit for now. I don't really have proof that the master database actually gets corrupte

Re: Impossible or Possible to Securely Erase File on Btrfs?

2013-03-19 Thread Chris Murphy
On Mar 19, 2013, at 3:06 AM, David Sterba wrote: > On Mon, Mar 18, 2013 at 09:18:28PM -0600, Chris Murphy wrote: >> I'm not finding a reference to "secure erase trim". In any case I >> wouldn't expect it to differ from trim. > > There's a 'secure discard' trim command in linux, > > http://lkml

Re: Impossible or Possible to Securely Erase File on Btrfs?

2013-03-19 Thread Marek Otahal
Hi, just reading chattr manpage.. On Monday 18 March 2013 14:15:17 you wrote: > Hi, > > After reading through the btrfs documentation I'm curious to know if > it's possible to ever securely erase a file from a btrfs filesystem (or > ZFS for that matter). On non-COW filesystems atop regular H

[PATCH v2] Btrfs: Include the device in most error printk()s

2013-03-19 Thread Simon Kirby
With more than one btrfs volume mounted, it can be very difficult to find out which volume is hitting an error. btrfs_error() will print this, but it is currently rigged as more of a fatal error handler, while many of the printk()s are currently for debugging and yet-unhandled cases. This patch ju

Re: [PATCH] xfstests: add background noise to test 276 (btrfs backref resolving)

2013-03-19 Thread Dave Chinner
On Tue, Mar 19, 2013 at 08:17:57PM +0100, Jan Schmidt wrote: > On 19.03.2013 18:09, Eric Sandeen wrote: > >> Furthermore, this increases two constants which make the test simply cycle > >> a > >> few seconds longer, increasing the chance to hit on something suspicious in > >> case we broke somethi

Re: corruption of active mmapped files in btrfs snapshots

2013-03-19 Thread Alexandre Oliva
On Mar 19, 2013, Sage Weil wrote: > There is a set of unit tests in the leveldb source tree that ought to do > the trick: > git clone https://code.google.com/p/leveldb/ But these don't create btrfs snapshots. -- Alexandre Oliva, freedom fighterhttp://FSFLA.org/~lxoliva/ You must be

Re: corruption of active mmapped files in btrfs snapshots

2013-03-19 Thread Alexandre Oliva
On Mar 19, 2013, Chris Mason wrote: > My guess is the truncate is creating a orphan item Would it, even though the truncate is used to grow rather than to shrink the file? > that is being processed inside the snapshot. This doesn't explain why the master database occasionally gets similarly co

Re: [PATCH] xfstests: add background noise to test 276 (btrfs backref resolving)

2013-03-19 Thread Jan Schmidt
On 19.03.2013 18:09, Eric Sandeen wrote: >> Furthermore, this increases two constants which make the test simply cycle a >> few seconds longer, increasing the chance to hit on something suspicious in >> case we broke something. > > Normally we don't change existing tests lest new failures look lik

Re: corruption of active mmapped files in btrfs snapshots

2013-03-19 Thread Sage Weil
On Tue, 19 Mar 2013, Chris Mason wrote: > Quoting Alexandre Oliva (2013-03-19 01:20:10) > > On Mar 18, 2013, Chris Mason wrote: > > > > > A few questions. Does leveldb use O_DIRECT and mmap together? > > > > No, it doesn't use O_DIRECT at all. Its I/O interface is very > > simplified: it just

Re: [PATCH] xfstests: add background noise to test 276 (btrfs backref resolving)

2013-03-19 Thread Eric Sandeen
On 3/19/13 11:24 AM, Jan Schmidt wrote: > The backref resolver test for btrfs was run on a static file system so far. > Resolving backrefs on a busy file system is what happens in reality and that > is what should be checked by this test. > > I added a parameter such that the script can easily be

Re: [PATCH] Btrfs: fix backref walking race with tree deletions

2013-03-19 Thread Jan Schmidt
Hi Alex, On Tue, March 12, 2013 at 12:47 (+0100), Alex Lyakas wrote: > Hi Jan, > I have been testing your patch, and definitely the reproducer now passes. > However, my system tests still hit the issue, but unfortunately I am > unable to isolate it into a bash script. All bash scripts work > alrig

[PATCH] xfstests: add background noise to test 276 (btrfs backref resolving)

2013-03-19 Thread Jan Schmidt
The backref resolver test for btrfs was run on a static file system so far. Resolving backrefs on a busy file system is what happens in reality and that is what should be checked by this test. I added a parameter such that the script can easily be changed to the former behavior for development pur

[PATCH] Btrfs: handle a bogus chunk tree nicely

2013-03-19 Thread Josef Bacik
If you restore a btrfs-image file system and try to mount that file system we'll panic. That's because btrfs-image restores and just makes one big chunk to envelope the whole disk, since they are really only meant to be messed with by our btrfs-progs. So fix up btrfs_rmap_block and the callers of

Re: [PATCH 3/3 V4] xfstests: btrfs tests for basic informational commands

2013-03-19 Thread Rich Johnston
This has been reverted and recommitted as test 307. Thanks --Rich commit 4f092a2e681c57394a0055a0735b8208bf83ec5f Author: Eric Sandeen Date: Wed Mar 13 19:01:58 2013 + xfstests: btrfs tests for basic informational commands Run basic btrfs information commands in various ways, p

[PATCH] Btrfs-progs: make btrfs-image grab the free space cache

2013-03-19 Thread Josef Bacik
A lot of tree log replay bugs are because of strange space cache setups, so make btrfs-image scrape the free space cache as well so we can better replicate what a user is seeing if they have a tree log bug or anything related to free space cache. Thanks, Signed-off-by: Josef Bacik --- btrfs-ima

Re: [PATCH 2/6] Btrfs: build up error handling for merge_reloc_roots

2013-03-19 Thread Liu Bo
On Mon, Mar 18, 2013 at 03:16:12PM +0100, David Sterba wrote: > On Tue, Mar 05, 2013 at 12:25:37AM +0800, Liu Bo wrote: > > We first use btrfs_std_error hook to replace with BUG_ON, and we > > also need to cleanup what is left, including reloc roots rbtree > > and reloc roots list. > > Here we use

Re: corruption of active mmapped files in btrfs snapshots

2013-03-19 Thread Chris Mason
Quoting Alexandre Oliva (2013-03-19 01:20:10) > On Mar 18, 2013, Chris Mason wrote: > > > A few questions. Does leveldb use O_DIRECT and mmap together? > > No, it doesn't use O_DIRECT at all. Its I/O interface is very > simplified: it just opens each new file (database chunks limited to 2MB) >

[PATCH] btrfs: update kconfig title

2013-03-19 Thread David Sterba
The Kconfig title does not make much sense after the cleanup of CONFIG_EXPERIMENTAL option, align the wording with other filesystems. Signed-off-by: David Sterba --- Based on current linus/master and should to to 3.9-rc fs/btrfs/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

Re: converting to raid5

2013-03-19 Thread Remco Hosman - Yerf-IT
Op 15-3-2013 13:47, David Sterba schreef: On Mon, Mar 11, 2013 at 09:15:44PM +0100, Remco Hosman wrote: first, i did the following: `btrfs val start -dconvert=raid5,usage=1` to convert the mostly empty chunks. This resulted in a lot of allocated space (10's of gigs), with only a few 100 meg us

[PATCH] Btrfs: fix missing qgroup reservation before fallocating

2013-03-19 Thread Wang Shilong
From: Wang Shilong Steps to reproduce: mkfs.btrfs mount btrfs quota enable btrfs sub create /subv btrfs qgroup limit 10M /subv fallocate --length 20M /subv/data For the above example, fallocating will return successfully which is not expected,

Re: Impossible or Possible to Securely Erase File on Btrfs?

2013-03-19 Thread David Sterba
On Tue, Mar 19, 2013 at 09:48:56AM +1100, Gareth Pye wrote: > Would it make sense for btrfs to support a write zeros to empty space > erase? I know it would be slow as it would have to write to all the > free space in the file system but it would be useful. > > It's probably pretty far down the pr

Re: Impossible or Possible to Securely Erase File on Btrfs?

2013-03-19 Thread David Sterba
On Mon, Mar 18, 2013 at 09:18:28PM -0600, Chris Murphy wrote: > I'm not finding a reference to "secure erase trim". In any case I > wouldn't expect it to differ from trim. There's a 'secure discard' trim command in linux, http://lkml.indiana.edu/hypermail/linux/kernel/1007.1/02355.html Used insi