LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 05-19-2011, 05:10 AM   #1
ravanan
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, 06:01 AM   #2
16pide
Member
 
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, 07:43 AM   #3
ravanan
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, 08:09 AM   #4
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,291

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
Hello

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, 08:53 AM   #5
akuthia
Member
 
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, 01:08 AM   #6
ravanan
LQ Newbie
 
Registered: Apr 2011
Posts: 9

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


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


All times are GMT -5. The time now is 12:07 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration