linux-next: manual merge of the block tree with the rr tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jens,

Today's linux-next merge of the block tree got conflicts in
drivers/block/virtio_blk.c and include/linux/virtio_blk.h between commit
a69a9b05d1050c24767d438bbe220157b7ff9250 ("Add serial number support for
virtio_blk, V4a") from the rr tree and commit
1cde26f928863d90e9e7c1217880c8450464d305 ("virtio_blk: SG_IO passthru
support") from the block tree.

I fixed it up (see below) and can carry the fix as necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@xxxxxxxxxxxxxxxx

diff --cc drivers/block/virtio_blk.c
index ad8cb22,c4845b1..0000000
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@@ -178,14 -175,16 +203,22 @@@ static int virtblk_ioctl(struct block_d
  			 unsigned cmd, unsigned long data)
  {
  	struct gendisk *disk = bdev->bd_disk;
 +	void __user *argp = (void __user *)data;
+ 	struct virtio_blk *vblk = disk->private_data;
  
 -	/*
 -	 * Only allow the generic SCSI ioctls if the host can support it.
 -	 */
 -	if (!virtio_has_feature(vblk->vdev, VIRTIO_BLK_F_SCSI))
 -		return -ENOIOCTLCMD;
 -
 -	return scsi_cmd_ioctl(disk->queue, disk, mode, cmd,
 -			      (void __user *)data);
 +	switch (cmd) {
 +	case HDIO_GET_IDENTITY:
 +		return virtblk_identify(disk, argp);
 +	default:
++		/*
++		 * Only allow the generic SCSI ioctls if the host
++		 * can support it.
++		 */
++		if (!virtio_has_feature(vblk->vdev, VIRTIO_BLK_F_SCSI))
++			return -ENOIOCTLCMD;
++
 +		return scsi_cmd_ioctl(disk->queue, disk, mode, cmd, argp);
 +	}
  }
  
  /* We provide getgeo only to please some old bootloader/partitioning tools */
@@@ -390,7 -390,7 +424,7 @@@ static struct virtio_device_id id_table
  static unsigned int features[] = {
  	VIRTIO_BLK_F_BARRIER, VIRTIO_BLK_F_SEG_MAX, VIRTIO_BLK_F_SIZE_MAX,
  	VIRTIO_BLK_F_GEOMETRY, VIRTIO_BLK_F_RO, VIRTIO_BLK_F_BLK_SIZE,
- 	VIRTIO_BLK_F_IDENTIFY
 -	VIRTIO_BLK_F_SCSI,
++	VIRTIO_BLK_F_SCSI, VIRTIO_BLK_F_IDENTIFY,
  };
  
  static struct virtio_driver virtio_blk = {
diff --cc include/linux/virtio_blk.h
index eb470d5,4dbcbc1..0000000
--- a/include/linux/virtio_blk.h
+++ b/include/linux/virtio_blk.h
@@@ -15,9 -15,7 +15,10 @@@
  #define VIRTIO_BLK_F_GEOMETRY	4	/* Legacy geometry available  */
  #define VIRTIO_BLK_F_RO		5	/* Disk is read-only */
  #define VIRTIO_BLK_F_BLK_SIZE	6	/* Block size of disk is available*/
+ #define VIRTIO_BLK_F_SCSI	7	/* Supports scsi command passthru */
 +#define VIRTIO_BLK_F_IDENTIFY	8	/* ATA IDENTIFY supported */
 +
 +#define VIRTIO_BLK_ID_BYTES	(sizeof(__u16[256]))	/* IDENTIFY DATA */
  
  struct virtio_blk_config
  {
--
To unsubscribe from this list: send the line "unsubscribe linux-next" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux