Re: [PATCH v2 3/3] fstests: generic: Check the fs after each FUA writes

2018-03-27 Thread Qu Wenruo
On 2018年03月28日 13:04, Amir Goldstein wrote: > On Wed, Mar 28, 2018 at 7:40 AM, Qu Wenruo wrote: >> Basic test case which triggers fsstress with dm-log-writes, and then >> check the fs after each FUA writes. >> With needed infrastructure and special handlers for journal based fs.

Re: [PATCH v2 3/3] fstests: generic: Check the fs after each FUA writes

2018-03-27 Thread Amir Goldstein
On Wed, Mar 28, 2018 at 7:40 AM, Qu Wenruo wrote: > Basic test case which triggers fsstress with dm-log-writes, and then > check the fs after each FUA writes. > With needed infrastructure and special handlers for journal based fs. > > Signed-off-by: Qu Wenruo > ---

[PATCH v2 2/3] fstests: log-writes: Add support for METADATA flag

2018-03-27 Thread Qu Wenruo
Signed-off-by: Qu Wenruo Reviewed-by: Amir Goldstein --- changelog: v2: Add Amir's reviewed-by tag. --- src/log-writes/log-writes.c | 3 ++- src/log-writes/log-writes.h | 9 + 2 files changed, 7 insertions(+), 5 deletions(-) diff --git

[PATCH v2 1/3] fstests: log-writes: Add support to output human readable flags

2018-03-27 Thread Qu Wenruo
Also change the flag numeric output to hex. Signed-off-by: Qu Wenruo Reviewed-by: Amir Goldstein --- changelog: v2: Add Amir's reviewed-by tag. --- src/log-writes/log-writes.c | 70 - 1 file changed, 63

[PATCH v2 3/3] fstests: generic: Check the fs after each FUA writes

2018-03-27 Thread Qu Wenruo
Basic test case which triggers fsstress with dm-log-writes, and then check the fs after each FUA writes. With needed infrastructure and special handlers for journal based fs. Signed-off-by: Qu Wenruo --- changelog: v2: Use proper "SUSE Linux Products GmbH" instead of "SuSE"

Re: [PATCH] fstests: test btrfs fsync after hole punching with no-holes mode

2018-03-27 Thread Eryu Guan
On Mon, Mar 26, 2018 at 11:59:21PM +0100, fdman...@kernel.org wrote: > From: Filipe Manana > > Test that when we have the no-holes mode enabled and a specific metadata > layout, if we punch a hole and fsync the file, at replay time the whole > hole was preserved. > > This

Re: [PATCH v2 2/3] btrfs: Allow rmdir(2) to delete a subvolume

2018-03-27 Thread Misono Tomohiro
On 2018/03/27 21:39, Nikolay Borisov wrote: > > > On 26.03.2018 11:30, Misono Tomohiro wrote: >> This patch changes the behavior of rmdir(2) to allow it to delete >> an empty subvolume by default, unless it is not a default subvolume >> and send is not in progress. >> >> New function

Re: [PATCH v2 1/3] btrfs: Move may_destroy_subvol() from ioctl.c to inode.c

2018-03-27 Thread Misono Tomohiro
On 2018/03/26 17:51, Nikolay Borisov wrote: > > > On 26.03.2018 11:28, Misono Tomohiro wrote: >> This is a preparation work to allow rmdir(2) to delete a subvolume. >> >> Signed-off-by: Tomohiro Misono >> --- >> fs/btrfs/ctree.h | 1 + >> fs/btrfs/inode.c | 54

error report: misc-test 006 sometimes fails in current devel branch

2018-03-27 Thread Misono Tomohiro
current devel branch of btrfs-progs (github) occasionally fails at misc-test 006: (kernel is 4.16.0-rc7) == $ sudo make test-misc TEST=006\* [LD] fssum [TEST] misc-tests.sh [TEST/misc] 006-image-on-missing-device /usr/data/src/btrfs-progs/tests//common: line 177: 10819

[PATCH v2 5/8] btrfs: check if the fsid in the primary sb and copy sb are same

2018-03-27 Thread Anand Jain
During the btrfs dev scan make sure that other copies of superblock contain the same fsid as the primary SB. So that we bring to the user notice if the superblock has been overwritten. mkfs.btrfs -fq /dev/sdc mkfs.btrfs -fq /dev/sdb dd if=/dev/sdb of=/dev/sdc count=4K skip=64K seek=64K obs=1

[PATCH 8/8] btrfs: drop the redundant invalidate_bdev()

2018-03-27 Thread Anand Jain
During the mount context btrfs_open_devices() calls invalidate_bdev() for all the devices. So drop the invalidate_bdev() in open_ctree() which is only for the btrfs_fs_devices::latest_bdev. The call trace is as shown below. btrfs_mount_root() | |_btrfs_parse_early_options (-o device only) |

[PATCH v2 3/8] btrfs: cleanup btrfs_read_disk_super() to return std error

2018-03-27 Thread Anand Jain
The only caller btrfs_scan_one_device() sets -EINVAL for error from btrfs_read_disk_super(), so this patch returns -EINVAL from the latter function. A preparatory patch to add csum check in btrfs_read_disk_super(). Signed-off-by: Anand Jain --- v1->v2: Check

[PATCH] btrfs-progs: wipe copies of the stale superblock beyond -b size

2018-03-27 Thread Anand Jain
During the mkfs.btrfs -b btrfs_prepare_device() zeros all the superblock bytenr locations only if the bytenr is below the blockcount. The problem with this is that if the BTRFS is recreated with a smaller size then we will leave the stale superblock in the disk which shall confuse the recovery.

[PATCH v2 6/8] btrfs: verify superblock checksum during scan

2018-03-27 Thread Anand Jain
During the scan context, we aren't verifying the superblock- checksum when read. This patch fixes it by adding the checksum verification function btrfs_check_super_csum() in the function btrfs_read_disk_super(). And makes device scan to error fail if the primary superblock csum is wrong, whereas

[PATCH v2 2/8] btrfs: return required error from btrfs_check_super_csum

2018-03-27 Thread Anand Jain
Return the required -EINVAL and -EUCLEAN from the function btrfs_check_super_csum(). And more the error log into the parent function. Signed-off-by: Anand Jain --- v1->v2: Fix commit indent reported by checkpatch.pl Fix pr_err split string fs/btrfs/disk-io.c | 25

[PATCH v2 7/8] btrfs: verify checksum for all devices in mount context

2018-03-27 Thread Anand Jain
During mount context, we aren't verifying the superblock checksum for all the devices, instead, we verify it only for the struct btrfs_fs_device::latest_bdev. This patch fixes it by moving the checksum verification code from the function open_ctree() into the function btrfs_read_dev_one_super().

[PATCH v2 0/9] Superblock read and verify cleanups

2018-03-27 Thread Anand Jain
v1->v2: Various changes suggested by Nicokay. Thanks. For specific changes pls ref to the patch. Patch 1-4/8 are preparatory patches adds cleanups and nonstatic requisites. Patch 5/8 makes sure that all copies of the superblock have the same fsid when we scan the device. Patch 6/8 verifies

[PATCH 4/8] btrfs: make btrfs_check_super_csum() non-static

2018-03-27 Thread Anand Jain
In preparation to add the superblock csum verification for the scan context, make btrfs_check_super_csum() non-static. Signed-off-by: Anand Jain Reviewed-by: Nikolay Borisov --- fs/btrfs/disk-io.c | 2 +- fs/btrfs/disk-io.h | 1 + 2 files changed, 2

[PATCH 1/8] btrfs: cleanup btrfs_check_super_csum() for better code flow

2018-03-27 Thread Anand Jain
We check the %csum_type twice. Drop one. Check for the csum_type and then for the csum. Which also matches with the progs which have better logic. This is preparatory patch to get proper error code from btrfs_check_super_csum(). Signed-off-by: Anand Jain Reviewed-by:

Re: [PATCH] btrfs-progs: wipe copies of the stale superblock beyond -b size

2018-03-27 Thread Anand Jain
On 03/27/2018 02:19 PM, Nikolay Borisov wrote: On 27.03.2018 02:50, Anand Jain wrote: I told you this code can be made a lot simpler, simply by modifying the last argument passed to zero_dev_clamped. I even posted the resulting diff which was just 3 lines changed. I agree that it's a

Re: [PATCH 6/8] btrfs: verify checksum when superblock is read for scan

2018-03-27 Thread Anand Jain
Test script: Corrupt primary superblock and check if device scan and mount fails: mkfs.btrfs -fq /dev/sdc dd if=/dev/urandom of=/dev/sdc ibs=1 obs=1 count=1 seek=64K btrfs dev scan mount /dev/sdb /btrfs Corrupt secondary superblock and check if device scan and mount is

Re: [PATCH 7/8] btrfs: verify checksum for all devices in mount context

2018-03-27 Thread Anand Jain
On 03/27/2018 08:21 PM, Nikolay Borisov wrote: On 26.03.2018 11:27, Anand Jain wrote: During mount context, we aren't verifying the superblock checksum for all the devices, instead, we verify it only for the struct btrfs_fs_device::latest_bdev. This patch fixes it by moving the checksum

Re: [PATCH 5/8] btrfs: check if the fsid in the primary sb and copy sb are same

2018-03-27 Thread Anand Jain
On 03/27/2018 04:49 PM, Nikolay Borisov wrote: On 26.03.2018 11:27, Anand Jain wrote: During the btrfs dev scan make sure that other copies of superblock contain the same fsid as the primary SB. So that we bring to the user notice if the superblock has been overwritten. mkfs.btrfs -fq

Re: [PATCH 2/8] btrfs: return required error from btrfs_check_super_csum

