aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-core.c
diff options
context:
space:
mode:
authorRandy Dunlap <randy.dunlap@oracle.com>2008-08-19 14:13:11 -0400
committerJens Axboe <jens.axboe@oracle.com>2008-10-09 02:56:03 -0400
commit710027a48ede75428cc68eaa8ae2269b1e356e2c (patch)
tree22cba18860b83b03613bad97c405fb5146a2d686 /block/blk-core.c
parent5b99c2ffa980528a197f26c7d876cceeccce8dd5 (diff)
Add some block/ source files to the kernel-api docbook. Fix kernel-doc notation in them as needed. Fix changed function parameter names. Fix typos/spellos. In comments, change REQ_SPECIAL to REQ_TYPE_SPECIAL and REQ_BLOCK_PC to REQ_TYPE_BLOCK_PC.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r--block/blk-core.c72
1 files changed, 36 insertions, 36 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 2616cdd049a8..86d22e7d65c5 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -531,7 +531,7 @@ EXPORT_SYMBOL(blk_alloc_queue_node);
531 * request queue; this lock will be taken also from interrupt context, so irq 531 * request queue; this lock will be taken also from interrupt context, so irq
532 * disabling is needed for it. 532 * disabling is needed for it.
533 * 533 *
534 * Function returns a pointer to the initialized request queue, or NULL if 534 * Function returns a pointer to the initialized request queue, or %NULL if
535 * it didn't succeed. 535 * it didn't succeed.
536 * 536 *
537 * Note: 537 * Note:
@@ -913,7 +913,7 @@ void blk_requeue_request(struct request_queue *q, struct request *rq)
913EXPORT_SYMBOL(blk_requeue_request); 913EXPORT_SYMBOL(blk_requeue_request);
914 914
915/** 915/**
916 * blk_insert_request - insert a special request in to a request queue 916 * blk_insert_request - insert a special request into a request queue
917 * @q: request queue where request should be inserted 917 * @q: request queue where request should be inserted
918 * @rq: request to be inserted 918 * @rq: request to be inserted
919 * @at_head: insert request at head or tail of queue 919 * @at_head: insert request at head or tail of queue
@@ -923,8 +923,8 @@ EXPORT_SYMBOL(blk_requeue_request);
923 * Many block devices need to execute commands asynchronously, so they don't 923 * Many block devices need to execute commands asynchronously, so they don't
924 * block the whole kernel from preemption during request execution. This is 924 * block the whole kernel from preemption during request execution. This is
925 * accomplished normally by inserting aritficial requests tagged as 925 * accomplished normally by inserting aritficial requests tagged as
926 * REQ_SPECIAL in to the corresponding request queue, and letting them be 926 * REQ_TYPE_SPECIAL in to the corresponding request queue, and letting them
927 * scheduled for actual execution by the request queue. 927 * be scheduled for actual execution by the request queue.
928 * 928 *
929 * We have the option of inserting the head or the tail of the queue. 929 * We have the option of inserting the head or the tail of the queue.
930 * Typically we use the tail for new ioctls and so forth. We use the head 930 * Typically we use the tail for new ioctls and so forth. We use the head
@@ -1322,7 +1322,7 @@ static inline int bio_check_eod(struct bio *bio, unsigned int nr_sectors)
1322} 1322}
1323 1323
1324/** 1324/**
1325 * generic_make_request: hand a buffer to its device driver for I/O 1325 * generic_make_request - hand a buffer to its device driver for I/O
1326 * @bio: The bio describing the location in memory and on the device. 1326 * @bio: The bio describing the location in memory and on the device.
1327 * 1327 *
1328 * generic_make_request() is used to make I/O requests of block 1328 * generic_make_request() is used to make I/O requests of block
@@ -1480,13 +1480,13 @@ void generic_make_request(struct bio *bio)
1480EXPORT_SYMBOL(generic_make_request); 1480EXPORT_SYMBOL(generic_make_request);
1481 1481
1482/** 1482/**
1483 * submit_bio: submit a bio to the block device layer for I/O 1483 * submit_bio - submit a bio to the block device layer for I/O
1484 * @rw: whether to %READ or %WRITE, or maybe to %READA (read ahead) 1484 * @rw: whether to %READ or %WRITE, or maybe to %READA (read ahead)
1485 * @bio: The &struct bio which describes the I/O 1485 * @bio: The &struct bio which describes the I/O
1486 * 1486 *
1487 * submit_bio() is very similar in purpose to generic_make_request(), and 1487 * submit_bio() is very similar in purpose to generic_make_request(), and
1488 * uses that function to do most of the work. Both are fairly rough 1488 * uses that function to do most of the work. Both are fairly rough
1489 * interfaces, @bio must be presetup and ready for I/O. 1489 * interfaces; @bio must be presetup and ready for I/O.
1490 * 1490 *
1491 */ 1491 */
1492void submit_bio(int rw, struct bio *bio) 1492void submit_bio(int rw, struct bio *bio)
@@ -1524,7 +1524,7 @@ EXPORT_SYMBOL(submit_bio);
1524/** 1524/**
1525 * __end_that_request_first - end I/O on a request 1525 * __end_that_request_first - end I/O on a request
1526 * @req: the request being processed 1526 * @req: the request being processed
1527 * @error: 0 for success, < 0 for error 1527 * @error: %0 for success, < %0 for error
1528 * @nr_bytes: number of bytes to complete 1528 * @nr_bytes: number of bytes to complete
1529 * 1529 *
1530 * Description: 1530 * Description:
@@ -1532,8 +1532,8 @@ EXPORT_SYMBOL(submit_bio);
1532 * for the next range of segments (if any) in the cluster. 1532 * for the next range of segments (if any) in the cluster.
1533 * 1533 *
1534 * Return: 1534 * Return:
1535 * 0 - we are done with this request, call end_that_request_last() 1535 * %0 - we are done with this request, call end_that_request_last()
1536 * 1 - still buffers pending for this request 1536 * %1 - still buffers pending for this request
1537 **/ 1537 **/
1538static int __end_that_request_first(struct request *req, int error, 1538static int __end_that_request_first(struct request *req, int error,
1539 int nr_bytes) 1539 int nr_bytes)
@@ -1544,7 +1544,7 @@ static int __end_that_request_first(struct request *req, int error,
1544 blk_add_trace_rq(req->q, req, BLK_TA_COMPLETE); 1544 blk_add_trace_rq(req->q, req, BLK_TA_COMPLETE);
1545 1545
1546 /* 1546 /*
1547 * for a REQ_BLOCK_PC request, we want to carry any eventual 1547 * for a REQ_TYPE_BLOCK_PC request, we want to carry any eventual
1548 * sense key with us all the way through 1548 * sense key with us all the way through
1549 */ 1549 */
1550 if (!blk_pc_request(req)) 1550 if (!blk_pc_request(req))
@@ -1810,11 +1810,11 @@ EXPORT_SYMBOL_GPL(blk_rq_cur_bytes);
1810/** 1810/**
1811 * end_queued_request - end all I/O on a queued request 1811 * end_queued_request - end all I/O on a queued request
1812 * @rq: the request being processed 1812 * @rq: the request being processed
1813 * @uptodate: error value or 0/1 uptodate flag 1813 * @uptodate: error value or %0/%1 uptodate flag
1814 * 1814 *
1815 * Description: 1815 * Description:
1816 * Ends all I/O on a request, and removes it from the block layer queues. 1816 * Ends all I/O on a request, and removes it from the block layer queues.
1817 * Not suitable for normal IO completion, unless the driver still has 1817 * Not suitable for normal I/O completion, unless the driver still has
1818 * the request attached to the block layer. 1818 * the request attached to the block layer.
1819 * 1819 *
1820 **/ 1820 **/
@@ -1827,7 +1827,7 @@ EXPORT_SYMBOL(end_queued_request);
1827/** 1827/**
1828 * end_dequeued_request - end all I/O on a dequeued request 1828 * end_dequeued_request - end all I/O on a dequeued request
1829 * @rq: the request being processed 1829 * @rq: the request being processed
1830 * @uptodate: error value or 0/1 uptodate flag 1830 * @uptodate: error value or %0/%1 uptodate flag
1831 * 1831 *
1832 * Description: 1832 * Description:
1833 * Ends all I/O on a request. The request must already have been 1833 * Ends all I/O on a request. The request must already have been
@@ -1845,14 +1845,14 @@ EXPORT_SYMBOL(end_dequeued_request);
1845/** 1845/**
1846 * end_request - end I/O on the current segment of the request 1846 * end_request - end I/O on the current segment of the request
1847 * @req: the request being processed 1847 * @req: the request being processed
1848 * @uptodate: error value or 0/1 uptodate flag 1848 * @uptodate: error value or %0/%1 uptodate flag
1849 * 1849 *
1850 * Description: 1850 * Description:
1851 * Ends I/O on the current segment of a request. If that is the only 1851 * Ends I/O on the current segment of a request. If that is the only
1852 * remaining segment, the request is also completed and freed. 1852 * remaining segment, the request is also completed and freed.
1853 * 1853 *
1854 * This is a remnant of how older block drivers handled IO completions. 1854 * This is a remnant of how older block drivers handled I/O completions.
1855 * Modern drivers typically end IO on the full request in one go, unless 1855 * Modern drivers typically end I/O on the full request in one go, unless
1856 * they have a residual value to account for. For that case this function 1856 * they have a residual value to account for. For that case this function
1857 * isn't really useful, unless the residual just happens to be the 1857 * isn't really useful, unless the residual just happens to be the
1858 * full current segment. In other words, don't use this function in new 1858 * full current segment. In other words, don't use this function in new
@@ -1870,12 +1870,12 @@ EXPORT_SYMBOL(end_request);
1870/** 1870/**
1871 * blk_end_io - Generic end_io function to complete a request. 1871 * blk_end_io - Generic end_io function to complete a request.
1872 * @rq: the request being processed 1872 * @rq: the request being processed
1873 * @error: 0 for success, < 0 for error 1873 * @error: %0 for success, < %0 for error
1874 * @nr_bytes: number of bytes to complete @rq 1874 * @nr_bytes: number of bytes to complete @rq
1875 * @bidi_bytes: number of bytes to complete @rq->next_rq 1875 * @bidi_bytes: number of bytes to complete @rq->next_rq
1876 * @drv_callback: function called between completion of bios in the request 1876 * @drv_callback: function called between completion of bios in the request
1877 * and completion of the request. 1877 * and completion of the request.
1878 * If the callback returns non 0, this helper returns without 1878 * If the callback returns non %0, this helper returns without
1879 * completion of the request. 1879 * completion of the request.
1880 * 1880 *
1881 * Description: 1881 * Description:
@@ -1883,8 +1883,8 @@ EXPORT_SYMBOL(end_request);
1883 * If @rq has leftover, sets it up for the next range of segments. 1883 * If @rq has leftover, sets it up for the next range of segments.
1884 * 1884 *
1885 * Return: 1885 * Return:
1886 * 0 - we are done with this request 1886 * %0 - we are done with this request
1887 * 1 - this request is not freed yet, it still has pending buffers. 1887 * %1 - this request is not freed yet, it still has pending buffers.
1888 **/ 1888 **/
1889static int blk_end_io(struct request *rq, int error, unsigned int nr_bytes, 1889static int blk_end_io(struct request *rq, int error, unsigned int nr_bytes,
1890 unsigned int bidi_bytes, 1890 unsigned int bidi_bytes,
@@ -1919,7 +1919,7 @@ static int blk_end_io(struct request *rq, int error, unsigned int nr_bytes,
1919/** 1919/**
1920 * blk_end_request - Helper function for drivers to complete the request. 1920 * blk_end_request - Helper function for drivers to complete the request.
1921 * @rq: the request being processed 1921 * @rq: the request being processed
1922 * @error: 0 for success, < 0 for error 1922 * @error: %0 for success, < %0 for error
1923 * @nr_bytes: number of bytes to complete 1923 * @nr_bytes: number of bytes to complete
1924 * 1924 *
1925 * Description: 1925 * Description:
@@ -1927,8 +1927,8 @@ static int blk_end_io(struct request *rq, int error, unsigned int nr_bytes,
1927 * If @rq has leftover, sets it up for the next range of segments. 1927 * If @rq has leftover, sets it up for the next range of segments.
1928 * 1928 *
1929 * Return: 1929 * Return:
1930 * 0 - we are done with this request 1930 * %0 - we are done with this request
1931 * 1 - still buffers pending for this request 1931 * %1 - still buffers pending for this request
1932 **/ 1932 **/
1933int blk_end_request(struct request *rq, int error, unsigned int nr_bytes) 1933int blk_end_request(struct request *rq, int error, unsigned int nr_bytes)
1934{ 1934{
@@ -1939,15 +1939,15 @@ EXPORT_SYMBOL_GPL(blk_end_request);
1939/** 1939/**
1940 * __blk_end_request - Helper function for drivers to complete the request. 1940 * __blk_end_request - Helper function for drivers to complete the request.
1941 * @rq: the request being processed 1941 * @rq: the request being processed
1942 * @error: 0 for success, < 0 for error 1942 * @error: %0 for success, < %0 for error
1943 * @nr_bytes: number of bytes to complete 1943 * @nr_bytes: number of bytes to complete
1944 * 1944 *
1945 * Description: 1945 * Description:
1946 * Must be called with queue lock held unlike blk_end_request(). 1946 * Must be called with queue lock held unlike blk_end_request().
1947 * 1947 *
1948 * Return: 1948 * Return:
1949 * 0 - we are done with this request 1949 * %0 - we are done with this request
1950 * 1 - still buffers pending for this request 1950 * %1 - still buffers pending for this request
1951 **/ 1951 **/
1952int __blk_end_request(struct request *rq, int error, unsigned int nr_bytes) 1952int __blk_end_request(struct request *rq, int error, unsigned int nr_bytes)
1953{ 1953{
@@ -1966,7 +1966,7 @@ EXPORT_SYMBOL_GPL(__blk_end_request);
1966/** 1966/**
1967 * blk_end_bidi_request - Helper function for drivers to complete bidi request. 1967 * blk_end_bidi_request - Helper function for drivers to complete bidi request.
1968 * @rq: the bidi request being processed 1968 * @rq: the bidi request being processed
1969 * @error: 0 for success, < 0 for error 1969 * @error: %0 for success, < %0 for error
1970 * @nr_bytes: number of bytes to complete @rq 1970 * @nr_bytes: number of bytes to complete @rq
1971 * @bidi_bytes: number of bytes to complete @rq->next_rq 1971 * @bidi_bytes: number of bytes to complete @rq->next_rq
1972 * 1972 *
@@ -1974,8 +1974,8 @@ EXPORT_SYMBOL_GPL(__blk_end_request);
1974 * Ends I/O on a number of bytes attached to @rq and @rq->next_rq. 1974 * Ends I/O on a number of bytes attached to @rq and @rq->next_rq.
1975 * 1975 *
1976 * Return: 1976 * Return:
1977 * 0 - we are done with this request 1977 * %0 - we are done with this request
1978 * 1 - still buffers pending for this request 1978 * %1 - still buffers pending for this request
1979 **/ 1979 **/
1980int blk_end_bidi_request(struct request *rq, int error, unsigned int nr_bytes, 1980int blk_end_bidi_request(struct request *rq, int error, unsigned int nr_bytes,
1981 unsigned int bidi_bytes) 1981 unsigned int bidi_bytes)
@@ -1987,11 +1987,11 @@ EXPORT_SYMBOL_GPL(blk_end_bidi_request);
1987/** 1987/**
1988 * blk_end_request_callback - Special helper function for tricky drivers 1988 * blk_end_request_callback - Special helper function for tricky drivers
1989 * @rq: the request being processed 1989 * @rq: the request being processed
1990 * @error: 0 for success, < 0 for error 1990 * @error: %0 for success, < %0 for error
1991 * @nr_bytes: number of bytes to complete 1991 * @nr_bytes: number of bytes to complete
1992 * @drv_callback: function called between completion of bios in the request 1992 * @drv_callback: function called between completion of bios in the request
1993 * and completion of the request. 1993 * and completion of the request.
1994 * If the callback returns non 0, this helper returns without 1994 * If the callback returns non %0, this helper returns without
1995 * completion of the request. 1995 * completion of the request.
1996 * 1996 *
1997 * Description: 1997 * Description:
@@ -2004,10 +2004,10 @@ EXPORT_SYMBOL_GPL(blk_end_bidi_request);
2004 * Don't use this interface in other places anymore. 2004 * Don't use this interface in other places anymore.
2005 * 2005 *
2006 * Return: 2006 * Return:
2007 * 0 - we are done with this request 2007 * %0 - we are done with this request
2008 * 1 - this request is not freed yet. 2008 * %1 - this request is not freed yet.
2009 * this request still has pending buffers or 2009 * this request still has pending buffers or
2010 * the driver doesn't want to finish this request yet. 2010 * the driver doesn't want to finish this request yet.
2011 **/ 2011 **/
2012int blk_end_request_callback(struct request *rq, int error, 2012int blk_end_request_callback(struct request *rq, int error,
2013 unsigned int nr_bytes, 2013 unsigned int nr_bytes,