Re: Unexpected reflink/subvol snapshot behaviour

2021-02-11 Thread Zygo Blaxell
On Tue, Feb 02, 2021 at 11:13:34AM +1100, Dave Chinner wrote: > On Fri, Jan 29, 2021 at 06:25:50PM -0500, Zygo Blaxell wrote: > > On Mon, Jan 25, 2021 at 09:36:55AM +1100, Dave Chinner wrote: > > > On Sat, Jan 23, 2021 at 04:42:33PM +0800, Qu Wenruo wrote: > > > > > > > > > > > > On 2021/1/22 上午6

Re: [PATCH 0/5] btrfs: support fsverity

2021-02-11 Thread Zygo Blaxell
On Thu, Feb 04, 2021 at 10:58:19PM -0800, Boris Burkov wrote: > On Thu, Feb 04, 2021 at 10:13:54PM -0800, Eric Biggers wrote: > > On Thu, Feb 04, 2021 at 03:21:36PM -0800, Boris Burkov wrote: > > > This patchset provides support for fsverity in btrfs. > > > > Very interested to see this! It gener

Re: [RFC][PATCH V6] btrfs: allocation_hint mode

2021-02-11 Thread Josef Bacik
On 2/11/21 1:47 PM, Goffredo Baroncelli wrote: On 2/10/21 5:04 PM, Josef Bacik wrote: On 2/1/21 4:28 PM, Goffredo Baroncelli wrote: Hi all, the previous V5 serie was called "btrfs: preferred_metadata: preferred device for metadata". A few general points up front, first I'd highly recommend

Re: [RFC][PATCH V6] btrfs: allocation_hint mode

2021-02-11 Thread Goffredo Baroncelli
On 2/10/21 5:04 PM, Josef Bacik wrote: On 2/1/21 4:28 PM, Goffredo Baroncelli wrote: Hi all, the previous V5 serie was called "btrfs: preferred_metadata: preferred device for metadata". A few general points up front, first I'd highly recommend reading our patch submission guidelines https

Re: [PATCH 2/5] btrfs: add flags to give an hint to the chunk allocator

2021-02-11 Thread Goffredo Baroncelli
On 2/10/21 5:09 PM, Josef Bacik wrote: On 2/1/21 4:28 PM, Goffredo Baroncelli wrote: From: Goffredo Baroncelli [...] + +/* btrfs chunk allocation hints */ +#define BTRFS_DEV_ALLOCATION_MASK_BIT_COUNT    3 +#define BTRFS_DEV_ALLOCATION_MASK ((1ULL << \ +    BTRFS_DEV_ALLOCATION_MASK_BIT_CO

Re: [PATCH 4/5] btrfs: add allocation_hint option.

2021-02-11 Thread Goffredo Baroncelli
On 2/10/21 5:14 PM, Josef Bacik wrote: On 2/1/21 4:28 PM, Goffredo Baroncelli wrote: From: Goffredo Baroncelli Add allocation_hint mount option. This option accepts the following values: - 0 (default):  the chunks allocator ignores the disk hints - 1:    the chunks allocator considers

Re: [PATCH 5/5] btrfs: add allocator_hint mode

