@@ -1478,17 +1478,10 @@ static unsigned get_num_write_zeroes_bios(struct dm_target *ti)
1478
1478
return ti -> num_write_zeroes_bios ;
1479
1479
}
1480
1480
1481
- typedef bool (* is_split_required_fn )(struct dm_target * ti );
1482
-
1483
- static bool is_split_required_for_discard (struct dm_target * ti )
1484
- {
1485
- return ti -> split_discard_bios ;
1486
- }
1487
-
1488
1481
static int __send_changing_extent_only (struct clone_info * ci , struct dm_target * ti ,
1489
- unsigned num_bios , bool is_split_required )
1482
+ unsigned num_bios )
1490
1483
{
1491
- unsigned len ;
1484
+ unsigned len = ci -> sector_count ;
1492
1485
1493
1486
/*
1494
1487
* Even though the device advertised support for this type of
@@ -1499,11 +1492,6 @@ static int __send_changing_extent_only(struct clone_info *ci, struct dm_target *
1499
1492
if (!num_bios )
1500
1493
return - EOPNOTSUPP ;
1501
1494
1502
- if (!is_split_required )
1503
- len = min ((sector_t )ci -> sector_count , max_io_len_target_boundary (ci -> sector , ti ));
1504
- else
1505
- len = min ((sector_t )ci -> sector_count , max_io_len (ci -> sector , ti ));
1506
-
1507
1495
__send_duplicate_bios (ci , ti , num_bios , & len );
1508
1496
1509
1497
ci -> sector += len ;
@@ -1514,23 +1502,22 @@ static int __send_changing_extent_only(struct clone_info *ci, struct dm_target *
1514
1502
1515
1503
static int __send_discard (struct clone_info * ci , struct dm_target * ti )
1516
1504
{
1517
- return __send_changing_extent_only (ci , ti , get_num_discard_bios (ti ),
1518
- is_split_required_for_discard (ti ));
1505
+ return __send_changing_extent_only (ci , ti , get_num_discard_bios (ti ));
1519
1506
}
1520
1507
1521
1508
static int __send_secure_erase (struct clone_info * ci , struct dm_target * ti )
1522
1509
{
1523
- return __send_changing_extent_only (ci , ti , get_num_secure_erase_bios (ti ), false );
1510
+ return __send_changing_extent_only (ci , ti , get_num_secure_erase_bios (ti ));
1524
1511
}
1525
1512
1526
1513
static int __send_write_same (struct clone_info * ci , struct dm_target * ti )
1527
1514
{
1528
- return __send_changing_extent_only (ci , ti , get_num_write_same_bios (ti ), false );
1515
+ return __send_changing_extent_only (ci , ti , get_num_write_same_bios (ti ));
1529
1516
}
1530
1517
1531
1518
static int __send_write_zeroes (struct clone_info * ci , struct dm_target * ti )
1532
1519
{
1533
- return __send_changing_extent_only (ci , ti , get_num_write_zeroes_bios (ti ), false );
1520
+ return __send_changing_extent_only (ci , ti , get_num_write_zeroes_bios (ti ));
1534
1521
}
1535
1522
1536
1523
static bool is_abnormal_io (struct bio * bio )
0 commit comments