Re: [RFC][PATCH] fix for async scsi scan sysfs problem (resend)

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

 



On Thu, 2007-04-19 at 09:25 -0400, Josef Bacik wrote:
> Looking through everything I came to the conclusion that we don't really need
> the scsi_sysfs_add_devices in scsi_finish_async_scan, which gets run everytime
> we do a do_scan_async.  In doing the scanning, if we come upon anything we will
> already be registering the device with sysfs so the scsi_sysfs_add_devices step
> is kind of useless.

Unfortunately, it isn't.  The registration step while scanning is at the
end of scsi_add_lun():


	if (!async && scsi_sysfs_add_sdev(sdev) != 0)
		return SCSI_SCAN_NO_RESPONSE;

	return SCSI_SCAN_LUN_PRESENT;

The !async should mean that the addition *only* occurs for the non async
scan case ... if you remove the post async scan add, we'll lose devices.

>   I tested this and it worked fine on my UP box (where the
> problem was happening) and my SMP box (where the problem wasn't happening).  Now
> I'm not entirely sure if this is correct, but I'm attaching the patch that I
> used to fix it for me, please point out if I've done something wrong or if there
> is a different way this needs to be fixed.  Thank you,

Could you add some debugging first to see if we're actually adding the
device twice (and also, if we are, what the value of the async is).

James


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux