Re: btrfs fi defrag does not defrag files >256kB?

2016-07-27 Thread Duncan
Nicholas D Steeves posted on Wed, 27 Jul 2016 13:19:01 -0400 as excerpted: > Is there any reason why defrag without -t cannot detect and default to > the data chunk size, or why it does not default to 1 GiB? I don't know the answer, but have wondered that myself. 256 KiB seems a rather small

Re: [PATCH] btrfs-progs: Make RAID stripesize configurable

2016-07-27 Thread Sanidhya Solanki
On Wed, 27 Jul 2016 18:25:48 +0200 Goffredo Baroncelli wrote: > I am not able to understand this sentence: on the best of my knowledge, > in btrfs the RAID5/RAID6 stripe is composed by several sub-stripes (I am > not sure about the terminology to adopt); the number of

[PATCH v3] btrfs: fix fsfreeze hang caused by delayed iputs deal

2016-07-27 Thread Wang Xiaoguang
When running fstests generic/068, sometimes we got below deadlock: xfs_io D 8800331dbb20 0 6697 6693 0x0080 8800331dbb20 88007acfc140 880034d895c0 8800331dc000 880032d243e8 fffe 880032d24400 0001 8800331dbb38

Re: [PATCH 2/5] New btrfs command: "btrfs inspect physical-find"

2016-07-27 Thread Qu Wenruo
At 07/28/2016 01:43 AM, Goffredo Baroncelli wrote: From: Goffredo Baroncelli The aim of this new command is to show the physical placement on the disk of a file. Currently it handles all the profiles (single, dup, raid1/10/5/6). The syntax is simple: Uh... Where is the

[PATCH] Btrfs: deal with unexpected return value in flush_space

2016-07-27 Thread Liu Bo
Function start_transaction() can return ERR_PTR(1) when flush is BTRFS_RESERVE_FLUSH_LIMIT, so the call graph is start_transaction (return ERR_PTR(1)) -> btrfs_block_rsv_add (return 1) -> reserve_metadata_bytes (return 1) -> flush_space (return 1) -> do_chunk_alloc

Re: [PATCH 1/5] Add some helper functions

2016-07-27 Thread Qu Wenruo
At 07/28/2016 01:43 AM, Goffredo Baroncelli wrote: From: Goffredo Baroncelli Add the following functions: - int is_btrfs_fs(const char *path) -> returns 0 if path is a btrfs filesystem - void check_root_or_exit() -> checks if the user has the root capability or

Re: [sparc64] mkfs.btrfs bus error / align issue?

