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

2021-03-16 Thread Anand Jain
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 --- fs/btrfs

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

2021-03-09 Thread Anand Jain
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 @@ -52,7

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

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

Re: [PATCH] btrfs: remove redundant NULL check

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

Re: [PATCH v2] btrfs: return EAGAIN when receiving a pending signal in the defrag loops

2020-11-18 Thread Anand Jain
On 18/11/20 12:02 pm, xiakaixu1...@gmail.com wrote: From: Kaixu Xia The variable ret is overwritten by the following variable defrag_count. Actually the code should return EAGAIN when receiving a pending signal in the defrag loops. Reported-by: Tosk Robot Signed-off-by: Kaixu Xia --- v2

Re: WARNING in close_fs_devices (2)

2020-10-30 Thread Anand Jain
On 30/10/20 6:10 pm, Dmitry Vyukov wrote: On Tue, Sep 22, 2020 at 2:37 PM Anand Jain wrote: On 18/9/20 7:22 pm, syzbot wrote: Hello, syzbot found the following issue on: HEAD commit:e4c26faa Merge tag 'usb-5.9-rc5' of git://git.kernel.org/p.. git tree: upstream console output

[PATCH stable-5.4] backport enospc issues during balance

2020-10-13 Thread Anand Jain
Patch 1 is a preparatory patch to reduce conflicts. Patch 2 fixes balance failure due to ENOSPC in btrfs/156 on arm64 systems with pagesize=64k. Minor conflicts in fs/btrfs/block-group.c are resolved. Thanks. Josef Bacik (2): btrfs: don't pass system_chunk into can_overcommit btrfs: take

[PATCH stable-5.4 1/2] btrfs: don't pass system_chunk into can_overcommit

2020-10-13 Thread Anand Jain
-by: David Sterba Signed-off-by: David Sterba Signed-off-by: Anand Jain --- fs/btrfs/space-info.c | 42 +++--- 1 file changed, 15 insertions(+), 27 deletions(-) diff --git a/fs/btrfs/space-info.c b/fs/btrfs/space-info.c index 6f484f0d347e..e19e538d05f9 100644

[PATCH stable-5.4 2/2] btrfs: take overcommit into account in inc_block_group_ro

2020-10-13 Thread Anand Jain
to mark read only. If we do then we can mark this block group as read only. Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba Signed-off-by: Anand Jain --- fs/btrfs/block-group.c | 38 ++ fs/btrfs/space

Re: [PATCH v2 add prerequisite-patch-id] btrfs: fix devid 0 without a replace item by failing the mount

2020-10-11 Thread Anand Jain
Accidentally this patch went to the stable. Pls, ignore. Sorry for the noise. Thanks. On 12/10/20 1:26 pm, Anand Jain wrote: If there is a BTRFS_DEV_REPLACE_DEVID without a replace item, then it means some device is trying to attack or may be corrupted. Fail the mount so that the user can

[PATCH v2 add prerequisite-patch-id] btrfs: fix devid 0 without a replace item by failing the mount

2020-10-11 Thread Anand Jain
c:1316 [inline] btrfs_mount_root.cold+0x14/0x165 fs/btrfs/super.c:1672 The fix here is, when we determine that there isn't a replace item then fail the mount if there is a replace target device (devid 0). Reported-by: syzbot+4cfe71a4da060be47...@syzkaller.appspotmail.com Signed-off-by: Anan

[PATCH stable-5.4 4/6] btrfs: Ensure we trim ranges across block group boundary

2020-10-08 Thread Anand Jain
Reviewed-by: Filipe Manana Reviewed-by: Nikolay Borisov Tested-by: Nikolay Borisov Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Signed-off-by: David Sterba Signed-off-by: Anand Jain --- fs/btrfs/extent-tree.c | 41 +++-- fs/btrfs/volumes.c | 6 ++

[PATCH stable-5.4 0/6] backport fixes for xfstests btrfs/199,200,203,204

