Re: [PATCH v2 2/2] btrfs: incremental send, improve rmdir performance for large directory

2018-05-08 Thread Filipe Manana
On Tue, May 8, 2018 at 11:11 AM, robbieko wrote: > From: Robbie Ko > > Currently when checking if we can delete a directory, we always > check if all its children have been processed. > > Example: A directory with 2,000,000 files was deleted >

Re: [PATCH v2 1/2] btrfs: incremental send, optimization add orphan_dir_info

2018-05-08 Thread Filipe Manana
On Tue, May 8, 2018 at 11:11 AM, robbieko wrote: > From: Robbie Ko > > moving the allocation to the end in order to avoid unnecessary > allocations > > Signed-off-by: Robbie Ko Reviewed-by: Filipe Manana >

Re: send ioctl failed with -2

2018-05-08 Thread Nicolas Porcel
On Tue, May 08, 2018 at 02:16:06PM -0400, Noah Massey wrote: > Silly question, but is 'mysnapshot' actually accessible at './mysnapshot' ? > Because the output from btrfs send should immediately output > 'At subvol mysnapshot' Inded. This is not even the right command considering I only kept the

[PATCH 2/2] xfstests: btrfs, test send's ability to punch holes and prealloc extents

2018-05-08 Thread Howard McLauchlan
From: Filipe Manana This test verifies that after an incremental btrfs send the replicated file has the same exact hole and data structure as in the origin filesystem. This didn't use to be the case before the send stream version 2 - holes were sent as write operations of 0

[PATCH 1/2] btrfs: add verify chattr support for send/receive test

2018-05-08 Thread Howard McLauchlan
From: Howard McLauchlan This test aims to verify correct behaviour with chattr operations and btrfs send/receive. The intent is to check general correctness as well as special interactions with troublesome flags(immutable, append only). This test is motivated by a bug in

Re: [PATCH 2/2] btrfs-progs: tests: check btrfs qgroup parent-child relation output

2018-05-08 Thread Qu Wenruo
On 2018年05月08日 13:48, Lu Fengqi wrote: > Since commit aaf2dac5ef37 ("btrfs-progs: qgroup: split update_qgroup to > reduce arguments") cause qgroup show to output the wrong qgroup > parent-child relationship, in addition to fixing the problem, a test case > is needed to prevent the similar

[PATCH RESEND 08/12] btrfs-progs: fsfeatures: Introduce a new set of features, runtime_features

2018-05-08 Thread Qu Wenruo
Introduce runtime_features for fsfeatures.[ch], and related functions: btrfs_list_all_runtime_features() btrfs_parse_runtime_features() btrfs_process_runtime_features() btrfs_parse_runtime_features_to_string() And rename one function to avoid confusion: btrfs_parse_features_to_string() ->

[PATCH RESEND 02/12] btrfs-progs: qgroup-verify: Use fs_info->readonly to check if we should repair qgroups

2018-05-08 Thread Qu Wenruo
In fact qgroup-verify is just kind of offline qgroup rescan, and later mkfs qgroup support will reuse it. So qgroup-verify doesn't really need to rely the global variable @repair to check if it should repair qgroups. Instead check fs_info->readonly to do the repair. Signed-off-by: Qu Wenruo

[PATCH RESEND 05/12] btrfs-progs: ctree: Introduce function to create an empty tree

2018-05-08 Thread Qu Wenruo
Introduce a new function, btrfs_create_tree(), to create an empty tree. Currently, there is only one caller to create new tree, namely data reloc tree in mkfs. However it's copying fs tree to create a new root. This copy fs tree method is not a good idea if we only need an empty tree. So here

[PATCH RESEND 06/12] btrfs-progs: mkfs: Introduce function to insert qgroup info and limit items

2018-05-08 Thread Qu Wenruo
Introduce a new function, insert_qgroup_items(), to insert qgroup info item and qgroup limit item for later mkfs qgroup support. Signed-off-by: Qu Wenruo --- mkfs/main.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/mkfs/main.c

[PATCH RESEND 03/12] btrfs-progs: qgroup-verify: Move qgroup classification out of report_qgroups

2018-05-08 Thread Qu Wenruo
The original qgroup-verify integrates qgroup classification into report_qgroups(). This behavior makes silent qgroup repair (or offline rescan) impossible. To repair qgroup, we must call report_qgroups() to trigger bad qgroup classification, which will output error message. This patch moves bad

[PATCH RESEND 11/12] btrfs-progs: test/mkfs: Add test case for -R quota option

2018-05-08 Thread Qu Wenruo
Only test if btrfs check (which will check qgroup by default) and kernel mount success. Comprehensive qgroup test cases still belongs to fstests. Signed-off-by: Qu Wenruo --- tests/mkfs-tests/001-basic-profiles/test.sh | 10 ++ 1 file changed, 10 insertions(+) diff

[PATCH RESEND 10/12] btrfs-progs: mkfs: Introduce quota runtime feature

2018-05-08 Thread Qu Wenruo
Introduce quota runtime feature for mkfs. The result fs will has quota enabled, with consistent qgroup accounting. This is quite handy to test quota with fstests, which doesn't support to call ioctl for btrfs at mount time. Signed-off-by: Qu Wenruo ---

[PATCH RESEND 07/12] btrfs-progs: mkfs: Introduce function to setup quota root and rescan

2018-05-08 Thread Qu Wenruo
Introduce a new function, setup_quota_root(), which will create quota root, and do an offline rescan to ensure all quota accounting numbers are correct. Signed-off-by: Qu Wenruo --- mkfs/main.c | 86 + 1 file changed, 86

[PATCH RESEND 09/12] btrfs-progs: mkfs: Introduce --runtime-features option

2018-05-08 Thread Qu Wenruo
Just like -O|--features, introduce -R|--runtime-features to enable features like qgroup, and maybe space cache later. Currently only mkfs is supported, mainly for test purpose. Convert is not supported yet. Signed-off-by: Qu Wenruo --- Documentation/mkfs.btrfs.asciidoc | 16

[PATCH RESEND 01/12] btrfs-progs: qgroup-verify: Also repair qgroup status version

2018-05-08 Thread Qu Wenruo
Current kernel only supports qgroup version 1. Make qgroup-verify to follow this standard. Signed-off-by: Qu Wenruo --- ctree.h | 1 + qgroup-verify.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/ctree.h b/ctree.h index fa861ba0b4c3..cf99df1c90a8 100644 ---

[PATCH RESEND 04/12] btrfs-progs: qgroup-verify: Allow repair_qgroups function to do silent repair

2018-05-08 Thread Qu Wenruo
Allow repair_qgroups() to do silent repair, so it can acts as offline qgroup rescan. This provides the basis for later mkfs quota support. Signed-off-by: Qu Wenruo --- check/main.c| 2 +- qgroup-verify.c | 19 +++ qgroup-verify.h | 2 +- 3 files changed, 13

[PATCH RESEND 12/12] btrfs-progs: test/mkfs: Add test case for --rootdir and -R quota

2018-05-08 Thread Qu Wenruo
Nothing interesting, since such combination can be handled easily by qgroup-verify. Signed-off-by: Qu Wenruo --- .../mkfs-tests/017-rootdir-with-quota/test.sh | 51 +++ 1 file changed, 51 insertions(+) create mode 100755

[PATCH RESEND 00/12] mkfs: Quota support through -R|--runtime quota

2018-05-08 Thread Qu Wenruo
Can be fetched from github: https://github.com/adam900710/btrfs-progs/tree/mkfs_qgroup Which is based on v4.16 tag. This patchset adds quota support, which means the result fs will have quota enabled by default, and its accounting is already consistent, no manually rescan or quota enable is

Re: [RFC][PATCH 0/76] vfs: 'views' for filesystems with more than one root

2018-05-08 Thread Dave Chinner
On Tue, May 08, 2018 at 11:03:20AM -0700, Mark Fasheh wrote: > Hi, > > The VFS's super_block covers a variety of filesystem functionality. In > particular we have a single structure representing both I/O and > namespace domains. > > There are requirements to de-couple this functionality. For

Re: [PATCH] btrfs: incremental send, fix BUG when parent commit_root changed

2018-05-08 Thread robbieko
Filipe Manana 於 2018-05-08 19:12 寫到: On Tue, May 8, 2018 at 11:30 AM, robbieko wrote: Hi Filipe Manana, Although the snapshot is readonly, when the snapshot is created, in order to modify the last_snapshot, it will cause generation changes, and it will affect the

[RFC PATCH 5/6] btrfs: add send_stream_version attribute to sysfs

2018-05-08 Thread Howard McLauchlan
From: Filipe David Borba Manana So that applications can find out what's the highest send stream version supported/implemented by the running kernel: $ cat /sys/fs/btrfs/send/stream_version 2 [Howard: rebased on 4.17-rc4] Signed-off-by: Howard McLauchlan

[RFC PATCH 6/6] btrfs: add chattr support for send/receive

2018-05-08 Thread Howard McLauchlan
From: Howard McLauchlan Presently btrfs send/receive does not propagate inode attribute flags; all chattr operations are effectively discarded upon transmission. This patch adds kernel support for inode attribute flags. Userspace support can be found under the commit:

[RFC PATCH 0/6] btrfs send stream version 2

2018-05-08 Thread Howard McLauchlan
In trying to implement support for inode flags in send/receive, the need for proper versioning/compatibility came up. I found some of Filipe's old patches [1] for send stream v2 and rebased them on 4.17-rc4. My chattr changes are landed on top and also gated behind send stream v2. Similar was done

[RFC PATCH 4/6] btrfs: send, use fallocate command to allocate extents

2018-05-08 Thread Howard McLauchlan
From: Filipe David Borba Manana The send stream version 2 adds the fallocate command, which can be used to allocate extents for a file or punch holes in a file. Previously we were ignoring file prealloc extents or treating them as extents filled with 0 bytes and sending a

[RFC PATCH 1/6] btrfs: send, bump stream version

2018-05-08 Thread Howard McLauchlan
From: Filipe David Borba Manana This increases the send stream version from version 1 to version 2, adding new commands: 1) total data size - used to tell the receiver how much file data the stream will add or update; 2) fallocate - used to pre-allocate space for files

