Re: [PATCH v8 1/3] xfstests: btrfs: add functions to create dm-error device

2015-08-31 Thread Eryu Guan
On Tue, Aug 25, 2015 at 12:39:26PM +0800, Anand Jain wrote: > From: Anand Jain > > Controlled EIO from the device is achieved using the dm device. > Helper functions are at common/dmerror. > > Broadly steps will include calling _dmerror_init(). > _dmerror_init() will use

Re: mount command now shows subvol and subvolid

2015-08-31 Thread Omar Sandoval
On Sun, Aug 30, 2015 at 11:17:44AM -0600, Chris Murphy wrote: > Does anyone know when this changed? Maybe it's a 4.2 thing... anyway > it's very much welcome! > > /dev/sda2 on /home type btrfs > (rw,relatime,seclabel,space_cache,subvolid=258,subvol=/home) > > /dev/sdc1 on /brick0 type btrfs >

Re: [PATCH] btrfs: Remove unneeded cast to s64 for qgroup rfer state

2015-08-31 Thread Alexandru Moise
On Mon, Aug 31, 2015 at 09:44:49AM +0800, Qu Wenruo wrote: > >>>From the perspective of users, qgroup's referenced or exclusive > >>is negative,but user can not continue to write data! a workaround > >>way is to cast u64 to s64 when doing qgroup reservation > > > >I am unable to

Re: [PATCH] btrfs: Remove unneeded cast to s64 for qgroup rfer state

2015-08-31 Thread Qu Wenruo
Alexandru Moise wrote on 2015/08/31 09:32 +0300: On Mon, Aug 31, 2015 at 09:44:49AM +0800, Qu Wenruo wrote: >From the perspective of users, qgroup's referenced or exclusive is negative,but user can not continue to write data! a workaround way is to cast u64 to s64 when doing

Re: [PATCH] btrfs: Remove unneeded cast to s64 for qgroup rfer state

2015-08-31 Thread Alexandru Moise
On Mon, Aug 31, 2015 at 02:51:08PM +0800, Qu Wenruo wrote: > > > Alexandru Moise wrote on 2015/08/31 09:32 +0300: > >On Mon, Aug 31, 2015 at 09:44:49AM +0800, Qu Wenruo wrote: > >From the perspective of users, qgroup's referenced or exclusive > is negative,but user can not

Re: [PATCH] generic/224: Increase filesystem instance size to 1.5 GiB

2015-08-31 Thread Theodore Ts'o
On Tue, Sep 01, 2015 at 05:49:14AM +0530, Chandan Rajendra wrote: > mkfs.btrfs when invoked on small filesystems by "not" specifying any block > sizes (i.e. mkfs.btrfs -f /dev/sda1) will automatically create filesystem > instance with "data block size" == "metadata block size". However in the >

Re: [PATCH] generic/224: Increase filesystem instance size to 1.5 GiB

2015-08-31 Thread Chandan Rajendra
On Monday 31 Aug 2015 22:15:10 Theodore Ts'o wrote: > On Tue, Sep 01, 2015 at 05:49:14AM +0530, Chandan Rajendra wrote: > > mkfs.btrfs when invoked on small filesystems by "not" specifying any block > > sizes (i.e. mkfs.btrfs -f /dev/sda1) will automatically create filesystem > > instance with

Re: [PATCH V3] Btrfs: Direct I/O: Fix space accounting

2015-08-31 Thread Liu Bo
On Fri, Aug 28, 2015 at 09:10:13PM +0530, Chandan Rajendra wrote: > The following call trace is seen when generic/095 test is executed, > > WARNING: CPU: 3 PID: 2769 at > /home/chandan/code/repos/linux/fs/btrfs/inode.c:8967 > btrfs_destroy_inode+0x284/0x2a0() > Modules linked in: > CPU: 3 PID:

Re: [PATCH v2 2/4] btrfs-progs: tests: Fix mount fail of 013-extent-tree-rebuild

