Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753838AbYABT6V (ORCPT ); Wed, 2 Jan 2008 14:58:21 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751837AbYABT6N (ORCPT ); Wed, 2 Jan 2008 14:58:13 -0500 Received: from smtp2.linux-foundation.org ([207.189.120.14]:51334 "EHLO smtp2.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751144AbYABT6M (ORCPT ); Wed, 2 Jan 2008 14:58:12 -0500 Date: Wed, 2 Jan 2008 11:57:10 -0800 (PST) From: Linus Torvalds To: Matthew Wilcox cc: James Bottomley , Ingo Molnar , linux-kernel@vger.kernel.org, Andrew Morton Subject: Re: [patch] scsi: revert "[SCSI] Get rid of scsi_cmnd->done" In-Reply-To: <20080102194030.GC11638@parisc-linux.org> Message-ID: References: <20080102162534.GA4041@elte.hu> <1199292381.3258.32.camel@localhost.localdomain> <20080102194030.GC11638@parisc-linux.org> User-Agent: Alpine 1.00 (LFD 882 2007-12-20) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1223 Lines: 31 On Wed, 2 Jan 2008, Matthew Wilcox wrote: > > sd_done and sr_done are called for REQ_TYPE_FS -- if the request comes > in through one of the SG interfaces, we call scsi_setup_blk_pc_cmnd() > which sets the ->done callback to scsi_blk_pc_done. Why do you think that REQ_TYPE_BLOCK_PC has anything to do with SG? It has *nothing* to do with SG, and anybody who uses SG in this day and age on a block device is just crazy. The way you do generic SCSI commands (on perfectly normal block device nodes) is using the SCSI ioctl() interfaces. That's how you are supposed to do things like burn DVD's or do any kind of special ops. So REQ_TYPE_BLOCK_PC does quite commonly happen on perfectly regular block devices, it's how all commands that aren't pure reads or writes done by the kernel behave. If you actually use /dev/sg*, you will be using the SG driver, and if you don't want that to have a ->done callback, then just set "done" to NULL for sg_driver. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/