ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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.
Hi everyone i am trying to use direct I/O but have no idea for where to refer and how to use it can someone please help me with the material or a bit of refernce.
[links moderated]
added some links above trying to implement this and how to implement this in terminal
I am a beginner so have very less knowledge about it so any help is appreciated.
Last edited by astrogeek; 08-04-2022 at 12:38 PM.
Reason: moderated links
Hi everyone i am trying to use direct I/O but have no idea for where to refer and how to use it can someone please help me with the material or a bit of refernce.
Sorry. Your question is not clear enough. What do you mean by direct I/O? Is there a reference you can cite which explains better what you're trying to do? There are a lot of ways to perform I/O.
i want to implement the theory given in these links so wanted to know the method for implementation of Direct I/O or some reference for it. Or how can i use these commands in terminal; Really a ameature so any help is appreciated
Last edited by astrogeek; 08-04-2022 at 12:38 PM.
Reason: links moderated
i want to implement the theory given in these links so wanted to know the method for implementation of Direct I/O or some reference for it. Or how can i use these commands in terminal; Really a ameature so any help is appreciated
You're right about amateur, at least that first blog.
This is kernel and how it behaves. I'm sure you can find code there.
The guidance to use dd with the direct option is tip #1. The source for dd is available and likely you can view in that code exactly what it does for this type of mode.
Now, what's your need?
Storytelling: Ere long ago I had a process collecting long time job activity data, a lot of data. When done they wanted to dock the tool and grab the data ASAP. What they'd see was the file, but incomplete because it hadn't synced yet. The solution which worked was that the data was collected to a temporary file, when the job process completed, I forked a child to exec a rename to the intended record name, then exited that child process. The parent seeing the signal meant the file was now ready, for real. Because when a process terms, all open file handles must be resolved. Worked for me.
Last edited by astrogeek; 08-04-2022 at 12:39 PM.
Reason: links moderated
Please review the Site FAQ for guidance in asking well formed questions. Especially visit the link from that page, How to Ask Questions the Smart Way for discussion of things to consider when asking others for help.
Also, the forum rules do not permit advertising, which includes promotion of personal blogs and programming projects. Please visit http://www.linuxquestions.org/advertising/ for more information on advertising. Feel free to contact the forum admin if you have any questions about this policy. As the added, repeated links appear to be the main point of your posts they have been moderated as indicated.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.