Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 10-22-2012, 06:41 AM   #1
LQ Newbie
Registered: Dec 2011
Location: Pune, India
Distribution: Fedora 17
Posts: 6

Rep: Reputation: Disabled
Separation into 4K buffers to be written to the disk


I was recently working on a project in my college where i had modified the write system call. What i observed was that the data buffer that was to be written to the disk, is of size 32K at the max. Kernel version: 2.6.35

The block size on the file system (EXT3) which i was working on was 4K. When i traced the call, i could not find a point where the buffer is actually split into 4K chunks. Is it done when the 4k pages (that would be written) are flushed to the disk? Kindly help me with this.

Would be great if anyone could tell me about the secret behind the 32K sized buffer. I mean why 32K?

Thanks in advance,
Zishan Shaikh.
Old 10-22-2012, 08:58 AM   #2
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,725

Rep: Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294
This magic is in the "buffer pool" and for further on that I direct you to the source-code.

32K is a fairly typical block-size for most things, and a common filesystem magic-number. Ultimately, though, it doesn't matter, and your apps should not be concerned with it. They should simply read and write data in whatever sizes make sense to them.


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
Data written to unformatted disk peterlowrie Linux - General 1 01-14-2011 06:32 PM
How can I mount a removable hard disk and make it can be written? spychan Linux - Newbie 2 04-12-2009 07:36 PM
sync and Disk Buffers LinuxGeek Linux - General 3 01-12-2005 10:18 AM
Possible to make filesystem on disk with data written to it? redhatman Linux - Newbie 3 08-28-2004 10:49 AM
Raster separation in E0.16 bznutz Linux - Software 0 05-29-2003 02:05 PM

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