devfs
[Top] [All Lists]

Re: Removeable Media, partitions and devfs?

To: "Kevin P. Fleming" <kevin@xxxxxxxxxxxxx>
Subject: Re: Removeable Media, partitions and devfs?
From: Richard Gooch <rgooch@xxxxxxxxxxxxxxx>
Date: Thu, 13 Dec 2001 23:39:37 -0700
Cc: "Paul Bristow" <paul@xxxxxxxxxxxxxxx>, <Andrej.Borsenkow@xxxxxxxxxxxxxx>, <mfedyk@xxxxxxxxxxxxx>, <devfs@xxxxxxxxxxx>
In-reply-to: <003401c180f8$ac3936c0$6caaa8c0@kevin>
References: <3C0C9AC5.4080504@paulbristow.net> <001801c17d15$758b6760$c8aaa8c0@kevin> <3C0D588F.9000806@paulbristow.net> <03be01c17d20$5d1b72f0$c8aaa8c0@kevin> <200112050639.fB56d0a05344@vindaloo.ras.ucalgary.ca> <00e901c17dd2$8ccffe50$c8aaa8c0@kevin> <200112060633.fB66XoZ22006@vindaloo.ras.ucalgary.ca> <3C0FED36.9050506@paulbristow.net> <200112070708.fB778bo09456@vindaloo.ras.ucalgary.ca> <000701c18011$8f1b1280$6caaa8c0@kevin> <200112090305.fB935r704671@vindaloo.ras.ucalgary.ca> <003401c180f8$ac3936c0$6caaa8c0@kevin>
Sender: owner-devfs@xxxxxxxxxxx
Kevin P. Fleming writes:
> > Someone else reported having problems, and it looks to me like the
> > media revalidation isn't working. It used to. Check the list
> > archives, I asked for people to insert debugging printk()'s to find
> > out what's going wrong. I don't have hardware to check this.
> >
> > Regards,
> >
> > Richard....
> > Permanent: rgooch@xxxxxxxxxxxxx
> > Current:   rgooch@xxxxxxxxxxxxxxx
> >
> 
> 
> OK, after a spending a few hours, here's what I've found (all based on
> 2.4.17-pre6):
> 
> - ide-probe.c does not contain any code to set the "removable" flag for
> ide-floppy devices. the ide-floppy driver would carry it over into the
> gendisk structure if it was there... so after adding that, the previously
> posted patch _does_ cause the directory and whole-disc device to be created
> on my system, even with no media in the drive when the driver loads
> 
> - when the removable flag set properly, devfs does appear to force a "media
> change" check on every readdir or access to the contents of the directory.
> unfortunately, ide-floppy currently contains (nearly) no media change logic.
> this makes the resulting behavior less than optimal :-)
> 
> - yes, removing partitions does seem to get the device directory in sync
> now; I don't know when that changed, but it works even for removable media,
> so that problem is gone
> 
> - ejecting and formatting media _would_ cause a revalidation to occur, if
> ide-floppy signaled that the media had been changed
> 
> So, I spent a couple of hours getting some rudimentary media change logic
> into ide-floppy. It's not complete yet, but should be tomorrow. It will
> report a media change under any of the following circumstances:
> 
> - the media was previously ejected
> - the media was previously formatted
> - the media is a different size than at the last media change check
> - the media is (now) unformatted but was at the last media change check
> - there is no media in the drive but was at the last media change check
> 
> This should cover almost all cases, except for the most important
> one: when the user manually ejects the media and replaces it with
> identically sized media. There is no way to currently catch that,
> since the media is not serialized. There are ATA commands to monitor
> this sort of thing, but they will require Andre's new ide subsystem
> for implementation without tons of new code.

OK, so that's not a devfs-related problem, right? Changing calls to
devfs won't help with this last problem?

                                Regards,

                                        Richard....
Permanent: rgooch@xxxxxxxxxxxxx
Current:   rgooch@xxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>