Re: [PATCH 2/4 v2] libata: Implement disk shock protection support

Previous thread: Re: [PATCH] AT91 Serial: update the powersave handler to match serial core by Haavard Skinnemoen on Friday, September 19, 2008 - 6:09 am. (1 message)

Next thread: Regarding select() on PPC by Halesh S on Friday, September 19, 2008 - 7:04 am. (1 message)
From: Elias Oltmanns
Date: Friday, September 19, 2008 - 7:06 am

You are right that it isn't designed for this use case and my approach
is somewhat hackish. Still, it really does exactly what we want. Please
note that ap->park_req_pending is protected by the host lock; the call
to complete() is atomic wrt the setting of ATA_EH_PARK for one of the
devices on the port and so is the call to INIT_COMPLETION() wrt clearing

Well, we don't really care about the done count after
wait_for_completion_timeout() has returned. All that matters is that the
done counter is cleared when all ATA_EH_PARK actions have been pulled in
which happens at the start of each cycle over the loop.

Perhaps I should add comments to this effect before
wait_for_completion_timeout() as well as INIT_COMPLETION()?

Regards,

Elias
--

From: Tejun Heo
Date: Friday, September 19, 2008 - 7:15 am

Ah... I missed the pull_park_action part.  Yes, in that case, it's
correct now but I would really appreciate you explain amply what's
going on inside the pull function and why it's needed.

Thanks.

-- 
tejun
--

From: Elias Oltmanns
Date: Friday, September 19, 2008 - 8:00 am

Will do. By the way, it's just occurred to me that we really need to
call complete_all() in ata_scsi_park_store(). So, thanks for making me
think it all through once more.

Regards,

Elias
--

From: Tejun Heo
Date: Friday, September 19, 2008 - 9:48 pm

Hmmm... just replied to the updated patch.  complete_all() will
potentially overflow the done counter (which BTW is interface problem
in completion) why is it necessary?  (probably best to continue on the
other thread).

Thanks.

-- 
tejun

--

Previous thread: Re: [PATCH] AT91 Serial: update the powersave handler to match serial core by Haavard Skinnemoen on Friday, September 19, 2008 - 6:09 am. (1 message)

Next thread: Regarding select() on PPC by Halesh S on Friday, September 19, 2008 - 7:04 am. (1 message)