Hi, all...
I have read plenty books about VFS. Comparing designs from Linux and UNIX-likes.
Linux's bread() will end up in disk driver's request() handler. But a book said that in some UNIX-like kernels, it will calls bread() from vnode/inode (struct inode_operations) who represented for specific disk devices.
Actually, I like simpler second method. But in doubt, I want to clarify what I was said from the book.
Is it right that some UNIX-likes using bread() inode/vnode operation? If so, why there are strategy() operation inside it too?
Thanks before..
How do you implement bread() in your kernel?
Re: How do you implement bread() in your kernel?
Code: Select all
loaf * bread()
{
return malloc( sizeof( loaf ) );
}
Every good solution is obvious once you've found it.
- eryjus
- Member
- Posts: 286
- Joined: Fri Oct 21, 2011 9:47 pm
- Libera.chat IRC: eryjus
- Location: Tustin, CA USA
Re: How do you implement bread() in your kernel?
I'm so glad I wasn't the only one....Solar wrote:Sorry, couldn't resist.Code: Select all
loaf * bread() { return malloc( sizeof( loaf ) ); }
Adam
The name is fitting: Century Hobby OS -- At this rate, it's gonna take me that long!
Read about my mistakes and missteps with this iteration: Journal
"Sometimes things just don't make sense until you figure them out." -- Phil Stahlheber
The name is fitting: Century Hobby OS -- At this rate, it's gonna take me that long!
Read about my mistakes and missteps with this iteration: Journal
"Sometimes things just don't make sense until you figure them out." -- Phil Stahlheber
- Schol-R-LEA
- Member
- Posts: 1925
- Joined: Fri Oct 27, 2006 9:42 am
- Location: Athens, GA, USA
Re: How do you implement bread() in your kernel?
First, take 4 cups of whole wheat flour, a cup and a half of milk, and two eggs...
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
Re: How do you implement bread() in your kernel?
OK, how about block_read()?. It was not so delicious as bread() taste like..
-
- Member
- Posts: 80
- Joined: Wed Aug 09, 2017 7:37 am
Re: How do you implement bread() in your kernel?
I can't help it either. You need wheat, a few other ingredients and yeast search C manuals... that might help