Persoonlijke en beleggingslening.

2018-03-26 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 leningen

Persoonlijke en beleggingslening.

2018-03-26 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 leningen

Persoonlijke en beleggingslening.

2018-03-26 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 leningen

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

2018-03-26 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 superb

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

2018-03-26 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 --- changelog: v2: Move

Re: Corruption on Big Endian System

2018-03-26 Thread Anand Jain
On 03/26/2018 11:00 PM, 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 OpenPower 720 (Big Endian

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

2018-03-26 Thread Qu Wenruo
On 2018年03月26日 22:10, David Sterba wrote: > On Wed, Dec 13, 2017 at 08:55:21AM +0800, Qu Wenruo wrote: >> On 2017年12月13日 05:12, David Sterba wrote: >>> On Tue, Dec 12, 2017 at 03:34:22PM +0800, Qu Wenruo wrote: The patch is consist of 2 main parts: 1) Type based qgroup reservation

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

2018-03-26 Thread Anand Jain
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 superblock when we use -b. However I don't agree with your appr

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

2018-03-26 Thread Goffredo Baroncelli
Hi Misono, On 03/26/2018 10:28 AM, Misono Tomohiro wrote: > changelog: > v1 -> v2 ... split the patch to hopefully make review easier > > 1st patch is a preparation work just moving the declaration of > may_destroy_subvol(). > > 2nd patch is the main part. New function btrfs_delete_subvolume()

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

2018-03-26 Thread Nikolay Borisov
On 26.03.2018 11:27, Anand Jain wrote: > 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

Corruption on Big Endian System

2018-03-26 Thread Ashu Tiwary
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 OpenPower 720 (Big Endian) running Fedora 27; kernel was at 4.15.9; attem

Re: spurious full btrfs corruption

2018-03-26 Thread Christoph Anton Mitterer
Hey Qu. Some update on the corruption issue on my Fujitsu notebook: Finally got around running some memtest on it... and few seconds after it started I already got this: https://paste.pics/1ff8b13b94f31082bc7410acfb1c6693 So plenty of bad memory... I'd say it's probably not so unlikely that *t

Re: [PATCH v2] btrfs-progs: Add test for collision DIR_ITEM handling

2018-03-26 Thread Qu Wenruo
On 2018年03月26日 21:59, Nikolay Borisov wrote: > Verify that if we have an otherwise clean filesystem, containging collided > DIR_ITEM, btrfs check lowmem's mode can correctly handle those and not produce > any false positives. > > This if fixed by commit titled: > > "btrfs-progs: Fix DIR_ITEM c

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

2018-03-26 Thread David Sterba
On Wed, Dec 13, 2017 at 08:55:21AM +0800, Qu Wenruo wrote: > On 2017年12月13日 05:12, David Sterba wrote: > > On Tue, Dec 12, 2017 at 03:34:22PM +0800, Qu Wenruo wrote: > >> The patch is consist of 2 main parts: > >> 1) Type based qgroup reservation > >>The original patchset is sent several months

[PATCH v2] btrfs-progs: Add test for collision DIR_ITEM handling

2018-03-26 Thread Nikolay Borisov
Verify that if we have an otherwise clean filesystem, containging collided DIR_ITEM, btrfs check lowmem's mode can correctly handle those and not produce any false positives. This if fixed by commit titled: "btrfs-progs: Fix DIR_ITEM checking in lowmem" Signed-off-by: Nikolay Borisov --- .../

Re: [PATCH 2/2] btrfs-progs: Add test for collision DIR_ITEM handling

2018-03-26 Thread David Sterba
On Mon, Mar 26, 2018 at 04:24:47PM +0300, Nikolay Borisov wrote: > >> +# The fs is clean so lowmem shouldn't produce any warnings > >> +run_check "$TOP/btrfs" check --mode=lowmem --readonly "$TEST_DEV" > > > > I understand this is a pinpoint test case for lowmem mode, but for > > lowmem mode test,

Re: [PATCH 2/2] btrfs-progs: Add test for collision DIR_ITEM handling

2018-03-26 Thread Qu Wenruo
On 2018年03月26日 21:24, Nikolay Borisov wrote: > > > On 25.03.2018 14:44, Qu Wenruo wrote: >> >> >> On 2018年03月23日 22:48, Nikolay Borisov wrote: >>> Verify that if we have an otherwise clean filesystem, containging collided >>> DIR_ITEM, btrfs check lowmem's mode can correctly handle those and n

Re: [PATCH] btrfs-progs: check/original: Remove unused variable first_key

