Page 1 of 1

How do you implement bread() in your kernel?

Posted: Thu Jun 01, 2017 9:30 am
by irvanherz
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..

Re: How do you implement bread() in your kernel?

Posted: Tue Jun 06, 2017 5:47 am
by Solar

Code: Select all

loaf * bread()
{
     return malloc( sizeof( loaf ) );
}
Sorry, couldn't resist.

Re: How do you implement bread() in your kernel?

Posted: Tue Jun 06, 2017 8:05 am
by eryjus
Solar wrote:

Code: Select all

loaf * bread()
{
     return malloc( sizeof( loaf ) );
}
Sorry, couldn't resist.
I'm so glad I wasn't the only one.... :lol:

Re: How do you implement bread() in your kernel?

Posted: Wed Jun 07, 2017 11:29 am
by Schol-R-LEA
First, take 4 cups of whole wheat flour, a cup and a half of milk, and two eggs...

Re: How do you implement bread() in your kernel?

Posted: Tue Jun 13, 2017 11:28 am
by irvanherz
OK, how about block_read()?. It was not so delicious as bread() taste like..

Re: How do you implement bread() in your kernel?

Posted: Sun Aug 13, 2017 2:52 pm
by stevewoods1986
I can't help it either. You need wheat, a few other ingredients and yeast 8) search C manuals... that might help