"Fossies" - the Fresh Open Source Software Archive

Member "aoe-aoe6-86/conf/22-patches/old-new.diff" (4 Jul 2015, 1336 Bytes) of archive /linux/misc/aoe-aoe6-86.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Diff source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 diff -upr old/linux/drivers/block/aoe/aoeblk.c new/linux/drivers/block/aoe/aoeblk.c
    2 --- old/linux/drivers/block/aoe/aoeblk.c    2009-01-22 12:11:17.000000000 -0500
    3 +++ new/linux/drivers/block/aoe/aoeblk.c    2009-01-21 17:13:12.000000000 -0500
    4 @@ -262,6 +262,22 @@ aoeblk_request(struct request_queue *q)
    5  }
    6  
    7  static int
    8 +aoeblk_getgeo(struct block_device *bdev, struct hd_geometry *geo)
    9 +{
   10 +   struct aoedev *d = bdev->bd_disk->private_data;
   11 +
   12 +   if ((d->flags & DEVFL_UP) == 0) {
   13 +       printk(KERN_ERR "aoe: disk not up\n");
   14 +       return -ENODEV;
   15 +   }
   16 +
   17 +   geo->cylinders = d->geo.cylinders;
   18 +   geo->heads = d->geo.heads;
   19 +   geo->sectors = d->geo.sectors;
   20 +   return 0;
   21 +}
   22 +
   23 +static int
   24  aoeblk_ioctl(struct block_device *bdev, fmode_t mode, uint cmd, ulong arg)
   25  {
   26     struct aoedev *d;
   27 @@ -280,11 +296,6 @@ aoeblk_ioctl(struct block_device *bdev, 
   28                 sizeof d->ident))
   29             return 0;
   30         return -EFAULT;
   31 -   } else if (cmd == HDIO_GETGEO) {
   32 -       d->geo.start = get_start_sect(inode->i_bdev);
   33 -       if (!copy_to_user((void __user *) arg, &d->geo, sizeof d->geo))
   34 -           return 0;
   35 -       return -EFAULT;
   36     }
   37  
   38     /* udev calls scsi_id, which uses SG_IO, resulting in noise */
   39 @@ -298,6 +309,7 @@ static struct block_device_operations ao
   40     .open = aoeblk_open,
   41     .release = aoeblk_release,
   42     .ioctl = aoeblk_ioctl,
   43 +   .getgeo = aoeblk_getgeo,
   44     .owner = THIS_MODULE,
   45  };
   46