Re: [RFC][PATCH 0/76] vfs: 'views' for filesystems with more than one root

2018-05-08 Thread Jeff Mahoney
On 5/8/18 7:38 PM, Dave Chinner wrote: > On Tue, May 08, 2018 at 11:03:20AM -0700, Mark Fasheh wrote: >> Hi, >> >> The VFS's super_block covers a variety of filesystem functionality. In >> particular we have a single structure representing both I/O and >> namespace domains. >> >> There are

[RFC PATCH 3/6] btrfs: send, use fallocate command to punch holes

2018-05-08 Thread Howard McLauchlan
From: Filipe David Borba Manana Instead of sending a write command with a data buffer filled with 0 value bytes, use the fallocate command, introduced in the send stream version 2, to tell the receiver to punch a file hole using the fallocate system call. [Howard: rebased on

[RFC PATCH 2/6] btrfs: send, implement total data size command to allow for progress estimation

2018-05-08 Thread Howard McLauchlan
From: Filipe David Borba Manana This new send flag makes send calculate first the amount of new file data (in bytes) the send root has relatively to the parent root, or for the case of a non-incremental send, the total amount of file data the stream will create (including

[RFC PATCH 1/6] Btrfs-progs: send, bump stream version

2018-05-08 Thread Howard McLauchlan
From: Filipe Manana This increases the send stream version from version 1 to version 2, adding new commands: 1) total data size - used to tell the receiver how much file data the stream will add or update; 2) fallocate - used to pre-allocate space for files and to punch

[RFC PATCH 2/6] Btrfs-progs: send, implement total data size callback and progress report

2018-05-08 Thread Howard McLauchlan
From: Filipe Manana This is a followup to the kernel patch titled: Btrfs: send, implement total data size command to allow for progress estimation This makes the btrfs send and receive commands aware of the new send flag, named BTRFS_SEND_C_TOTAL_DATA_SIZE, which tells

[RFC PATCH 6/6] btrfs-progs: add chattr support for send/receive

2018-05-08 Thread Howard McLauchlan
From: Howard McLauchlan Presently, btrfs send/receive does not propagate inode attribute flags; all chattr operations are effectively discarded upon transmission. This patch adds userspace support for inode attribute flags. Kernel support can be found under the commit:

[RFC PATCH 5/6] btrfs-progs: add total data size, fallocate to dump

2018-05-08 Thread Howard McLauchlan
From: Howard McLauchlan Adding entries to dump for new commands (total data size, fallocate). Signed-off-by: Howard McLauchlan --- send-dump.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/send-dump.c

[RFC PATCH 4/6] Btrfs-progs: add write and clone commands debug info to receive

2018-05-08 Thread Howard McLauchlan
From: Filipe Manana When specifying -vv print information about received write and clone commands too, as we do this for other commands already and it's very useful for debugging and troubleshooting. Signed-off-by: Filipe David Borba Manana ---

[RFC PATCH 3/6] Btrfs-progs: send, implement fallocate command callback

2018-05-08 Thread Howard McLauchlan
From: Filipe Manana The fallocate send stream command, added in stream version 2, is used to pre-allocate space for files and punch file holes. This change implements the callback for that new command, using the fallocate function from the standard C library to carry out the

Btrfs remounted read-only due to ENOSPC in btrfs_run_delayed_refs cont. [Was: Re: metadata_ratio mount option?]

2018-05-08 Thread Martin Svec
Hello Chris, Dne 7.5.2018 v 18:37 Chris Mason napsal(a): > > > On 7 May 2018, at 12:16, Martin Svec wrote: > >> Hello Chris, >> >> Dne 7.5.2018 v 16:49 Chris Mason napsal(a): >>> On 7 May 2018, at 7:40, Martin Svec wrote: >>> Hi, According to man btrfs [1], I assume that

Re: [PATCH] btrfs: incremental send, fix BUG when parent commit_root changed

2018-05-08 Thread Filipe Manana
On Tue, May 8, 2018 at 9:15 AM, robbieko wrote: > From: Robbie Ko > > [BUG] > btrfs send BUG on parent commit_root node receive destination > is at the same volume. I can't make sense of that sentence. > > [Example] > btrfs send -e -p /mnt/snap1/

[PATCH v2 1/2] btrfs: incremental send, optimization add orphan_dir_info

2018-05-08 Thread robbieko
From: Robbie Ko moving the allocation to the end in order to avoid unnecessary allocations Signed-off-by: Robbie Ko --- fs/btrfs/send.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/fs/btrfs/send.c

[PATCH v2 2/2] btrfs: incremental send, improve rmdir performance for large directory

2018-05-08 Thread robbieko
From: Robbie Ko Currently when checking if we can delete a directory, we always check if all its children have been processed. Example: A directory with 2,000,000 files was deleted Result: original : 1994m57.071s patch : 1m38.554s [FIX] Instead of checking all children

[PATCH v2 0/2] btrfs :incremental send, improve rmdir performance

2018-05-08 Thread robbieko
From: Robbie Ko The following patch is to improve the btrfs send, the speed of large directory deletion. 1. Optimization, avoid unnecessary allocations. 2. Increase the speed of can_rmdir. Robbie Ko (2): btrfs: incremental send, optimization add orphan_dir_info

Re: Btrfs installation advices

2018-05-08 Thread Rolf Wald
Hello, some hints inside Am 08.05.2018 um 02:22 schrieb faurepi...@gmail.com: Hi, I'm curious about btrfs, and maybe considering it for my new laptop installation (a Lenovo T470). I was going to install my usual lvm+ext4+full disk encryption setup, but thought I should maybe give a try to

[PATCH v5 02/16] btrfs-progs: lowmem: exclude extents of metadata blocks

2018-05-08 Thread Su Yue
Commit d17d6663c99c ("btrfs-progs: lowmem check: Fix regression which screws up extent allocator") removes pin_metadata_blocks() from lowmem repair. So we have to find another way to exclude extents which should be occupied by existed tree blocks. Modify pin_down_tree_blocks() and rename it to

[PATCH v5 10/16] btrfs-progs: lowmem: remove parameter @trans of repair_extent_item()

2018-05-08 Thread Su Yue
This patch removes parameter @trans of repair_extent_item(). It calls try_avoid_extents_overwrite() and starts a transaction by itself. Note: This patch and next patches cause error in lowmem repair like: "Error: Commit_root already set when starting transaction". Such error will disappear after

[PATCH v5 12/16] btrfs-progs: lowmem: remove parameter @trans of repair_tree_back_ref()

2018-05-08 Thread Su Yue
This patch removes parameter @trans of repair_tree_back_ref(). It calls try_avoid_extents_overwrite() and starts a transaction by itself. Note: This patch and next patches cause error in lowmem repair like: "Error: Commit_root already set when starting transaction". Such error will disappear

[PATCH v5 11/16] btrfs-progs: lowmem: remove parameter @trans of check_leaf_items()

2018-05-08 Thread Su Yue
This patch removes parameter @trans of check_leaf_items(). Note: This patch and next patches cause error in lowmem repair like: "Error: Commit_root already set when starting transaction". Such error will disappear after removing @trans finished. Signed-off-by: Su Yue

[PATCH v5 03/16] btrfs-progs: lowmem: introduce mark/clear_block_groups_full()

2018-05-08 Thread Su Yue
Excluding or pining all metadata blocks is time-inefficient for large storage filesystems. Here is another way to mark all metadata block groups full and allocate new chunks for CoW. Then new reserved extents never overwrite extents. Introduce modify_block_groups_cache() to modify all blocks

[PATCH v5 14/16] btrfs-progs: lowmem: introduce repair_block_accounting()

2018-05-08 Thread Su Yue
Introduce repair_block_accounting() which calls btrfs_fix_block_accounting() to repair block group accouting. Replace btrfs_fix_block_accounting() with the new function. Note: This patch and next patches cause error in lowmem repair like: "Error: Commit_root already set when starting

[PATCH v5 13/16] btrfs-progs: lowmem: remove parameter @trans of check_btrfs_root()

2018-05-08 Thread Su Yue
Remove parameters @trans of delete_extent_item() and walk_down_tree_v2(). Note: This patch and next patches cause error in lowmem repair like: "Error: Commit_root already set when starting transaction". Such error will disappear after removing @trans finished. Signed-off-by: Su Yue

[PATCH] btrfs: incremental send, fix BUG when parent commit_root changed

2018-05-08 Thread robbieko
From: Robbie Ko [BUG] btrfs send BUG on parent commit_root node receive destination is at the same volume. [Example] btrfs send -e -p /mnt/snap1/ /mnt/snap2/ | btrfs receive -e /mnt/temp [REASON] 1. When send with the parent, the send process will get the parent

Re: [PATCH] btrfs: send, improve rmdir performance for large directory

2018-05-08 Thread Filipe Manana
On Tue, May 8, 2018 at 3:50 AM, robbieko wrote: > From: Robbie Ko > > At present, we check if the directory can be deleted. At present, and in the future... it will always be needed. > We need to check whether all the files under this directory >

[PATCH v5 15/16] btrfs-progs: lowmem: end of removing parameters @trans in lowmem

2018-05-08 Thread Su Yue
Remove @trans in check_chunks_and_extents_lowmem(). After this patch, lowmem repair works again. Signed-off-by: Su Yue --- check/mode-lowmem.c | 13 - 1 file changed, 13 deletions(-) diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c index

[PATCH v5 07/16] btrfs-progs: lowmem: start to remove parameters @trans in lowmem

2018-05-08 Thread Su Yue
Since extents can be avoid to be overwrited by excluding or chunk allocation. It's unnessesary to do all repairs in one transaction. This patch removes parameter @trans of repair_extent_data_item(). repair_extent_data_item() calls try_avoid_extents_overwrite() and starts a transaction by itself.

[PATCH v5 06/16] btrfs-progs: lowmem: exclude extents if init-extent-tree in lowmem

2018-05-08 Thread Su Yue
If options '--init-extent-tree' and '--mode=lowmem' are both input, all metadata blocks will be traversed twice. First one is done by pin_metadata_blocks() in reinit_extent_tree(). Second one is in check_chunks_and_extents_v2(). Excluding instead of pining metadata blocks before reinit extent

[PATCH v5 08/16] btrfs-progs: lowmem: remove parameter @trans of delete_extent_item()

2018-05-08 Thread Su Yue
This patch removes the parameter @trans of delete_extent_item(). It calls try_avoid_extents_overwrite() and starts a transaction by itself. Note: This patch and next patches cause error in lowmem repair like: "Error: Commit_root already set when starting transaction". Such error will disappear

[PATCH v5 16/16] btrfs-progs: fsck-tests: add image no extent with normal device size

2018-05-08 Thread Su Yue
This new image misses one extent which leads lowmem mode to allocate new chunks in repair. Rename original image to no_extent_bad_dev.img. Because of its bad used bytes, it should let lowmem mode exclude blocks in repair. Due to problems of btrfs-image, choose xz as compression tool.

[PATCH v5 00/16] btrfs-progs: lowmem: avoid extents overwrite

2018-05-08 Thread Su Yue
This patchset can be fetched from my github: https://github.com/Damenly/btrfs-progs/tree/lowmem_v5 Patch[1] is added for code shared. Patch[2-6] introduce two ways to avoid extents overwrite: 1) Traverse trees and exclude all metadata blocks. It's time-inefficient for large filesystems. 2)

Re: [PATCH] btrfs: incremental send, fix BUG when parent commit_root changed

2018-05-08 Thread robbieko
Hi Manana, I will fix and modify and then send patch V2. Thanks. Robbie Ko Filipe Manana 於 2018-05-08 17:15 寫到: On Tue, May 8, 2018 at 9:15 AM, robbieko wrote: From: Robbie Ko [BUG] btrfs send BUG on parent commit_root node receive

[PATCH v5 01/16] btrfs-progs: check: move pin_down_tree_blocks to mode-common.c

2018-05-08 Thread Su Yue
Move pin_down_tree_blocks from main.c to mode-common.c for further patches. And export pin_metadata_blocks to mode-common.h. Signed-off-by: Su Yue --- check/main.c| 88 - check/mode-common.c | 88

[PATCH v5 04/16] btrfs-progs: lowmem: introduce try_force_cow_in_new_chunk()

2018-05-08 Thread Su Yue
Introduce create_chunk_and_block_block_group() to allocate a new chunk and corresponding block group. The new function force_cow_in_new_chunk() firstly allocates new chunk and records its start. Then it modifies all metadata block groups cached and full. Finally it marks the new block group

[PATCH v5 09/16] btrfs-progs: lowmem: remove parameter @trans of repair_chunk_item()

2018-05-08 Thread Su Yue
This patch removes parameter @trans of repair_chunk_item(). It calls try_avoid_extents_overwrite() and starts a transaction by itself. Note: This patch and next patches cause error in lowmem repair like: "Error: Commit_root already set when starting transaction". Such error will disappear after

[PATCH v5 05/16] btrfs-progs: lowmem: introduce avoid_extents_overwrite()

2018-05-08 Thread Su Yue
Declare a global u64 variable last_allocated_chunk records start of the last chunk allocated by lowmem repair. Although global variable is not graceful, it simplifies codes much. avoid_extents_overwrite() prefers to allocates a new chunk first. If it failed because of no space or wrong used

Re: [PATCH] btrfs: incremental send, fix BUG when parent commit_root changed

2018-05-08 Thread robbieko
Hi Filipe Manana, Although the snapshot is readonly, when the snapshot is created, in order to modify the last_snapshot, it will cause generation changes, and it will affect the commit_root modification. Example: #btrfs sub show snap1 Name: snap1 UUID:

Re: [PATCH] btrfs: send, improve rmdir performance for large directory

2018-05-08 Thread robbieko
Hi Manana, I will fix and modify and then send patch V2. Thanks. Robbie Ko Filipe Manana 於 2018-05-08 17:10 寫到: On Tue, May 8, 2018 at 3:50 AM, robbieko wrote: From: Robbie Ko At present, we check if the directory can be deleted. At present,

Re: [PATCH] btrfs: incremental send, fix BUG when parent commit_root changed

2018-05-08 Thread Filipe Manana
On Tue, May 8, 2018 at 11:30 AM, robbieko wrote: > Hi Filipe Manana, > > Although the snapshot is readonly, when the snapshot is created, > in order to modify the last_snapshot, it will cause generation changes, > and it will affect the commit_root modification. So what

Re: [PATCH 0/5] Fix delalloc inodes leaking on btrfs unmount

2018-05-08 Thread David Sterba
On Tue, May 08, 2018 at 08:16:37AM +0300, Nikolay Borisov wrote: > >> properly cleanup delalloc inodes and as a result cleans up the code a bit. > >> > >> I've given it a good bashing through xfstest (4 full xfstest cycles + 100 > >> iterations of generic/475 since it was hitting some early

Re: Btrfs installation advices

2018-05-08 Thread Austin S. Hemmelgarn
On 2018-05-08 03:50, Rolf Wald wrote: Hello, some hints inside Am 08.05.2018 um 02:22 schrieb faurepi...@gmail.com: Hi, I'm curious about btrfs, and maybe considering it for my new laptop installation (a Lenovo T470). I was going to install my usual lvm+ext4+full disk encryption setup, but

Re: [PATCH 0/3] Misc cleanups to cached extent

2018-05-08 Thread David Sterba
On Fri, May 04, 2018 at 10:47:24AM +0300, Nikolay Borisov wrote: > Here are a couple of cleanups I stumbled upon while looking at the freespace > validation code. The first one simplifies btrfs_rmap_block that has an unused > parameter. The next 2 patches cleanup the cache_extent apis since they

Re: [PATCH v4 00/18] btrfs-progs: lowmem check: avoid extents overwrite

2018-05-08 Thread David Sterba
On Tue, May 08, 2018 at 10:06:05AM +0800, Qu Wenruo wrote: > >>>   - Repair functions for lowmem mode call try_avoid_extents_overwrite() > >>>     and start transactions. > >>>     Su Yue (18): > >>>    btrfs-progs: lowmem check: release path in repair_extent_data_item() > >>>    btrfs-progs:

Re: [PATCH v5 00/16] btrfs-progs: lowmem: avoid extents overwrite

2018-05-08 Thread David Sterba
On Tue, May 08, 2018 at 04:29:56PM +0800, Su Yue wrote: > Su Yue (16): > btrfs-progs: check: move pin_down_tree_blocks to mode-common.c > btrfs-progs: lowmem: exclude extents of metadata blocks > btrfs-progs: lowmem: introduce mark/clear_block_groups_full() > btrfs-progs: lowmem: introduce

Re: [PATCH 1/2] btrfs-progs: print-tree: Avoid segfault for heavily corrupted item pointers

2018-05-08 Thread David Sterba
On Mon, May 07, 2018 at 04:56:21PM +0800, Qu Wenruo wrote: > > > On 2018年05月07日 15:46, Qu Wenruo wrote: > > Normally corrupted leaf should be caught by csum check, but sometimes > > corrupted item pointers (out of leaf range) can still pass csum check. > > In fact, our fsck/005 test case image

[PATCH 59/76] fs/proc: Use inode_sb() helper instead of inode->i_sb

2018-05-08 Thread Mark Fasheh
Signed-off-by: Mark Fasheh --- fs/proc/array.c | 2 +- fs/proc/base.c| 22 -- fs/proc/fd.c | 4 ++-- fs/proc/generic.c | 2 +- fs/proc/namespaces.c | 2 +- fs/proc/nommu.c | 2 +- fs/proc/proc_sysctl.c | 4 ++--

[PATCH 56/76] fs/openpromfs: Use inode_sb() helper instead of inode->i_sb

2018-05-08 Thread Mark Fasheh
Signed-off-by: Mark Fasheh --- fs/openpromfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/openpromfs/inode.c b/fs/openpromfs/inode.c index 2200662a9bf1..d1c59e6252c5 100644 --- a/fs/openpromfs/inode.c +++ b/fs/openpromfs/inode.c @@ -229,7 +229,7

[PATCH 57/76] fs/orangefs: Use inode_sb() helper instead of inode->i_sb

2018-05-08 Thread Mark Fasheh
Signed-off-by: Mark Fasheh --- fs/orangefs/file.c| 2 +- fs/orangefs/namei.c | 12 fs/orangefs/orangefs-kernel.h | 8 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c index

[PATCH 55/76] fs/omfs: Use inode_sb() helper instead of inode->i_sb

2018-05-08 Thread Mark Fasheh
Signed-off-by: Mark Fasheh --- fs/omfs/dir.c | 24 fs/omfs/file.c | 37 +++-- fs/omfs/inode.c | 19 ++- 3 files changed, 41 insertions(+), 39 deletions(-) diff --git a/fs/omfs/dir.c b/fs/omfs/dir.c

[PATCH 58/76] fs/overlayfs: Use inode_sb() helper instead of inode->i_sb

2018-05-08 Thread Mark Fasheh
Signed-off-by: Mark Fasheh --- fs/overlayfs/export.c | 2 +- fs/overlayfs/inode.c | 6 +++--- fs/overlayfs/super.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/overlayfs/export.c b/fs/overlayfs/export.c index 87bd4148f4fb..41b23510f5b9 100644 ---

[PATCH 50/76] fs/nfs: Use inode_sb() helper instead of inode->i_sb

2018-05-08 Thread Mark Fasheh
Signed-off-by: Mark Fasheh --- fs/nfs/blocklayout/rpc_pipefs.c| 2 +- fs/nfs/callback_proc.c | 4 ++-- fs/nfs/dir.c | 22 +- fs/nfs/export.c| 2 +- fs/nfs/file.c

[PATCH 52/76] fs/notify: Use inode_sb() helper instead of inode->i_sb

2018-05-08 Thread Mark Fasheh
Signed-off-by: Mark Fasheh --- fs/notify/fdinfo.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/notify/fdinfo.c b/fs/notify/fdinfo.c index d478629c728b..857df5ce27ac 100644 --- a/fs/notify/fdinfo.c +++ b/fs/notify/fdinfo.c @@ -91,7 +91,8 @@ static

