~ubuntu-branches/ubuntu/wily/linux-ti-omap4/wily

« back to all changes in this revision

Viewing changes to drivers/target/target_core_device.c

  • Committer: Package Import Robot
  • Author(s): Paolo Pisati, Paolo Pisati, Ubuntu: 3.5.0-26.42
  • Date: 2013-03-14 15:21:40 UTC
  • mfrom: (76.1.1 quantal-proposed)
  • Revision ID: package-import@ubuntu.com-20130314152140-tl4mkjmxa038tm3h
Tags: 3.5.0-221.31
* Release Tracking Bug
  - LP: #1153648

[ Paolo Pisati ]

* rebased on Ubuntu-3.5.0-26.42

[ Ubuntu: 3.5.0-26.42 ]

* Release Tracking Bug
  - LP: #1152715
* ubuntu: overlayfs -- fix missmerge of vfs_open changes
  - LP: #1122094, #1147678

Show diffs side-by-side

added added

removed removed

Lines of Context:
1167
1167
 
1168
1168
int se_dev_set_fabric_max_sectors(struct se_device *dev, u32 fabric_max_sectors)
1169
1169
{
 
1170
        int block_size = dev->se_sub_dev->se_dev_attrib.block_size;
 
1171
 
1170
1172
        if (atomic_read(&dev->dev_export_obj.obj_access_count)) {
1171
1173
                pr_err("dev[%p]: Unable to change SE Device"
1172
1174
                        " fabric_max_sectors while dev_export_obj: %d count exists\n",
1204
1206
        /*
1205
1207
         * Align max_sectors down to PAGE_SIZE to follow transport_allocate_data_tasks()
1206
1208
         */
 
1209
        if (!block_size) {
 
1210
                block_size = 512;
 
1211
                pr_warn("Defaulting to 512 for zero block_size\n");
 
1212
        }
1207
1213
        fabric_max_sectors = se_dev_align_max_sectors(fabric_max_sectors,
1208
 
                                                      dev->se_sub_dev->se_dev_attrib.block_size);
 
1214
                                                      block_size);
1209
1215
 
1210
1216
        dev->se_sub_dev->se_dev_attrib.fabric_max_sectors = fabric_max_sectors;
1211
1217
        pr_debug("dev[%p]: SE Device max_sectors changed to %u\n",