2018-03-26 Thread David Sterba
On Thu, Mar 22, 2018 at 05:06:24PM +0800, Qu Wenruo wrote: > This @first_key variable is introduced in f5c4c4f3b75b > ("btrfsck: add code to rebuild extent records"), however it's not only > unused, but also used incorrectly. > > It's calling btrfs_item_key_to_cpu() on an node extent buffer. > >

Re: [PATCH 2/2] btrfs-progs: Add test for collision DIR_ITEM handling

2018-03-26 Thread Nikolay Borisov
On 25.03.2018 14:44, Qu Wenruo wrote: > > > On 2018年03月23日 22:48, Nikolay Borisov wrote: >> Verify that if we have an otherwise clean filesystem, containging collided >> DIR_ITEM, btrfs check lowmem's mode can correctly handle those and not >> produce >> any false positives. >> >> This if fi

Re: [PATCH v2] btrfs-progs: mkfs: add uuid and otime to ROOT_ITEM of, FS_TREE

2018-03-26 Thread David Sterba
On Fri, Mar 23, 2018 at 05:16:49PM +0900, Misono Tomohiro wrote: > Currently, the top-level subvolume lacks the UUID. As a result, both > non-snapshot subvolume and snapshot of top-level subvolume do not have > Parent UUID and cannot be distinguisued. Therefore "fi show" of > top-level lists all th

Re: [PATCH] btrfs-progs: remove BTRFS_CRC32_SIZE definition

2018-03-26 Thread David Sterba
On Mon, Mar 26, 2018 at 03:57:09PM +0800, Qu Wenruo wrote: > > > On 2018年03月26日 08:54, Misono Tomohiro wrote: > > On 2018/03/23 18:14, Qu Wenruo wrote: > >> > >> > >> On 2018年03月23日 16:20, Misono Tomohiro wrote: > >>> The kernel code no longer has BTRFS_CRC32_SIZE and only uses > >>> btrfs_csum_s

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

2018-03-26 Thread Nikolay Borisov
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 ++ > fs/btrfs/ioctl.c | 54

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

2018-03-26 Thread Misono Tomohiro
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 btrfs_ioctl_snap_destroy(). This function requires inode_lo

[PATCH v2 3/3] btrfs: Cleanup btrfs_ioctl_snap_destroy() by using btrfs_delete_subvolume()

2018-03-26 Thread Misono Tomohiro
Use btrfs_delete_subvolume() in btrfs_ioctl_snap_destroy() too to cleanup the code. Call of d_delete() is still required since btrfs_delete_subvolume() does not call it (for rmdir(2), vfs layer later calls it). As a result, btrfs_unlink_subvol() and may_destroy_subvol() become static functions. No

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

2018-03-26 Thread Misono Tomohiro
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 ++ fs/btrfs/ioctl.c | 54 -- 3 files chan

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

2018-03-26 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 --- fs/btrfs/disk-io.c | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/fs/btrfs/disk-i

[PATCH v2 0/3] Allow rmdir(2) to delete a subvolume

2018-03-26 Thread Misono Tomohiro
changelog: v1 -> v2 ... split the patch to hopefully make review easier 1st patch is a preparation work just moving the declaration of may_destroy_subvol(). 2nd patch is the main part. New function btrfs_delete_subvolume() is introduced and used in btrfs_rmdir() when a direcoty is an empty subv

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

2018-03-26 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 --- fs/btrfs/disk-io.c | 38 +

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

2018-03-26 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 --- fs/btrfs/volumes.c | 15 +++ 1 file ch

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

2018-03-26 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 ib

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

2018-03-26 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(). B

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

2018-03-26 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 if

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

2018-03-26 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 --- fs/btrfs/disk-io.c | 2 +- fs/btrfs/disk-io.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/di

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

2018-03-26 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. As

[PATCH 0/8] Superblock read and verify cleanups

2018-03-26 Thread Anand Jain
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 superblock csum when we read it in the scan context. Patch 7/8 fixes a bug that we weren't verifying t

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

2018-03-26 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) | |_

Re: [PATCH] btrfs-progs: remove BTRFS_CRC32_SIZE definition

2018-03-26 Thread Qu Wenruo
On 2018年03月26日 08:54, Misono Tomohiro wrote: > On 2018/03/23 18:14, Qu Wenruo wrote: >> >> >> On 2018年03月23日 16:20, Misono Tomohiro wrote: >>> The kernel code no longer has BTRFS_CRC32_SIZE and only uses >>> btrfs_csum_sizes[]. So, update the progs code as well. >>> >>> Suggested-by: Qu Wenruo >