Juan, is there any way to find supermount sb given dev in check_disk_change?
� ���, 03.06.2002, � 09:56, [EMAIL PROTECTED] �������: > > > >> Hmmm. supermount did notice the media change. the "wrong content" > >> didn't mean it shows the content of previos CD. it shows content of > >> the second CD, but wrong. u can give it a try. > >> > > > > If you want a bug to be fixed please at least describe it properly. I > > have no idea what "shows but wrong" is. > > Hmmmm.. sorry. in my case, the wrong content of "ls /mnt/cdrom" > shows as below (the cd is Mandrake download edition disk 2): > it shows "byacc" as a directory, and show some rpms. > > byacc-1.9-12mdk.i586.rpm/ > bzflag-1.7e4-2mdk.i586.rpm [...] O.K. reproduced. So 1. it is "fixed" with the patch I sent today. But you are not going to like this fix because now you get no files at all ... 2. the reason it happens is rather complicated and currently I do not see any trivial fix. What happens is: - normally every time supermount has to access media it checks for media change. If it finds media has been changed it unmounts subfs and invalidates media (i.e. destroys any information about files on that media). Please note, that "media changed" flag is not sticky and it is reset after query. - in your case you first manually close tray and then do 'eject -t'. Ironically, it does not matter what command you run at this moment as long as it tries to access CD-ROM. Because when it opens CD-ROM (/dev/cdrom) standard open routine invokes standard check_disk_change procedure that knows nothing about supermount and tries to invalidate media _without_ unmounting subfs. It can't do it (VFS: busy inodes on changed media) but it also clears "media changed" flag. With the final effect that you now have stale entries that point to non-existent files but supermount has no way to find out that it needs to remount subfs :( (when you invoke eject -t without manually closing tray you get the same problem with VFS layer but because now supermoutn sees media changed flag it correctly cleans up). So the only thing I can tell you again - do not do it. So far the only possible solution I see is to check for supermounted file system in check_disk_change and unmount subfs. -andrej