2020-10-08 Thread Anand Jain
This series backports fixes for the xfstests test cases btrfs/199 btrfs/200 btrfs/203 and btrfs/204. patch 1 is fix for btrfs/200 patch 2 fixes regression in patch 1 and is fix for btrfs/203 patch 3 helps to fix conflicts in patch 4 patch 4 is fix for btrfs/199 patch 5 helps to avoid conflicts

[PATCH stable-5.4 5/6] btrfs: fix RWF_NOWAIT write not failling when we need to cow

2020-10-08 Thread Anand Jain
k_can_nocow() returns a number of NOCOW'able bytes smaller then the requested number of bytes, and if it does return -EAGAIN. Fixes: edf064e7c6fec3 ("btrfs: nowait aio support") CC: sta...@vger.kernel.org # 4.14+ Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba

[PATCH stable-5.4 6/6] btrfs: allow btrfs_truncate_block() to fallback to nocow for data space reservation

2020-10-08 Thread Anand Jain
ization introduced in btrfs_buffered_write(), to avoid expensive btrfs_check_can_nocow() call. This patch will export check_can_nocow() as btrfs_check_can_nocow(), and use it in btrfs_truncate_block() to fix the problem. Reported-by: Martin Doucha Reviewed-by: Filipe Manana Reviewed-by: Anand Jai

[PATCH stable-5.4 2/6] Btrfs: send, fix emission of invalid clone operations within the same file

2020-10-08 Thread Anand Jain
ows soon. Fixes: 11f2069c113e02 ("Btrfs: send, allow clone operations within the same file") CC: sta...@vger.kernel.org # 5.5+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba Signed-off-by: Anand Jain --- fs/btrfs/send.c | 3 ++- 1 file changed, 2 in

[PATCH stable-5.4 3/6] btrfs: volumes: Use more straightforward way to calculate map length

2020-10-08 Thread Anand Jain
iewed-by: Josef Bacik Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba Signed-off-by: Anand Jain --- fs/btrfs/volumes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 196ddbcd2936..1dba45d43485 100644

[PATCH stable-5.4 1/6] Btrfs: send, allow clone operations within the same file

2020-10-08 Thread Anand Jain
f Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba Signed-off-by: Anand Jain --- fs/btrfs/send.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index 6ad216e8178e..48d028b1cfaf 1006

[PATCH stable-4.14.y] Btrfs: fix unexpected failure of nocow buffered writes after snapshotting when low on space

2020-10-08 Thread Anand Jain
off-by: David Sterba Signed-off-by: Anand Jain Conflicts: fs/btrfs/disk-io.c --- fs/btrfs/ctree.h | 1 + fs/btrfs/disk-io.c | 1 + fs/btrfs/inode.c | 25 - fs/btrfs/ioctl.c | 16 4 files changed, 22 insertions(+), 21 deletions(-) diff --gi

Re: WARNING in close_fs_devices (2)

2020-09-22 Thread Anand Jain
On 18/9/20 7:22 pm, syzbot wrote: Hello, syzbot found the following issue on: HEAD commit:e4c26faa Merge tag 'usb-5.9-rc5' of git://git.kernel.org/p.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=15bf162190 kernel config:

Re: WARNING in close_fs_devices (2)

2020-09-21 Thread Anand Jain
On 21/9/20 6:42 am, syzbot wrote: syzbot has found a reproducer for the following issue on: HEAD commit:b652d2a5 Add linux-next specific files for 20200918 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=17e84b0790 kernel config:

Re: [PATCH -next] btrfs: Make btrfs_sysfs_add_fs_devices static

2020-09-16 Thread Anand Jain
On 16/9/20 10:26 pm, YueHaibing wrote: Fix sparse warning: fs/btrfs/sysfs.c:1386:5: warning: symbol 'btrfs_sysfs_add_fs_devices' was not declared. Should it be static? misc-next branch has it declared static. It was fixed later. Thanks, Anand Signed-off-by: YueHaibing ---

Re: [PATCH -next] btrfs: Remove unused function calc_global_rsv_need_space()

2020-09-09 Thread Anand Jain
On 9/9/20 9:51 pm, YueHaibing wrote: It is not used since commit 0096420adb03 ("btrfs: do not account global reserve in can_overcommit") Signed-off-by: YueHaibing Reviewed-by: Anand Jain Thanks, Anand

Re: [PATCH -next] btrfs: remove set but not used variable 'offset'

2019-07-02 Thread Anand Jain
btrfs: Use btrfs_get_io_geometry appropriately") Reported-by: Hulk Robot Signed-off-by: YueHaibing Reviewed-by: Anand Jain --- fs/btrfs/volumes.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index d1fd910..5d5a9ff 100644 --- a/fs/btrfs

Re: [PATCH 3.16 315/410] btrfs: use proper endianness accessors for super_copy

2018-06-07 Thread Anand Jain
objections, please let me know. -- From: Anand Jain commit 3c181c12c431fe33b669410d663beb9cceefcd1b upstream. The fs_info::super_copy is a byte copy of the on-disk structure and all members must use the accessor macros/functions to obtain the right value. This was missing

Re: [PATCH 3.16 315/410] btrfs: use proper endianness accessors for super_copy

2018-06-07 Thread Anand Jain
objections, please let me know. -- From: Anand Jain commit 3c181c12c431fe33b669410d663beb9cceefcd1b upstream. The fs_info::super_copy is a byte copy of the on-disk structure and all members must use the accessor macros/functions to obtain the right value. This was missing

Re: [btrfs_put_block_group] WARNING: CPU: 1 PID: 14674 at fs/btrfs/disk-io.c:3675 free_fs_root+0xc2/0xd0 [btrfs]

2018-05-03 Thread Anand Jain
On 04/19/2018 03:25 PM, Nikolay Borisov wrote: On 19.04.2018 08:32, Fengguang Wu wrote: Hello, FYI this happens in mainline kernel and at least dates back to v4.16 . It's rather rare error and happens when running xfstests. Yeah, so this is something which only recently was

Re: [btrfs_put_block_group] WARNING: CPU: 1 PID: 14674 at fs/btrfs/disk-io.c:3675 free_fs_root+0xc2/0xd0 [btrfs]

2018-05-03 Thread Anand Jain
On 04/19/2018 03:25 PM, Nikolay Borisov wrote: On 19.04.2018 08:32, Fengguang Wu wrote: Hello, FYI this happens in mainline kernel and at least dates back to v4.16 . It's rather rare error and happens when running xfstests. Yeah, so this is something which only recently was

Re: [PATCH 4.14 024/110] btrfs: use proper endianness accessors for super_copy

2018-03-20 Thread Anand Jain
On 03/20/2018 03:32 AM, David Sterba wrote: On Sat, Mar 17, 2018 at 06:27:15PM +0100, Christoph Biedl wrote: Greg Kroah-Hartman wrote... On Thu, Mar 15, 2018 at 07:55:42PM +0100, Christoph Biedl wrote: commit 3c181c12c431fe33b669410d663beb9cceefcd1b upstream. On big-endian systems,

Re: [PATCH 4.14 024/110] btrfs: use proper endianness accessors for super_copy

2018-03-20 Thread Anand Jain
On 03/20/2018 03:32 AM, David Sterba wrote: On Sat, Mar 17, 2018 at 06:27:15PM +0100, Christoph Biedl wrote: Greg Kroah-Hartman wrote... On Thu, Mar 15, 2018 at 07:55:42PM +0100, Christoph Biedl wrote: commit 3c181c12c431fe33b669410d663beb9cceefcd1b upstream. On big-endian systems,

Re: [PATCH 4.14 024/110] btrfs: use proper endianness accessors for super_copy

2018-03-16 Thread Anand Jain
On 03/16/2018 10:02 PM, Greg Kroah-Hartman wrote: On Fri, Mar 16, 2018 at 02:22:02PM +0100, David Sterba wrote: On Fri, Mar 16, 2018 at 01:30:49PM +0100, Greg Kroah-Hartman wrote: On Thu, Mar 15, 2018 at 07:55:42PM +0100, Christoph Biedl wrote: Greg Kroah-Hartman wrote... 4.14-stable

Re: [PATCH 4.14 024/110] btrfs: use proper endianness accessors for super_copy

2018-03-16 Thread Anand Jain
On 03/16/2018 10:02 PM, Greg Kroah-Hartman wrote: On Fri, Mar 16, 2018 at 02:22:02PM +0100, David Sterba wrote: On Fri, Mar 16, 2018 at 01:30:49PM +0100, Greg Kroah-Hartman wrote: On Thu, Mar 15, 2018 at 07:55:42PM +0100, Christoph Biedl wrote: Greg Kroah-Hartman wrote... 4.14-stable

Re: [PATCH 4.14 024/110] btrfs: use proper endianness accessors for super_copy

2018-03-16 Thread Anand Jain
On 03/16/2018 02:55 AM, Christoph Biedl wrote: Greg Kroah-Hartman wrote... 4.14-stable review patch. If anyone has any objections, please let me know. commit 3c181c12c431fe33b669410d663beb9cceefcd1b upstream. (...) If the filesystem is always used on a same endian host, this will not

Re: [PATCH 4.14 024/110] btrfs: use proper endianness accessors for super_copy

2018-03-16 Thread Anand Jain
On 03/16/2018 02:55 AM, Christoph Biedl wrote: Greg Kroah-Hartman wrote... 4.14-stable review patch. If anyone has any objections, please let me know. commit 3c181c12c431fe33b669410d663beb9cceefcd1b upstream. (...) If the filesystem is always used on a same endian host, this will not

Re: [PATCH] f2fs: support multiple devices

2016-11-10 Thread Anand Jain
(this is deviating from the subject, sorry about that) Pretty much, if you're using just raid1 mode, without compression, on reasonable storage devices, things are rock-solid relative to the rest of BTRFS. IMO, BTRFS volume manger feature is incomplete and there is RAID1 critical bug which

Re: [PATCH] f2fs: support multiple devices

2016-11-10 Thread Anand Jain
(this is deviating from the subject, sorry about that) Pretty much, if you're using just raid1 mode, without compression, on reasonable storage devices, things are rock-solid relative to the rest of BTRFS. IMO, BTRFS volume manger feature is incomplete and there is RAID1 critical bug which

Re: [lkp] [btrfs] 164a91c9be: xfstests.generic.088.fail

2016-06-21 Thread Anand Jain
Thanks for the report. > _check_btrfs_filesystem: filesystem on /dev/sda5 is inconsistent (see /lkp/benchmarks/xfstests/results//check.full) > generic/088 0s Ran tests again unfortunately I couldn't reproduce.. - generic/088 0s ... 0s generic/089 21s ... 39s generic/090 4s

Re: [lkp] [btrfs] 164a91c9be: xfstests.generic.088.fail

2016-06-21 Thread Anand Jain
Thanks for the report. > _check_btrfs_filesystem: filesystem on /dev/sda5 is inconsistent (see /lkp/benchmarks/xfstests/results//check.full) > generic/088 0s Ran tests again unfortunately I couldn't reproduce.. - generic/088 0s ... 0s generic/089 21s ... 39s generic/090 4s

Re: [PATCH 1/1] Btrfs: Code Cleanup

2016-03-21 Thread Anand Jain
Hi Flex, diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 366b335..5c16f04 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -2325,7 +2325,10 @@ int btrfs_init_new_device(struct btrfs_root *root, char *device_path) if (seeding_dev) { sb->s_flags

Re: [PATCH 1/1] Btrfs: Code Cleanup

2016-03-21 Thread Anand Jain
Hi Flex, diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 366b335..5c16f04 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -2325,7 +2325,10 @@ int btrfs_init_new_device(struct btrfs_root *root, char *device_path) if (seeding_dev) { sb->s_flags