2015-08-31 Thread David Sterba
On Mon, Aug 31, 2015 at 01:04:37PM +0800, Zhao Lei wrote: > +mount_test_dev() > +{ > + local loop_opt > + if [[ -b "$TEST_DEV" ]]; then > + loop_opt=() > + elif [[ -f "$TEST_DEV" ]]; then > + loop_opt=(-o loop) > + else > + _fail "Invalid

Re: [PATCH v2 3/4] btrfs-progs: tests: umount TEST_MNT in clean-tests.sh

2015-08-31 Thread David Sterba
On Mon, Aug 31, 2015 at 01:04:38PM +0800, Zhao Lei wrote: > If a testcase failed, we can't run it(or other tests needs mount) again, > # ./misc-tests.sh 007 >[TEST] 007-subvolume-sync >failed: fail >test failed for case 007-subvolume-sync > # ./misc-tests.sh 007 >[TEST]

Re: [PATCH 1/3] btrfs-progs: fix memory leak in btrfs-convert main()

2015-08-31 Thread David Sterba
On Fri, Aug 28, 2015 at 12:38:16AM +0900, Byongho Lee wrote: > In btrfs-convert main(), strdup() allocates memory to fslabel but that > memory is not freed. We could fix it by adding free() calls to every > return point, but that would make the code messy because there are > several return paths.

Re: [PATCH 1/4] btrfs-progs: Fix infinite loop of btrfs subvolumn sync

2015-08-31 Thread David Sterba
On Wed, Aug 26, 2015 at 10:03:36PM +0800, Zhao Lei wrote: > We can trigger the bug by following operation: > (no wait between commands 3~5) > btrfs subvolume create /mnt/btrfs/mysubvol > btrfs subvolume snapshot /mnt/btrfs/mysubvol /mnt/btrfs/mysubvol_snap > btrfs subvolume delete

Re: [PATCH 3/4] btrfs-progs: Fix wrong return value of wait_for_subvolume_cleaning()

2015-08-31 Thread David Sterba
On Wed, Aug 26, 2015 at 10:03:38PM +0800, Zhao Lei wrote: > Reproduce: > # btrfs subvolume sync /mnt/btrfs > Subvolume id 323 is gone > # echo $? > 1 > # > > Reason: > wait_for_subvolume_cleaning() return !0 in right case, because > value of ret is set to "is subvolume clean" state before

Re: [PATCH 2/4] btrfs-progs: Simplify memory allocation for enumerate_dead_subvols

2015-08-31 Thread David Sterba
On Wed, Aug 26, 2015 at 10:03:37PM +0800, Zhao Lei wrote: > No need prepare memory for enumerate_dead_subvols() in caller, and pass > additional argument for allocated length. > > Just do every thing inside enumerate_dead_subvols(), it will not > increase malloc count, but make code simple. > >

Re: [PATCH 4/4] btrfs-progs: Simplify all-subvolumn-clean condition for wait_for_subvolume_cleaning

2015-08-31 Thread David Sterba
On Wed, Aug 26, 2015 at 10:03:39PM +0800, Zhao Lei wrote: > Instead of using a dirty-subvolumn-counter in old code, this patch > turn to use a simple and direct way: > If (not dirty-subvolumn found in current loop) { > return all_clean; > } > > Signed-off-by: Zhao Lei

Re: FW: btrfs-progs: android build

2015-08-31 Thread David Sterba
On Wed, Aug 26, 2015 at 04:44:28PM +0200, David Sterba wrote: > On Mon, Aug 10, 2015 at 04:30:58PM +0900, 강상우 wrote: > > I change the code that you are suggest. > > Well, it's still not exactly what I expected. I'll add the makefile bits > from you patch and do the wrappers and ifdefs myself.

Re: btrfs regression since 4.X kernel NULL pointer dereference

2015-08-31 Thread Stefan Priebe - Profihost AG
> Am 25.08.2015 um 15:51 schrieb Chris Mason : > >> On Tue, Aug 25, 2015 at 11:00:30AM +0200, Christoph Hellwig wrote: >> I think this is btrfs using a struct block_device that doesn't have >> a valid queue pointer in it's gendisk for ->s_bdev. And there are >> some fishy looking

Kernel bug after changing raid levels

2015-08-31 Thread Néstor Uribe-Patarroyo
I've filed bug https://bugzilla.kernel.org/show_bug.cgi?id=103811 on a recent kernel bug I've encountered using btrfs after changing raid level online. Let me know if there's any more info I can provide, I haven't formatted that file system yet. -- To unsubscribe from this list: send the

Re: [PATCH] generic/224: Increase filesystem instance size to 1.5 GiB

2015-08-31 Thread Theodore Ts'o
On Sun, Aug 30, 2015 at 08:16:21PM +0530, Chandan Rajendra wrote: > For small filesystem instances (i.e. size <= 1 GiB), mkfs.btrfs fails when > "data block size" does not match with the "metadata block size" specified on > the mkfs.btrfs command line. This commit increases the size of filesystem

[BUG] kernel BUG at fs/btrfs/extent_io.c:2062 (v4.2.0-rc8)

2015-08-31 Thread Dāvis Mosāns
I'm getting kernel crash and complete system lockup when trying to access journal on two disk btrfs filesystem with data/metadata as RAID1. I can't get proper log because whole system hangs and even kdump fails, seems it doesn't start or I'm doing something wrong. Also because there are several

errors while "btrfs receive"

2015-08-31 Thread Vincent Olivier
hi, i'm doing a ~900TiB receive on a 6x4TB RAID0 "fi show", "device scan" all fail and report "unable to connect to /dev/sdX" is it normal ? thanks, Vincent -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More

Re: [GIT PULL] Fujitsu pull part1: cleanup

2015-08-31 Thread Chris Mason
On Thu, Aug 27, 2015 at 09:11:46AM +0800, Qu Wenruo wrote: > Hi Chris, > > Any comment on the git pull? > As it's not picked yet nor any objection here. Hi Qu, Some of these were already in integration, but I've picked the rest. Thanks! -chris -- To unsubscribe from this list: send the line

[PATCH] Btrfs: Check metadata redundancy on balance

2015-08-31 Thread sam tygier
Resending, as I received no comments on previous submission. Currently BTRFS allows you to make bad choices of data and metadata levels. For example -d raid1 -m raid0 means you can only use half your total disk space, but will loose everything if 1 disk fails. It should give a warning in these

Re: Do you need a loan?

2015-08-31 Thread
We offer private, commercial and personal loans with very low annualinterest rates as low as 2% in one year to 50 years repayment period anywhere in the world. We offer loans ranging from $5000 to $100 million. Our loans are well insured for maximum security is our priority. Are you losing

Re: [PATCH] generic/224: Increase filesystem instance size to 1.5 GiB

2015-08-31 Thread Austin S Hemmelgarn
On 2015-08-31 14:11, Theodore Ts'o wrote: On Sun, Aug 30, 2015 at 08:16:21PM +0530, Chandan Rajendra wrote: For small filesystem instances (i.e. size <= 1 GiB), mkfs.btrfs fails when "data block size" does not match with the "metadata block size" specified on the mkfs.btrfs command line. This

Re: [PATCH] generic/224: Increase filesystem instance size to 1.5 GiB

2015-08-31 Thread Theodore Ts'o
On Mon, Aug 31, 2015 at 03:19:22PM -0400, Austin S Hemmelgarn wrote: > AFAIK, it shouldn't be failing that way, and should automatically switch to > mixed mode allocation. A 1G filesystem should work fine for BTRFS, but > smaller ones will have higher chances of ENOSPC issues (inversely >

Re: [BUG] kernel BUG at fs/btrfs/extent_io.c:2062 (v4.2.0-rc8)

2015-08-31 Thread Dāvis Mosāns
2015-08-31 18:14 GMT+00:00 Dāvis Mosāns : > I'm getting kernel crash and complete system lockup when trying to access > journal on two disk btrfs filesystem with data/metadata as RAID1. > > I can't get proper log because whole system hangs and even kdump fails, > seems it

Re: [PATCH] generic/224: Increase filesystem instance size to 1.5 GiB

2015-08-31 Thread Chandan Rajendra
On Monday 31 Aug 2015 14:11:27 Theodore Ts'o wrote: > On Sun, Aug 30, 2015 at 08:16:21PM +0530, Chandan Rajendra wrote: > > For small filesystem instances (i.e. size <= 1 GiB), mkfs.btrfs fails when > > "data block size" does not match with the "metadata block size" specified > > on the mkfs.btrfs

Re: [PATCH] generic/224: Increase filesystem instance size to 1.5 GiB

2015-08-31 Thread Chandan Rajendra
On Tuesday 01 Sep 2015 05:49:14 Chandan Rajendra wrote: > On Monday 31 Aug 2015 14:11:27 Theodore Ts'o wrote: > > On Sun, Aug 30, 2015 at 08:16:21PM +0530, Chandan Rajendra wrote: > > > For small filesystem instances (i.e. size <= 1 GiB), mkfs.btrfs fails > > > when > > > "data block size" does

[PATCH v2 4/4] btrfs-progs: Use common unit parser for btrfs qgroup command

2015-08-31 Thread Zhao Lei
Move to use get_unit_mode_from_arg() for btrfs qgroup command, to make "btrfs qgroup show"'s unit argument same with other tools. Signed-off-by: Zhao Lei --- cmds-qgroup.c | 47 --- 1 file changed, 4 insertions(+), 43

[PATCH v2 2/4] btrfs-progs: Use common unit parser for btrfs filesystem command

2015-08-31 Thread Zhao Lei
Move to use get_unit_mode_from_arg() for cmds-filesystem.c, to make "btrfs filesystem df/show/usage"'s unit argument same. Also have cleanup effect: 19 insertions(+), 181 deletions(-) Signed-off-by: Zhao Lei --- cmds-fi-usage.c | 79

Re: [PATCH] Abort tests on mkfs failure

2015-08-31 Thread Chandan Rajendra
On Monday 31 Aug 2015 09:20:24 Dave Chinner wrote: > On Sun, Aug 30, 2015 at 08:14:48PM +0530, Chandan Rajendra wrote: > > When creating small Btrfs filesystem instances (i.e. filesystem size <= > > 1GiB), mkfs.btrfs can fail if "data block size" does not match "metadata > > block size". In such

[PATCH v2 0/4] btrfs-progs: Use common function to parse unit arguments

2015-08-31 Thread Zhao Lei
We are using separate code for parse unit mode in current code, better to use common function. This patchset introduce common function to parse arguments for setting unit: get_unit_mode_from_arg() and common help message for unit argument, to make every tool in btrfs having same interface for

[PATCH v2 3/4] btrfs-progs: Use common unit parser for btrfs device command

2015-08-31 Thread Zhao Lei
Move to use get_unit_mode_from_arg() for cmds-device.c, to make "btrfs device usage"'s unit argument same with other tools. Signed-off-by: Zhao Lei --- cmds-device.c | 74 ++- 1 file changed, 7 insertions(+), 67

[PATCH v2 1/4] btrfs-progs: Introduce get_unit_mode_from_arg for common use

2015-08-31 Thread Zhao Lei
We are using separate code for parse unit mode in current code, better to use common function. This patch introduce common function for to arguments for setting unit, and a common help message, to make every tool in btrfs having same unit argument. The merit are: 1: Unify current each tool's

Re: btrfs regression since 4.X kernel NULL pointer dereference

2015-08-31 Thread Stefan Priebe
Am 01.09.2015 um 02:06 schrieb Chris Mason: On Mon, Aug 31, 2015 at 07:32:09PM +0200, Stefan Priebe - Profihost AG wrote: Am 25.08.2015 um 15:51 schrieb Chris Mason : On Tue, Aug 25, 2015 at 11:00:30AM +0200, Christoph Hellwig wrote: I think this is btrfs using a struct

Re: mount command now shows subvol and subvolid

2015-08-31 Thread David Sterba
On Sun, Aug 30, 2015 at 11:17:44AM -0600, Chris Murphy wrote: > Does anyone know when this changed? Maybe it's a 4.2 thing... anyway > it's very much welcome! And another "side effect" is that /proc/self/mountinfo will report the mounted subvolume, even if it was an implicit mount of non-toplevel

Re: [PATCH v2 0/4] btrfs-progs: Use common function to parse unit arguments

2015-08-31 Thread David Sterba
On Mon, Aug 31, 2015 at 07:03:40PM +0800, Zhao Lei wrote: > Zhao Lei (4): > btrfs-progs: Introduce get_unit_mode_from_arg for common use > btrfs-progs: Use common unit parser for btrfs filesystem command > btrfs-progs: Use common unit parser for btrfs device command > btrfs-progs: Use

Re: [PATCH v2 2/4] btrfs-progs: Use common unit parser for btrfs filesystem command

2015-08-31 Thread David Sterba
On Mon, Aug 31, 2015 at 07:03:42PM +0800, Zhao Lei wrote: > @@ -859,88 +859,23 @@ out: > const char * const cmd_filesystem_usage_usage[] = { > "btrfs filesystem usage [options] [..]", > "Show detailed information about internal filesystem usage .", > - "-b|--raw raw

Re: [PATCH v2 1/4] btrfs-progs: tests: Introduce init_env to initialize common env variant

2015-08-31 Thread David Sterba
On Mon, Aug 31, 2015 at 01:04:36PM +0800, Zhao Lei wrote: > For example, $TEST_DIR is common used in severial tests, and have > duplicated code for initialize. > > These duplicated code not only benifits harddisk vendor, but have > inconsistent details, as: > convert-tests.sh: lack of mkdir >