Re: [PATCH 3/4] ide: Implement disk shock protection support

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Bartlomiej Zolnierkiewicz
Date: Monday, September 1, 2008 - 12:29 pm

On Friday 29 August 2008, Elias Oltmanns wrote:

[ continuing the discussion from 'patch #2' thread ]

While I'm still not fully convinced this is the best way to go in
the long-term I'm well aware that if we won't get in 2.6.28 it will
mean at least 3 more months until it hits users so lets concentrate
on existing user/kernel-space solution first...

There are some issues to address before it can go in but once they
are fixed I'm fine with the patch and I'll merge it as soon as patches
#1-2 are in.

[...]


ide_port_tune_devices() is not a best suited place for it,
please move it to ide_port_init_devices().

[...]


No need to hold ide_lock for rq manipulations.


No need to hold ide_setting_mtx here.


How's about just looping on hwif->drives[] instead?

[ this would also allow removal of loops in issue_park_cmd()
  and simplify locking there ]


There is only one in ide. ;)



This is unnecessary (IDE_DFLAG_PRESENT won't be cleared as long
as there are references on &drive->gendev and we should have such
reference if we got here).


No need to hold ide_settings_mtx here.


Same comment as in park_show().


No need for getting additional reference on hwif, it won't go away
as long as we have references on its child devices.


ide_lock taking here is superfluous (as it doesn't protect against
changing IDE settings, hwgroup->busy does)

Also could you please move the new code to a separate file (i.e.
ide-park.c) instead of stuffing it all in ide.c?

Otherwise it looks OK (modulo PM notifiers concerns raised by Tejun
but the code is identical to libata's version so it is sufficient to
duplicate the potential fixes here).
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC] Disk shock protection in GNU/Linux (take 2), Elias Oltmanns, (Fri Aug 29, 2:11 pm)
[PATCH 1/4] Introduce ata_id_has_unload(), Elias Oltmanns, (Fri Aug 29, 2:16 pm)
[PATCH 3/4] ide: Implement disk shock protection support, Elias Oltmanns, (Fri Aug 29, 2:26 pm)
Re: [PATCH 1/4] Introduce ata_id_has_unload(), Sergei Shtylyov, (Sat Aug 30, 4:56 am)
Re: [PATCH 1/4] Introduce ata_id_has_unload(), Elias Oltmanns, (Sat Aug 30, 10:29 am)
Re: [PATCH 1/4] Introduce ata_id_has_unload(), Sergei Shtylyov, (Sat Aug 30, 11:01 am)
Re: [PATCH 3/4] ide: Implement disk shock protection support, Bartlomiej Zolnierki ..., (Mon Sep 1, 12:29 pm)