Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754782AbZFTOU4 (ORCPT ); Sat, 20 Jun 2009 10:20:56 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752334AbZFTOUo (ORCPT ); Sat, 20 Jun 2009 10:20:44 -0400 Received: from bedivere.hansenpartnership.com ([66.63.167.143]:56075 "EHLO bedivere.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751521AbZFTOUn (ORCPT ); Sat, 20 Jun 2009 10:20:43 -0400 Subject: Re: generic_make_request fucntion for scsi_disk From: James Bottomley To: Ravish Tayal Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-scsi@vger.kernel.org, linux-usb@vger.kernel.org In-Reply-To: References: Content-Type: text/plain Date: Sat, 20 Jun 2009 09:20:40 -0500 Message-Id: <1245507640.4255.6.camel@mulgrave.site> Mime-Version: 1.0 X-Mailer: Evolution 2.24.1.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 924 Lines: 22 On Sat, 2009-06-20 at 19:35 +0530, Ravish Tayal wrote: > I am debugging Filesystem code for USB mass storage devices. I need > help to figure out after generic_make_request how the request is > placed to scsi disk (sd) requeset queue and than how sd qeueuecommand > to usb_storeage thread. (in which context, is it system call context) requests out of the lower end of block come from the elevators. The elevators can operate in a variety of contexts: user, kernel thread or softirq depending on state. The mechanism for queueing to the USB thread is in scsiglue.c:queuecommand() it's basically a simple single command consumer model: fill in slot and wake thread. James -- 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/