LinuxQuestions.org
Register a domain and help support LQ
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 06-08-2015, 07:39 PM   #1
yashgovin19
LQ Newbie
 
Registered: Nov 2014
Posts: 6

Rep: Reputation: Disabled
What kernel level functions are called when we perform write in ext3 file system?


I have ext3 file system mounted and I am creating a file on it to understand how block groups are allocated. I want to know what functions are being called when I create/write a file. I know vfs_write is called and thereafter I am confused what all functions are called. (do_sync_write is mentioned but I am not sure if it's write). Specifically, I don't want my files to exceed 2 block groups (trying to limit the size. 1 BG contains ~32768 blocks which are of 4K size each). Also, I am new to system programming so any help or direction will be great.
I tried strace but that was of no help.

Last edited by yashgovin19; 06-08-2015 at 08:12 PM.
 
Old 06-09-2015, 11:54 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 2,609

Rep: Reputation: 702Reputation: 702Reputation: 702Reputation: 702Reputation: 702Reputation: 702Reputation: 702
Write from a user program just copies your data into block cache. Disk writes are scheduled and done in the background from cache by a separate flush task.


ulimit -f can be used to limit file size.

Last edited by smallpond; 06-09-2015 at 11:56 AM.
 
Old 06-09-2015, 07:59 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,832

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
As pointed out, user administration is a function of userland code, not the generic kernel code.

If this is a learning exercise, you are of course free to break your own system however you like. Start with ftrace maybe. It's a long dark rabbit hole.
 
  


Reply

Tags
ext3


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
How do you create a cron file that will regularly perform a level 0 backup once per month? cadre41 Linux - Newbie 2 03-04-2011 11:44 AM
USB kernel module, how functions get called by kernel falmdavis Linux - Kernel 1 01-18-2011 02:58 PM
Functions in .so file not called. priyeshwadhwa Linux - Newbie 2 02-22-2008 05:05 AM
Kernel Panic happens after trying to write the ext3 files system to my secondary drv abefroman Linux - Software 3 07-27-2006 07:41 PM
GUI test tool to perform widget functions via a text file liguorir Linux - Software 0 01-05-2004 03:30 PM


All times are GMT -5. The time now is 04:27 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