LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 12-04-2010, 08:08 AM   #1
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Rep: Reputation: 83
linux newbie question: where is elv_next_trequest?


Hi!

I'm working on developing a simple block device driver (just for the fun on it).

I'm using the sbull code from here:

http://www.kernel-labs.org/?q=blockdriver

So, when I compile it, I get some errors. I have corrected the first one and now I'm getting something about elv_next_request being first time used, blh blah.

So I have to find the .h file where elv_next_request is defined and include it. I'm checking at my "Understanding the linux kernel" book and it'ssomething related to elevator.

When I check for .h files that define that function, none is found. When I check for files with "elevator" in their names, I get linux/elevator.h but there's no such function. Has the API been changed and I have to use another function now?

Code:
$ uname -a
Linux ubuntu 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010 i686 GNU/Linux
On a LiveUSB (Kubuntu Lucid)

Thanks in advance.
 
Old 12-04-2010, 08:59 AM   #2
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Original Poster
Rep: Reputation: 83
Well, well.... I found it... kind of.

After reading http://lwn.net/Articles/333221/ it seems I have to call blk_fetch_request instead of elv_next_request. blk_fetch_request is defined in linux/blkdev.h:

Code:
extern struct request *blk_fetch_request(struct request_queue *q);
 
  


Reply

Tags
block, elevator, elv_next_request, linux


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
Newbie to linux question nightcat Programming 2 04-08-2007 11:10 PM
Linux Newbie Question eckertc1 Linux - Software 3 02-27-2005 05:21 PM


All times are GMT -5. The time now is 11:35 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration