Re: [PATCH 25/20] sysfs: Only support removing emtpy sysfs directories.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 27 May 2009, James Bottomley wrote:

> I find the terms delete and release too close for comfort, which is why
> I've always been careful to say remove from visibility.

Okay; I'll use your terms when conversing with you.  :-)

> > That's fine.  You remove a target from visibility when target->reap_ref
> > becomes 0.  The target isn't released until the target's embedded
> > struct device's refcount becomes 0.  To make this work, simply have
> > scsi_alloc_sdev() call
> > 
> > 	get_device(&starget->dev);
> > 
> > and have scsi_device_dev_release_usercontext() call
> > 
> > 	put_device(&starget->dev);
> > 
> > Doesn't that do exactly what you're asking for?
> 
> That's um what we do to day ... the addition has to be to the visibility
> management.

That's what I was trying to accomplish in the patch you said was wrong.  
It moved the call to scsi_target_reap() from
scsi_device_dev_release_usercontext() into __scsi_remove_device().  
That is, the target's count of underlying sdevs was to be decremented
whenever an sdev was removed from visibility, not when the sdev was
released.

That's how the problem should be solved.  But the details need to be 
correct, and I don't understand how they all work (as you noticed when 
reading the patch).

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux