FreeMinT bug: Mount drive

Hardware, coding, music, graphic and various applications

Moderators: Mug UK, [ProToS], lp, moondog/.tSCc., Moderator Team

Latz
Captain Atari
Captain Atari
Posts: 232
Joined: Tue Mar 08, 2011 6:02 pm
Location: Germany
Contact:

FreeMinT bug: Mount drive

Postby Latz » Sun Oct 21, 2018 6:18 pm

Hi,
i found a bug in current FreeMnT snapshot. The MinT mailinglist subscription page refuses my email address for any reason,
so i post it here:
When i do a "reload directory" with ESC key (TeraDesk here), new FreeMinT (re-)mounts the partition/drive (which is counted
by fscheck,too) and results in warning "Maximum mount count reached" very often.

Can you fix this?

Latz
Last edited by Latz on Mon Oct 22, 2018 6:01 am, edited 1 time in total.
Falcon/CT60 90MHz, 14+128 MB RAM, CTPCI/Radeon 9250/RTL8139, Carte Eiffel+LCD, 80GB IDE HD, DVD-RW.
Falcon/CT63 95MHz, 4+128 MB RAM, CTPCI/Radeon 9250/RTL8139, Carte Eiffel+LCD, 16GB IDE CF card, CD-RW.

czietz
Hardware Guru
Hardware Guru
Posts: 772
Joined: Tue May 24, 2016 6:47 pm

Re: FreeinT bug: Mount drive

Postby czietz » Sun Oct 21, 2018 6:26 pm

It would probably better bring this to the FreeMiNT developers' attention if you opened a ticket: https://github.com/freemint/freemint/issues

Latz
Captain Atari
Captain Atari
Posts: 232
Joined: Tue Mar 08, 2011 6:02 pm
Location: Germany
Contact:

Re: FreeMinT bug: Mount drive

Postby Latz » Mon Oct 22, 2018 6:11 am

Hi,
maybe you´re right, but i think the FreeMinT developers are here.
Also i wanted to give you and others the chance to confirm this bug ;)
(... and to avoid another account for me).

Additional info:The re-mount only happens with ext2 partitions here.

Latz
Falcon/CT60 90MHz, 14+128 MB RAM, CTPCI/Radeon 9250/RTL8139, Carte Eiffel+LCD, 80GB IDE HD, DVD-RW.
Falcon/CT63 95MHz, 4+128 MB RAM, CTPCI/Radeon 9250/RTL8139, Carte Eiffel+LCD, 16GB IDE CF card, CD-RW.

User avatar
wongck
Ultimate Atarian
Ultimate Atarian
Posts: 12487
Joined: Sat May 03, 2008 2:09 pm
Location: Far East
Contact:

Re: FreeMinT bug: Mount drive

Postby wongck » Mon Oct 22, 2018 7:49 am

You should be able to use tune2fs to set the number to higher or turn it off.
My Stuff: FB/Falcon CT63/CTPCI+ATI+RTL8139+USB 512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list

ThorstenOtto
Captain Atari
Captain Atari
Posts: 417
Joined: Sun Aug 03, 2014 5:54 pm

Re: FreeMinT bug: Mount drive

Postby ThorstenOtto » Mon Oct 22, 2018 12:43 pm

Latz wrote:Hi,
new FreeMinT (re-)mounts the partition/drive (which is counted
by fscheck,too) and results in warning "Maximum mount count reached" very often.
Latz


This is just a feature of the ext2 filesystem. You can specify the maximum number of mounts after which the filesystem will be checked regardless whether it was unmounted cleanly. You can also turn that feature off. As wongck said, you can use tune2fs for that.

User avatar
frank.lukas
Hardware Guru
Hardware Guru
Posts: 1638
Joined: Tue Jan 29, 2008 5:33 pm
Location: Germany

Re: FreeMinT bug: Mount drive

Postby frank.lukas » Mon Oct 22, 2018 2:04 pm

wongck wrote:You should be able to use tune2fs to set the number to higher or turn it off.


How to use tune2fs ?

Is there a document about tune2fs ?
fancy Atari Musik anDA Dance "Agare Hinu Harukana" 1998 ATARI http://www.youtube.com/watch?v=JX10fxb5eYE

Latz
Captain Atari
Captain Atari
Posts: 232
Joined: Tue Mar 08, 2011 6:02 pm
Location: Germany
Contact:

Re: FreeMinT bug: Mount drive

Postby Latz » Mon Oct 22, 2018 3:26 pm

Hi,

wongck wrote:You should be able to use tune2fs to set the number to higher or turn it off.

ThorstenOtto wrote:This is just a feature of the ext2 filesystem.

