Thread (19 messages) 19 messages, 5 authors, 2021-06-10

Re: [PATCH v2 2/3] btrfs: zoned: fix compressed writes

From: Johannes Thumshirn <hidden>
Date: 2021-05-25 06:31:08

On 24/05/2021 15:05, Qu Wenruo wrote:
quoted hunk ↗ jump to hunk
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index 831e6ae92940..26e2dceda1fc 100644
--- a/fs/btrfs/compression.c
+++ b/fs/btrfs/compression.c
@@ -455,10 +455,13 @@ blk_status_t btrfs_submit_compressed_write(struct
btrfs_inode *inode, u64 start,
                         submit = btrfs_bio_fits_in_stripe(page,
PAGE_SIZE, bio,
                                                           0);

-               if (pg_index == 0 && use_append)
-                       len = bio_add_zone_append_page(bio, page,
PAGE_SIZE, 0);
-               else
-                       len = bio_add_page(bio, page, PAGE_SIZE, 0);
+               if (!submit) {
+                       if (pg_index == 0 && use_append)
+                               len = bio_add_zone_append_page(bio, page,
+
PAGE_SIZE, 0);
+                       else
+                               len = bio_add_page(bio, page, PAGE_SIZE, 0);
+               }

                 page->mapping = NULL;
                 if (submit || len < PAGE_SIZE) {
This looks good, thanks for fixing it. I indeed messed up the bio_add_page() 
call in the new version when untangling that if (submit || bio_add_page())
construct. 

Can you send an official patch?

Thanks a lot,
	Johannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help