linux AHCI driver which functions are responsible to read/write on disk
Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
linux AHCI driver which functions are responsible to read/write on disk
Hi,
I have SATA disk connected to my system running centos, i am looking for the disk i/o function which is responsible to do the read/write on disk, would somebody point me?
AHCI is used by kernel to perform read and write operation. Could you be more specific as to what exactly you are looking for? Are you looking for specific parameters that can be tuned?
I Want to process the data just before it is written to disk. also wants to process the data immediately after reading from disk.
That is how it is done. So am not quite sure what exactly you are looking for? For example: If an application given task to process the data it will contact the kernel, kernel then load that process in CPU, if data is there on cache or RAM it will pick it up else will go to disk for getting the relevant data. Once data is process it will be written to the disk. Vice-versa happens when you talk about reading from the disk.
If you are talking about parameters for performing immediate sync which are responsible for writing the data immediately to the disk then that is something different.
I am interested to know the function responsible in kernel which writes the chunk of data to the disk. looks like it is not strait forward to find that function.
Ok it is the application that writes to the disk with the help of the kernel. When application has to write any data to the disk post processing (already explained in my previous post) it will tell the kernel that I want to write this stuff to the disk. Kernel will then provide VFS (virtual file system because application doesn't care about the file system you are running on) to the application for data writing which in turn in the backend with the help of kernel writes to the disk.
Now it is quite clear. Basically you are looking for which function is invoked by ahci module (block driver) which helps the kernel to write. Have a look at this wiki and read the POSIX section of it: http://en.wikipedia.org/wiki/Write_(system_call) .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.