Re: [PATCH 3/8] aacraid: handle AIF hotplug events

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

 



> +			if ((dev != (struct aac_dev *)NULL)
> +			 && (dev->scsi_host_ptr != (struct Scsi_Host *)NULL)) {

no need for the casts.

> +	shost_for_each_device(device, dev->scsi_host_ptr)
> +	{
> +		if ((device->channel == CONTAINER_TO_CHANNEL(container))
> +		 && (device->id == CONTAINER_TO_ID(container))
> +		 && (device->lun == CONTAINER_TO_LUN(container))) {
> +			busy |= device->device_busy ||
> +				test_bit(SHOST_RECOVERY,
> +				(const unsigned long*)&dev->scsi_host_ptr->shost_state);

this is broken.  You must not look at the device_busy field from a driver,
and it means something different than what seems intended here.  Also
the direct messing with the host state is wrong.

> +			if (busy == 0) {
> +				device->removable = 1;

devce->removeable means the device has a removable medium, not that
it can go away.

---end quoted text---
-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux