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 06-08-2015, 06:39 PM   #1
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 07:12 PM.
Old 06-09-2015, 10:54 AM   #2
Senior Member
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 2,812

Rep: Reputation: 749Reputation: 749Reputation: 749Reputation: 749Reputation: 749Reputation: 749Reputation: 749
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 10:56 AM.
Old 06-09-2015, 06:59 PM   #3
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,883

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



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 10:44 AM
USB kernel module, how functions get called by kernel falmdavis Linux - Kernel 1 01-18-2011 01:58 PM
Functions in .so file not called. priyeshwadhwa Linux - Newbie 2 02-22-2008 04:05 AM
Kernel Panic happens after trying to write the ext3 files system to my secondary drv abefroman Linux - Software 3 07-27-2006 06:41 PM
GUI test tool to perform widget functions via a text file liguorir Linux - Software 0 01-05-2004 02:30 PM > Forums > Linux Forums > Linux - Newbie

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