Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763283AbXHaWoi (ORCPT ); Fri, 31 Aug 2007 18:44:38 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756366AbXHaWn5 (ORCPT ); Fri, 31 Aug 2007 18:43:57 -0400 Received: from mx1.redhat.com ([66.187.233.31]:51855 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752966AbXHaWnz (ORCPT ); Fri, 31 Aug 2007 18:43:55 -0400 Date: Fri, 31 Aug 2007 18:43:35 -0400 (EDT) Message-Id: <20070831.184335.85683085.k-ueda@ct.jp.nec.com> To: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org, jens.axboe@oracle.com, mike.miller@hp.com, grant.likely@secretlab.ca Cc: dm-devel@redhat.com, j-nomura@ce.jp.nec.com, k-ueda@ct.jp.nec.com Subject: [PATCH 6/7] blk_end_request: remove/unexport end_that_request_* From: Kiyoshi Ueda X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5772 Lines: 146 This patch removes the following functions: o end_that_request_first() o end_that_request_chunk() and stops exporting the functions below: o end_that_request_last() Signed-off-by: Kiyoshi Ueda Signed-off-by: Jun'ichi Nomura --- block/ll_rw_blk.c | 61 ++++++++++++------------------------------------- include/linux/blkdev.h | 15 ++++-------- 2 files changed, 21 insertions(+), 55 deletions(-) diff -rupN 05-ide-cd-change/block/ll_rw_blk.c 06-remove-old-interface/block/ll_rw_blk.c --- 05-ide-cd-change/block/ll_rw_blk.c 2007-08-24 12:11:02.000000000 -0400 +++ 06-remove-old-interface/block/ll_rw_blk.c 2007-08-24 12:19:02.000000000 -0400 @@ -3388,6 +3388,20 @@ static void blk_recalc_rq_sectors(struct } } +/** + * __end_that_request_first - end I/O on a request + * @req: the request being processed + * @uptodate: 1 for success, 0 for I/O error, < 0 for specific error + * @nr_bytes: number of bytes to complete + * + * Description: + * Ends I/O on a number of bytes attached to @req, and sets it up + * for the next range of segments (if any) in the cluster. + * + * Return: + * 0 - we are done with this request, call end_that_request_last() + * 1 - still buffers pending for this request + **/ static int __end_that_request_first(struct request *req, int uptodate, int nr_bytes) { @@ -3498,49 +3512,6 @@ static int __end_that_request_first(stru return 1; } -/** - * end_that_request_first - end I/O on a request - * @req: the request being processed - * @uptodate: 1 for success, 0 for I/O error, < 0 for specific error - * @nr_sectors: number of sectors to end I/O on - * - * Description: - * Ends I/O on a number of sectors attached to @req, and sets it up - * for the next range of segments (if any) in the cluster. - * - * Return: - * 0 - we are done with this request, call end_that_request_last() - * 1 - still buffers pending for this request - **/ -int end_that_request_first(struct request *req, int uptodate, int nr_sectors) -{ - return __end_that_request_first(req, uptodate, nr_sectors << 9); -} - -EXPORT_SYMBOL(end_that_request_first); - -/** - * end_that_request_chunk - end I/O on a request - * @req: the request being processed - * @uptodate: 1 for success, 0 for I/O error, < 0 for specific error - * @nr_bytes: number of bytes to complete - * - * Description: - * Ends I/O on a number of bytes attached to @req, and sets it up - * for the next range of segments (if any). Like end_that_request_first(), - * but deals with bytes instead of sectors. - * - * Return: - * 0 - we are done with this request, call end_that_request_last() - * 1 - still buffers pending for this request - **/ -int end_that_request_chunk(struct request *req, int uptodate, int nr_bytes) -{ - return __end_that_request_first(req, uptodate, nr_bytes); -} - -EXPORT_SYMBOL(end_that_request_chunk); - /* * splice the completion data to a local structure and hand off to * process_completion_queue() to complete the requests @@ -3620,7 +3591,7 @@ EXPORT_SYMBOL(blk_complete_request); /* * queue lock must be held */ -void end_that_request_last(struct request *req, int uptodate) +static void end_that_request_last(struct request *req, int uptodate) { struct gendisk *disk = req->rq_disk; int error; @@ -3655,8 +3626,6 @@ void end_that_request_last(struct reques __blk_put_request(req->q, req); } -EXPORT_SYMBOL(end_that_request_last); - void end_request(struct request *req, int uptodate) { __blk_end_request(req, uptodate, sect2byte(req->hard_cur_sectors)); diff -rupN 05-ide-cd-change/include/linux/blkdev.h 06-remove-old-interface/include/linux/blkdev.h --- 05-ide-cd-change/include/linux/blkdev.h 2007-08-24 12:21:45.000000000 -0400 +++ 06-remove-old-interface/include/linux/blkdev.h 2007-08-24 12:21:15.000000000 -0400 @@ -720,19 +720,16 @@ static inline void blk_run_address_space } /* - * end_request() and friends. Must be called with the request queue spinlock - * acquired. All functions called within end_request() _must_be_ atomic. + * blk_end_request() and friends. + * __blk_end_request() and end_request() must be called with + * the request queue spinlock acquired. * * Several drivers define their own end_request and call - * end_that_request_first() and end_that_request_last() - * for parts of the original function. This prevents - * code duplication in drivers. + * blk_end_request() for parts of the original function. + * This prevents code duplication in drivers. */ extern int blk_end_request(struct request *rq, int uptodate, int nr_bytes); extern int __blk_end_request(struct request *rq, int uptodate, int nr_bytes); -extern int end_that_request_first(struct request *, int, int); -extern int end_that_request_chunk(struct request *, int, int); -extern void end_that_request_last(struct request *, int); extern void end_request(struct request *req, int uptodate); extern int blk_end_request_callback(struct request *rq, int uptodate, int nr_bytes, @@ -749,7 +746,7 @@ extern void blk_complete_request(struct #define blk_rq_cur_size(rq) (sect2byte((rq)->current_nr_sectors)) /* - * end_that_request_first/chunk() takes an uptodate argument. we account + * blk_end_request() takes an uptodate argument. we account * any value <= as an io error. 0 means -EIO for compatability reasons, * any other < 0 value is the direct error type. An uptodate value of * 1 indicates successful io completion - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/