[PATCH v13 13/42] btrfs: track unusable bytes for zones

2021-01-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 v13 07/42] btrfs: disallow fitrim in ZONED mode

2021-01-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 v13 14/42] btrfs: do sequential extent allocation in ZONED mode

2021-01-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 v13 39/42] btrfs: split alloc_log_tree()

2021-01-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. Reviewed-by: Josef Bacik

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

2021-01-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 v13 42/42] btrfs: reorder log node allocation

2021-01-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 v13 41/42] btrfs: serialize log transaction on ZONED mode

2021-01-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 v13 36/42] btrfs: support dev-replace in ZONED mode

2021-01-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 v13 33/42] btrfs: mark block groups to copy for device-replace

2021-01-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 v13 35/42] btrfs: implement copying for ZONED device-replace

2021-01-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 v13 37/42] btrfs: enable relocation in ZONED mode

2021-01-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 v13 38/42] btrfs: relocate block group to repair IO failure in ZONED

2021-01-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 v13 34/42] btrfs: implement cloning for ZONED device-replace

2021-01-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 v13 27/42] btrfs: use ZONE_APPEND write for ZONED btrfs

2021-01-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 v13 29/42] btrfs: introduce dedicated data write path for ZONED mode

2021-01-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 v13 30/42] btrfs: serialize meta IOs on ZONED mode

2021-01-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 v13 28/42] btrfs: enable zone append writing for direct IO

2021-01-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 | 18 ++ 1 file changed, 18 insertions(+) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index c6

[PATCH v13 31/42] btrfs: wait existing extents before truncating

2021-01-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 v13 32/42] btrfs: avoid async metadata checksum on ZONED mode

2021-01-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 v13 12/42] btrfs: calculate allocation offset for conventional zones

2021-01-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 v13 26/42] btrfs: save irq flags when looking up an ordered extent

2021-01-21 Thread Naohiro Aota
From: Johannes Thumshirn A following patch will add another caller of btrfs_lookup_ordered_extent() from a bio endio context. btrfs_lookup_ordered_extent() uses spin_lock_irq() which unconditionally disables interrupts. Change this to spin_lock_irqsave() so interrupts aren't disabled and re-enab

[PATCH v13 20/42] btrfs: use bio_add_zone_append_page for zoned btrfs

2021-01-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 v13 25/42] btrfs: cache if block-group is on a sequential zone

2021-01-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 v13 23/42] btrfs: check if bio spans across an ordered extent

2021-01-21 Thread Naohiro Aota
From: Johannes Thumshirn To ensure that an ordered extent maps to a contiguous region on disk, we need to maintain a "one bio == one ordered extent" rule. This commit ensures that constructing bio does not span across an ordered extent. Signed-off-by: Johannes Thumshirn Signed-off-by: Naohiro

[PATCH v13 22/42] btrfs: split ordered extent when bio is sent

2021-01-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 v13 24/42] btrfs: extend btrfs_rmap_block for specifying a device

2021-01-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 v13 18/42] btrfs: reset zones of unused block groups

2021-01-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. Reviewed-by: Josef Bacik Signed-off-by: Naohiro Aota --- fs/btrfs/block-group.c | 8 ++-- fs

[PATCH v13 15/42] btrfs: redirty released extent buffers in ZONED mode

2021-01-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 v13 21/42] btrfs: handle REQ_OP_ZONE_APPEND as writing

2021-01-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 v13 19/42] btrfs: extract page adding function

2021-01-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 v13 16/42] btrfs: advance allocation pointer after tree log node

2021-01-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. Reviewed

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

2021-01-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 v13 11/42] btrfs: load zone's allocation offset

2021-01-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 v13 10/42] btrfs: verify device extent is aligned to zone

2021-01-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 v13 09/42] btrfs: implement zoned chunk allocator

2021-01-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 v13 08/42] btrfs: allow zoned mode on non-zoned block devices

2021-01-21 Thread Naohiro Aota
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. This is mainly aimed at testing parts of t

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

2021-01-21 Thread Naohiro Aota
From: Johannes Thumshirn Don't set the zoned flag in fs_info when encountering the BTRFS_FEATURE_INCOMPAT_ZONED on mount. The zoned flag in fs_info is in a union together with the zone_size, so setting it too early will result in setting an incorrect zone_size as well. Once the correct zone_size

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

2021-01-21 Thread Naohiro Aota
From: Johannes Thumshirn Since we have no write pointer in conventional zones, we cannot determine the 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

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

2021-01-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-v13 Userland https://github.com/naota/btrfs-progs/tree/btrfs

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

2021-01-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 v13 01/42] block: add bio_add_zone_append_page

2021-01-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 Reviewed-by: Christoph Hellwig Reviewed-by: Josef Bacik Signed-of

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

2021-01-21 Thread Naohiro Aota
The zoned btrfs puts a superblock at the beginning of SB logging zones if the zone is conventional. This difference causes a chicken-and-egg problem for emulated zoned mode. Since the device is a regular (non-zoned) device, we cannot know if the btrfs is regular or emulated zoned while we read the

[PATCH v13 02/42] iomap: support REQ_OP_ZONE_APPEND

2021-01-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] btrfs: make Private2 lifespan more consistent

2021-01-21 Thread Qu Wenruo
Currently btrfs uses page Private2 bit to incidate if we have ordered extent for the page range. But the lifespan of it is not consistent, during regular writeback path, there are two locations to clear the same PagePrivate2: T - Page marked Dirty | + - Page marked Private2, t

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

2021-01-21 Thread Anand Jain
[Oops. A part of the cover letter is missing again. The cover-letter file has it all. I am not sure why it happened. Here below, I am just sending it by email]. v4: Add rb from Josef in patch 1 and 3. In patch 1/3, use fs_info instead of device->fs_devices->fs_info. Drop round-robin policy beca

Re: [PATCH] btrfs: fix lockdep warning due to seqcount_mutex_init() with wrong address

2021-01-21 Thread Su Yue
On Fri 22 Jan 2021 at 01:07, David Sterba wrote: Adding Davidlohr to CC as it's about reverting his patch. In d5c8238849e7 ("btrfs: convert data_seqcount to seqcount_mutex_t") the seqcount_mutex_t was added as an annotation for lockep so by revert we'd lose that again. On Thu, Jan 21, 20

Re: Access Beyond End of Device & Input/Output Errors

2021-01-21 Thread Qu Wenruo
On 2021/1/22 上午7:55, chainofflowers wrote: Hi Qu, it happened again. This time on my /home partition. I rebooted from an external disk and ran btrfs check without first going through btrfs scrub, and this is the output, no errors: -- [manjaro oc]# btrf

Re: Access Beyond End of Device & Input/Output Errors

2021-01-21 Thread chainofflowers
Hi Qu, it happened again. This time on my /home partition. I rebooted from an external disk and ran btrfs check without first going through btrfs scrub, and this is the output, no errors: -- [manjaro oc]# btrfs check /dev/mapper/OMO Opening filesystem to ch

Unexpected reflink/subvol snapshot behaviour

2021-01-21 Thread Dave Chinner
Hi btrfs-gurus, I'm running a simple reflink/snapshot/COW scalability test at the moment. It is just a loop that does "fio overwrite of 10,000 4kB random direct IOs in a 4GB file; snapshot" and I want to check a couple of things I'm seeing with btrfs. fio config file is appended to the email. Fir

Re: [RFC][PATCH V5] btrfs: preferred_metadata: preferred device for metadata

2021-01-21 Thread Zygo Blaxell
On Thu, Jan 21, 2021 at 07:16:05PM +0100, Goffredo Baroncelli wrote: > On 1/20/21 5:02 PM, Josef Bacik wrote: > > On 1/17/21 1:54 PM, Goffredo Baroncelli wrote: > > > > > > Hi all, > > > > > > This is an RFC; I wrote this patch because I find the idea interesting > > > even though it adds more co

Re: [RFC][PATCH V5] btrfs: preferred_metadata: preferred device for metadata

2021-01-21 Thread Martin Svec
Hi all, Dne 20.01.2021 v 0:12 Zygo Blaxell napsal(a): > With the 4 device types we can trivially specify this arrangement. > > The sorted device lists would be: > > Metadata sort order Data sort order > metadata only (3) data only (2) > metadata pr

Re: [RFC][PATCH V5] btrfs: preferred_metadata: preferred device for metadata

2021-01-21 Thread Goffredo Baroncelli
On 1/20/21 5:02 PM, Josef Bacik wrote: On 1/17/21 1:54 PM, Goffredo Baroncelli wrote: Hi all, This is an RFC; I wrote this patch because I find the idea interesting even though it adds more complication to the chunk allocator. The basic idea is to store the metadata chunk in the fasters disks

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

2021-01-21 Thread David Sterba
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-time experienced by the read IOs

Re: [PATCH] btrfs: fix lockdep warning due to seqcount_mutex_init() with wrong address

2021-01-21 Thread David Sterba
Adding Davidlohr to CC as it's about reverting his patch. In d5c8238849e7 ("btrfs: convert data_seqcount to seqcount_mutex_t") the seqcount_mutex_t was added as an annotation for lockep so by revert we'd lose that again. On Thu, Jan 21, 2021 at 07:39:10PM +0800, Su Yue wrote: > while running xfst

Re: [PATCH v2 13/14] lib/zstd: Convert constants to defines

2021-01-21 Thread David Sterba
On Wed, Jan 20, 2021 at 12:25:25PM +0200, Nikolay Borisov wrote: > Those constants are really used internally by zstd and including > linux/zstd.h into users results in the following warnings: > > In file included from fs/btrfs/zstd.c:19: > ./include/linux/zstd.h:798:21: warning: ‘ZSTD_skippableHe

Re: [PATCH] btrfs: rework the order of btrfs_ordered_extent::flags

2021-01-21 Thread David Sterba
On Thu, Jan 21, 2021 at 02:13:54PM +0800, Qu Wenruo wrote: > [BUG] > There is a long existing bug in the last parameter of > btrfs_add_ordered_extent(), in commit 771ed689d2cd ("Btrfs: Optimize > compressed writeback and reads") back to 2008. > > In that ancient commit btrfs_add_ordered_extent() e

Re: [PATCH] btrfs: remove redundant NULL check

2021-01-21 Thread David Sterba
On Thu, Jan 21, 2021 at 04:19:47PM +0800, Yang Li wrote: > Fix below warnings reported by coccicheck: > ./fs/btrfs/raid56.c:237:2-8: WARNING: NULL check before some freeing > functions is not needed. > > Reported-by: Abaci Robot > Signed-off-by: Yang Li Added to misc-next, thanks.

Re: [PATCH v2 03/14] btrfs: Fix function description format

2021-01-21 Thread David Sterba
On Wed, Jan 20, 2021 at 12:25:15PM +0200, Nikolay Borisov wrote: > This fixes following W=1 warnings: > > fs/btrfs/file-item.c:27: warning: Cannot understand * @inode: the inode we > want to update the disk_i_size for > on line 27 - I thought it was a doc line > fs/btrfs/file-item.c:65: warnin

Re: Btrfs progs release 5.10

2021-01-21 Thread David Sterba
On Mon, Jan 18, 2021 at 11:20:21PM +0100, David Sterba wrote: > Hi, > > btrfs-progs version 5.10 have been released. I got a report that static build is broken. It's caused by libmount that has some internal functions with the same name as is in progs (canonicalize_path, parse_size). I don't have

[PATCH] btrfs: fix lockdep warning due to seqcount_mutex_init() with wrong address

2021-01-21 Thread Su Yue
while running xfstests on 32 bits test box, many tests failed because of warnings in dmesg. One of those warnings(btrfs/003): [ 66.441305] [ cut here ] [ 66.441317] WARNING: CPU: 6 PID: 9251 at incl

Re: [PATCH] btrfs: rework the order of btrfs_ordered_extent::flags

2021-01-21 Thread Qu Wenruo
On 2021/1/21 下午6:32, Filipe Manana wrote: On Thu, Jan 21, 2021 at 6:27 AM Qu Wenruo wrote: [BUG] There is a long existing bug in the last parameter of btrfs_add_ordered_extent(), in commit 771ed689d2cd ("Btrfs: Optimize compressed writeback and reads") back to 2008. In that ancient commit

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 below f

Re: [PATCH] btrfs: rework the order of btrfs_ordered_extent::flags

2021-01-21 Thread Filipe Manana
On Thu, Jan 21, 2021 at 6:27 AM Qu Wenruo wrote: > > [BUG] > There is a long existing bug in the last parameter of > btrfs_add_ordered_extent(), in commit 771ed689d2cd ("Btrfs: Optimize > compressed writeback and reads") back to 2008. > > In that ancient commit btrfs_add_ordered_extent() expects t

Re: [PATCH] btrfs: remove redundant NULL check

2021-01-21 Thread Anand Jain
On 21/1/21 4:19 pm, Yang Li wrote: Fix below warnings reported by coccicheck: ./fs/btrfs/raid56.c:237:2-8: WARNING: NULL check before some freeing functions is not needed. Reported-by: Abaci Robot Signed-off-by: Yang Li --- fs/btrfs/raid56.c | 3 +-- 1 file changed, 1 insertion(+), 2 deleti

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 v2: C style fixe

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

2021-01-21 Thread Anand Jain
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-time experienced by the read IOs through the individual device. This patch obtains the historical read IO st

Re: [RFC PATCH 00/37] block: introduce bio_init_fields()

2021-01-21 Thread Chaitanya Kulkarni
On 1/20/21 7:01 PM, Julian Calaby wrote: > Hi Chaitanya, > > On Tue, Jan 19, 2021 at 5:01 PM Chaitanya Kulkarni > wrote: >> Hi, >> >> This is a *compile only RFC* which adds a generic helper to initialize >> the various fields of the bio that is repeated all the places in >> file-systems, block la

[PATCH] btrfs: remove redundant NULL check

2021-01-21 Thread Yang Li
Fix below warnings reported by coccicheck: ./fs/btrfs/raid56.c:237:2-8: WARNING: NULL check before some freeing functions is not needed. Reported-by: Abaci Robot Signed-off-by: Yang Li --- fs/btrfs/raid56.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/btrfs/raid56.c