From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764363AbZE1VFP (ORCPT ); Thu, 28 May 2009 17:05:15 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760865AbZE1VFA (ORCPT ); Thu, 28 May 2009 17:05:00 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:56658 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1758511AbZE1VE7 (ORCPT ); Thu, 28 May 2009 17:04:59 -0400 Date: Thu, 28 May 2009 17:04:59 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: James Bottomley cc: Hannes Reinecke , Kay Sievers , SCSI development list , "Eric W. Biederman" , Andrew Morton , Greg Kroah-Hartman , Kernel development list , Tejun Heo , Cornelia Huck , , "Eric W. Biederman" Subject: Re: [PATCH 25/20] sysfs: Only support removing emtpy sysfs directories. In-Reply-To: <1243541439.2830.21.camel@localhost.localdomain> Message-ID: 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 On Thu, 28 May 2009, James Bottomley wrote: > > How so? Why not unlink the target from the host's list when the > > device_del() call returns? A new target can be created any time after > > that, since the old one is now completely invisible. > > The answer to that one is several emails back: we need the target in the > host list for the lifetime of the devices ... it's alterable, but even > more auditing. I don't recall you mentioning that the target had to be linked into the host's list for the lifetime of the devices; I thought you said merely that the target had to _exist_ for the lifetime of the devices. Does it really need to be linked, or is existence of the structure sufficient? Likewise, after a device is removed from visibility, does it need to remain linked into the host's and target's lists? > > P.S.: Does scsi_target_reap() really ever get called in non-process > > context? I couldn't find any place where that might happen. > > From the device release, which is done by last put, which could be I/O > context. But scsi_target_reap() isn't called directly from the device release. It's called from scsi_device_dev_release_usercontext(). And besides, in the patch I'm working on it isn't called from either of those places -- it's called from __scsi_remove_device(). So I'll go ahead and get rid of scsi_target_reap_usercontext(). Alan Stern From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Stern Subject: Re: [PATCH 25/20] sysfs: Only support removing emtpy sysfs directories. Date: Thu, 28 May 2009 17:04:59 -0400 (EDT) Message-ID: References: <1243541439.2830.21.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Return-path: In-Reply-To: <1243541439.2830.21.camel@localhost.localdomain> Sender: linux-fsdevel-owner@vger.kernel.org To: James Bottomley Cc: Hannes Reinecke , Kay Sievers , SCSI development list , "Eric W. Biederman" , Andrew Morton , Greg Kroah-Hartman , Kernel development list , Tejun Heo , Cornelia Huck , linux-fsdevel@vger.kernel.org, "Eric W. Biederman" List-Id: linux-scsi@vger.kernel.org On Thu, 28 May 2009, James Bottomley wrote: > > How so? Why not unlink the target from the host's list when the > > device_del() call returns? A new target can be created any time after > > that, since the old one is now completely invisible. > > The answer to that one is several emails back: we need the target in the > host list for the lifetime of the devices ... it's alterable, but even > more auditing. I don't recall you mentioning that the target had to be linked into the host's list for the lifetime of the devices; I thought you said merely that the target had to _exist_ for the lifetime of the devices. Does it really need to be linked, or is existence of the structure sufficient? Likewise, after a device is removed from visibility, does it need to remain linked into the host's and target's lists? > > P.S.: Does scsi_target_reap() really ever get called in non-process > > context? I couldn't find any place where that might happen. > > From the device release, which is done by last put, which could be I/O > context. But scsi_target_reap() isn't called directly from the device release. It's called from scsi_device_dev_release_usercontext(). And besides, in the patch I'm working on it isn't called from either of those places -- it's called from __scsi_remove_device(). So I'll go ahead and get rid of scsi_target_reap_usercontext(). Alan Stern