[PATCH 53/76] fs/ntfs: Use inode_sb() helper instead of inode->i_sb

2018-05-08 Thread Mark Fasheh
Signed-off-by: Mark Fasheh --- fs/ntfs/aops.c| 16 ++-- fs/ntfs/bitmap.c | 11 ++- fs/ntfs/dir.c | 10 ++- fs/ntfs/file.c| 30 --- fs/ntfs/inode.c | 231 +- fs/ntfs/inode.h | 2 +- fs/ntfs/logfile.c |

[PATCH 51/76] fs/nilfs2: Use inode_sb() helper instead of inode->i_sb

2018-05-08 Thread Mark Fasheh
Signed-off-by: Mark Fasheh --- fs/nilfs2/alloc.c | 10 - fs/nilfs2/bmap.c| 4 ++-- fs/nilfs2/btnode.c | 6 +++--- fs/nilfs2/btree.c | 12 +-- fs/nilfs2/cpfile.c | 6 +++--- fs/nilfs2/dat.c | 2 +- fs/nilfs2/dir.c | 24 ++---

[PATCH 49/76] fs/nfsd: Use inode_sb() helper instead of inode->i_sb

2018-05-08 Thread Mark Fasheh
Signed-off-by: Mark Fasheh --- fs/nfsd/blocklayout.c | 4 ++-- fs/nfsd/export.c | 8 fs/nfsd/nfs4recover.c | 2 +- fs/nfsd/nfsctl.c | 4 ++-- fs/nfsd/nfssvc.c | 5 +++-- fs/nfsd/vfs.c | 8 6 files changed, 16 insertions(+), 15

[PATCH 46/76] fs/kernfs: Use inode_sb() helper instead of inode->i_sb

2018-05-08 Thread Mark Fasheh
Signed-off-by: Mark Fasheh --- fs/kernfs/dir.c | 4 ++-- fs/kernfs/inode.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c index 89d1dc19340b..1239244e826a 100644 --- a/fs/kernfs/dir.c +++ b/fs/kernfs/dir.c @@ -1059,7

[PATCH 47/76] fs/lockd: Use inode_sb() helper instead of inode->i_sb

2018-05-08 Thread Mark Fasheh
Signed-off-by: Mark Fasheh --- fs/lockd/svclock.c | 8 fs/lockd/svcsubs.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c index 3701bccab478..d13892c7bd89 100644 --- a/fs/lockd/svclock.c +++

[PATCH 45/76] fs/jfs: Use inode_sb() helper instead of inode->i_sb

2018-05-08 Thread Mark Fasheh
Signed-off-by: Mark Fasheh --- fs/jfs/acl.c | 2 +- fs/jfs/file.c | 6 +-- fs/jfs/inode.c| 14 +++ fs/jfs/ioctl.c| 2 +- fs/jfs/jfs_discard.c | 12 +++--- fs/jfs/jfs_dmap.c | 104 +

[PATCH 42/76] fs/isofs: Use inode_sb() helper instead of inode->i_sb

2018-05-08 Thread Mark Fasheh
Signed-off-by: Mark Fasheh --- fs/isofs/dir.c| 2 +- fs/isofs/export.c | 6 +++--- fs/isofs/inode.c | 22 -- fs/isofs/joliet.c | 4 ++-- fs/isofs/namei.c | 4 ++-- fs/isofs/rock.c | 29 +++-- 6 files changed, 35

[PATCH 48/76] fs/minix: Use inode_sb() helper instead of inode->i_sb

2018-05-08 Thread Mark Fasheh
Signed-off-by: Mark Fasheh --- fs/minix/bitmap.c | 18 ++ fs/minix/dir.c | 18 +- fs/minix/inode.c| 10 +- fs/minix/itree_common.c | 10 +- fs/minix/itree_v1.c | 6 +++--- fs/minix/itree_v2.c | 2 +-

[PATCH 41/76] fs/hugetlbfs: Use inode_sb() helper instead of inode->i_sb

2018-05-08 Thread Mark Fasheh
Signed-off-by: Mark Fasheh --- fs/hugetlbfs/inode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index b9a254dcc0e7..31d2a6051bea 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c @@ -791,7

[PATCH 44/76] fs/jffs2: Use inode_sb() helper instead of inode->i_sb

2018-05-08 Thread Mark Fasheh
Signed-off-by: Mark Fasheh --- fs/jffs2/dir.c | 16 fs/jffs2/file.c | 8 fs/jffs2/fs.c| 8 fs/jffs2/xattr.c | 6 +++--- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/fs/jffs2/dir.c b/fs/jffs2/dir.c index

[PATCH 43/76] fs/jbd2: Use inode_sb() helper instead of inode->i_sb

2018-05-08 Thread Mark Fasheh
Signed-off-by: Mark Fasheh --- fs/jbd2/journal.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index 3fbf48ec2188..e1834a69cd41 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -1262,12

[PATCH 38/76] fs/hfsplus: Use inode_sb() helper instead of inode->i_sb

