Skip to contentSkip to conversation

virtio_blk: ioctl return value fix

PATCH Applied Christoph Hellwig 3 participants 5 messages Jun 20, 2009 – Jul 9, 2009

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 virtio_blk: ioctl return value fix

Block driver ioctl methods must return ENOTTY and not -ENOIOCTLCMD if they expect the block layer to handle generic ioctls.

This triggered a BLKROSET failure in xfsqa #200.

drivers/block/virtio_blk.c +1 -1
Index: linux-2.6/drivers/block/virtio_blk.c
===================================================================
@@ -213,7 +213,7 @@ static int virtblk_ioctl(struct block_de
 	 * 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 -ENOTTY;
 
 	return scsi_cmd_ioctl(disk->queue, disk, mode, cmd, argp);
 }
#1 lore raw
Quoted 4 lines · Christoph Hellwig

Block driver ioctl methods must return ENOTTY and not -ENOIOCTLCMD if they expect the block layer to handle generic ioctls.

This triggered a BLKROSET failure in xfsqa #200.

Applied.

Thanks,
Rusty.

#2 lore raw
Quoted 7 lines · Rusty Russell
Quoted 4 lines · Christoph Hellwig

Block driver ioctl methods must return ENOTTY and not -ENOIOCTLCMD if they expect the block layer to handle generic ioctls.

This triggered a BLKROSET failure in xfsqa #200.

Applied.

Can you send on this fix to Linus? It fixes a regression introduced in Linux 2.6.30.

#3 lore raw
Quoted 7 lines · Christoph Hellwig
Quoted 5 lines · Rusty Russell
Quoted 3 lines · Christoph Hellwig

Block driver ioctl methods must return ENOTTY and not -ENOIOCTLCMD if they expect the block layer to handle generic ioctls.

Quoted 9 lines
Quoted 4 lines
Quoted 2 lines

This triggered a BLKROSET failure in xfsqa #200.

Applied.

Can you send on this fix to Linus? It fixes a regression introduced in Linux 2.6.30.

It should set the Cc: [email protected] marker then.

Signature · 2 lines
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
#4 lore raw
In reply to Christoph Hellwig
Quoted 11 lines · Christoph Hellwig
Quoted 7 lines · Rusty Russell
Quoted 4 lines · Christoph Hellwig

Block driver ioctl methods must return ENOTTY and not -ENOIOCTLCMD if they expect the block layer to handle generic ioctls.

This triggered a BLKROSET failure in xfsqa #200.

Applied.

Can you send on this fix to Linus? It fixes a regression introduced in Linux 2.6.30.

Yep, I've been away, but they'll both be pushed soon with other (minor) lguest/virtio fixes. I'm holding on a final lguest regression which I need to track down.

Thanks,
Rusty.