From patchwork Tue Aug 4 22:15:18 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David VomLehn X-Patchwork-Id: 30752 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id D1315B6EDE for ; Wed, 5 Aug 2009 08:15:47 +1000 (EST) Received: by ozlabs.org (Postfix) id C641ADDD0C; Wed, 5 Aug 2009 08:15:47 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 4637BDDD04 for ; Wed, 5 Aug 2009 08:15:47 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933468AbZHDWPV (ORCPT ); Tue, 4 Aug 2009 18:15:21 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933460AbZHDWPU (ORCPT ); Tue, 4 Aug 2009 18:15:20 -0400 Received: from sj-iport-2.cisco.com ([171.71.176.71]:39477 "EHLO sj-iport-2.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755410AbZHDWPR (ORCPT ); Tue, 4 Aug 2009 18:15:17 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAP9PeEqrR7PE/2dsb2JhbAC8N4gpkBcFhBg X-IronPort-AV: E=Sophos;i="4.43,324,1246838400"; d="scan'208";a="192519245" Received: from sj-dkim-4.cisco.com ([171.71.179.196]) by sj-iport-2.cisco.com with ESMTP; 04 Aug 2009 22:15:18 +0000 Received: from sj-core-5.cisco.com (sj-core-5.cisco.com [171.71.177.238]) by sj-dkim-4.cisco.com (8.12.11/8.12.11) with ESMTP id n74MFIWO010787; Tue, 4 Aug 2009 15:15:18 -0700 Received: from cuplxvomd02.corp.sa.net ([64.101.20.155]) by sj-core-5.cisco.com (8.13.8/8.14.3) with ESMTP id n74MFIqh025971; Tue, 4 Aug 2009 22:15:18 GMT Date: Tue, 4 Aug 2009 15:15:18 -0700 From: David VomLehn To: linux-kernel@vger.kernel.org Cc: akpm@linux-foundation.org, linux-usb@vger.kernel.org, greg@kroah.com, linux-scsi@vger.kernel.org, netdev@vger.kernel.org, arjan@infradead.org Subject: [PATCH 6/7 v1] initdev:kernel:SCSI asynchronous block init device notification Message-ID: <20090804221518.GA9362@cuplxvomd02.corp.sa.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; l=1309; t=1249424118; x=1250288118; c=relaxed/simple; s=sjdkim4002; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=dvomlehn@cisco.com; z=From:=20David=20VomLehn=20 |Subject:=20[PATCH=206/7=20v1]=20initdev=3Akernel=3ASCSI=20 asynchronous=20block=20init=20device=0A=09notification |Sender:=20; bh=b/jZUwcbAuq7h9+g+bYg7qSEN9U3sYWIhoIWHXQesZg=; b=XN0OqC+VZrlda81zyPfSVf98IEktuYB4pbh41dDKtBrTUm5Y+qReo8eCdW /9/4WWDwUBOw6YSnrdj4tyY9CvZhBHul8C5TepR5OBCltMaE32B99GvpfCCh zcFHVgrIdz; Authentication-Results: sj-dkim-4; header.From=dvomlehn@cisco.com; dkim=pass ( sig from cisco.com/sjdkim4002 verified; ); Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org In addition to the bus initdev synchronization, SCSI also starts asynchronous threads with which we must synchronize. Signed-off-by: David VomLehn --- drivers/scsi/sd.c | 2 ++ fs/partitions/check.c | 1 + 2 files changed, 3 insertions(+), 0 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 5616cd7..394235d 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -2005,6 +2005,7 @@ static void sd_probe_async(void *data, async_cookie_t cookie) sd_printk(KERN_NOTICE, sdkp, "Attached SCSI %sdisk\n", sdp->removable ? "removable " : ""); + initdev_probe_done(INITDEV_BLOCK_MASK); } /** @@ -2090,6 +2091,7 @@ static int sd_probe(struct device *dev) get_device(&sdp->sdev_gendev); + initdev_found(INITDEV_BLOCK_MASK); async_schedule(sd_probe_async, sdkp); return 0; diff --git a/fs/partitions/check.c b/fs/partitions/check.c index ea4e6cb..a0fa50c 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c @@ -512,6 +512,7 @@ exit: while ((part = disk_part_iter_next(&piter))) kobject_uevent(&part_to_dev(part)->kobj, KOBJ_ADD); disk_part_iter_exit(&piter); + initdev_registered(INITDEV_BLOCK_TYPE); } int rescan_partitions(struct gendisk *disk, struct block_device *bdev)