~ubuntu-branches/ubuntu/quantal/linux-lowlatency/quantal

« back to all changes in this revision

Viewing changes to drivers/md/dm-flakey.c

  • Committer: Package Import Robot
  • Author(s): Alessio Igor Bogani
  • Date: 2011-10-26 11:13:05 UTC
  • Revision ID: package-import@ubuntu.com-20111026111305-04kado7d1u2er2rl
Tags: 3.2.0-16.25
Add new lowlatency kernel flavour

Show diffs side-by-side

added added

removed removed

Lines of Context:
368
368
static int flakey_ioctl(struct dm_target *ti, unsigned int cmd, unsigned long arg)
369
369
{
370
370
        struct flakey_c *fc = ti->private;
371
 
 
372
 
        return __blkdev_driver_ioctl(fc->dev->bdev, fc->dev->mode, cmd, arg);
 
371
        struct dm_dev *dev = fc->dev;
 
372
        int r = 0;
 
373
 
 
374
        /*
 
375
         * Only pass ioctls through if the device sizes match exactly.
 
376
         */
 
377
        if (fc->start ||
 
378
            ti->len != i_size_read(dev->bdev->bd_inode) >> SECTOR_SHIFT)
 
379
                r = scsi_verify_blk_ioctl(NULL, cmd);
 
380
 
 
381
        return r ? : __blkdev_driver_ioctl(dev->bdev, dev->mode, cmd, arg);
373
382
}
374
383
 
375
384
static int flakey_merge(struct dm_target *ti, struct bvec_merge_data *bvm,