Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 349470
b: refs/heads/master
c: 7a3cf6c
h: refs/heads/master
v: v3
  • Loading branch information
Nicholas Bellinger committed Jan 31, 2013
1 parent 091db4a commit d406478
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 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: faa06ab9aed22f0ad0e15bbf3f80463b5dd7cbe0
refs/heads/master: 7a3cf6ca1ab2a2f7161c6dec5a787fc7a5de864e
8 changes: 7 additions & 1 deletion trunk/drivers/target/target_core_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,8 @@ int se_dev_set_queue_depth(struct se_device *dev, u32 queue_depth)

int se_dev_set_fabric_max_sectors(struct se_device *dev, u32 fabric_max_sectors)
{
int block_size = dev->dev_attrib.block_size;

if (dev->export_count) {
pr_err("dev[%p]: Unable to change SE Device"
" fabric_max_sectors while export_count is %d\n",
Expand Down Expand Up @@ -978,8 +980,12 @@ int se_dev_set_fabric_max_sectors(struct se_device *dev, u32 fabric_max_sectors)
/*
* Align max_sectors down to PAGE_SIZE to follow transport_allocate_data_tasks()
*/
if (!block_size) {
block_size = 512;
pr_warn("Defaulting to 512 for zero block_size\n");
}
fabric_max_sectors = se_dev_align_max_sectors(fabric_max_sectors,
dev->dev_attrib.block_size);
block_size);

dev->dev_attrib.fabric_max_sectors = fabric_max_sectors;
pr_debug("dev[%p]: SE Device max_sectors changed to %u\n",
Expand Down

0 comments on commit d406478

Please sign in to comment.