public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* RE: Removable IDE devices problem
@ 2002-03-08 10:42 Marko Kohtala
  2002-03-08 12:01 ` Martin Dalecki
  0 siblings, 1 reply; 4+ messages in thread
From: Marko Kohtala @ 2002-03-08 10:42 UTC (permalink / raw)
  To: dalecki; +Cc: linux-kernel

 > Your analysis of the problem is entierly right, since the current
 > kernel behaviour for removable media is supposed to work for
 > floppies (never get this thing out of your computer
 > as long as long the diode blinks) or read only media where it doesn't
 > really matter. However I still don't see a good way to
 > resolve this issue. (Maybe just adding buffer cache flush before
 > going into the check_media_change business of "grocking" partitions
 > would be sufficient...

But there is ide-floppy and ide-cd with their own media_check functions.

I'm thinking about ignoring the removable bit, at least when the device 
does not have door lock. What would be hurt by it?

P.S. Sorry for the previous mail with long lines. I should know better 
than using Outlook...



^ permalink raw reply	[flat|nested] 4+ messages in thread
* Removable IDE devices problem
@ 2002-03-06 16:57 marko.kohtala
  2002-03-06 17:13 ` Martin Dalecki
  0 siblings, 1 reply; 4+ messages in thread
From: marko.kohtala @ 2002-03-06 16:57 UTC (permalink / raw)
  To: linux-kernel

I have a question about the struct ide_drive_s member removable.

The problem with it is that I have an IDE flash disk that sits on normal IDE bus and this removable flag gets set because the IDE ID info has the bit set for removable. Because this flag is set, idedisk_media_change will return true every time media change check is done. This happens every time when partitions are being mounted.

Now, because idedisk_media_change tells the media is changed, the system invalidates all buffers. This is bad when the dirty buffers on some of the partitions have not been written to the disk. Data is lost and file system is corrupt.

I suppose the device tells it is removable because the controller on the disk is also used with some PCMCIA IDE devices.

I am curious if this idedisk_media_change return value is needed with some removable disks. I do not know any. I think that in case of a PCMCIA, the whole IDE controller is removed and that should invalidate all buffers.

Currently I have just patched the kernel to clear the flag for this particular disk.

But I'd need your help in finding a real fix to the problem.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-03-08 12:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-08 10:42 Removable IDE devices problem Marko Kohtala
2002-03-08 12:01 ` Martin Dalecki
  -- strict thread matches above, loose matches on Subject: below --
2002-03-06 16:57 marko.kohtala
2002-03-06 17:13 ` Martin Dalecki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox