Re: [PATCH 1/2] libata: implement ata_dev_enabled and disabled()

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

 



On Mon, Mar 27, 2006 at 12:17:37PM +0100, Alan Cox wrote:
> On Sul, 2006-03-26 at 08:57 +0900, Tejun Heo wrote:
> > Can you elaborate how ata_dev_pair() is broken by this patch?
> > ata_dev_present() is simply renamed to ata_dev_enabled().
> > ata_dev_disabled() only differenciates the conditions where
> > ata_dev_present() used to think there was no device.  There should be
> > no behavior change to existing code. 
> 
> Some of the drivers want one sematic some want the other, and
> ata_dev_pair is now confusing. Needs a pair of better names and I'm not
> sure what they should be
> 

Hmm... how about using ata_dev_enable() || ata_dev_disable() for
ata_dev_pair() such that any existent device returned and make the
user responsible for ata_dev_enable() testing if it wants only enabled
device?

And I think the current enabled/disabled model matches SCSI device
state model sufficiently.  SCSI doesn't register devices which fail
INQUIRY and devices which fail after being attached get offlined.
Similar thing will happen for libata devices.  Stuff that fails
initial configuration won't be attached to SCSI while devices which
fail during operation will get disabled and then get SCSI-offlined.

Thanks.

-- 
tejun
-
: 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