From patchwork Sat Jun 20 19:29:41 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 31611 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n5KJTpA6019243 for ; Sat, 20 Jun 2009 19:29:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751636AbZFTT3p (ORCPT ); Sat, 20 Jun 2009 15:29:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751509AbZFTT3p (ORCPT ); Sat, 20 Jun 2009 15:29:45 -0400 Received: from verein.lst.de ([213.95.11.210]:58807 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751243AbZFTT3p (ORCPT ); Sat, 20 Jun 2009 15:29:45 -0400 Received: from verein.lst.de (localhost [127.0.0.1]) by verein.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id n5KJTfr8027007 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sat, 20 Jun 2009 21:29:42 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id n5KJTfIi027005; Sat, 20 Jun 2009 21:29:41 +0200 Date: Sat, 20 Jun 2009 21:29:41 +0200 From: Christoph Hellwig To: rusty@rustcorp.com.au Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Subject: [PATCH] virtio_blk: ioctl return value fix Message-ID: <20090620192941.GA26873@lst.de> Mime-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Spam-Score: 0 () X-Scanned-By: MIMEDefang 2.39 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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. Signed-off-by: Christoph Hellwig --- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-2.6/drivers/block/virtio_blk.c =================================================================== --- linux-2.6.orig/drivers/block/virtio_blk.c 2009-06-20 21:21:20.252930284 +0200 +++ linux-2.6/drivers/block/virtio_blk.c 2009-06-20 21:22:48.364932365 +0200 @@ -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); }