Thread (101 messages) 101 messages, 11 authors, 2022-11-11

Re: [PATCH 10/17] btrfs: remove stripe boundary calculation for compressed I/O

From: Christoph Hellwig <hch@lst.de>
Date: 2022-09-05 06:49:35
Also in: linux-btrfs, linux-fsdevel

On Thu, Sep 01, 2022 at 09:56:05AM +0000, Johannes Thumshirn wrote:
On 01.09.22 09:43, Christoph Hellwig wrote:
quoted
+	if (bio_op(bio) == REQ_OP_ZONE_APPEND) {
+		struct btrfs_fs_info *fs_info = btrfs_sb(cb->inode->i_sb);
+		struct extent_map *em;
 
-	if (bio_op(bio) == REQ_OP_ZONE_APPEND)
-		bio_set_dev(bio, em->map_lookup->stripes[0].dev->bdev);
+		em = btrfs_get_chunk_map(fs_info, disk_bytenr,
+					 fs_info->sectorsize);
+		if (IS_ERR(em)) {
+			bio_put(bio);
+			return ERR_CAST(em);
+		}
Please use btrfs_get_zoned_device() instead of open coding it.
I though of that, decided againt doing this in this patch as an
unrelated patch and moved it to a separate cleanup.  And then
I noticed that btrfs_get_zoned_device goes away later in the series
entirely, so I dropped that patch again..
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help