Re: [PATCH 07/12] btrfs: test snapshotting encrypted subvol

2023-11-27 Thread Anand Jain
On 31/10/2023 23:39, Filipe Manana wrote: On Tue, Oct 10, 2023 at 9:26 PM Josef Bacik wrote: From: Sweet Tea Dorminy Make sure that snapshots of encrypted data are readable and writeable. Test deliberately high-numbered to not conflict. Signed-off-by: Sweet Tea Dorminy --- tests/btrf

Re: [PATCH 09/12] fstests: split generic/580 into two tests

2023-11-22 Thread Anand Jain
On 11/9/23 04:25, Josef Bacik wrote: On Thu, Nov 02, 2023 at 07:42:50PM +0800, Anand Jain wrote: On 10/11/23 04:26, Josef Bacik wrote: generic/580 tests both v1 and v2 encryption policies, however btrfs only supports v2 policies. Split this into two tests so that we can get the v2 coverage

Re: [PATCH 12/12] fstest: add a fsstress+fscrypt test

2023-11-07 Thread Anand Jain
ctory. Signed-off-by: Josef Bacik Looks good. Reviewed-by: Anand Jain

Re: [PATCH 09/12] fstests: split generic/580 into two tests

2023-11-02 Thread Anand Jain
On 10/11/23 04:26, Josef Bacik wrote: generic/580 tests both v1 and v2 encryption policies, however btrfs only supports v2 policies. Split this into two tests so that we can get the v2 coverage for btrfs. Instead of duplicating the test cases for v1 and v2 encryption policies, can we check the

Re: [PATCH 08/12] fstests: properly test for v1 encryption policies in encrypt tests

2023-11-01 Thread Anand Jain
er patches. Signed-off-by: Josef Bacik --- For now this looks good; Reviewed-by: Anand Jain Thanks, Anand

Re: [PATCH 07/12] btrfs: test snapshotting encrypted subvol

2023-10-31 Thread Anand Jain
On 11/10/2023 04:26, Josef Bacik wrote: From: Sweet Tea Dorminy Make sure that snapshots of encrypted data are readable and writeable. Test deliberately high-numbered to not conflict. Signed-off-by: Sweet Tea Dorminy Looks good to me. Reviewed-by: Anand Jain Thanks, Anand

Re: [PATCH 05/12] common/verity: explicitly don't allow btrfs encryption

2023-10-31 Thread Anand Jain
iewed-by: Anand Jain Thanks, Anand

Re: [PATCH 04/12] common/encrypt: enable making a encrypted btrfs filesystem

2023-10-31 Thread Anand Jain
On 11/10/2023 04:25, Josef Bacik wrote: From: Sweet Tea Dorminy Signed-off-by: Sweet Tea Dorminy --- Looks good. Reviewed-by: Anand Jain Thanks, Anand

Re: [PATCH 03/12] common/encrypt: add btrfs to get_ciphertext_filename

2023-10-31 Thread Anand Jain
On 11/10/2023 04:25, Josef Bacik wrote: From: Sweet Tea Dorminy Add the relevant call to get an encrypted filename from btrfs. Signed-off-by: Sweet Tea Dorminy Looks good. Reviewed-by: Anand Jain Thanks, Anand

Re: [PATCH 02/12] common/encrypt: add btrfs to get_encryption_*nonce

2023-10-31 Thread Anand Jain
nonce for the data nonce; when we write a bigger file test, we'll need to change that. Signed-off-by: Sweet Tea Dorminy --- Reviewed-by: Anand Jain Thanks, Anand

Re: [PATCH 01/12] common/encrypt: separate data and inode nonces

2023-10-31 Thread Anand Jain
: Anand Jain And, as Eric pointed out, the naming can be more intuitive. Keywords such as 'inode' and 'extent' will make them more intuitive, rather than 'file' and 'data,' IMO. Thanks, Anand

Re: [PATCH 06/12] btrfs: add simple test of reflink of encrypted data

2023-10-31 Thread Anand Jain
On 11/10/2023 04:25, Josef Bacik wrote: From: Sweet Tea Dorminy Make sure that we succeed at reflinking encrypted data. Test deliberately numbered with a high number so it won't conflict with tests between now and merge. --- Looks good. However, SOB is missing. Thanks, Anand

Re: [RFC PATCH v3 2/9] common/encrypt: add btrfs to get_encryption_*nonce

2023-10-02 Thread Anand Jain
On 09/08/2023 01:21, Sweet Tea Dorminy wrote: Add the modes of getting the encryption nonces, either inode or extent, to the various get_encryption_nonce functions. For now, no encrypt test makes a file with more than one extent, so we can just grab the first extent's nonce for the data nonce; wh

Re: [RFC PATCH v3 6/9] tests: adjust generic/429 for extent encryption

2023-10-02 Thread Anand Jain
On 09/08/2023 01:21, Sweet Tea Dorminy wrote: Extent encryption is different from the existing inode-based encryption insofar as it only generates encryption keys for data encryption at the moment at which the data is written. This means that when a session key is removed, even if there's an open

Re: [PATCH] btrfs-progs: Correct check_running_fs_exclop() return value

