Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-19-2011, 06:10 AM   #1
LQ Newbie
Registered: Apr 2011
Posts: 9

Rep: Reputation: 0
Internal operation of floppy in linux.

Hi folks,

Can anyone tell what happen internally when we insert the floppy into the linux operating system? Who will take care of making the entry in the /etc/mtab, etc.

Please tell me the whole internal operation of the kernel when we insert the floppy.

Thanks in advance.
Old 05-19-2011, 07:01 AM   #2
Registered: Jan 2010
Posts: 418

Rep: Reputation: 83
that's a very broad question. And it sounds like a school exercise (people don't usually like doing other's homework ...).
From another post, it seems you genuinely have a floppy issue though.

Can you maybe describe what exact problem the floppy is causing you. Otherwise in the best case, people will just point you to documentation, and you already have access to that I bet.
Old 05-19-2011, 08:43 AM   #3
LQ Newbie
Registered: Apr 2011
Posts: 9

Original Poster
Rep: Reputation: 0
Hi folks,
This is my actual issue.

With this system call i mounting the floppy in my applcation.

mount(“/dev/sdc”(source dir), ”/fdHD/0/”(Our dest dir) "vfat", l_uReadWrite | MS_SYNCHRONOUS, NULL);

This is the system call which we are using to mount to mount he floppy to our desired folder. When I use this system call it is taking much time in linux 2.6. But we are using the same code in Linux 2.4, at that time the mount operation is happening very fast.

So what I did I replaced the mount system call by system(“mount –t vfat /dev/sdc /fdHD/0/”) . Now when we transfer, the operation is happening very fast. So what is did I removed the MS_SYNCHRONOUS flag from the mount system call. So now it is working fine in 2.6 kernel.

Now my doubt is what the use of MS_SYNCHRONOUS flag is? Why removing the flag making the transfer operation very fast? whatis the effect of this flag in mounting?

What might be the reason for this? we are using the same mount system call in 2.4 kernel, there the transfer of image is fast. But in 2.6 it is very slow.
Old 05-19-2011, 09:09 AM   #4
Senior Member
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,293

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335

MS_SYNCHRONOUS means that every time some data is written to a file, it's written to disk, and the call doesn't return until it's actually written. So if the application does a lot of small writes, it will be very slow. Without it, the kernel will optimize writes so data will be written in "bulk" and according to the sectors/clusters of the disk.

The main difference is when someone removes the disk before it is unmounted. Without the MS_SYNCHRONOUS, there will usually be lost data. But a program can use sync/fsync get the data written to disk.

I don't know why it was fast in 2.4 kernels. Maybe some bug?
Old 05-19-2011, 09:53 AM   #5
Registered: Oct 2007
Location: triad, nc, usa
Distribution: Ubuntu
Posts: 232

Rep: Reputation: 29
isnt this the same question you asked in your other thread?
Old 05-26-2011, 02:08 AM   #6
LQ Newbie
Registered: Apr 2011
Posts: 9

Original Poster
Rep: Reputation: 0
But how MS_SYNCHRONOUS is related to mounting of floppy.


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
[SOLVED] IO operation too slow in linux. lakshmun Linux - Hardware 4 04-22-2011 06:07 AM
i need all the operation code of linux ,example:makedir..... gorgio Linux - Newbie 1 11-15-2009 02:28 AM
different linux modes of operation harsha7 Linux - Newbie 1 12-13-2007 11:44 AM
want to know the difference between different linux operation modes harsha7 Linux - Distributions 2 12-13-2007 11:37 AM
Internal floppy to USB Floppy kbvaldez Linux - Newbie 0 08-21-2003 12:11 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:29 AM.

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