No, this is definetly a bug and never happened before (caused by simple "refresh dir").
Sure i know about fsck, max. mountcount and tune2fs and it worked correct all the years before, means:
- ext2 drives/partitions which are listed in /etc/fstab are checked at boot by fsck. If not clearly unmounted
or max. mountcount reached, the "full" fsck check is done then.
- "refresh directories" never were counted as "mounts" before.

frank.lukas wrote:How to use tune2fs ?
Is there a document about tune2fs ?

Use command

Code: Select all

man tune2fs

in TosWin2 shell.

Latz
Falcon/CT60 90MHz, 14+128 MB RAM, CTPCI/Radeon 9250/RTL8139, Carte Eiffel+LCD, 80GB IDE HD, DVD-RW.
Falcon/CT63 95MHz, 4+128 MB RAM, CTPCI/Radeon 9250/RTL8139, Carte Eiffel+LCD, 16GB IDE CF card, CD-RW.

mikro
Atari God
Atari God
Posts: 1777
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia
Contact:

Re: FreeMinT bug: Mount drive

Postby mikro » Mon Oct 22, 2018 4:32 pm

Latz, can you really confirm (by running tune2fs on given partition) following scenario?

1. Print current number of mounts
2. Refresh
3. Print current number of mounts again

Ideally, without any "maximum number of mounts reached" or whatever else what could lead you to false assumptions. Also make sure that the partition has been already mounted.