2021-04-09 Thread Anand Jain
On 09/04/2021 23:56, Goldwyn Rodrigues wrote: check_running_fs_exclop() can return 1 when exclop is changed to "none" The ret is set by the return value of the select() operation. Checking the exclusive op changes just the exclop variable while ret is still set to 1. Set ret exclusively if exclo

Re: [PATCH v3 1/5] btrfs: add compat_flags to btrfs_inode_item

2021-04-08 Thread Anand Jain
On 09/04/2021 02:33, Boris Burkov wrote: The tree checker currently rejects unrecognized flags when it reads btrfs_inode_item. Practically, this means that adding a new flag makes the change backwards incompatible if the flag is ever set on a file. Take up one of the 4 reserved u64 fields in

Re: [PATCH 2/2] btrfs: Use reada_control pointer instead of void pointer

2021-04-06 Thread Anand Jain
yep. Signed-off-by: Goldwyn Rodrigues Reviewed-by: Anand Jain --- fs/btrfs/ctree.h | 2 +- fs/btrfs/reada.c | 6 ++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 2acbd8919611..8bf434a4f014 100644 --- a/fs/btrfs/ctree.h +++ b/fs/bt

Re: [PATCH 1/2] btrfs: Remove unused function btrfs_reada_detach()

2021-04-06 Thread Anand Jain
tach(). Reviewed-by: Anand Jain Signed-off-by: Goldwyn Rodrigues --- fs/btrfs/ctree.h | 1 - fs/btrfs/reada.c | 9 + 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index f2fd73e58ee6..2acbd8919611 100644 --- a/fs/btrfs/ctree.h +++

Re: [PATCH v2] btrfs: fix lockdep warning while mounting sprout fs

2021-04-06 Thread Anand Jain
On 07/04/2021 00:48, David Sterba wrote: On Mon, Apr 05, 2021 at 05:18:32PM +0800, Su Yue wrote: On Mon 05 Apr 2021 at 16:38, Anand Jain wrote: Ping again. It's already queued in misc-next. commit 441737bb30f83914bb8517f52088c0130138d74b (misc-next) Author: Anand Jain Date: Fr

Re: [PATCH v3 00/13] btrfs: support read-write for subpage metadata

2021-04-05 Thread Anand Jain
On 05/04/2021 14:14, Qu Wenruo wrote: On 2021/4/3 下午7:08, David Sterba wrote: On Thu, Mar 25, 2021 at 03:14:32PM +0800, Qu Wenruo wrote: This patchset can be fetched from the following github repo, along with the full subpage RW support: https://github.com/adam900710/linux/tree/subpage This

Re: [PATCH v2] btrfs: fix lockdep warning while mounting sprout fs

2021-04-05 Thread Anand Jain
On 05/04/2021 17:18, Su Yue wrote: On Mon 05 Apr 2021 at 16:38, Anand Jain wrote: Ping again. It's already queued in misc-next. Oh thanks. Thanks David. -Anand commit 441737bb30f83914bb8517f52088c0130138d74b (misc-next) Author: Anand Jain Date:   Fri Jul 17 18:05:25 2020

Re: [PATCH v2] btrfs: fix lockdep warning while mounting sprout fs

2021-04-05 Thread Anand Jain
Ping again. Thanks, Anand On 06/03/2021 16:37, Anand Jain wrote: David, Ping? Thanks, Anand On 04/03/2021 02:10, Anand Jain wrote: Following test case reproduces lockdep warning. Test case: DEV1=/dev/vdb DEV2=/dev/vdc umount /btrfs run mkfs.btrfs -f $DEV1 run btrfstune -S 1 $DEV1 run

Re: [PATCH v3 00/13] btrfs: support read-write for subpage metadata

2021-04-01 Thread Anand Jain
On 29/03/2021 10:01, Qu Wenruo wrote: On 2021/3/29 上午4:02, Ritesh Harjani wrote: On 21/03/25 09:16PM, Qu Wenruo wrote: On 2021/3/25 下午8:20, Neal Gompa wrote: On Thu, Mar 25, 2021 at 3:17 AM Qu Wenruo wrote: This patchset can be fetched from the following github repo, along with the fu

Re: [PATCH v3 00/13] btrfs: support read-write for subpage metadata

2021-04-01 Thread Anand Jain
On 01/04/2021 13:36, Qu Wenruo wrote: On 2021/3/30 上午2:53, David Sterba wrote: On Thu, Mar 25, 2021 at 03:14:32PM +0800, Qu Wenruo wrote: v3: - Rename the sysfs to supported_sectorsizes - Rebased to latest misc-next branch    This removes 2 cleanup patches. - Add new overview comment for su

Re: [PATCH v3 04/13] btrfs: refactor how we iterate ordered extent in btrfs_invalidatepage()

2021-04-01 Thread Anand Jain
On 25/03/2021 15:14, Qu Wenruo wrote: In btrfs_invalidatepage(), we need to iterate through all ordered extents and finish them. This involved a loop to exhaust all ordered extents, but that loop is implemented using again: label and goto. Refactor the code by: - Use a while() loop Just an ob

Re: [PATCH v3 01/13] btrfs: add sysfs interface for supported sectorsize