2021-02-11 Thread Goffredo Baroncelli
On 2/10/21 5:12 PM, Josef Bacik wrote: On 2/1/21 4:28 PM, Goffredo Baroncelli wrote: From: Goffredo Baroncelli [...] +    int hint; + +    static const char alloc_hint_map[BTRFS_DEV_ALLOCATION_MASK_COUNT] = { +    [BTRFS_DEV_ALLOCATION_DATA_ONLY] = -1, +    [BTRFS_DEV_ALLOCATION_PREFE

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

2021-02-11 Thread Goffredo Baroncelli
On 2/10/21 5:08 PM, Josef Bacik wrote: On 2/1/21 4:28 PM, 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. For now only the "type" field is returned / set. Signed-off-by: Goffredo

[PATCH] btrfs: add test for cases when a dio write has to fallback to a buffered write

2021-02-11 Thread fdmanana
From: Filipe Manana Test cases where a direct IO write, with O_DSYNC, can not be done and has to fallback to a buffered write. This is motivated by a regression that was introduced in kernel 5.10 by commit 0eb79294dbe328 ("btrfs: dio iomap DSYNC workaround")) and was fixed in kernel 5.11 by comm

[PATCH 5.10.x] btrfs: fix crash after non-aligned direct IO write with O_DSYNC

2021-02-11 Thread fdmanana
From: Filipe Manana Whenever we attempt to do a non-aligned direct IO write with O_DSYNC, we end up triggering an assertion and crashing. Example reproducer: $ cat test.sh #!/bin/bash DEV=/dev/sdj MNT=/mnt/sdj mkfs.btrfs -f $DEV > /dev/null mount $DEV $MNT # Do a direct IO write

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

2021-02-11 Thread Michal Rostecki
On Wed, Feb 10, 2021 at 04:20:20PM +0800, Anand Jain wrote: > On 10/02/2021 04:30, Michal Rostecki wrote: > > The penalty value is an additional value added to the number of inflight > > requests when a scheduled request is non-local (which means it would > > start from the different physical locat

Re: [PATCH v15 00/42] btrfs: zoned block device support

2021-02-11 Thread David Sterba
On Thu, Feb 11, 2021 at 03:26:04PM +, Johannes Thumshirn wrote: > On 11/02/2021 16:21, David Sterba wrote: > > On Thu, Feb 11, 2021 at 09:58:09AM +, Johannes Thumshirn wrote: > >> On 10/02/2021 21:02, David Sterba wrote: > This series implements superblock log writing. It uses two zone

Re: [PATCH v15 00/42] btrfs: zoned block device support

2021-02-11 Thread Johannes Thumshirn
On 11/02/2021 16:21, David Sterba wrote: > On Thu, Feb 11, 2021 at 09:58:09AM +, Johannes Thumshirn wrote: >> On 10/02/2021 21:02, David Sterba wrote: This series implements superblock log writing. It uses two zones as a circular buffer to write updated superblocks. Once the first zon

Re: [PATCH v15 00/42] btrfs: zoned block device support

2021-02-11 Thread David Sterba
On Thu, Feb 11, 2021 at 09:58:09AM +, Johannes Thumshirn wrote: > On 10/02/2021 21:02, David Sterba wrote: > >> This series implements superblock log writing. It uses two zones as a > >> circular buffer to write updated superblocks. Once the first zone is filled > >> up, start writing into the

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

2021-02-11 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn

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

2021-02-11 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn

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

2021-02-11 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn

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

2021-02-11 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn

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

2021-02-11 Thread Michal Rostecki
On Thu, Feb 11, 2021 at 03:27:38AM +0100, Michał Mirosław wrote: > On Wed, Feb 10, 2021 at 07:23:04PM +, Michal Rostecki wrote: > > On Wed, Feb 10, 2021 at 01:58:15PM +0100, Michał Mirosław wrote: > > > On Wed, Feb 10, 2021 at 12:29:25PM +, Michal Rostecki wrote: > > > > On Wed, Feb 10, 202

Re: [PATCH] btrfs: avoid double put of block group when emptying cluster

2021-02-11 Thread Nikolay Borisov
On 11.02.21 г. 0:50 ч., David Sterba wrote: > On Tue, Jan 26, 2021 at 09:30:45AM -0500, Josef Bacik wrote: >> On 1/26/21 4:02 AM, Nikolay Borisov wrote: >>> On 25.01.21 г. 23:42 ч., Josef Bacik wrote: In __btrfs_return_cluster_to_free_space we will bail doing the cleanup of the cluster

Re: [PATCH v15 00/42] btrfs: zoned block device support

2021-02-11 Thread Johannes Thumshirn
On 10/02/2021 21:02, David Sterba wrote: >> This series implements superblock log writing. It uses two zones as a >> circular buffer to write updated superblocks. Once the first zone is filled >> up, start writing into the second zone. The first zone will be reset once >> both zones are filled. We

Re: is BTRFS_IOC_DEFRAG behavior optimal?

2021-02-11 Thread Chris Murphy
On Wed, Feb 10, 2021 at 11:12 PM Zygo Blaxell wrote: > > If we want the data compressed (and who doesn't? journal data compresses > 8:1 with btrfs zstd) then we'll always need to make a copy at close. > Because systemd used prealloc, the copy is necessarily to a new inode, > as there's no way t

[PATCH] btrfs: initialize btrfs_fs_info::csum_size earlier in open_ctree()

2021-02-11 Thread Su Yue
User reported that btrfs-progs misc-tests/028-superblock-recover fails: [TEST/misc] 028-superblock-recover unexpected success: mounted fs with corrupted superblock test failed for case 028-superblock-recover The test case expects that a broken image with bad superblock will be rejected to be

[PATCH] btrfs: ordered-extent: fix comment for btrfs ordered extent flag bits

2021-02-11 Thread Qu Wenruo
There is small error in comment about BTRFS_ORDERED_* flags. The 4 types are for ordered extent itself, not for direct io. Only 3 types support direct io, REGULAR/NOCOW/PREALLOC. Fix the comment to reflect that. Signed-off-by: Qu Wenruo --- fs/btrfs/ordered-data.h | 4 ++-- 1 file changed, 2 i