If that is really true, can you try 1.18 kernel? (should be still available here: https://bintray.com/freemint/freemint/s ... estVersion)

ThorstenOtto
Captain Atari
Captain Atari
Posts: 417
Joined: Sun Aug 03, 2014 5:54 pm

Re: FreeMinT bug: Mount drive

Postby ThorstenOtto » Tue Oct 23, 2018 12:02 am

frank.lukas wrote:
wongck wrote:Is there a document about tune2fs ?


Should be the same as the linux version. Maybe some ext4 specific options are not available.

Latz
Captain Atari
Captain Atari
Posts: 232
Joined: Tue Mar 08, 2011 6:02 pm
Location: Germany
Contact:

Re: FreeMinT bug: Mount drive

Postby Latz » Tue Oct 23, 2018 10:47 am

Hi mikro,

it's like i wrote (FreeMinT 1-19-b43 020 snapshot/XaAES/TeraDesk):

- Drive h: ext2fsck check was forced at boot, so a we have a "fresh" counter.
- Then in bash:

Code: Select all

>tune2fs -l h:
...
Last mount time:          Tue Oct 23 10:29:09 2018
Last write time:          Tue Oct 23 12:20:11 2018
Mount count:              1
Maximum mount count:      23
Last checked:             Tue Oct 23 12:20:11 2018

- After a "reload directory" (with ESC key on TeraDesk):

Code: Select all

>tune2fs -l h:
...
Last mount time:          Tue Oct 23 10:29:09 2018
Last write time:          Tue Oct 23 12:20:11 2018
Mount count:              2
Maximum mount count:      23
Last checked:             Tue Oct 23 12:20:11 2018

- Tested a few more times, always the same: "reload dir" = mount_count+1

Please note the time at "Last write time" and "Last checked": This is impossible,
as i run tune2fs at 10:35 today!

- Tested drive g: last ext2fsck two days ago: The problem does not occure here!!
Drive g: is the first ext2 partition here, my "MinT drive" (1x FAT, 3x VFAT, 4x ext2 on 80GB IDE).

Code: Select all

>tune2fs -l g:
...
Last mount time:          Tue Oct 23 12:17:47 2018
Last write time:          Sun Oct 21 10:43:55 2018
Mount count:              7
Maximum mount count:      31
Last checked:             Sun Oct 21 10:43:54 2018


- Tested drives i: and j: last ext2fsck long time ago, not listed in /etc/fstab, warning "mount unchecked fs...":
The problem happens here, too; same as drive h:

Code: Select all

>tune2fs -l i:  # and j:
...
Last mount time:          Tue Oct 23 11:07:13 2018
Last write time:          Sat Oct 28 15:03:55 2017
Mount count:              49
Maximum mount count:      39
Last checked:             Sat Oct 28 15:03:55 2017


Finally tested FreeMinT 1-19-cur from January 2018, the behaviour is the same:
Drive g: works correct, h: - j: show the problem. Now i know why i didn´t find this before - g: is my main ext2 drive, i rarely
used h: - j: before

mikro wrote:If that is really true, can you try 1.18 kernel?

Oh no, please not - one week ago i deleted my 1-18-0 installation after i thought that
1-19-b43 works good. I only kept 1-19-cur as a fallback.

Regards,
Lars
Falcon/CT60 90MHz, 14+128 MB RAM, CTPCI/Radeon 9250/RTL8139, Carte Eiffel+LCD, 80GB IDE HD, DVD-RW.
Falcon/CT63 95MHz, 4+128 MB RAM, CTPCI/Radeon 9250/RTL8139, Carte Eiffel+LCD, 16GB IDE CF card, CD-RW.

mikro
Atari God
Atari God
Posts: 1777
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia
Contact:

Re: FreeMinT bug: Mount drive

Postby mikro » Tue Oct 23, 2018 12:07 pm

Interesting. It would really help if you could compare this to some previous experience - like that whether it worked a year ago for instance.

Anyways, if possible, try to test at least a build before June 2017 - that was the last time something related had changed. However that requires manual compilation.

Ideally, report this at github so it wont be forgotten.

Latz
Captain Atari
Captain Atari
Posts: 232
Joined: Tue Mar 08, 2011 6:02 pm
Location: Germany
Contact:

Re: FreeMinT bug: Mount drive

Postby Latz » Tue Oct 23, 2018 1:04 pm

Hi,
as i´m working on another project while i discovered this i would be happy if someone else (who has still 1.18-*) could test this...

Latz
Falcon/CT60 90MHz, 14+128 MB RAM, CTPCI/Radeon 9250/RTL8139, Carte Eiffel+LCD, 80GB IDE HD, DVD-RW.
Falcon/CT63 95MHz, 4+128 MB RAM, CTPCI/Radeon 9250/RTL8139, Carte Eiffel+LCD, 16GB IDE CF card, CD-RW.

ThorstenOtto
Captain Atari
Captain Atari
Posts: 417
Joined: Sun Aug 03, 2014 5:54 pm

Re: FreeMinT bug: Mount drive

Postby ThorstenOtto » Tue Oct 23, 2018 6:11 pm

On what medium is that h: partition located? Could it be that your harddisk driver reports a media change on those?

Latz
Captain Atari
Captain Atari
Posts: 232
Joined: Tue Mar 08, 2011 6:02 pm
Location: Germany
Contact:

Re: FreeMinT bug: Mount drive

Postby Latz » Wed Oct 24, 2018 12:16 pm

Hi,

ThorstenOtto wrote:On what medium is that h: partition located? Could it be that your harddisk driver reports a media change on those?

No media change, 1x FAT, 3x VFAT, 4x ext2 on 80GB internal IDE HD (Falcon connector, not CTPCI).
So it seems that it works correct on the first ext2 partition but not on the following ones.
Again: Can anybody confirm this behaviour (on 1-18-* or 1-19-*)? :megaphone:

Latz
Falcon/CT60 90MHz, 14+128 MB RAM, CTPCI/Radeon 9250/RTL8139, Carte Eiffel+LCD, 80GB IDE HD, DVD-RW.
Falcon/CT63 95MHz, 4+128 MB RAM, CTPCI/Radeon 9250/RTL8139, Carte Eiffel+LCD, 16GB IDE CF card, CD-RW.

User avatar
wongck
Ultimate Atarian
Ultimate Atarian
Posts: 12487
Joined: Sat May 03, 2008 2:09 pm
Location: Far East
Contact:

Re: FreeMinT bug: Mount drive

Postby wongck » Wed Oct 24, 2018 12:43 pm

I don't have so many e2fs, only 1.
My Stuff: FB/Falcon CT63/CTPCI+ATI+RTL8139+USB 512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list

Galvez
Captain Atari
Captain Atari
Posts: 235
Joined: Fri Oct 19, 2007 7:49 am

Re: FreeMinT bug: Mount drive

Postby Galvez » Thu Oct 25, 2018 4:20 pm

I can replicate this, I have 4 ext2 partitions (f:, g:, h: and i:), three of them (f:, g: and i:) behaves as explained above, every directory refresh increases the mount count. For partition h: it doesn't occur. h: is where my UNIX stuff is, Latz said that his main ext2 partition didn't have these extra mount counts either.

Latz
Captain Atari
Captain Atari
Posts: 232
Joined: Tue Mar 08, 2011 6:02 pm
Location: Germany
Contact:

Re: FreeMinT bug: Mount drive

Postby Latz » Fri Oct 26, 2018 8:41 am

Thank you David!!
So we are one step further: It´s not the first ext2 partition but the UNIX stuff partition which works fine.
But i can´t find any differences between g: and h: here (regarding hddriver, fstab, mint.cnf, ...).
Only one thing: g: is 2GB, h: and the others are > 20GB here
So what makes the "UNIX stuff drive" so special?

Latz
Falcon/CT60 90MHz, 14+128 MB RAM, CTPCI/Radeon 9250/RTL8139, Carte Eiffel+LCD, 80GB IDE HD, DVD-RW.
Falcon/CT63 95MHz, 4+128 MB RAM, CTPCI/Radeon 9250/RTL8139, Carte Eiffel+LCD, 16GB IDE CF card, CD-RW.

Galvez
Captain Atari
Captain Atari
Posts: 235
Joined: Fri Oct 19, 2007 7:49 am

Re: FreeMinT bug: Mount drive

Postby Galvez » Fri Oct 26, 2018 9:19 am

I have traced it to this line of code
https://github.com/freemint/freemint/bl ... sys.c#L903

dir.fs is NULL and a media change is forced, I'm trying to understand now why this happens only with some ext2 partitions.

Galvez
Captain Atari
Captain Atari
Posts: 235
Joined: Fri Oct 19, 2007 7:49 am

Re: FreeMinT bug: Mount drive

Postby Galvez » Fri Oct 26, 2018 4:09 pm

Teradesk forces the media change when the window is refreshed:

Code: Select all

      case ESCAPE:            /* refresh a window */
      {
         if ( wt == DIR_WIND )
         {
            /* refresh a directory window */

            force_mediach(((DIR_WINDOW *) w)->path);   <------------------
            dir_refresh_wd((DIR_WINDOW *)w);
         }
         else
         {
            /* re-read the file in a text window */
   
            txt_reread((TXT_WINDOW *)w, NULL, tyw->px, tyw->py);
         }
         break;
      }


The partition with the UNIX hierarchical tree must be being locked by MiNT not allowing the media change in that drive.

ThorstenOtto
Captain Atari
Captain Atari
Posts: 417
Joined: Sun Aug 03, 2014 5:54 pm

Re: FreeMinT bug: Mount drive

Postby ThorstenOtto » Fri Oct 26, 2018 5:32 pm

Could be as simple as some file being open on that partition, maybe some log file. But this is not MiNT's fault then, if a media change is forced by teradesk and possible, then a remount is the expected behaviour. Not doing that might have the opposite effect, ie. not displaying the current contents of a CDROM or other changeable media.

Latz
Captain Atari
Captain Atari
Posts: 232
Joined: Tue Mar 08, 2011 6:02 pm
Location: Germany
Contact:

Re: FreeMinT bug: Mount drive

Postby Latz » Sat Oct 27, 2018 6:33 am

Wow,
thank you David and Thorsten for your investigations!
I never could have found that (in fact i´m happy that i understand ~half of the things that you explain :oops: ).
I understood that the behaviour is basically correct both for FreeMinT and TeraDesk.
So please excuse me for calling this a "FreeMinT bug" and for this perhaps stupid question:
- Can "the system" detect if any media is changeable or not (so FreeMinT or TeraDesk could use this "value" for a better behaviour)?

Regards,
Latz
Falcon/CT60 90MHz, 14+128 MB RAM, CTPCI/Radeon 9250/RTL8139, Carte Eiffel+LCD, 80GB IDE HD, DVD-RW.
Falcon/CT63 95MHz, 4+128 MB RAM, CTPCI/Radeon 9250/RTL8139, Carte Eiffel+LCD, 16GB IDE CF card, CD-RW.

mikro
Atari God
Atari God
Posts: 1777
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia
Contact:

Re: FreeMinT bug: Mount drive

Postby mikro » Sat Oct 27, 2018 8:39 am

I don't think reloading directory should invoke a media change. So in this matter I'd call it a Teradesk bug.

Galvez
Captain Atari
Captain Atari
Posts: 235
Joined: Fri Oct 19, 2007 7:49 am

Re: FreeMinT bug: Mount drive

Postby Galvez » Sat Oct 27, 2018 9:58 am

Latz wrote:- Can "the system" detect if any media is changeable or not (so FreeMinT or TeraDesk could use this "value" for a better behaviour)?

The XHDI protocol has the function XHInqTarget http://toshyp.atari.org/en/010008.html#XHInqTarget2 that allows you to check if a device is removable, but I'm not sure if the kernel should filter media change requests depending on it. In any case I agree with Miro that is strange that Teradesk forces a media change when updating window contents.

ThorstenOtto
Captain Atari
Captain Atari
Posts: 417
Joined: Sun Aug 03, 2014 5:54 pm

Re: FreeMinT bug: Mount drive

Postby ThorstenOtto » Sat Oct 27, 2018 2:41 pm

Forcing a media change is common practice, and at least on older TOS versions even needed to get an up-to-date status. But that might depend on the OS and the harddisk-driver being used. At least it would be difficult for an app to figure out whether that is actually needed. Using XHDI is not reliable either, even if it is available.

mikro
Atari God
Atari God
Posts: 1777
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia
Contact:

Re: FreeMinT bug: Mount drive

Postby mikro » Sat Oct 27, 2018 6:42 pm

I think the cleanest solution is to actually handle this on the application level - for instance SHIFT+ESC = "hard" (media change) reload, ESC = "soft" reload.


Social Media

     

Return to “Professionals”

Who is online

Users browsing this forum: No registered users and 9 guests