2016-07-27 Thread Patrick Baggett
On Wed, Jul 27, 2016 at 3:40 PM, John Paul Adrian Glaubitz wrote: > On 07/27/2016 03:59 PM, Anatoly Pugachev wrote: >> Program received signal SIGBUS, Bus error. >> 0x0015e160 in write_raid56_with_parity (info=0x2b17b0, >> eb=0x2c7fe0, multi=0x2c2870,

Re: [sparc64] mkfs.btrfs bus error / align issue?

2016-07-27 Thread Patrick Baggett
On Wed, Jul 27, 2016 at 3:39 PM, Patrick Baggett wrote: > On Wed, Jul 27, 2016 at 8:59 AM, Anatoly Pugachev wrote: >> >> Hello! >> >> Running xfstests suite, got in logs mkfs.btrfs bus error, debugging it >> shows the following : >> >>

Re: [sparc64] mkfs.btrfs bus error / align issue?

2016-07-27 Thread John Paul Adrian Glaubitz
On 07/27/2016 03:59 PM, Anatoly Pugachev wrote: > Program received signal SIGBUS, Bus error. > 0x0015e160 in write_raid56_with_parity (info=0x2b17b0, > eb=0x2c7fe0, multi=0x2c2870, stripe_len=65536, raid_map=0x2c2570) at > volumes.c:2156 > 2156*(unsigned

Re: [sparc64] mkfs.btrfs bus error / align issue?

2016-07-27 Thread Patrick Baggett
On Wed, Jul 27, 2016 at 8:59 AM, Anatoly Pugachev wrote: > > Hello! > > Running xfstests suite, got in logs mkfs.btrfs bus error, debugging it > shows the following : > > mator@nvg5120:~/btrfs-progs$ git log -1 --oneline > 40650bf Btrfs progs v4.6.1 > >

Re: [sparc64] mkfs.btrfs bus error / align issue?

2016-07-27 Thread David Sterba
On Wed, Jul 27, 2016 at 04:59:27PM +0300, Anatoly Pugachev wrote: > Hello! > > Running xfstests suite, got in logs mkfs.btrfs bus error, debugging it > shows the following : > > Program received signal SIGBUS, Bus error. > 0x0015e160 in write_raid56_with_parity (info=0x2b17b0, >

[PATCH v3] Btrfs: remove BUG() in raid56

2016-07-27 Thread Liu Bo
This BUG() has been triggered by a fuzz testing image, which contains an invalid chunk type, ie. a single stripe chunk has the raid6 type. Btrfs can handle this gracefully by returning -EIO, so besides using btrfs_warn to give us more debugging information rather than a single BUG(), we can

[BTRFS-PROGS][PATCH][V2] Add two new commands: 'btrfs insp physical-find' and 'btrfs insp physical-dump'

2016-07-27 Thread Goffredo Baroncelli
Hi all, the following patches add two new commands: 1) btrfs inspect-internal physical-find 2) btrfs inspect-internal physical-dump The aim of these two new commands is to locate (1) and dump (2) the stripe elements stored on the disks. I developed these two new command to simplify the

[PATCH 2/5] New btrfs command: "btrfs inspect physical-find"

2016-07-27 Thread Goffredo Baroncelli
From: Goffredo Baroncelli The aim of this new command is to show the physical placement on the disk of a file. Currently it handles all the profiles (single, dup, raid1/10/5/6). The syntax is simple: where: is the file to inspect is the offset of the file to inspect

[PATCH 1/5] Add some helper functions

2016-07-27 Thread Goffredo Baroncelli
From: Goffredo Baroncelli Add the following functions: - int is_btrfs_fs(const char *path) -> returns 0 if path is a btrfs filesystem - void check_root_or_exit() -> checks if the user has the root capability or it exits writing an error message

[PATCH 3/5] new command btrfs inspect physical-dump

2016-07-27 Thread Goffredo Baroncelli
From: Goffredo Baroncelli The aim of this command, is to dump the disk content of a file bypassing the btrfs filesystem. This could help to test the btrfs filesystem. The dump size is a page (4k) (even if the file is shorter). It is possible to set an offset for the file

[PATCH 4/5] Add man page for command btrfs insp physical-find

2016-07-27 Thread Goffredo Baroncelli
From: Goffredo Baroncelli Signed-off-by: Goffredo Baroncelli --- Documentation/btrfs-inspect-internal.asciidoc | 7 +++ 1 file changed, 7 insertions(+) diff --git a/Documentation/btrfs-inspect-internal.asciidoc

[PATCH 5/5] Add new command to man pages: btrfs insp physical-dump

2016-07-27 Thread Goffredo Baroncelli
From: Goffredo Baroncelli Signed-off-by: Goffredo Baroncelli --- Documentation/btrfs-inspect-internal.asciidoc | 12 1 file changed, 12 insertions(+) diff --git a/Documentation/btrfs-inspect-internal.asciidoc

Re: btrfs fi defrag does not defrag files >256kB?

2016-07-27 Thread Nicholas D Steeves
On 26 July 2016 at 21:10, Duncan <1i5t5.dun...@cox.net> wrote: > Nicholas D Steeves posted on Tue, 26 Jul 2016 19:03:53 -0400 as excerpted: > >> Hi, >> >> I've been using btrfs fi defrag with out the "-r -t 32M" option for >> regular maintenance. I just learned, in >>

Re: [PATCH] btrfs-progs: Make RAID stripesize configurable

2016-07-27 Thread Goffredo Baroncelli
Hi Sanidhya, On 2016-07-27 08:12, Sanidhya Solanki wrote: > The reason for this limit is the fact that, as I noted above the real > stripe size is currently 4KiB, with an element size of 64KiB. I am not able to understand this sentence: on the best of my knowledge, in btrfs the RAID5/RAID6

Re: [PATCH V20 04/19] Btrfs: subpage-blocksize: Define extent_buffer_head

2016-07-27 Thread Chandan Rajendra
On Tuesday, July 26, 2016 01:42:08 PM Josef Bacik wrote: > On 07/04/2016 12:34 AM, Chandan Rajendra wrote: > > In order to handle multiple extent buffers per page, first we need to > > create a > > way to handle all the extent buffers that are attached to a page. > > > > This patch creates a new

[sparc64] mkfs.btrfs bus error / align issue?

2016-07-27 Thread Anatoly Pugachev
Hello! Running xfstests suite, got in logs mkfs.btrfs bus error, debugging it shows the following : mator@nvg5120:~/btrfs-progs$ git log -1 --oneline 40650bf Btrfs progs v4.6.1 root@nvg5120:/home/mator/xfstests# gdb GNU gdb (Debian 7.11.1-2) 7.11.1 (gdb) file /opt/btrfs/bin/mkfs.btrfs Reading

Re: [PATCH V20 01/19] Btrfs: subpage-blocksize: Fix whole page read.

2016-07-27 Thread Chandan Rajendra
On Tuesday, July 26, 2016 12:11:49 PM Josef Bacik wrote: > On 07/04/2016 12:34 AM, Chandan Rajendra wrote: > > For the subpage-blocksize scenario, a page can contain multiple > > blocks. In such cases, this patch handles reading data from files. > > > > To track the status of individual blocks of

Re: [PATCH v2] btrfs: fix fsfreeze hang caused by delayed iputs deal

2016-07-27 Thread Wang Xiaoguang
hello, On 07/27/2016 04:10 PM, Wang Xiaoguang wrote: When running fstests generic/068, sometimes we got below deadlock: xfs_io D 8800331dbb20 0 6697 6693 0x0080 8800331dbb20 88007acfc140 880034d895c0 8800331dc000 880032d243e8 fffe

[PATCH v2] btrfs: fix fsfreeze hang caused by delayed iputs deal

2016-07-27 Thread Wang Xiaoguang
When running fstests generic/068, sometimes we got below deadlock: xfs_io D 8800331dbb20 0 6697 6693 0x0080 8800331dbb20 88007acfc140 880034d895c0 8800331dc000 880032d243e8 fffe 880032d24400 0001 8800331dbb38

Re: [PATCH] btrfs-progs: Make RAID stripesize configurable

2016-07-27 Thread Sanidhya Solanki
On Tue, 26 Jul 2016 11:14:37 -0600 Chris Murphy wrote: > On Fri, Jul 22, 2016 at 8:58 AM, Austin S. Hemmelgarn > wrote: > > On 2016-07-22 09:42, Sanidhya Solanki wrote: > > >> +*stripesize=*;; > >> +Specifies the new stripe size > > It'd be