Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 302402
b: refs/heads/master
c: 32d8d2e
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig authored and Nicholas Bellinger committed May 6, 2012
1 parent 390b691 commit 23301bd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ed0b2144c50b03ed926aa1c582178abb661325e2
refs/heads/master: 32d8d2e4300cabb0acbf4b60fa695924be27d0d1
15 changes: 0 additions & 15 deletions trunk/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 23301bd

Please sign in to comment.