Re: [PATCH 6/7] blk_end_request: remove/unexport end_that_request_*
On Wed, Sep 05 2007 at 2:13 +0300, Kiyoshi Ueda <[EMAIL PROTECTED]> wrote: > Hi, > > On Tue, 4 Sep 2007 17:25:14 -0400, "Halevy, Benny" <[EMAIL PROTECTED]> wrote: >> We suspect we'll still need the extern entry points for handling the bidi >> request in the scsi_io_completion() path as we only want to call >> end_that_request_chunk on req->next_rq and never >> end_that_request_last. >> >> (see >> http://www.bhalevy.com/open-osd/download/linux-2.6.23-rc2_and_iscsi-iscsi-2007_08_09/0005-SCSI-bidi-support.patch) > > If this patch-set is merged, there may be other way to do that. > > For tricky drivers, special interface, blk_end_request_callback(), > is added in the patch 5/7. > (http://marc.info/?l=linux-kernel=118860027714753=2) > Currently, only user of the interface is ide-cd (cdrom_newpc_intr()). > It needs to call only end_that_request_first() too. > > With the patch 7/7, you can set your own handler in rq->end_io() > to complete the request by your own way. > > Thanks, > Kiyoshi Ueda That will not work, as I will have no means of releasing the BIOs of the bidi request, which can not use end_request(). I guess as Jens said it's OK to remove them now, and later we can just add end_that_request_first(), will be enough. Or we can patch end_request() to also call __end_that_request_first(req->next_rq) if not NULL. Jens which method do you prefer? I will adjust my patches accordingly. Thanks Boaz Harrosh - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 6/7] blk_end_request: remove/unexport end_that_request_*
Hi, On Tue, 4 Sep 2007 17:25:14 -0400, "Halevy, Benny" <[EMAIL PROTECTED]> wrote: > We suspect we'll still need the extern entry points for handling the bidi > request in the scsi_io_completion() path as we only want to call > end_that_request_chunk on req->next_rq and never > end_that_request_last. > > (see > http://www.bhalevy.com/open-osd/download/linux-2.6.23-rc2_and_iscsi-iscsi-2007_08_09/0005-SCSI-bidi-support.patch) If this patch-set is merged, there may be other way to do that. For tricky drivers, special interface, blk_end_request_callback(), is added in the patch 5/7. (http://marc.info/?l=linux-kernel=118860027714753=2) Currently, only user of the interface is ide-cd (cdrom_newpc_intr()). It needs to call only end_that_request_first() too. With the patch 7/7, you can set your own handler in rq->end_io() to complete the request by your own way. Thanks, Kiyoshi Ueda - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 6/7] blk_end_request: remove/unexport end_that_request_*
On Tue, Sep 04 2007, Halevy, Benny wrote: > Boaz raised my attention to this patchset today... > We suspect we'll still need the extern entry points for handling the bidi > request in the scsi_io_completion() path as we only want to call > end_that_request_chunk on req->next_rq and never > end_that_request_last. > > (see > http://www.bhalevy.com/open-osd/download/linux-2.6.23-rc2_and_iscsi-iscsi-2007_08_09/0005-SCSI-bidi-support.patch) > > If this is ok with you I'd leave these entry points in place rather than > taking them out and putting them back in later. There's no point in leaving them in when nothing current needs it, I'd much rather add it back in should the need arise. That's the proper way to handle things like this. -- Jens Axboe - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH 6/7] blk_end_request: remove/unexport end_that_request_*
Boaz raised my attention to this patchset today... We suspect we'll still need the extern entry points for handling the bidi request in the scsi_io_completion() path as we only want to call end_that_request_chunk on req->next_rq and never end_that_request_last. (see http://www.bhalevy.com/open-osd/download/linux-2.6.23-rc2_and_iscsi-iscsi-2007_08_09/0005-SCSI-bidi-support.patch) If this is ok with you I'd leave these entry points in place rather than taking them out and putting them back in later. Benny From: [EMAIL PROTECTED] on behalf of Kiyoshi Ueda Sent: Sat 2007-09-01 01:43 To: linux-kernel@vger.kernel.org; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PATCH 6/7] blk_end_request: remove/unexport end_that_request_* 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 <[EMAIL PROTECTED]> Signed-off-by: Jun'ichi Nomura <[EMAIL PROTECTED]> --- 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.0 -0400 +++ 06-remove-old-interface/block/ll_rw_blk.c 2007-08-24 12:19:02.0 -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.0 -0400 +++ 06-remove-old-interface/include/linux/blkdev.h 2007-08-24 12:21:15.0 -0400 @@ -720,19 +720,16 @@ static inline void blk_run_address_space } /* - * end_request() and friends. Must be called
RE: [PATCH 6/7] blk_end_request: remove/unexport end_that_request_*
Boaz raised my attention to this patchset today... We suspect we'll still need the extern entry points for handling the bidi request in the scsi_io_completion() path as we only want to call end_that_request_chunk on req-next_rq and never end_that_request_last. (see http://www.bhalevy.com/open-osd/download/linux-2.6.23-rc2_and_iscsi-iscsi-2007_08_09/0005-SCSI-bidi-support.patch) If this is ok with you I'd leave these entry points in place rather than taking them out and putting them back in later. Benny From: [EMAIL PROTECTED] on behalf of Kiyoshi Ueda Sent: Sat 2007-09-01 01:43 To: linux-kernel@vger.kernel.org; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PATCH 6/7] blk_end_request: remove/unexport end_that_request_* 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 [EMAIL PROTECTED] Signed-off-by: Jun'ichi Nomura [EMAIL PROTECTED] --- 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.0 -0400 +++ 06-remove-old-interface/block/ll_rw_blk.c 2007-08-24 12:19:02.0 -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.0 -0400 +++ 06-remove-old-interface/include/linux/blkdev.h 2007-08-24 12:21:15.0 -0400 @@ -720,19 +720,16 @@ static inline void blk_run_address_space } /* - * end_request() and friends. Must be called with the
Re: [PATCH 6/7] blk_end_request: remove/unexport end_that_request_*
On Tue, Sep 04 2007, Halevy, Benny wrote: Boaz raised my attention to this patchset today... We suspect we'll still need the extern entry points for handling the bidi request in the scsi_io_completion() path as we only want to call end_that_request_chunk on req-next_rq and never end_that_request_last. (see http://www.bhalevy.com/open-osd/download/linux-2.6.23-rc2_and_iscsi-iscsi-2007_08_09/0005-SCSI-bidi-support.patch) If this is ok with you I'd leave these entry points in place rather than taking them out and putting them back in later. There's no point in leaving them in when nothing current needs it, I'd much rather add it back in should the need arise. That's the proper way to handle things like this. -- Jens Axboe - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 6/7] blk_end_request: remove/unexport end_that_request_*
Hi, On Tue, 4 Sep 2007 17:25:14 -0400, Halevy, Benny [EMAIL PROTECTED] wrote: We suspect we'll still need the extern entry points for handling the bidi request in the scsi_io_completion() path as we only want to call end_that_request_chunk on req-next_rq and never end_that_request_last. (see http://www.bhalevy.com/open-osd/download/linux-2.6.23-rc2_and_iscsi-iscsi-2007_08_09/0005-SCSI-bidi-support.patch) If this patch-set is merged, there may be other way to do that. For tricky drivers, special interface, blk_end_request_callback(), is added in the patch 5/7. (http://marc.info/?l=linux-kernelm=118860027714753w=2) Currently, only user of the interface is ide-cd (cdrom_newpc_intr()). It needs to call only end_that_request_first() too. With the patch 7/7, you can set your own handler in rq-end_io() to complete the request by your own way. Thanks, Kiyoshi Ueda - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/