2018-05-08 Thread Mark Fasheh
Signed-off-by: Mark Fasheh --- fs/hfsplus/attributes.c | 12 ++-- fs/hfsplus/bnode.c | 2 +- fs/hfsplus/catalog.c| 12 ++-- fs/hfsplus/dir.c| 22 +++--- fs/hfsplus/extents.c| 11 ++- fs/hfsplus/inode.c | 18

[PATCH 40/76] fs/hpfs: Use inode_sb() helper instead of inode->i_sb

2018-05-08 Thread Mark Fasheh
Signed-off-by: Mark Fasheh --- fs/hpfs/dir.c | 76 +--- fs/hpfs/dnode.c | 176 fs/hpfs/ea.c| 2 +- fs/hpfs/file.c | 45 --- fs/hpfs/inode.c | 77 +

[PATCH 39/76] fs/hostfs: Use inode_sb() helper instead of inode->i_sb

2018-05-08 Thread Mark Fasheh
Signed-off-by: Mark Fasheh --- fs/hostfs/hostfs_kern.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index c148e7f4f451..b99d08b7ef34 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c

[PATCH 37/76] fs/hfs: Use inode_sb() helper instead of inode->i_sb

2018-05-08 Thread Mark Fasheh
Signed-off-by: Mark Fasheh --- fs/hfs/attr.c| 4 ++-- fs/hfs/catalog.c | 10 +- fs/hfs/dir.c | 11 ++- fs/hfs/extent.c | 10 +- fs/hfs/inode.c | 32 5 files changed, 34 insertions(+), 33 deletions(-) diff

[PATCH 36/76] fs/gfs2: Use inode_sb() helper instead of inode->i_sb

2018-05-08 Thread Mark Fasheh
Signed-off-by: Mark Fasheh --- fs/gfs2/aops.c| 9 + fs/gfs2/bmap.c| 9 + fs/gfs2/dir.c | 3 ++- fs/gfs2/export.c | 2 +- fs/gfs2/file.c| 4 ++-- fs/gfs2/incore.h | 2 +- fs/gfs2/inode.c | 8 fs/gfs2/meta_io.h | 2 +- fs/gfs2/super.c

[PATCH 34/76] fs/freevxfs: Use inode_sb() helper instead of inode->i_sb

2018-05-08 Thread Mark Fasheh
Signed-off-by: Mark Fasheh --- fs/freevxfs/vxfs_bmap.c | 14 +++--- fs/freevxfs/vxfs_inode.c | 2 +- fs/freevxfs/vxfs_lookup.c | 10 +- fs/freevxfs/vxfs_subr.c | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git

[PATCH 35/76] fs/fuse: Use inode_sb() helper instead of inode->i_sb

2018-05-08 Thread Mark Fasheh
Signed-off-by: Mark Fasheh --- fs/fuse/dir.c| 13 +++-- fs/fuse/file.c | 6 +++--- fs/fuse/fuse_i.h | 2 +- fs/fuse/inode.c | 7 --- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index

[PATCH 27/76] fs/efs: Use inode_sb() helper instead of inode->i_sb

2018-05-08 Thread Mark Fasheh
Signed-off-by: Mark Fasheh --- fs/efs/dir.c | 2 +- fs/efs/file.c| 2 +- fs/efs/inode.c | 6 +++--- fs/efs/namei.c | 4 ++-- fs/efs/symlink.c | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/fs/efs/dir.c b/fs/efs/dir.c index

[PATCH 33/76] fs/fat: Use inode_sb() helper instead of inode->i_sb

2018-05-08 Thread Mark Fasheh
Signed-off-by: Mark Fasheh --- fs/fat/cache.c | 12 ++-- fs/fat/dir.c | 26 +- fs/fat/fat.h | 2 +- fs/fat/fatent.c | 10 +- fs/fat/file.c| 24 fs/fat/inode.c | 28

[PATCH 28/76] fs/exofs: Use inode_sb() helper instead of inode->i_sb

2018-05-08 Thread Mark Fasheh
Signed-off-by: Mark Fasheh --- fs/exofs/dir.c | 6 +++--- fs/exofs/inode.c | 12 ++-- fs/exofs/namei.c | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/fs/exofs/dir.c b/fs/exofs/dir.c index f0138674c1ed..592471362243 100644 ---

[PATCH 30/76] fs/ext2: Use inode_sb() helper instead of inode->i_sb

2018-05-08 Thread Mark Fasheh
Signed-off-by: Mark Fasheh --- fs/ext2/balloc.c | 10 +++ fs/ext2/dir.c| 32 ++-- fs/ext2/file.c | 6 ++-- fs/ext2/ialloc.c | 16 +- fs/ext2/inode.c | 82 +++- fs/ext2/ioctl.c

[PATCH 32/76] fs/f2fs: Use inode_sb() helper instead of inode->i_sb

2018-05-08 Thread Mark Fasheh
Signed-off-by: Mark Fasheh --- fs/f2fs/data.c | 6 +++--- fs/f2fs/f2fs.h | 2 +- fs/f2fs/file.c | 36 ++-- fs/f2fs/inline.c | 4 ++-- fs/f2fs/inode.c| 6 +++--- fs/f2fs/namei.c| 11 ++- fs/f2fs/recovery.c | 11

  1   2   >