2021-04-01 Thread Anand Jain
On 30/03/2021 02:20, David Sterba wrote: On Thu, Mar 25, 2021 at 10:41:43PM +0800, Anand Jain wrote: On 25/03/2021 15:14, Qu Wenruo wrote: +static ssize_t supported_sectorsizes_show(struct kobject *kobj, + struct kobj_attribute *a

Re: [PATCH 0/1] zoned: moving superblock logging zones

2021-03-28 Thread Anand Jain
On 15/03/2021 13:53, Naohiro Aota wrote: The following patch will change the superblock logging zones' location from fixed zone number to fixed LBAs. Here is a background of how the superblock is working on zoned btrfs. This document will be promoted to btrfs-dev-docs in the future. # Superblo

Re: [PATCH v3 01/13] btrfs: add sysfs interface for supported sectorsize

2021-03-25 Thread Anand Jain
On 25/03/2021 15:14, Qu Wenruo wrote: Add extra sysfs interface features/supported_ro_sectorsize and features/supported_rw_sectorsize to indicate subpage support. Currently for supported_rw_sectorsize all architectures only have their PAGE_SIZE listed. While for supported_ro_sectorsize, for sys

Re: [PATCH v2 2/2] btrfs: zoned: automatically reclaim zones

2021-03-22 Thread Anand Jain
On 19/03/2021 18:48, Johannes Thumshirn wrote: When a file gets deleted on a zoned file system, the space freed is not returned back into the block group's free space, but is migrated to zone_unusable. As this zone_unusable space is behind the current write pointer it is not possible to use it

Re: [PATCH v2 1/2] btrfs: rename delete_unused_bgs_mutex

2021-03-22 Thread Anand Jain
On 19/03/2021 18:48, Johannes Thumshirn wrote: As a preparation for another user, rename the unused_bgs_mutex into reclaim_bgs_lock. Signed-off-by: Johannes Thumshirn Reviewed-by: Anand Jain

[PATCH v2] btrfs-progs: fix inspect-internal --help incomplete sentence

2021-03-19 Thread Anand Jain
patch just fixes it. Signed-off-by: Anand Jain --- v2: Drop the idea to fix the period at the end of the single line help statements. Because the fix wasn't sufficient, there are more, and it can be done separately. cmds/inspect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 dele

[PATCH] btrfs-progs: fix inspect-internal --help incomplete sentence

2021-03-18 Thread Anand Jain
: Anand Jain --- cmds/inspect.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmds/inspect.c b/cmds/inspect.c index 15f19c8a3027..fcb3b1ae1321 100644 --- a/cmds/inspect.c +++ b/cmds/inspect.c @@ -80,7 +80,7 @@ out: static const char * const

Re: [PATCH 0/1] btrfs-progs: libbtrfsutil: Relicense to LGPLv2.1+

2021-03-18 Thread Anand Jain
oup.c |2 +- libbtrfsutil/stubs.c |2 +- libbtrfsutil/stubs.h |2 +- libbtrfsutil/subvolume.c |2 +- 17 files changed, 495 insertions(+), 832 deletions(-) delete mode 100644 libbtrfsutil/COPYING.LESSER Acked-by: Anand Jain

Re: [PATCH] btrfs: Use immediate assignment when referencing cc-option

2021-03-16 Thread Anand Jain
nment to subdir-ccflags-y when referencing cc-option. This causes make to also evaluate += immediately, cc-option calls are done right away and we don't end up with KBUILD_CFLAGS referencing itself. Thanks for the patch. Reviewed-by: Anand Jain Signed-off-by: Victor Erminpour ---

Re: [PATCH v2 01/15] btrfs: add sysfs interface for supported sectorsize

2021-03-15 Thread Anand Jain
On 16/03/2021 08:05, Qu Wenruo wrote: On 2021/3/16 上午2:44, David Sterba wrote: On Mon, Mar 15, 2021 at 08:39:31PM +0800, Qu Wenruo wrote: On 2021/3/15 下午7:59, Anand Jain wrote: On 10/03/2021 17:08, Qu Wenruo wrote: Add extra sysfs interface features/supported_ro_sectorsize and

Re: [PATCH v2 03/15] btrfs: remove unnecessary variable shadowing in btrfs_invalidatepage()

2021-03-15 Thread Anand Jain
ed-by: Anand Jain -Anand fs/btrfs/inode.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 2973cec05505..f99554f0bd48 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -8404,15 +8404,11 @@ static void btrfs_invalidat

Re: [PATCH v2 02/15] btrfs: use min() to replace open-code in btrfs_invalidatepage()

2021-03-15 Thread Anand Jain
On 10/03/2021 17:08, Qu Wenruo wrote: In btrfs_invalidatepage() we introduce a temporary variable, new_len, to update ordered->truncated_len. But we can use min() to replace it completely and no need for the variable. Signed-off-by: Qu Wenruo --- Reviewed-by: Anand Jain -Anand

Re: [PATCH v2 01/15] btrfs: add sysfs interface for supported sectorsize

2021-03-15 Thread Anand Jain
On 10/03/2021 17:08, Qu Wenruo wrote: Add extra sysfs interface features/supported_ro_sectorsize and features/supported_rw_sectorsize to indicate subpage support. Currently for supported_rw_sectorsize all architectures only have their PAGE_SIZE listed. While for supported_ro_sectorsize, for sys

Re: [PATCH 4/9] btrfs: use booleans where appropriate for the tree mod log functions

2021-03-12 Thread Anand Jain
On 11/3/21 10:31 pm, fdman...@kernel.org wrote: From: Filipe Manana Several functions of the tree modification log use integers as booleans, so change them to use booleans instead, making their use more clear. Signed-off-by: Filipe Manana Reviewed-by: Anand Jain

Re: [PATCH 3/9] btrfs: move the tree mod log code into its own file

2021-03-12 Thread Anand Jain
read it to fix a bug. Signed-off-by: Filipe Manana Reviewed-by: Anand Jain

Re: [PATCH 3/3] btrfs: don't init dev replace for bad dev root

2021-03-11 Thread Anand Jain
this happens only in RO mount. Reviewed-by: Anand Jain path = btrfs_alloc_path(); if (!path) { ret = -ENOMEM;

Re: [PATCH 2/3] btrfs: do not init dev stats if we have no dev_root

2021-03-11 Thread Anand Jain
root. Fix this by skipping init'ing the device stats if we do not have a device root. Reported-by: Neal Gompa Signed-off-by: Josef Bacik Reviewed-by: Anand Jain

Re: [PATCH 1/3] btrfs: init devices always

2021-03-11 Thread Anand Jain
s_info pointer properly, so this needs to be done unconditionally always so that we can properly deref device->fs_info in rescue cases. Reported-by: Neal Gompa Signed-off-by: Josef Bacik Reviewed-by: Anand Jain

Re: [PATCH 1/3] btrfs: init devices always

2021-03-11 Thread Anand Jain
On 12/3/21 1:52 pm, Anand Jain wrote: On 12/3/21 12:23 am, Josef Bacik wrote: Neal reported a panic trying to use -o rescue=all BUG: kernel NULL pointer dereference, address: 0030 PGD 0 P4D 0 Oops: [#1] SMP NOPTI CPU: 0 PID: 696 Comm: mount Tainted: G    W

Re: [PATCH 1/3] btrfs: init devices always

2021-03-11 Thread Anand Jain
On 12/3/21 12:23 am, Josef Bacik wrote: Neal reported a panic trying to use -o rescue=all BUG: kernel NULL pointer dereference, address: 0030 PGD 0 P4D 0 Oops: [#1] SMP NOPTI CPU: 0 PID: 696 Comm: mount Tainted: GW 5.12.0-rc2+ #296 Hardware name: QEMU Standard PC

Re: [PATCH] fstest: random read fio test for read policy

2021-03-10 Thread Anand Jain
Hi, How about a review of this test case or suggest any better ideas? If we are ok with this, I will be adding 2 other types of workloads that we need to test read policies. Thanks, Anand On 22/2/21 10:48 pm, Anand Jain wrote: This test case runs fio for raid1/10/1c3/1c4 profiles and all

Re: [PATCH] btrfs: turn btrfs_destroy_delayed_refs() into void function

2021-03-09 Thread Anand Jain
ported-by: Abaci Robot Signed-off-by: Yang Li Reviewed-by: Anand Jain --- fs/btrfs/disk-io.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 41b718c..b75d2d9 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c

Re: [PATCH v2] btrfs: fix lockdep warning while mounting sprout fs

2021-03-06 Thread Anand Jain
David, Ping? Thanks, Anand On 04/03/2021 02:10, Anand Jain wrote: Following test case reproduces lockdep warning. Test case: DEV1=/dev/vdb DEV2=/dev/vdc umount /btrfs run mkfs.btrfs -f $DEV1 run btrfstune -S 1 $DEV1 run mount $DEV1 /btrfs run btrfs device add $DEV2 /btrfs -f run umount

Re: Scared with degraded raid1 fs

2021-03-05 Thread Anand Jain
On 05/03/2021 15:15, Alexandru Stan wrote: Hello, My raid1 btrfs fs went read only recently. It was comprised of 2 drives: /dev/sda ST4000VN008 (firmware SC60) - 6 month old drive /dev/sdb ST4000VN000 (firmware SC44) - 5 year old drive (but it was mostly idly spinning, very little accesses were

[PATCH v2] btrfs: fix lockdep warning while mounting sprout fs

2021-03-03 Thread Anand Jain
ice_list_mutex in clone_fs_devices(). And adds a lockdep_assert_held(&uuid_mutex) in clone_fs_devices(). Reported-by: Su Yue Signed-off-by: Anand Jain --- v2: Remove Martin's Reported-by and Tested-by. Add Su's Reported-by. Add lockdep_assert_held check. Update the change

Re: [report] lockdep warning when mounting seed device

2021-03-02 Thread Anand Jain
On 26/02/2021 23:10, David Sterba wrote: On Fri, Feb 26, 2021 at 01:01:02PM +0800, Anand Jain wrote: On 25/02/2021 12:39, Su Yue wrote: While playing with seed device(misc/next and v5.11), lockdep complains the following: To reproduce: dev1=/dev/sdb1 dev2=/dev/sdb2 umount /mnt mkfs.btrfs

Re: [PATCH] fstests: make sure we rescan all devices after unregistering

2021-02-26 Thread Anand Jain
-by: Eric Sandeen Signed-off-by: Qu Wenruo Reviewed-by: Anand Jain Thanks. --- common/btrfs| 8 tests/btrfs/124 | 2 ++ tests/btrfs/125 | 2 ++ tests/btrfs/163 | 2 ++ tests/btrfs/164 | 2 ++ tests/btrfs/219 | 2 ++ tests/btrfs/225 | 3 +++ 7 files changed, 21 insertions

Re: [report] lockdep warning when mounting seed device

2021-02-25 Thread Anand Jain
On 25/02/2021 12:39, Su Yue wrote: While playing with seed device(misc/next and v5.11), lockdep complains the following: To reproduce: dev1=/dev/sdb1 dev2=/dev/sdb2 umount /mnt mkfs.btrfs -f $dev1 btrfstune -S 1 $dev1 mount $dev1 /mnt btrfs device add $dev2 /mnt/ -f umount /mnt m

Re: xfstests seems broken on btrfs with multi-dev TEST_DEV

2021-02-25 Thread Anand Jain
On 25/02/2021 11:18, Qu Wenruo wrote: On 2021/2/25 上午11:15, Eric Sandeen wrote: On 2/24/21 9:13 PM, Qu Wenruo wrote: Now this makes way more sense, Sorry for the earlier mistake. as your previous comment on _btrfs_forget_or_module_reload is completely correct. _btrfs_forget_or_module

Re: [PATCH 4/5] btrfs: scrub_checksum_tree_block() drop its function declaration

2021-02-24 Thread Anand Jain
On 12/02/2021 22:36, David Sterba wrote: On Wed, Feb 10, 2021 at 09:25:18PM -0800, Anand Jain wrote: Move the static function scrub_checksum_tree_block() before its use in the scrub.c, and drop its declaration. No functional changes. We've rejected patches that move static function w

Re: xfstests seems broken on btrfs with multi-dev TEST_DEV

2021-02-24 Thread Anand Jain
On 25/02/2021 05:39, Eric Sandeen wrote: On 2/24/21 10:12 AM, Eric Sandeen wrote: Last week I was curious to just see how btrfs is faring with RAID5 in xfstests, so I set it up for a quick run with devices configured as: Whoops this was supposed to cc: fstests, not fsdevel, sorry. -Eric TES

Re: [PATCH 1/4] btrfs: add ioctl BTRFS_IOC_DEV_PROPERTIES.

2021-02-23 Thread Anand Jain
On 23/02/2021 21:53, David Sterba wrote: On Mon, Feb 22, 2021 at 10:19:06PM +0100, Goffredo Baroncelli wrote: From: Goffredo Baroncelli This ioctl is a base for returning / setting information from / to the fields of the btrfs_dev_item object. Please don't add a new ioctl for properties, th

Re: 5.11.0: open ctree failed: devide total_bytes should be at most X but found Y

2021-02-23 Thread Anand Jain
On 24/02/2021 01:35, Johannes Thumshirn wrote: On 23/02/2021 18:20, Steven Davies wrote: On 2021-02-23 14:30, David Sterba wrote: On Tue, Feb 23, 2021 at 09:43:04AM +, Johannes Thumshirn wrote: On 23/02/2021 10:13, Johannes Thumshirn wrote: On 22/02/2021 21:07, Steven Davies wrote: [+

[PATCH] fstest: random read fio test for read policy

2021-02-22 Thread Anand Jain
study of the read policy performance. I find tests/btrfs as the placeholder for this test case. As it contains many things which are btrfs specific and didn't fit well under perf. Signed-off-by: Anand Jain --- tests/btrfs/231 | 145 tests/

Re: [RFC][PATCH] btrfs: sysfs for chunk layout hint

2021-02-18 Thread Anand Jain
On 19/02/2021 03:11, Goffredo Baroncelli wrote: On 2/18/21 6:20 PM, Anand Jain wrote: btrfs_chunk_alloc() uses dev_alloc_list to allocate new chunks. The function's stack leading to btrfs_cmp_device_info() sorts the dev_alloc_list in the descending order of unallocated space. This sorting

[RFC][PATCH] btrfs: sysfs for chunk layout hint

2021-02-18 Thread Anand Jain
added on top of this when we have a consensus. Signed-off-by: Anand Jain --- This + sequential chunk layout hint (experimental) (patch not yet sent) helped me get consistent performance numbers for read_policy pid. As chunk layout hint is not set at mkfs, a balance after setting the desired chunk l

[RFC][PATCH] btrfs: random read fio test for read policy

2021-02-18 Thread Anand Jain
the result is in the $seqresfull-file. I find tests/btrfs as the placeholder for this test case. As it contains many things which are btrfs specific and didn't fit well under perf. Feedback/suggestions welcome. Signed-off-by: Anand Jain --- tests/btrfs/231

[PATCH 4/5] btrfs: scrub_checksum_tree_block() drop its function declaration

2021-02-10 Thread Anand Jain
Move the static function scrub_checksum_tree_block() before its use in the scrub.c, and drop its declaration. No functional changes. Signed-off-by: Anand Jain --- fs/btrfs/scrub.c | 133 +++ 1 file changed, 66 insertions(+), 67 deletions(-) diff

[PATCH 5/5] btrfs: scrub_checksum_data() drop its function declaration

2021-02-10 Thread Anand Jain
Move scrub_checksum_data() before its use, and drop its declaration. No functional changes. Signed-off-by: Anand Jain --- fs/btrfs/scrub.c | 61 1 file changed, 30 insertions(+), 31 deletions(-) diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c

[PATCH 1/5] btrfs: make btrfs_extent_readonly() static

2021-02-10 Thread Anand Jain
btrfs_extent_readonly() is used by can_nocow_extent() in inode.c. So move btrfs_extent_readonly() from extent-tree.c to inode.c and declare it as static. Signed-off-by: Anand Jain --- fs/btrfs/ctree.h | 1 - fs/btrfs/extent-tree.c | 13 - fs/btrfs/inode.c | 13

[PATCH 3/5] btrfs: scrub drop few function declarations

2021-02-10 Thread Anand Jain
Drop function declarations at the beginning of the file scrub.c. These functions are defined before they are used in the same file. No functional changes. Signed-off-by: Anand Jain --- fs/btrfs/scrub.c | 8 1 file changed, 8 deletions(-) diff --git a/fs/btrfs/scrub.c b/fs/btrfs

[PATCH 2/5] btrfs: btrfs_extent_readonly() change return type to bool

2021-02-10 Thread Anand Jain
btrfs_extent_readonly() checks if the bg is readonly, the bool return type will suffice its need. Signed-off-by: Anand Jain --- fs/btrfs/inode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 2ed7d736e39a..ebb2b8e3a71c 100644

[PATCH 0/5] cleanups btrfs_extent_readonly() and scrub, part1

2021-02-10 Thread Anand Jain
This patchset makes btrfs_extent_readonly() static and changes the return type to bool. And drops few unwanted function declarations in the scrub.c. Thanks. Anand Anand Jain (5): btrfs: make btrfs_extent_readonly() static btrfs: btrfs_extent_readonly() change return type to bool btrfs

Re: [PATCH v2 3/3] btrfs: fix race between swap file activation and snapshot creation

2021-02-10 Thread Anand Jain
snapshot lock during swap file activation before locking the extent range, as that is the order in which we lock these during buffered writes. Fixes: ed46ff3d42378 ("Btrfs: support swap files") Signed-off-by: Filipe Manana Reviewed-by: Anand Jain Thanks, Anan

Re: [PATCH v2 2/3] btrfs: fix race between writes to swap files and scrub

2021-02-10 Thread Anand Jain
- this is the same approach we currently use for balance. Fixes: ed46ff3d42378 ("Btrfs: support swap files") Signed-off-by: Filipe Manana Looks good. Reviewed-by: Anand Jain Thanks, Anand --- fs/btrfs/block-group.c | 33 - fs/btrfs/block-gr

Re: [PATCH v2 1/3] btrfs: avoid checking for RO block group twice during nocow writeback

2021-02-10 Thread Anand Jain
. Reviewed-by: Anand Jain Thanks, Anand --- fs/btrfs/inode.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 04cd95899ac8..76a0151ef05a 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -1657,9 +1657,6 @@ static noinline

Re: [PATCH RFC 6/6] btrfs: Add roundrobin raid1 read policy

2021-02-10 Thread Anand Jain
On 10/02/2021 04:30, Michal Rostecki wrote: From: Michal Rostecki Add a new raid1 read policy `roundrobin`. For each read request, it selects the mirror which has lower load than queue depth and it starts iterating from the last used mirror (by the current CPU). Load is defined as the number of

Re: [PATCH RFC 0/6] Add roundrobin raid1 read policy

2021-02-09 Thread Anand Jain
On 10/02/2021 04:30, Michal Rostecki wrote: From: Michal Rostecki This patch series adds a new raid1 read policy - roundrobin. For each request, it selects the mirror which has lower load than queue depth. Load is defined as the number of inflight requests + a penalty value (if the scheduled r

Re: [PATCH v4 1/3] btrfs: add read_policy latency

2021-02-09 Thread Anand Jain
On 10/02/2021 05:12, Michal Rostecki wrote: On Thu, Feb 04, 2021 at 08:30:01PM +0800, Anand Jain wrote: Hi Michal, Did you get any chance to run the evaluation with this patchset? Thanks, Anand Hi Anand, Yes, I tested your policies now. Sorry for late response. For the

Re: [PATCH 2/4] btrfs: fix race between writes to swap files and scrub

2021-02-04 Thread Anand Jain
On 2/4/2021 6:11 PM, Filipe Manana wrote: On Thu, Feb 4, 2021 at 8:48 AM Anand Jain wrote: On 2/3/2021 7:17 PM, fdman...@kernel.org wrote: From: Filipe Manana When we active a swap file, at btrfs_swap_activate(), we acquire the exclusive operation lock to prevent the physical location of

Re: [PATCH v4 1/3] btrfs: add read_policy latency

2021-02-04 Thread Anand Jain
Hi Michal, Did you get any chance to run the evaluation with this patchset? Thanks, Anand On 1/30/2021 9:08 AM, Anand Jain wrote: 500m is really small data size for such measurement I reran the read policy tests with some changes in the fio command options. Mainly to measure IOPS

Re: [PATCH 0/2] btrfs: add proper subpage compress read support

2021-02-04 Thread Anand Jain
Nice. Works well. Thanks, Anand On 2/4/2021 3:03 PM, Qu Wenruo wrote: During the long time subpage development, I forgot to properly check compression code after just one compression read success during early development. It turns out that, with current RO support, the compression read nee

Re: [PATCH 2/4] btrfs: fix race between writes to swap files and scrub

2021-02-04 Thread Anand Jain
and not a read/write lock) on very large filesystems, with several thousands of allocated block groups. Fixes: ed46ff3d42378 ("Btrfs: support swap files") Signed-off-by: Filipe Manana I am not sure about the optimization of direct IO part, but as such changes looks good. Reviewed

Re: [PATCH 1/4] btrfs: avoid checking for RO block group twice during nocow writeback

2021-02-03 Thread Anand Jain
that protects it (specially since it is a spin lock and not a read-write lock). That may make a noticeable difference on very large filesystems, with thousands of allocated block groups. Signed-off-by: Filipe Manana Reviewed-by: Anand Jain Thanks. --- fs/btrfs/inode.c | 4 +--- 1 file

Re: [PATCH v14 12/42] btrfs: calculate allocation offset for conventional zones

2021-02-02 Thread Anand Jain
On 2/3/2021 2:10 PM, Damien Le Moal wrote: On 2021/02/03 14:22, Anand Jain wrote: On 1/26/2021 10:24 AM, Naohiro Aota wrote: Conventional zones do not have a write pointer, so we cannot use it to determine the allocation offset if a block group contains a conventional zone. But instead, we

Re: [PATCH v14 12/42] btrfs: calculate allocation offset for conventional zones

2021-02-02 Thread Anand Jain
offset to 0, anyway. Information about how are the WP of conventional zones used is missing here. Reviewed-by: Anand Jain Thanks. Signed-off-by: Naohiro Aota --- fs/btrfs/block-group.c | 4 +- fs/btrfs/zoned.c | 99 +++--- fs/btrfs/zoned.h

Re: [bug report] Unable to handle kernel paging request

2021-02-02 Thread Anand Jain
+0.001075] ---[ end trace d4f31b4f11a947b7 ]--- [ +14.775765] note: kworker/u64:1[5754] exited with preempt_count 1 Thanks, Anand On 2/2/2021 7:28 PM, Anand Jain wrote: On 2/2/2021 6:23 PM, Qu Wenruo wrote: On 2021/2/2 下午5:21, Anand Jain wrote: Qu,   fstests ran

Re: [bug report] Unable to handle kernel paging request

2021-02-02 Thread Anand Jain
On 2/2/2021 6:23 PM, Qu Wenruo wrote: On 2021/2/2 下午5:21, Anand Jain wrote: Qu,   fstests ran fine on an aarch64 kvm with this patch set. Do you mean subpage patchset? With 4K sector size? No way it can run fine... No . fstests ran with sectorsize == pagesize == 64k. These aren&#

[bug report] Unable to handle kernel paging request

2021-02-02 Thread Anand Jain
Qu, fstests ran fine on an aarch64 kvm with this patch set. Further, I was running few hand tests as below, and it fails with - Unable to handle kernel paging. Test case looks something like.. On x86_64 create btrfs on a file 11g copy /usr into /test-mnt stops at enospc set compressio

Re: [PATCH v14 08/42] btrfs: allow zoned mode on non-zoned block devices

2021-02-01 Thread Anand Jain
of device extent. This is mainly aimed at testing parts of the zoned mode, i.e. the zoned chunk allocator, on regular block devices. Signed-off-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Reviewed-by: Josef Bacik Reviewed-by: Anand Jain Thanks, Anand

Re: [PATCH v14 17/42] btrfs: enable to mount ZONED incompat flag

2021-01-31 Thread Anand Jain
On 1/26/2021 10:24 AM, Naohiro Aota wrote: This final patch adds the ZONED incompat flag to BTRFS_FEATURE_INCOMPAT_SUPP and enables btrfs to mount ZONED flagged file system. Signed-off-by: Naohiro Aota Reviewed-by: Josef Bacik Reviewed-by: Anand Jain Thanks, Anand --- fs/btrfs/ctree.h

Re: [PATCH v14 18/42] btrfs: reset zones of unused block groups

2021-01-31 Thread Anand Jain
Reviewed-by: Anand Jain Thanks, Anand --- fs/btrfs/block-group.c | 8 ++-- fs/btrfs/extent-tree.c | 17 - fs/btrfs/zoned.h | 16 3 files changed, 34 insertions(+), 7 deletions(-) diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c

Re: [PATCH v14 09/42] btrfs: implement zoned chunk allocator

2021-01-31 Thread Anand Jain
. Also, it checks that a region allocation is not overlapping any of the super block zones, and ensures the region is empty. Reviewed-by: Josef Bacik Signed-off-by: Naohiro Aota Reviewed-by: Anand Jain A nit below. --- fs/btrfs/volumes.c | 169

Re: [PATCH v14 08/42] btrfs: allow zoned mode on non-zoned block devices

2021-01-30 Thread Anand Jain
On 1/26/2021 10:24 AM, Naohiro Aota wrote: From: Johannes Thumshirn Run zoned btrfs mode on non-zoned devices. This is done by "slicing up" the block-device into static sized chunks and fake a conventional zone on each of them. The emulated zone size is determined from the size of device extent

Re: [PATCH v14 07/42] btrfs: disallow fitrim in ZONED mode

2021-01-30 Thread Anand Jain
space cache (but, only for fitrim) or scanning the extent tree at fitrim time. But, for now, disallow fitrim in ZONED mode. Signed-off-by: Naohiro Aota Reviewed-by: Josef Bacik Reviewed-by: Anand Jain Thanks, Anand --- fs/btrfs/ioctl.c | 8 1 file changed, 8 insertions(+) diff

Re: [PATCH v14 06/42] btrfs: do not load fs_info->zoned from incompat flag

2021-01-30 Thread Anand Jain
rrect zone_size as well. Once the correct zone_size is read from the device, we can rely on the zoned flag in fs_info as well to determine if the filesystem is running in zoned mode. Signed-off-by: Johannes Thumshirn Reviewed-by: Josef Bacik Looks good. Reviewed-by: Anand Jain T

Re: [PATCH v14 05/42] btrfs: release path before calling into btrfs_load_block_group_zone_info

2021-01-30 Thread Anand Jain
Thumshirn Reviewed-by: Josef Bacik Looks good to me. Reviewed-by: Anand Jain Thanks. --- fs/btrfs/block-group.c | 39 ++- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c index 763a3671b7af

Re: [PATCH v14 04/42] btrfs: use regular SB location on emulated zoned mode

2021-01-30 Thread Anand Jain
he SB locations are at a conventional zone on emulated zoned mode. Reviewed-by: Josef Bacik Signed-off-by: Naohiro Aota Makes sense to me. Reviewed-by: Anand Jain Thanks. --- fs/btrfs/zoned.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/zoned.c b/fs/

Re: [PATCH v14 03/42] btrfs: defer loading zone info after opening trees

2021-01-30 Thread Anand Jain
y: Naohiro Aota Patches are already in for-next. My apologies for the delay in review here and in the following patches how many ever I could. Reviewed-by: Anand Jain Thanks. --- fs/btrfs/disk-io.c | 13 + fs/btrfs/volumes.c | 4 fs/btrfs/zone

Re: [PATCH v4 1/3] btrfs: add read_policy latency

2021-01-29 Thread Anand Jain
500m is really small data size for such measurement I reran the read policy tests with some changes in the fio command options. Mainly to measure IOPS throughput and latency on the filesystem with latency-policy and pid-policy. Each of these tests was run for 3 iterations and the best and wo

Re: [PATCH v4 1/3] btrfs: add read_policy latency

2021-01-22 Thread Anand Jain
On 22/1/21 1:52 am, David Sterba wrote: On Thu, Jan 21, 2021 at 06:10:36PM +0800, Anand Jain wrote: On 20/1/21 8:14 pm, David Sterba wrote: On Tue, Jan 19, 2021 at 11:52:05PM -0800, Anand Jain wrote: The read policy type latency routes the read IO based on the historical average wait

Re: [PATCH v4 0/3, full-cover-letter] btrfs: read_policy types latency, device and round-robin

2021-01-21 Thread Anand Jain
uct btrfs_fs_info *fs_info, fs_info->fs_devices->read_policy = BTRFS_READ_POLICY_PID; fallthrough; case BTRFS_READ_POLICY_PID: + /* + * Just to factor in the cost of calculating the avg wait using + * iostat, call btrfs_find_best_stripe() here for the PID policy + * and drop its results o

Re: [PATCH v3 1/4] btrfs: add read_policy latency

2021-01-21 Thread Anand Jain
On 20/1/21 9:54 pm, Michal Rostecki wrote: On Wed, Jan 20, 2021 at 08:30:56PM +0800, Anand Jain wrote: I ran fio tests again, now with dstat in an another window. I don't notice any such stalls, the read numbers went continuous until fio finished. Could you please check with the

Re: [PATCH] btrfs: remove redundant NULL check

2021-01-21 Thread Anand Jain
if (x) - kvfree(x); + kvfree(x); Reviewed-by: Anand Jain Thanks, Anand return 0; }

Re: [PATCH v4 2/3] btrfs: introduce new device-state read_preferred

2021-01-21 Thread Anand Jain
On 20/1/21 3:52 pm, Anand Jain wrote: This is a preparatory patch and introduces a new device flag 'read_preferred', RW-able using sysfs interface. Signed-off-by: Anand Jain > --- v4: - There is rb from Josef for this patch in v3. Could you please add it? Thanks, Anand

  1   2   3   4   5   6   7   8   9   10   >