From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
Hannes Reinecke <hare@suse.de>,
john cooper <john.cooper@redhat.com>,
Rusty Russell <rusty@rustcorp.com.au>
Subject: linux-next: manual merge of the block tree with the rr tree
Date: Tue, 9 Jun 2009 15:09:30 +1000 [thread overview]
Message-ID: <20090609150930.45eb8a32.sfr@canb.auug.org.au> (raw)
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@canb.auug.org.au
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
{
next reply other threads:[~2009-06-09 6:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-09 5:09 Stephen Rothwell [this message]
2010-07-06 4:25 Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090609150930.45eb8a32.sfr@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=hare@suse.de \
--cc=jens.axboe@oracle.com \
--cc=john.cooper@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®