How does the redhat8 write files to the floppy disk?
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How does the redhat8 write files to the floppy disk?
I have been working on a CD floppy control application on Redhat8. Now I am trying to find out how the system writes files to the floppy disk. I need to find out the daemons or programs which are watching and flushing the file system. Unfortunately I did not find them. Before I was doing this, I did:
I know that you may loss the file when you eject the floppy disk without umounting it. After mounting the floppy disk, the floppy light will be on whenever you copy a file to the floppy. But this somehow is not really writting data to the floppy disk. I notice that the light will be on again after few seconds and this time the file is really written to the floppy disk. I just want to know how the system does this.
The kernel writes it, in fact. It may wait some time (uses buffers). You may look into the kernel source for details (but it may be a hard read). I suggest something about VFS (maybe "Linux kernel" by Bovet and Cesati from O'Reilly ).
Thank you again Mara.
My purpose is to know if it is the same floppy disk before the system(kernel) writes data on the disk. Linux is somehow weak to control floppy disk. According to your saying, I do not have better methords to do this except modifying kernel, am I right?
As long as you use the mount and umount commands the kernel has no problem keeping the floppy straight. The only time the floppy can get messed up is if you pull it out without doing a umount.
Incidently, the kernel uses the same logic for hard drives. The only way the hard drives can get messed up is if you power off or reboot without going through shutdown. Shutdown includes umount commands for the hard drives.
norman68, if you need to control the floppy directly (without mount/umount), you need to dig into the kernel and modify it. I don't see any other solution.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.