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

btrfs: rename btrfs_submit_bio() to btrfs_submit_bbio()

The function name is a bit misleading as it submits the btrfs_bio
(bbio), rename it so we can use btrfs_submit_bio() when an actual bio is
submitted.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>

+21 -21
+5 -5
fs/btrfs/bio.c
··· 53 53 54 54 /* 55 55 * Allocate a btrfs_bio structure. The btrfs_bio is the main I/O container for 56 - * btrfs, and is used for all I/O submitted through btrfs_submit_bio. 56 + * btrfs, and is used for all I/O submitted through btrfs_submit_bbio(). 57 57 * 58 58 * Just like the underlying bio_alloc_bioset it will not fail as it is backed by 59 59 * a mempool. ··· 211 211 goto done; 212 212 } 213 213 214 - btrfs_submit_bio(repair_bbio, mirror); 214 + btrfs_submit_bbio(repair_bbio, mirror); 215 215 return; 216 216 } 217 217 ··· 280 280 281 281 mirror = next_repair_mirror(fbio, failed_bbio->mirror_num); 282 282 btrfs_debug(fs_info, "submitting repair read to mirror %d", mirror); 283 - btrfs_submit_bio(repair_bbio, mirror); 283 + btrfs_submit_bbio(repair_bbio, mirror); 284 284 return fbio; 285 285 } 286 286 ··· 777 777 return true; 778 778 } 779 779 780 - void btrfs_submit_bio(struct btrfs_bio *bbio, int mirror_num) 780 + void btrfs_submit_bbio(struct btrfs_bio *bbio, int mirror_num) 781 781 { 782 782 /* If bbio->inode is not populated, its file_offset must be 0. */ 783 783 ASSERT(bbio->inode || bbio->file_offset == 0); ··· 789 789 /* 790 790 * Submit a repair write. 791 791 * 792 - * This bypasses btrfs_submit_bio deliberately, as that writes all copies in a 792 + * This bypasses btrfs_submit_bbio() deliberately, as that writes all copies in a 793 793 * RAID setup. Here we only want to write the one bad copy, so we do the 794 794 * mapping ourselves and submit the bio directly. 795 795 *
+3 -3
fs/btrfs/bio.h
··· 29 29 30 30 /* 31 31 * Highlevel btrfs I/O structure. It is allocated by btrfs_bio_alloc and 32 - * passed to btrfs_submit_bio for mapping to the physical devices. 32 + * passed to btrfs_submit_bbio() for mapping to the physical devices. 33 33 */ 34 34 struct btrfs_bio { 35 35 /* ··· 42 42 union { 43 43 /* 44 44 * For data reads: checksumming and original I/O information. 45 - * (for internal use in the btrfs_submit_bio machinery only) 45 + * (for internal use in the btrfs_submit_bbio() machinery only) 46 46 */ 47 47 struct { 48 48 u8 *csum; ··· 104 104 /* Submit using blkcg_punt_bio_submit. */ 105 105 #define REQ_BTRFS_CGROUP_PUNT REQ_FS_PRIVATE 106 106 107 - void btrfs_submit_bio(struct btrfs_bio *bbio, int mirror_num); 107 + void btrfs_submit_bbio(struct btrfs_bio *bbio, int mirror_num); 108 108 void btrfs_submit_repair_write(struct btrfs_bio *bbio, int mirror_num, bool dev_replace); 109 109 int btrfs_repair_io_failure(struct btrfs_fs_info *fs_info, u64 ino, u64 start, 110 110 u64 length, u64 logical, struct folio *folio,
+2 -2
fs/btrfs/compression.c
··· 395 395 cb->bbio.ordered = ordered; 396 396 btrfs_add_compressed_bio_folios(cb); 397 397 398 - btrfs_submit_bio(&cb->bbio, 0); 398 + btrfs_submit_bbio(&cb->bbio, 0); 399 399 } 400 400 401 401 /* ··· 630 630 if (memstall) 631 631 psi_memstall_leave(&pflags); 632 632 633 - btrfs_submit_bio(&cb->bbio, 0); 633 + btrfs_submit_bbio(&cb->bbio, 0); 634 634 return; 635 635 636 636 out_free_compressed_pages:
+1 -1
fs/btrfs/direct-io.c
··· 726 726 } 727 727 } 728 728 729 - btrfs_submit_bio(bbio, 0); 729 + btrfs_submit_bbio(bbio, 0); 730 730 } 731 731 732 732 static const struct iomap_ops btrfs_dio_iomap_ops = {
+3 -3
fs/btrfs/extent_io.c
··· 117 117 bio_ctrl->compress_type != BTRFS_COMPRESS_NONE) 118 118 btrfs_submit_compressed_read(bbio); 119 119 else 120 - btrfs_submit_bio(bbio, 0); 120 + btrfs_submit_bbio(bbio, 0); 121 121 122 122 /* The bbio is owned by the end_io handler now */ 123 123 bio_ctrl->bbio = NULL; ··· 1800 1800 folio_unlock(folio); 1801 1801 } 1802 1802 } 1803 - btrfs_submit_bio(bbio, 0); 1803 + btrfs_submit_bbio(bbio, 0); 1804 1804 } 1805 1805 1806 1806 /* ··· 3572 3572 ASSERT(ret); 3573 3573 } 3574 3574 } 3575 - btrfs_submit_bio(bbio, mirror_num); 3575 + btrfs_submit_bbio(bbio, mirror_num); 3576 3576 3577 3577 done: 3578 3578 if (wait == WAIT_COMPLETE) {
+2 -2
fs/btrfs/inode.c
··· 9152 9152 9153 9153 if (bio_add_page(&bbio->bio, pages[i], bytes, 0) < bytes) { 9154 9154 atomic_inc(&priv.pending); 9155 - btrfs_submit_bio(bbio, 0); 9155 + btrfs_submit_bbio(bbio, 0); 9156 9156 9157 9157 bbio = btrfs_bio_alloc(BIO_MAX_VECS, REQ_OP_READ, fs_info, 9158 9158 btrfs_encoded_read_endio, &priv); ··· 9167 9167 } while (disk_io_size); 9168 9168 9169 9169 atomic_inc(&priv.pending); 9170 - btrfs_submit_bio(bbio, 0); 9170 + btrfs_submit_bbio(bbio, 0); 9171 9171 9172 9172 if (atomic_dec_return(&priv.pending)) 9173 9173 io_wait_event(priv.wait, !atomic_read(&priv.pending));
+5 -5
fs/btrfs/scrub.c
··· 838 838 bbio->bio.bi_iter.bi_size >= blocksize)) { 839 839 ASSERT(bbio->bio.bi_iter.bi_size); 840 840 atomic_inc(&stripe->pending_io); 841 - btrfs_submit_bio(bbio, mirror); 841 + btrfs_submit_bbio(bbio, mirror); 842 842 if (wait) 843 843 wait_scrub_stripe_io(stripe); 844 844 bbio = NULL; ··· 857 857 if (bbio) { 858 858 ASSERT(bbio->bio.bi_iter.bi_size); 859 859 atomic_inc(&stripe->pending_io); 860 - btrfs_submit_bio(bbio, mirror); 860 + btrfs_submit_bbio(bbio, mirror); 861 861 if (wait) 862 862 wait_scrub_stripe_io(stripe); 863 863 } ··· 1683 1683 bbio->bio.bi_iter.bi_size >= stripe_len)) { 1684 1684 ASSERT(bbio->bio.bi_iter.bi_size); 1685 1685 atomic_inc(&stripe->pending_io); 1686 - btrfs_submit_bio(bbio, mirror); 1686 + btrfs_submit_bbio(bbio, mirror); 1687 1687 bbio = NULL; 1688 1688 } 1689 1689 ··· 1720 1720 if (bbio) { 1721 1721 ASSERT(bbio->bio.bi_iter.bi_size); 1722 1722 atomic_inc(&stripe->pending_io); 1723 - btrfs_submit_bio(bbio, mirror); 1723 + btrfs_submit_bbio(bbio, mirror); 1724 1724 } 1725 1725 1726 1726 if (atomic_dec_and_test(&stripe->pending_io)) { ··· 1776 1776 1777 1777 mirror = calc_next_mirror(mirror, num_copies); 1778 1778 } 1779 - btrfs_submit_bio(bbio, mirror); 1779 + btrfs_submit_bbio(bbio, mirror); 1780 1780 } 1781 1781 1782 1782 static bool stripe_has_metadata_error(struct scrub_stripe *stripe)