Re: [PATCHSET] libata: implement new initialization model w/ iomap support, take 2

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

 



Tejun Heo wrote:
> You're right.  I was confused that ->slave_destroy() is called on host 
> release.  SCSI doesn't have host release callback.  What do you think 
> about adding a host release callback?  That should make things easier 
> and it is generally useful.

Sounds reasonable. 


>> In order to do what you are proposing, I think we would need to add
>> some refcounting to the ata_host object. Each allocated ata_port would
>> get a reference to its parent ata_host and would put a reference when the
>> port is freed. Otherwise I am concerned that we would end up in the situation
>> where the ata_host is freed before all the ata ports and the scsi_host is
>> freed. It might be appropriate to create an ata_host class device and
>> an ata_port class device...
> 
> Or we can just keep ata_host_init() and let sas allocate ata_host as 
> part of SCSI host and free all dynamic stuff when all ports are 
> detached.  It's a bit hacky but should work for the time being.

I think that's a fine approach for now.

> 
>>> Hmmm.... I see.  Something like ata_dev_attach(adev) after initialized 
>>> by SAS maybe?
>> Possibly. Are you proposing that ata_dev_attach would then end up calling
>> scsi_add_device after doing the ATA initialization stuff?
> 
> For SAS, libata isn't controlling SCSI host, so I think it's more 
> logical to leave SCSI devices to SAS too. 

I agree.


-- 
Brian King
eServer Storage I/O
IBM Linux Technology Center
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux