Skip to content

Commit 1a332a6

Browse files
adam900710kdave
authored andcommitted
btrfs: raid56: remove the "_step" infix
The following functions are introduced as a middle step for bs > ps support: - rbio_streip_step_paddr() - rbio_pstripe_step_paddr() - rbio_qstripe_step_paddr() - sector_step_paddr_in_rbio() As there is already an existing function without the infix, and has a different parameter list. But the existing functions have been cleaned up, there is no need to keep the "_step" infix, just remove it completely. Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 8870dbe commit 1a332a6

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

fs/btrfs/raid56.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -735,25 +735,25 @@ static unsigned int rbio_paddr_index(const struct btrfs_raid_bio *rbio,
735735
return ret;
736736
}
737737

738-
static phys_addr_t rbio_stripe_step_paddr(const struct btrfs_raid_bio *rbio,
738+
static phys_addr_t rbio_stripe_paddr(const struct btrfs_raid_bio *rbio,
739739
unsigned int stripe_nr, unsigned int sector_nr,
740740
unsigned int step_nr)
741741
{
742742
return rbio->stripe_paddrs[rbio_paddr_index(rbio, stripe_nr, sector_nr, step_nr)];
743743
}
744744

745-
static phys_addr_t rbio_pstripe_step_paddr(const struct btrfs_raid_bio *rbio,
745+
static phys_addr_t rbio_pstripe_paddr(const struct btrfs_raid_bio *rbio,
746746
unsigned int sector_nr, unsigned int step_nr)
747747
{
748-
return rbio_stripe_step_paddr(rbio, rbio->nr_data, sector_nr, step_nr);
748+
return rbio_stripe_paddr(rbio, rbio->nr_data, sector_nr, step_nr);
749749
}
750750

751-
static phys_addr_t rbio_qstripe_step_paddr(const struct btrfs_raid_bio *rbio,
751+
static phys_addr_t rbio_qstripe_paddr(const struct btrfs_raid_bio *rbio,
752752
unsigned int sector_nr, unsigned int step_nr)
753753
{
754754
if (rbio->nr_data + 1 == rbio->real_stripes)
755755
return INVALID_PADDR;
756-
return rbio_stripe_step_paddr(rbio, rbio->nr_data + 1, sector_nr, step_nr);
756+
return rbio_stripe_paddr(rbio, rbio->nr_data + 1, sector_nr, step_nr);
757757
}
758758

759759
/* Return a paddr pointer into the rbio::stripe_paddrs[] for the specified sector. */
@@ -1033,9 +1033,9 @@ static phys_addr_t *sector_paddrs_in_rbio(struct btrfs_raid_bio *rbio,
10331033
* Similar to sector_paddr_in_rbio(), but with extra consideration for
10341034
* bs > ps cases, where we can have multiple steps for a fs block.
10351035
*/
1036-
static phys_addr_t sector_step_paddr_in_rbio(struct btrfs_raid_bio *rbio,
1037-
int stripe_nr, int sector_nr, int step_nr,
1038-
bool bio_list_only)
1036+
static phys_addr_t sector_paddr_in_rbio(struct btrfs_raid_bio *rbio,
1037+
int stripe_nr, int sector_nr, int step_nr,
1038+
bool bio_list_only)
10391039
{
10401040
phys_addr_t ret = INVALID_PADDR;
10411041
const int index = rbio_paddr_index(rbio, stripe_nr, sector_nr, step_nr);
@@ -1413,18 +1413,18 @@ static void generate_pq_vertical_step(struct btrfs_raid_bio *rbio, unsigned int
14131413
/* First collect one sector from each data stripe */
14141414
for (stripe = 0; stripe < rbio->nr_data; stripe++)
14151415
pointers[stripe] = kmap_local_paddr(
1416-
sector_step_paddr_in_rbio(rbio, stripe, sector_nr, step_nr, 0));
1416+
sector_paddr_in_rbio(rbio, stripe, sector_nr, step_nr, 0));
14171417

14181418
/* Then add the parity stripe */
1419-
pointers[stripe++] = kmap_local_paddr(rbio_pstripe_step_paddr(rbio, sector_nr, step_nr));
1419+
pointers[stripe++] = kmap_local_paddr(rbio_pstripe_paddr(rbio, sector_nr, step_nr));
14201420

14211421
if (has_qstripe) {
14221422
/*
14231423
* RAID6, add the qstripe and call the library function
14241424
* to fill in our p/q
14251425
*/
14261426
pointers[stripe++] = kmap_local_paddr(
1427-
rbio_qstripe_step_paddr(rbio, sector_nr, step_nr));
1427+
rbio_qstripe_paddr(rbio, sector_nr, step_nr));
14281428

14291429
assert_rbio(rbio);
14301430
raid6_call.gen_syndrome(rbio->real_stripes, step, pointers);
@@ -1958,9 +1958,9 @@ static void recover_vertical_step(struct btrfs_raid_bio *rbio,
19581958
* bio list if possible.
19591959
*/
19601960
if (rbio->operation == BTRFS_RBIO_READ_REBUILD) {
1961-
paddr = sector_step_paddr_in_rbio(rbio, stripe_nr, sector_nr, step_nr, 0);
1961+
paddr = sector_paddr_in_rbio(rbio, stripe_nr, sector_nr, step_nr, 0);
19621962
} else {
1963-
paddr = rbio_stripe_step_paddr(rbio, stripe_nr, sector_nr, step_nr);
1963+
paddr = rbio_stripe_paddr(rbio, stripe_nr, sector_nr, step_nr);
19641964
}
19651965
pointers[stripe_nr] = kmap_local_paddr(paddr);
19661966
unmap_array[stripe_nr] = pointers[stripe_nr];
@@ -2651,8 +2651,8 @@ static bool verify_one_parity_step(struct btrfs_raid_bio *rbio,
26512651
/* First collect one page from each data stripe. */
26522652
for (int stripe = 0; stripe < nr_data; stripe++)
26532653
pointers[stripe] = kmap_local_paddr(
2654-
sector_step_paddr_in_rbio(rbio, stripe, sector_nr,
2655-
step_nr, 0));
2654+
sector_paddr_in_rbio(rbio, stripe, sector_nr,
2655+
step_nr, 0));
26562656

26572657
if (has_qstripe) {
26582658
assert_rbio(rbio);
@@ -2665,7 +2665,7 @@ static bool verify_one_parity_step(struct btrfs_raid_bio *rbio,
26652665
}
26662666

26672667
/* Check scrubbing parity and repair it. */
2668-
parity = kmap_local_paddr(rbio_stripe_step_paddr(rbio, rbio->scrubp, sector_nr, step_nr));
2668+
parity = kmap_local_paddr(rbio_stripe_paddr(rbio, rbio->scrubp, sector_nr, step_nr));
26692669
if (memcmp(parity, pointers[rbio->scrubp], step) != 0)
26702670
memcpy(parity, pointers[rbio->scrubp], step);
26712671
else

0 commit comments

Comments
 (0)