Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'for-5.5-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux

Pull btrfs fixes from David Sterba:
"A few fixes for btrfs:

- blkcg accounting problem with compression that could stall writes

- setting up blkcg bio for compression crashes due to NULL bdev
pointer

- fix possible infinite loop in writeback for nocow files (here
possible means almost impossible, 13 things that need to happen to
trigger it)"

* tag 'for-5.5-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
Btrfs: fix infinite loop during nocow writeback due to race
btrfs: fix compressed write bio blkcg attribution
btrfs: punt all bios created in btrfs_submit_compressed_write()

+9 -4
+6 -1
fs/btrfs/compression.c
··· 447 447 448 448 if (blkcg_css) { 449 449 bio->bi_opf |= REQ_CGROUP_PUNT; 450 - bio_associate_blkg_from_css(bio, blkcg_css); 450 + kthread_associate_blkcg(blkcg_css); 451 451 } 452 452 refcount_set(&cb->pending_bios, 1); 453 453 ··· 491 491 bio->bi_opf = REQ_OP_WRITE | write_flags; 492 492 bio->bi_private = cb; 493 493 bio->bi_end_io = end_compressed_bio_write; 494 + if (blkcg_css) 495 + bio->bi_opf |= REQ_CGROUP_PUNT; 494 496 bio_add_page(bio, page, PAGE_SIZE, 0); 495 497 } 496 498 if (bytes_left < PAGE_SIZE) { ··· 518 516 bio->bi_status = ret; 519 517 bio_endio(bio); 520 518 } 519 + 520 + if (blkcg_css) 521 + kthread_associate_blkcg(NULL); 521 522 522 523 return 0; 523 524 }
+3 -3
fs/btrfs/inode.c
··· 1479 1479 disk_num_bytes = 1480 1480 btrfs_file_extent_disk_num_bytes(leaf, fi); 1481 1481 /* 1482 - * If extent we got ends before our range starts, skip 1483 - * to next extent 1482 + * If the extent we got ends before our current offset, 1483 + * skip to the next extent. 1484 1484 */ 1485 - if (extent_end <= start) { 1485 + if (extent_end <= cur_offset) { 1486 1486 path->slots[0]++; 1487 1487 goto next_slot; 1488 1488 }