LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 04-23-2003, 11:33 AM   #1
norman68
LQ Newbie
 
Registered: Apr 2003
Location: Calgary,AB,Canada
Posts: 9

Rep: Reputation: 0
Question 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:

killall magicdev
mv /sbin/update /sbin/update.old (disable bdflush)

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.

Profoundly appreciate your help !
 
Old 04-23-2003, 01:43 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
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 ).
 
Old 04-23-2003, 02:39 PM   #3
norman68
LQ Newbie
 
Registered: Apr 2003
Location: Calgary,AB,Canada
Posts: 9

Original Poster
Rep: Reputation: 0
Thank you very much, Mara.
I am wondering if the kernel calls other programs to do it or just do it by itself.
 
Old 04-23-2003, 05:22 PM   #4
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,349

Rep: Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552
The kernel maintains the cache buffers itself. The logic of how it does so is complex and like Mara says would take an entire book to describe.
 
Old 04-23-2003, 05:25 PM   #5
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
type sync to flush the buffers now.
it seems like if you mount the floppy sync, it
writes now, but i can't remember.
 
Old 04-25-2003, 02:35 PM   #6
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Quote:
Originally posted by norman68
Thank you very much, Mara.
I am wondering if the kernel calls other programs to do it or just do it by itself.
That's one of the things that must be done by kernel. Like scheduling, memory management etc.
 
Old 04-25-2003, 02:54 PM   #7
norman68
LQ Newbie
 
Registered: Apr 2003
Location: Calgary,AB,Canada
Posts: 9

Original Poster
Rep: Reputation: 0
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?
 
Old 04-25-2003, 03:30 PM   #8
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,349

Rep: Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552
umount

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.
 
Old 04-25-2003, 03:57 PM   #9
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using a floppy disk to load a USB disk. joeyjwc Linux - General 2 03-21-2004 06:05 PM
Taking .txt files from Linux to Windows NT on Floppy Disk???? rnk103 Linux - General 1 09-18-2003 06:43 AM
How do i copy files to a floppy disk?? dsantamassino Linux - Newbie 32 05-30-2003 09:54 PM
which daemon or program watches writing files on floppy disk? norman68 Linux - Software 2 04-04-2003 07:08 PM
It is impossible to open the zip files from floppy disk or cd rom jjay02 Linux - Distributions 1 08-11-2002 05:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration