Skip to content

Commit

Permalink
target: remove the unused transport_limit_task_sectors helper
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
  • Loading branch information
Christoph Hellwig authored and Nicholas Bellinger committed May 6, 2012
1 parent ed0b214 commit 32d8d2e
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions drivers/target/target_core_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -3694,21 +3694,6 @@ transport_generic_get_mem(struct se_cmd *cmd)
return -ENOMEM;
}

/* Reduce sectors if they are too long for the device */
static inline sector_t transport_limit_task_sectors(
struct se_device *dev,
unsigned long long lba,
sector_t sectors)
{
sectors = min_t(sector_t, sectors, dev->se_sub_dev->se_dev_attrib.max_sectors);

if (dev->transport->get_device_type(dev) == TYPE_DISK)
if ((lba + sectors) > transport_dev_end_lba(dev))
sectors = ((transport_dev_end_lba(dev) - lba) + 1);

return sectors;
}

/*
* Break up cmd into chunks transport can handle
*/
Expand Down

0 comments on commit 32d8d2e

Please sign in to comment.