2018-03-27 Thread Anand Jain
On 03/28/2018 03:16 AM, David Sterba wrote: On Tue, Mar 27, 2018 at 11:05:53AM +0300, Nikolay Borisov wrote: + if (err) { + if (err == -EINVAL) + pr_err("BTRFS error (device %pg): "\ + "unsupported checksum algorithm", +

HI

2018-03-27 Thread Lucy Boston
-- Greeting, once again is me Lucy Boston this is twice am contacting you please is very urgent respond to me for more details through my. Email: dr.lucybos...@gmail.com -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to

Re: [PATCH 4/6] btrfs: use RCU in btrfs_show_devname for device list traversal

2018-03-27 Thread Anand Jain
On 03/28/2018 02:48 AM, David Sterba wrote: The show_devname callback is used to print device name in /proc/self/mounts, we need to traverse the device list consistently and read the name that's copied to a seq buffer so we don't need further locking. If the first device is being deleted at

Re: [PATCH 2/8] btrfs: return required error from btrfs_check_super_csum

2018-03-27 Thread David Sterba
On Tue, Mar 27, 2018 at 11:05:53AM +0300, Nikolay Borisov wrote: > > + if (err) { > > + if (err == -EINVAL) > > + pr_err("BTRFS error (device %pg): "\ > > + "unsupported checksum algorithm", > > +

Re: [PATCH 0/8] Delayed refs cleanups/streamlining

2018-03-27 Thread David Sterba
On Wed, Mar 21, 2018 at 10:45:04AM +0200, Nikolay Borisov wrote: > This patchkit aims to simplify and streamline the logic involved in > initialising and adding delayed refs/delayed head structures which deal with > modification of the extent tree. Currently the logic for init and add was >

[PATCH 4/6] btrfs: use RCU in btrfs_show_devname for device list traversal

2018-03-27 Thread David Sterba
The show_devname callback is used to print device name in /proc/self/mounts, we need to traverse the device list consistently and read the name that's copied to a seq buffer so we don't need further locking. If the first device is being deleted at the same time, the RCU will allow us to read the

[PATCH 6/6] btrfs: split dev-replace locking helpers for read and write

2018-03-27 Thread David Sterba
The current calls are unclear in what way btrfs_dev_replace_lock takes the locks, so drop the argument, split the helpers and use similar naming as for read and write locks. Signed-off-by: David Sterba --- fs/btrfs/dev-replace.c | 98

[PATCH 5/6] btrfs: remove stale comments about fs_mutex

2018-03-27 Thread David Sterba
The fs_mutex has been killed in 2008, a213501153fd66e2 ("Btrfs: Replace the big fs_mutex with a collection of other locks"), still remembered in some comments. We don't have any extra needs for locking in the ACL handlers. Signed-off-by: David Sterba --- fs/btrfs/acl.c | 8

[PATCH 3/6] btrfs: update barrier in should_cow_block

2018-03-27 Thread David Sterba
Once there was a simple int force_cow that was used with the plain barriers, and then converted to a bit, so we should use the appropriate barrier helper. Other variables in the complex if condition do not depend on a barrier, so we should be fine in case the atomic barrier becomes a no-op.

[PATCH 2/6] btrfs: use lockdep_assert_held for mutexes

2018-03-27 Thread David Sterba
Using lockdep_assert_held is preferred, replace mutex_is_locked. Signed-off-by: David Sterba --- fs/btrfs/extent-tree.c | 2 +- fs/btrfs/scrub.c | 4 ++-- fs/btrfs/volumes.c | 10 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git

[PATCH 1/6] btrfs: use lockdep_assert_held for spinlocks

2018-03-27 Thread David Sterba
Using lockdep_assert_held is preferred, replace assert_spin_locked. Signed-off-by: David Sterba --- fs/btrfs/delayed-ref.c | 6 +++--- fs/btrfs/qgroup.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c

[PATCH 0/6] Btrfs lockdep and locking cleanups

2018-03-27 Thread David Sterba
A few cleanups related to lockdep and locking. The btrfs_show_devname is a functional change, uses the same mechanism as btrfs_ioctl_dev_info or btrfs_ioctl_fs_info so that's not a new thing. David Sterba (6): btrfs: use lockdep_assert_held for spinlocks btrfs: use lockdep_assert_held for

Re: [PATCH 00/14] Qgroup metadata reservation rework

2018-03-27 Thread Filipe Manana
On Tue, Mar 27, 2018 at 4:23 PM, David Sterba wrote: > On Tue, Mar 27, 2018 at 07:49:02AM +0800, Qu Wenruo wrote: >> > Merging plan for this patchset from last week was to postpone until >> > 4.18 due to lack of final testing here. I've tried to run this with >> > quotas enabled

[PATCH] btrfs: lift errors from add_extent_changeset to the callers

2018-03-27 Thread David Sterba
The missing error handling in add_extent_changeset was hidden, so make it at least visible in the callers. Signed-off-by: David Sterba --- fs/btrfs/extent_io.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/fs/btrfs/extent_io.c

Re: [PATCH 0/2] btrfs fiemap related BUG fix.

2018-03-27 Thread David Sterba
On Wed, Mar 07, 2018 at 04:20:17PM +0800, robbieko wrote: > From: Robbie Ko > > This patchset intends to fix btrfs fiemap related bug. > > The fiemap has the following problems: > > 1) Wrong extent count when fm_extent_count is zero. > > > 2) SHARED bit is not correct

Re: [PATCH 00/14] Qgroup metadata reservation rework

2018-03-27 Thread David Sterba
On Tue, Mar 27, 2018 at 07:49:02AM +0800, Qu Wenruo wrote: > > Merging plan for this patchset from last week was to postpone until > > 4.18 due to lack of final testing here. I've tried to run this with > > quotas enabled an fstests that led to warnings in the power failure > > simulation tests. >

[PATCH v2 2/2] btrfs: Validate child tree block's level and first key

2018-03-27 Thread Qu Wenruo
We have several reports about node pointer points to incorrect child tree blocks, which could have even wrong owner and level but still with valid generation and checksum. Although btrfs check could handle it and print error message like: leaf parent key incorrect 60670574592 Kernel doesn't have

[PATCH 1/2] btrfs: tests/qgroup: Fix wrong tree backref level

2018-03-27 Thread Qu Wenruo
The extent tree of the test fs is like the following: BTRFS info (device (null)): leaf 16327509003777336587 total ptrs 1 free space 3919 item 0 key (4096 168 4096) itemoff 3944 itemsize 51 extent refs 1 gen 1 flags 2 tree block key (68719476736 0 0) level 1

Re: [PATCH v2 2/3] btrfs: Allow rmdir(2) to delete a subvolume

2018-03-27 Thread Nikolay Borisov
On 26.03.2018 11:30, Misono Tomohiro wrote: > This patch changes the behavior of rmdir(2) to allow it to delete > an empty subvolume by default, unless it is not a default subvolume > and send is not in progress. > > New function btrfs_delete_subvolume() is almost equal to the second half > of

Re: [PATCH 7/8] btrfs: verify checksum for all devices in mount context

2018-03-27 Thread Nikolay Borisov
On 26.03.2018 11:27, Anand Jain wrote: > During mount context, we aren't verifying the superblock checksum > for all the devices, instead, we verify it only for the > struct btrfs_fs_device::latest_bdev. This patch fixes it > by moving the checksum verification code from the function

Re: Corruption on Big Endian System

2018-03-27 Thread David Sterba
On Mon, Mar 26, 2018 at 10:00:04AM -0500, Ashu Tiwary wrote: > It appears my system may have hit the issue reverted here ( > https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg74621.html > ) ( [PATCH] Revert "btrfs: use proper endianness accessors for > super_copy" ); system is an IBM

Re: [PATCH 4/8] btrfs: make btrfs_check_super_csum() non-static

2018-03-27 Thread Nikolay Borisov
On 26.03.2018 11:27, Anand Jain wrote: > In preparation to add the superblock csum verification for the > scan context, make btrfs_check_super_csum() non-static. > > Signed-off-by: Anand Jain Reviewed-by: Nikolay Borisov > --- > fs/btrfs/disk-io.c

Re: [PATCH 6/8] btrfs: verify checksum when superblock is read for scan

2018-03-27 Thread Nikolay Borisov
On 27.03.2018 14:30, Nikolay Borisov wrote: > > > On 26.03.2018 11:27, Anand Jain wrote: >> During the scan context, we aren't verifying the superblock- >> checksum when read. >> This patch fixes it by adding the checksum verification function >> btrfs_check_super_csum() in the function

Re: [PATCH 1/8] btrfs: cleanup btrfs_check_super_csum() for better code flow

2018-03-27 Thread Nikolay Borisov
On 26.03.2018 11:27, Anand Jain wrote: > We check the %csum_type twice. Drop one. Check for the csum_type and > then for the csum. Which also matches with the progs which have better > logic. This is preparatory patch to get proper error code from > btrfs_check_super_csum(). > > Signed-off-by:

Re: [PATCH 6/8] btrfs: verify checksum when superblock is read for scan

2018-03-27 Thread Nikolay Borisov
On 26.03.2018 11:27, Anand Jain wrote: > During the scan context, we aren't verifying the superblock- > checksum when read. > This patch fixes it by adding the checksum verification function > btrfs_check_super_csum() in the function btrfs_read_disk_super(). > And makes device scan to error fail

Re: [PATCH 5/8] btrfs: check if the fsid in the primary sb and copy sb are same

2018-03-27 Thread Nikolay Borisov
On 26.03.2018 11:27, Anand Jain wrote: > During the btrfs dev scan make sure that other copies of superblock > contain the same fsid as the primary SB. So that we bring to the > user notice if the superblock has been overwritten. > > mkfs.btrfs -fq /dev/sdc > mkfs.btrfs -fq /dev/sdb > dd

[PATCH] fstests: test btrfs fsync after hole punching with no-holes mode

2018-03-27 Thread fdmanana
From: Filipe Manana Test that when we have the no-holes mode enabled and a specific metadata layout, if we punch a hole and fsync the file, at replay time the whole hole was preserved. This issue is fixed by the following btrfs patch for the linux kernel: "Btrfs: fix fsync

[PATCH 2/2] Btrfs: fix copy_items() return value when logging an inode

2018-03-27 Thread fdmanana
From: Filipe Manana When logging an inode, at tree-log.c:copy_items(), if we call btrfs_next_leaf() at the loop which checks for the need to log holes, we need to make sure copy_items() returns the value 1 to its caller and not 0 (on success). This is because the path the

[PATCH 1/2] Btrfs: fix fsync after hole punching when using no-holes feature

2018-03-27 Thread fdmanana
From: Filipe Manana When we have the no-holes mode enabled and fsync a file after punching a hole in it, we can end up not logging the whole hole range in the log tree. This happens if the file has extent items that span more than one leaf and we punch a hole that covers a

Re: [PATCH 3/8] btrfs: cleanup btrfs_read_disk_super() to return std error

2018-03-27 Thread Nikolay Borisov
On 26.03.2018 11:27, Anand Jain wrote: > The only caller btrfs_scan_one_device() sets -EINVAL for error from > btrfs_read_disk_super(), so this patch returns -EINVAL from the latter > function. > > A preparatory patch to add csum check in btrfs_read_disk_super(). > > Signed-off-by: Anand Jain

Re: [PATCH 2/8] btrfs: return required error from btrfs_check_super_csum

2018-03-27 Thread Nikolay Borisov
On 26.03.2018 11:27, Anand Jain wrote: > Return the required -EINVAL and -EUCLEAN from the function > btrfs_check_super_csum(). And more the error log into the > parent function. > > Signed-off-by: Anand Jain > --- > fs/btrfs/disk-io.c | 27 --- >

Re: [PATCH v2 1/2] btrfs-progs: print-tree: Use macro to replace immediate number for readable flags string buffer length

2018-03-27 Thread Nikolay Borisov
On 27.03.2018 09:04, Qu Wenruo wrote: > In print-tree, we have a lot of parsers to convert numeric flags to > human readable string. > > For the buffer size we're using immediate numbers for all their callers. > Change this to macro so it will be much easier for us to expand the > buffer size.

[PATCH v2 1/4] btrfs-progs: Remove btrfs-debug-tree command

2018-03-27 Thread Nikolay Borisov
There is already a replacement in the face of btrfs inspect-internal dump-tree. And this command is just a simple wrapper around it. Just remove it and adjust the show-blocks script to call the main btrfs binary to achieve the same effect. Signed-off-by: Nikolay Borisov ---

[PATCH v2 3/4] btrfs-progs: Remove deprecated btrfs-show-super

2018-03-27 Thread Nikolay Borisov
Its function has been superseded by btrfs inspect-internal show-super. Furthermore the tools is currently not built by default. Just remove it. Signed-off-by: Nikolay Borisov --- .gitignore| 1 - Documentation/Makefile.in | 1

[PATCH v2 4/4] btrfs-progs: Remove deprecated btrfs-calc-size tool

2018-03-27 Thread Nikolay Borisov
Its function has been superseded by btrfs inspect-internal tree-stats. Just remove it. Signed-off-by: Nikolay Borisov --- .gitignore| 1 - Makefile | 2 +- btrfs-calc-size.c | 39 --- 3 files changed, 1 insertion(+), 41

[PATCH v2 2/4] btrfs-progs: Remove deprecated btrfs-zero-log standalone tool

2018-03-27 Thread Nikolay Borisov
Its function has been subsumed by "btrfs rescue zero-log". Remove its source file and adjust make/tests soruces accordingly. Signed-off-by: Nikolay Borisov --- .gitignore| 1 - Documentation/Makefile.in | 1 -

Re: [PATCH 00/10] Simplify function interfaces

2018-03-27 Thread Su Yue
On 03/27/2018 03:19 PM, Nikolay Borisov wrote: A bunch of functions in lowmem mode take an 'ext_ref' parameter only to pass it down the call chain where it eventually is consumed. Turns out the functions which actually check the parameter are find_inode_ref and check_inode_item, the are only

[PATCH 02/10] btrfs-progs: Drop ext_ref param from check_dir_item

2018-03-27 Thread Nikolay Borisov
This parameter is no longer used in this function, so drop it Signed-off-by: Nikolay Borisov --- check/mode-lowmem.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c index a8a2f76549a2..2c7b270a3ffa 100644 ---

[PATCH 03/10] btrfs-progs: Drop ext_ref argument from check_inode_item

2018-03-27 Thread Nikolay Borisov
We can derive this argument from root->fs_info and also make it local to the sole switch case it's used. Signed-off-by: Nikolay Borisov --- check/mode-lowmem.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/check/mode-lowmem.c

[PATCH 09/10] btrfs-progs: Remove ext_ref local variable from check_fs_roots_lowmem

2018-03-27 Thread Nikolay Borisov
All real consumers of that variable have inlined the checks since they are simple enough. So just remove it. Signed-off-by: Nikolay Borisov --- check/mode-lowmem.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c index

[PATCH 04/10] btrfs-progs: Drop unused ext_ref parameter from process_one_leaf

2018-03-27 Thread Nikolay Borisov
It's no longer used in the function so just remove it Signed-off-by: Nikolay Borisov --- check/mode-lowmem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c index e26e9bdf3bb3..34519f30a4aa 100644 ---

[PATCH 01/10] btrfs-progs: Drop ext_ref parameter from find_inode_ref

2018-03-27 Thread Nikolay Borisov
This is a boolean parameter which signals whether the fs has the EXTENDED_IREF feature flag toggled or not. Since a reference to fs_info can be obtained there is no need to pollute the interface. Signed-off-by: Nikolay Borisov --- check/mode-lowmem.c | 13 ++--- 1

[PATCH 07/10] btrfs-progs: Drop ext_ref param from check_fs_first_inode

2018-03-27 Thread Nikolay Borisov
It's no longer used in that function so can be dropped altogether. Signed-off-by: Nikolay Borisov --- check/mode-lowmem.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c index

[PATCH 05/10] btrfs-progs: Remove ext_ref param from check_fs_first_inode

2018-03-27 Thread Nikolay Borisov
It's no longer use and can be dropped. Signed-off-by: Nikolay Borisov --- check/mode-lowmem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c index 34519f30a4aa..29c55e202f2b 100644 --- a/check/mode-lowmem.c

[PATCH 10/10] btrfs-progs: Make __btrfs_fs_incompat return bool

2018-03-27 Thread Nikolay Borisov
First this function does the '!!' trick to turn its value into a bool, yet the return type is int. Second, the kernel counterpart also returns bool. Signed-off-by: Nikolay Borisov --- ctree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctree.h

[PATCH 06/10] btrfs-progs: Remove ext_ref param from walk_down_tree

2018-03-27 Thread Nikolay Borisov
It's no longer used so just remove it. Signed-off-by: Nikolay Borisov --- check/mode-lowmem.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c index 29c55e202f2b..76365a214e34 100644 --- a/check/mode-lowmem.c

[PATCH v2 09/10] btrfs-progs: tests: add testcase for undelete-subvol

2018-03-27 Thread Lu Fengqi
The testcase checks the functionality of "btrfs rescue undelete-subvol", including recovering an intact subvolume, and handling correctly incomplete subvolume. Signed-off-by: Lu Fengqi --- v2: add shell quoting to test script.

[PATCH v2 04/10] btrfs-progs: undelete-subvol: introduce is_subvol_intact

2018-03-27 Thread Lu Fengqi
The function is used to determine whether the subvolume is intact. Signed-off-by: Lu Fengqi --- Makefile | 3 ++- undelete-subvol.c | 53 + undelete-subvol.h | 17 + 3 files changed, 72

[PATCH v2 03/10] btrfs-progs: use btrfs_find_free_dir_index to find free inode index

2018-03-27 Thread Lu Fengqi
Since we have an existing function to find free inode index, we can reuse it here. Signed-off-by: Lu Fengqi --- inode.c | 27 +++ 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/inode.c b/inode.c index 478036562652..86905365dfd8

[PATCH v2 01/10] btrfs-progs: copy btrfs_del_orphan_item from kernel

2018-03-27 Thread Lu Fengqi
Add btrfs_del_orphan_item for the later subvolume undelete. Signed-off-by: Lu Fengqi --- ctree.h | 2 ++ inode.c | 30 ++ 2 files changed, 32 insertions(+) diff --git a/ctree.h b/ctree.h index fa861ba0b4c3..0fc31dd8d998 100644 ---

[PATCH v2 08/10] btrfs-progs: undelete-subvol: add undelete-subvol subcommand

2018-03-27 Thread Lu Fengqi
Add the undelete-subvol subcommand for btrfs rescue. This subcommand is used to recover deleted subvolume left intact on the device. Signed-off-by: Lu Fengqi --- v2: add -s option to specify subvol_id. cmds-rescue.c | 70

[PATCH v2 06/10] btrfs-progs: undelete-subvol: introduce link_subvol_to_lostfound

2018-03-27 Thread Lu Fengqi
The function will create lost+found directory, link the deleted subvolume specified by the subvol_id to the directory, update the information of root_item and cleanup the associated orphan item. Signed-off-by: Lu Fengqi --- undelete-subvol.c | 76

[PATCH v2 07/10] btrfs-progs: undelete-subvol: introduce btrfs_undelete_intact_subvols

2018-03-27 Thread Lu Fengqi
The function default will traverse the all orphan items on the tree root, and recover the all intact subvolumes. If subvol_id is specified, then only the corresponding subvolume will be recovered. Signed-off-by: Lu Fengqi --- v2: add subvol_id argumenta to specify

[PATCH v2 02/10] btrfs-progs: extract btrfs_link_subvol from btrfs_mksubvol

2018-03-27 Thread Lu Fengqi
The original btrfs_mksubvol is too specific to specify the directory that the subvolume will link to. Furthermore, in this transaction, we don't only need to create root_ref/dir-item, but also update the refs or flags of root_item. Extract a generic btrfs_link_subvol that allow the caller pass a

[PATCH v2 05/10] btrfs-progs: undelete-subvol: introduce recover_dead_root

2018-03-27 Thread Lu Fengqi
The function will find the root_item specified by the subvol_id, clear the BTRFS_ROOT_SUBVOL_DEAD flag and set root_refs to one. Signed-off-by: Lu Fengqi --- ctree.h | 1 + undelete-subvol.c | 55 +++ 2

[PATCH v2 00/10] undelete subvolume offline version

2018-03-27 Thread Lu Fengqi
This patchset will add undelete-subvol subcommand for btrfs rescue. This enhancement allows undeleting a subvolume on an unmounted filesystem. Patchset can be fetched from github: https://github.com/littleroad/btrfs-progs.git undelete v1->v2: add -s option to allow user specify the subvolume

Persoonlijke en beleggingslening.

2018-03-27 Thread Funding Trusts Finance
-- Goede dag, We zijn Funding Trusts Finance verstrekt leningen per postadvertentie. Wij bieden verschillende soorten leningen of projectleningen (korte en lange termijnleningen, persoonlijke leningen, leningen aan bedrijven enz.) Met een rentetarief van 3%. We verstrekken

Persoonlijke en beleggingslening.

2018-03-27 Thread Funding Trusts Finance
-- Goede dag, We zijn Funding Trusts Finance verstrekt leningen per postadvertentie. Wij bieden verschillende soorten leningen of projectleningen (korte en lange termijnleningen, persoonlijke leningen, leningen aan bedrijven enz.) Met een rentetarief van 3%. We verstrekken

Persoonlijke en beleggingslening.

2018-03-27 Thread Funding Trusts Finance
-- Goede dag, We zijn Funding Trusts Finance verstrekt leningen per postadvertentie. Wij bieden verschillende soorten leningen of projectleningen (korte en lange termijnleningen, persoonlijke leningen, leningen aan bedrijven enz.) Met een rentetarief van 3%. We verstrekken

Re: [PATCH] btrfs-progs: wipe copies of the stale superblock beyond -b size

2018-03-27 Thread Nikolay Borisov
On 27.03.2018 02:50, Anand Jain wrote: > > >> I told you this code can be made a lot simpler, simply by modifying the >> last argument passed to zero_dev_clamped. I even posted the resulting >> diff which was just 3 lines changed. >> >> I agree that it's a good idea to wipe all available

[PATCH v2 1/2] btrfs-progs: print-tree: Use macro to replace immediate number for readable flags string buffer length

2018-03-27 Thread Qu Wenruo
In print-tree, we have a lot of parsers to convert numeric flags to human readable string. For the buffer size we're using immediate numbers for all their callers. Change this to macro so it will be much easier for us to expand the buffer size. Signed-off-by: Qu Wenruo ---