[PATCH v2 2/2] btrfs: refactor btrfs_dec_test_* functions for ordered extents

2020-12-21 Thread Qu Wenruo
The refactors involves the following modifications: - Return bool instead of int - Parameter update for @cached of btrfs_dec_test_first_ordered_pending() For btrfs_dec_test_first_ordered_pending(), @cached is only used to return the finished ordered extent. Rename it to @finished_ret. - Com

[PATCH v2 1/2] btrfs: make btrfs_dio_private::bytes to be u32

2020-12-21 Thread Qu Wenruo
btrfs_dio_private::bytes is only assigned from bio::bi_iter::bi_size, which is no larger than U32. Signed-off-by: Qu Wenruo --- fs/btrfs/btrfs_inode.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h index d9bf53d9ff90..fbd65807f

[PATCH v2 0/2] btrfs: btrfs_dec_test_*_ordered_extent() refactor

2020-12-21 Thread Qu Wenruo
This small patchset is btrfs_dec_test_*_ordered_extent() refactor during subpage RW support development. This is mostly to make btrfs_dev_test_* functions more human readable and prepare it for calling btrfs_dec_test_first_ordered_extent() in btrfs_writepage_endio_finish_ordered() where we can hav

Re: [PATCH 0/2] btrfs: btrfs_dec_test_*_ordered_extent() refactor

2020-12-21 Thread Qu Wenruo
On 2020/12/19 上午8:26, Qu Wenruo wrote: On 2020/12/18 下午11:57, David Sterba wrote: On Fri, Dec 18, 2020 at 01:16:59PM +0800, Qu Wenruo wrote: This small patchset is btrfs_dec_test_*_ordered_extent() refactor during subpage RW support development. This is mostly to make btrfs_dev_test_* fun

Re: [PATCH RFC 4/4] btrfs: inode: make btrfs_invalidatepage() to be subpage compatible

2020-12-21 Thread Qu Wenruo
On 2020/12/17 下午7:20, Filipe Manana wrote: On Thu, Dec 17, 2020 at 5:03 AM Qu Wenruo wrote: [BUG] With current subpage RW patchset, the following script can lead to filesystem hang: # mkfs.btrfs -f -s 4k $dev # mount $dev -o nospace_cache $mnt # fsstress -w -n 100 -p 1 -s 160814025

[PATCH v11 40/40] btrfs: reorder log node allocation

2020-12-21 Thread Naohiro Aota
This is the 3/3 patch to enable tree-log on ZONED mode. The allocation order of nodes of "fs_info->log_root_tree" and nodes of "root->log_root" is not the same as the writing order of them. So, the writing causes unaligned write errors. This patch reorders the allocation of them by delaying alloc

[PATCH v11 38/40] btrfs: extend zoned allocator to use dedicated tree-log block group

2020-12-21 Thread Naohiro Aota
This is the 1/3 patch to enable tree log on ZONED mode. The tree-log feature does not work on ZONED mode as is. Blocks for a tree-log tree are allocated mixed with other metadata blocks, and btrfs writes and syncs the tree-log blocks to devices at the time of fsync(), which is different timing fro

[PATCH v11 39/40] btrfs: serialize log transaction on ZONED mode

2020-12-21 Thread Naohiro Aota
This is the 2/3 patch to enable tree-log on ZONED mode. Since we can start more than one log transactions per subvolume simultaneously, nodes from multiple transactions can be allocated interleaved. Such mixed allocation results in non-sequential writes at the time of log transaction commit. The n

[PATCH v11 23/40] btrfs: extend btrfs_rmap_block for specifying a device

2020-12-21 Thread Naohiro Aota
btrfs_rmap_block currently reverse-maps the physical addresses on all devices to the corresponding logical addresses. This commit extends the function to match to a specified device. The old functionality of querying all devices is left intact by specifying NULL as target device. We pass block_de

[PATCH v11 35/40] btrfs: enable relocation in ZONED mode

2020-12-21 Thread Naohiro Aota
To serialize allocation and submit_bio, we introduced mutex around them. As a result, preallocation must be completely disabled to avoid a deadlock. Since current relocation process relies on preallocation to move file data extents, it must be handled in another way. In ZONED mode, we just truncat

[PATCH v11 36/40] btrfs: relocate block group to repair IO failure in ZONED

2020-12-21 Thread Naohiro Aota
When btrfs find a checksum error and if the file system has a mirror of the damaged data, btrfs read the correct data from the mirror and write the data to damaged blocks. This repairing, however, is against the sequential write required rule. We can consider three methods to repair an IO failure

[PATCH v11 37/40] btrfs: split alloc_log_tree()

2020-12-21 Thread Naohiro Aota
This is a preparation for the next patch. This commit split alloc_log_tree() to allocating tree structure part (remains in alloc_log_tree()) and allocating tree node part (moved in btrfs_alloc_log_tree_node()). The latter part is also exported to be used in the next patch. Signed-off-by: Johannes

[PATCH v11 33/40] btrfs: implement copying for ZONED device-replace

2020-12-21 Thread Naohiro Aota
This is 3/4 patch to implement device-replace on ZONED mode. This commit implement copying. So, it track the write pointer during device replace process. Device-replace's copying is smart to copy only used extents on source device, we have to fill the gap to honor the sequential write rule in the

[PATCH v11 34/40] btrfs: support dev-replace in ZONED mode

2020-12-21 Thread Naohiro Aota
This is 4/4 patch to implement device-replace on ZONED mode. Even after the copying is done, the write pointers of the source device and the destination device may not be synchronized. For example, when the last allocated extent is freed before device-replace process, the extent is not copied, lea

[PATCH v11 32/40] btrfs: implement cloning for ZONED device-replace

2020-12-21 Thread Naohiro Aota
This is 2/4 patch to implement device-replace for ZONED mode. On zoned mode, a block group must be either copied (from the source device to the destination device) or cloned (to the both device). This commit implements the cloning part. If a block group targeted by an IO is marked to copy, we sho

[PATCH v11 28/40] btrfs: serialize meta IOs on ZONED mode

2020-12-21 Thread Naohiro Aota
We cannot use zone append for writing metadata, because the B-tree nodes have references to each other using the logical address. Without knowing the address in advance, we cannot construct the tree in the first place. So we need to serialize write IOs for metadata. We cannot add a mutex around al

[PATCH v11 29/40] btrfs: wait existing extents before truncating

2020-12-21 Thread Naohiro Aota
When truncating a file, file buffers which have already been allocated but not yet written may be truncated. Truncating these buffers could cause breakage of a sequential write pattern in a block group if the truncated blocks are for example followed by blocks allocated to another file. To avoid t

[PATCH v11 31/40] btrfs: mark block groups to copy for device-replace

2020-12-21 Thread Naohiro Aota
This is the 1/4 patch to support device-replace in ZONED mode. We have two types of I/Os during the device-replace process. One is an I/O to "copy" (by the scrub functions) all the device extents on the source device to the destination device. The other one is an I/O to "clone" (by handle_ops_on_

[PATCH v11 30/40] btrfs: avoid async metadata checksum on ZONED mode

2020-12-21 Thread Naohiro Aota
In ZONED, btrfs uses per-FS zoned_meta_io_lock to serialize the metadata write IOs. Even with these serialization, write bios sent from btree_write_cache_pages can be reordered by async checksum workers as these workers are per CPU and not per zone. To preserve write BIO ordering, we can disable

[PATCH v11 27/40] btrfs: introduce dedicated data write path for ZONED mode

2020-12-21 Thread Naohiro Aota
If more than one IO is issued for one file extent, these IO can be written to separate regions on a device. Since we cannot map one file extent to such a separate area, we need to follow the "one IO == one ordered extent" rule. The Normal buffered, uncompressed, not pre-allocated write path (used

[PATCH v11 26/40] btrfs: enable zone append writing for direct IO

2020-12-21 Thread Naohiro Aota
Likewise to buffered IO, enable zone append writing for direct IO when its used on a zoned block device. Reviewed-by: Josef Bacik Signed-off-by: Naohiro Aota --- fs/btrfs/inode.c | 17 + 1 file changed, 17 insertions(+) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 0ca

[PATCH v11 25/40] btrfs: use ZONE_APPEND write for ZONED btrfs

2020-12-21 Thread Naohiro Aota
This commit enables zone append writing for zoned btrfs. When using zone append, a bio is issued to the start of a target zone and the device decides to place it inside the zone. Upon completion the device reports the actual written position back to the host. Three parts are necessary to enable zo

[PATCH v11 22/40] btrfs: split ordered extent when bio is sent

2020-12-21 Thread Naohiro Aota
For a zone append write, the device decides the location the data is written to. Therefore we cannot ensure that two bios are written consecutively on the device. In order to ensure that a ordered extent maps to a contiguous region on disk, we need to maintain a "one bio == one ordered extent" rule

[PATCH v11 24/40] btrfs: cache if block-group is on a sequential zone

2020-12-21 Thread Naohiro Aota
From: Johannes Thumshirn In zoned mode, cache if a block-group is on a sequential write only zone. On sequential write only zones, we can use REQ_OP_ZONE_APPEND for writing of data, therefore provide btrfs_use_zone_append() to figure out if I/O is targeting a sequential write only zone and we can

[PATCH v11 21/40] btrfs: handle REQ_OP_ZONE_APPEND as writing

2020-12-21 Thread Naohiro Aota
ZONED btrfs uses REQ_OP_ZONE_APPEND bios for writing to actual devices. Let btrfs_end_bio() and btrfs_op be aware of it. Reviewed-by: Josef Bacik Signed-off-by: Naohiro Aota --- fs/btrfs/disk-io.c | 4 ++-- fs/btrfs/inode.c | 10 +- fs/btrfs/volumes.c | 8 fs/btrfs/volumes.

[PATCH v11 17/40] btrfs: enable to mount ZONED incompat flag

2020-12-21 Thread Naohiro Aota
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 --- fs/btrfs/ctree.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/ctree.h b/f

[PATCH v11 20/40] btrfs: use bio_add_zone_append_page for zoned btrfs

2020-12-21 Thread Naohiro Aota
Zoned device has its own hardware restrictions e.g. max_zone_append_size when using REQ_OP_ZONE_APPEND. To follow the restrictions, use bio_add_zone_append_page() instead of bio_add_page(). We need target device to use bio_add_zone_append_page(), so this commit reads the chunk information to memoiz

[PATCH v11 18/40] btrfs: reset zones of unused block groups

2020-12-21 Thread Naohiro Aota
For an ZONED volume, a block group maps to a zone of the device. For deleted unused block groups, the zone of the block group can be reset to rewind the zone write pointer at the start of the zone. Signed-off-by: Naohiro Aota --- fs/btrfs/block-group.c | 8 ++-- fs/btrfs/extent-tree.c | 17

[PATCH v11 19/40] btrfs: extract page adding function

2020-12-21 Thread Naohiro Aota
This commit extract page adding to bio part from submit_extent_page(). The page is added only when bio_flags are the same, contiguous and the added page fits in the same stripe as pages in the bio. Condition checkings are reordered to allow early return to avoid possibly heavy btrfs_bio_fits_in_st

[PATCH v11 16/40] btrfs: advance allocation pointer after tree log node

2020-12-21 Thread Naohiro Aota
Since the allocation info of tree log node is not recorded to the extent tree, calculate_alloc_pointer() cannot detect the node, so the pointer can be over a tree node. Replaying the log call btrfs_remove_free_space() for each node in the log tree. So, advance the pointer after the node. Signed-o

[PATCH v11 14/40] btrfs: do sequential extent allocation in ZONED mode

2020-12-21 Thread Naohiro Aota
This commit implements a sequential extent allocator for the ZONED mode. This allocator just needs to check if there is enough space in the block group. Therefor the allocator never manages bitmaps or clusters. Also add ASSERTs to the corresponding functions. Actually, with zone append writing, it

[PATCH v11 13/40] btrfs: track unusable bytes for zones

2020-12-21 Thread Naohiro Aota
In zoned btrfs a region that was once written then freed is not usable until we reset the underlying zone. So we need to distinguish such unusable space from usable free space. Therefore we need to introduce the "zone_unusable" field to the block group structure, and "bytes_zone_unusable" to the

[PATCH v11 15/40] btrfs: redirty released extent buffers in ZONED mode

2020-12-21 Thread Naohiro Aota
Tree manipulating operations like merging nodes often release once-allocated tree nodes. Btrfs cleans such nodes so that pages in the node are not uselessly written out. On ZONED volumes, however, such optimization blocks the following IOs as the cancellation of the write out of the freed blocks br

[PATCH v11 10/40] btrfs: verify device extent is aligned to zone

2020-12-21 Thread Naohiro Aota
Add a check in verify_one_dev_extent() to check if a device extent on a zoned block device is aligned to the respective zone boundary. Signed-off-by: Naohiro Aota Reviewed-by: Anand Jain Reviewed-by: Josef Bacik --- fs/btrfs/volumes.c | 14 ++ 1 file changed, 14 insertions(+) diff

[PATCH v11 11/40] btrfs: load zone's allocation offset

2020-12-21 Thread Naohiro Aota
Zoned btrfs must allocate blocks at the zones' write pointer. The device's write pointer position can be mapped to a logical address within a block group. This commit adds "alloc_offset" to track the logical address. This logical address is populated in btrfs_load_block_group_zone_info() from writ

[PATCH v11 12/40] btrfs: calculate allocation offset for conventional zones

2020-12-21 Thread Naohiro Aota
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 can consider the end of the last allocated extent in the block group as an allocation offset. For new block group, we cannot calcul

[PATCH v11 08/40] btrfs: emulated zoned mode on non-zoned devices

2020-12-21 Thread Naohiro Aota
From: Johannes Thumshirn Emulate 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. This is mainly aimed at testing parts

[PATCH v11 09/40] btrfs: implement zoned chunk allocator

2020-12-21 Thread Naohiro Aota
This commit implements a zoned chunk/dev_extent allocator. The zoned allocator aligns the device extents to zone boundaries, so that a zone reset affects only the device extent and does not change the state of blocks in the neighbor device extents. Also, it checks that a region allocation is not o

[PATCH v11 07/40] btrfs: disallow fitrim in ZONED mode

2020-12-21 Thread Naohiro Aota
The implementation of fitrim is depending on space cache, which is not used and disabled for zoned btrfs' extent allocator. So the current code does not work with zoned btrfs. In the future, we can implement fitrim for zoned btrfs by enabling space cache (but, only for fitrim) or scanning the exten

[PATCH v11 06/40] btrfs: do not load fs_info->zoned from incompat flag

2020-12-21 Thread Naohiro Aota
From: Johannes Thumshirn Since fs_info->zoned is unioned with fs_info->zone_size, loading fs_info->zoned from the incompat flag screw up the zone_size. So, let's avoid to load it from the flag. It will be eventually set by btrfs_get_dev_zone_info_all_devices(). Signed-off-by: Johannes Thumshirn

[PATCH v11 05/40] btrfs: release path before calling into btrfs_load_block_group_zone_info

2020-12-21 Thread Naohiro Aota
From: Johannes Thumshirn Since we have no write pointer in conventional zones, we cannot determine allocation offset from it. Instead, we set the allocation offset after the highest addressed extent. This is done by reading the extent tree in btrfs_load_block_group_zone_info(). However, this func

[PATCH v11 03/40] btrfs: defer loading zone info after opening trees

2020-12-21 Thread Naohiro Aota
This is preparation patch to implement zone emulation on a regular device. To emulate zoned mode on a regular (non-zoned) device, we need to decide an emulating zone size. Instead of making it compile-time static value, we'll make it configurable at mkfs time. Since we have one zone == one device

[PATCH v11 04/40] btrfs: change superblock location on conventional zone

2020-12-21 Thread Naohiro Aota
We cannot use log-structured superblock writing in conventional zones since there is no write pointer to determine the last written superblock position. So, we write a superblock at a static location in a conventional zone. The written position is at the beginning of a zone, which is different fro

[PATCH v11 01/40] block: add bio_add_zone_append_page

2020-12-21 Thread Naohiro Aota
From: Johannes Thumshirn Add bio_add_zone_append_page(), a wrapper around bio_add_hw_page() which is intended to be used by file systems that directly add pages to a bio instead of using bio_iov_iter_get_pages(). Cc: Jens Axboe Signed-off-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig

[PATCH v11 02/40] iomap: support REQ_OP_ZONE_APPEND

2020-12-21 Thread Naohiro Aota
A ZONE_APPEND bio must follow hardware restrictions (e.g. not exceeding max_zone_append_sectors) not to be split. bio_iov_iter_get_pages builds such restricted bio using __bio_iov_append_get_pages if bio_op(bio) == REQ_OP_ZONE_APPEND. To utilize it, we need to set the bio_op before calling bio_iov

[PATCH v11 00/40] btrfs: zoned block device support

2020-12-21 Thread Naohiro Aota
This series adds zoned block device support to btrfs. Some of the patches in the previous series are already merged as preparation patches. This series is also available on github. Kernel https://github.com/naota/linux/tree/btrfs-zoned-v11 Userland https://github.com/naota/btrfs-progs/tree/btrfs

Re: AW: WG: How to properly setup for snapshots

2020-12-21 Thread Graham Cobb
On 21/12/2020 20:45, Claudius Ellsel wrote: > I had a closer look at snapper now and have installed and set it up. This > seems to be really the easiest way for me, I guess. My main confusion was > probably that I was unsure whether I had to create a subvolume prior to this > or not, which got s

Re: WG: How to properly setup for snapshots

2020-12-21 Thread Goffredo Baroncelli
On 12/21/20 9:27 PM, Remi Gauvin wrote: On 2020-12-21 3:14 p.m., Goffredo Baroncelli wrote: A subvolume can be moved everywhere with a simple 'mv' command. No, they can not,, try this again with a *read only* snapshot The topic was about why put the subvolumes/snapshots in another subvolu

AW: AW: WG: How to properly setup for snapshots

2020-12-21 Thread Claudius Ellsel
I seem to have forgotten to choose "reply all" for this one. So for the sake of completeness my reply again (I now know that there are read-only snapshots): That command will create a snapshot subvolume and just mount it at the specified directory, correct? I am not such a big fan of this, as th

AW: WG: How to properly setup for snapshots

2020-12-21 Thread Claudius Ellsel
I had a closer look at snapper now and have installed and set it up. This seems to be really the easiest way for me, I guess. My main confusion was probably that I was unsure whether I had to create a subvolume prior to this or not, which got sorted out now. The situation is apparently still not

Re: WG: How to properly setup for snapshots

2020-12-21 Thread Remi Gauvin
On 2020-12-21 3:14 p.m., Goffredo Baroncelli wrote: > A subvolume can be moved everywhere with a simple 'mv' command. > No, they can not,, try this again with a *read only* snapshot

Re: WG: How to properly setup for snapshots

2020-12-21 Thread Goffredo Baroncelli
On 12/21/20 7:26 PM, Andrei Borzenkov wrote: 21.12.2020 20:37, Roman Mamedov пишет: [...] Having dedicated subvolume containing snapshots makes it easy to switch your root between subvolumes (either for roll back or transactional updates or whatever) and retain access to snapshots by simply mou

Re: WG: How to properly setup for snapshots

2020-12-21 Thread Goffredo Baroncelli
On 12/21/20 7:14 PM, Remi Gauvin wrote: On 2020-12-21 12:37 p.m., Roman Mamedov wrote: As such there's no benefit in storing snapshots "inside" a subvolume. There's not much of the "inside". Might as well just create a regular directory for that -- and with less potential for confusion. Mayb

[BUG] 500-2000% performance regression w/ 5.10

2020-12-21 Thread René Rebe
Hey there, as a long time btrfs user I noticed some some things became very slow w/ Linux kernel 5.10. I found a very simple test case, namely extracting a huge tarball like: tar xf /usr/src/t2-clean/download/mirror/f/firefox-84.0.source.tar.zst Why my external, USB3 road-warrior SSD on a Ryze

Re: AW: WG: How to properly setup for snapshots

2020-12-21 Thread Andrei Borzenkov
21.12.2020 21:35, Claudius Ellsel пишет: > I was aware that snapshots are basically subvolumes. Currently I am looking > for an easy way to achieve what I want. I currently just want to be able to > create manual snapshots btrfs subvolume snapshot / /snapshot > and an easy way to restore stuff

AW: AW: WG: How to properly setup for snapshots

2020-12-21 Thread Claudius Ellsel
Nice, thanks for clarifying it, that is a first step towards clearing up my confusion 🙂 Von: Remi Gauvin Gesendet: Montag, 21. Dezember 2020 19:32 An: Claudius Ellsel Cc: linux-btrfs Betreff: Re: AW: WG: How to properly setup for snapshots   On 2020-12-21 1:04 p.m., Claudius Ellsel wrote: >

AW: WG: How to properly setup for snapshots

2020-12-21 Thread Claudius Ellsel
I was aware that snapshots are basically subvolumes. Currently I am looking for an easy way to achieve what I want. I currently just want to be able to create manual snapshots and an easy way to restore stuff on file level. For that (including the management of snapshots), snapper seems to be th

Re: AW: WG: How to properly setup for snapshots

2020-12-21 Thread Remi Gauvin
On 2020-12-21 1:04 p.m., Claudius Ellsel wrote: > > I still doubt that a bit, `sudo btrfs subvolume list /media/clel/NAS` (which > is where I mount the volume with an fstab entry based on the UUID) does not > output anything. Additionally I read (I guess on a reddit post) that in this > case o

Re: WG: How to properly setup for snapshots

2020-12-21 Thread Andrei Borzenkov
21.12.2020 20:37, Roman Mamedov пишет: > On Mon, 21 Dec 2020 12:05:37 -0500 > Remi Gauvin wrote: > >> I suggest making a new Read/Write subvolume to put your snapshots into >> >> btrfs subvolume create .my_snapshots >> btrfs subvolume snapshot -r /mnt_point /mnt_point/.my_snapshots/snapshot1 > >

Re: WG: How to properly setup for snapshots

2020-12-21 Thread Remi Gauvin
On 2020-12-21 12:37 p.m., Roman Mamedov wrote: > > As such there's no benefit in storing snapshots "inside" a subvolume. There's > not much of the "inside". Might as well just create a regular directory for > that -- and with less potential for confusion. Maybe I was complicating things for a ba

AW: WG: How to properly setup for snapshots

2020-12-21 Thread Claudius Ellsel
I have backups of the important data, but not for all data on that volume. Thus I wanted to make clear that I don't just want to copy paste stuff I find on the internet and motivate why I am asking here and want to have reliable sources. But thanks for the hint anyway, I also plan to have a bett

memory bit flip not detected by write time tree check

2020-12-21 Thread Chris Murphy
Hi, mount failure, WARNING at fs/btrfs/extent-tree.c:3060 __btrfs_free_extent.isra.0+0x5fd/0x8d0 https://bugzilla.redhat.com/show_bug.cgi?id=1905618#c9 In this bug, the user reports what looks like undetected memory bit flip corruption, that makes it to disk, and then is caught at mount time, res

Re: WG: How to properly setup for snapshots

2020-12-21 Thread Roman Mamedov
On Mon, 21 Dec 2020 12:05:37 -0500 Remi Gauvin wrote: > I suggest making a new Read/Write subvolume to put your snapshots into > > btrfs subvolume create .my_snapshots > btrfs subvolume snapshot -r /mnt_point /mnt_point/.my_snapshots/snapshot1 It sounds like this could plant a misconception rig

Re: WG: How to properly setup for snapshots

2020-12-21 Thread Remi Gauvin
On 2020-12-21 11:11 a.m., Claudius Ellsel wrote: > Unfortunately I am already at a somewhat production stage where I don't want to lose any data. > You should first and foremost make sure you have backups of everything. > > The problem might be that I currently don't have any subvolumes set up

Re: [PATCH] btrfs: Consolidate btrfs_previous_item ret val handling in btrfs_shrink_device

2020-12-21 Thread David Sterba
On Thu, Dec 17, 2020 at 03:21:16PM +0200, Nikolay Borisov wrote: > Instead of having 3 'if' to handle non-null return value consolidate > this in 1 'if (ret)'. That way the code is more obvious: > > - Always drop dlete_unused_bgs_mutex if ret is non null > - If ret is negative -> goto done > -

Re: [PATCH 02/13] btrfs: initialize test inodes location

2020-12-21 Thread David Sterba
On Fri, Dec 18, 2020 at 12:30:13PM +0200, Nikolay Borisov wrote: > > > On 16.12.20 г. 18:22 ч., Josef Bacik wrote: > > While testing other things I was noticing that sometimes my VM would > > fail to load the btrfs module because the self test failed like this > > > > BTRFS: selftest: fs/btrfs/t

WG: How to properly setup for snapshots

2020-12-21 Thread Claudius Ellsel
Next try (this time text only activated) after my second try was treated as spam (this time I at least got a delivery failed message stating so). The original message does not seem to have made it through, so here I try again. Von: Claudius Ellsel Gesendet: Donnerstag, 10. Dezember 2020 15:37 A

Fwd: "BTRFS critical: ... corrupt leaf" due to defective RAM

2020-12-21 Thread Nik.
Dear all, the forwarded mail below came back yesterday with the error "Diagnostic-Code: X-Postfix; TLS is required, but was not offered by host vger.kernel.org[23.128.96.18]". Is it really intended that your mail server does not offer TLS? Kind regards, Nik. -- 15.12.2020 18:40, Nik.: De

Re: Fwd: "BTRFS critical: ... corrupt leaf" due to defective RAM

2020-12-21 Thread Qu Wenruo
On 2020/12/21 下午6:08, Nik. wrote: Dear all, the forwarded mail below came back yesterday with the error "Diagnostic-Code: X-Postfix; TLS is required, but was not offered by host vger.kernel.org[23.128.96.18]". Is it really intended that your mail server does not offer TLS? Can't help on th

Re: [PATCH v2 06/18] btrfs: extent_io: make attach_extent_buffer_page() to handle subpage case

2020-12-21 Thread Qu Wenruo
On 2020/12/19 上午8:24, Qu Wenruo wrote: On 2020/12/18 下午11:41, Josef Bacik wrote: On 12/17/20 7:44 PM, Qu Wenruo wrote: On 2020/12/18 上午12:00, Josef Bacik wrote: On 12/10/20 1:38 AM, Qu Wenruo wrote: For subpage case, we need to allocate new memory for each metadata page. So we need to