Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 110561
b: refs/heads/master
c: d00e29f
h: refs/heads/master
i:
  110559: bac8945
v: v3
  • Loading branch information
Kiyoshi Ueda authored and Jens Axboe committed Oct 9, 2008
1 parent 917e683 commit 461fa1f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 54 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 99cd3386f290eaf61f2b7596d5a4cc2007771174
refs/heads/master: d00e29fd99dd63d1c51917604e35dee824ed567f
58 changes: 7 additions & 51 deletions trunk/block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1790,17 +1790,6 @@ static void end_that_request_last(struct request *req, int error)
}
}

static inline void __end_request(struct request *rq, int uptodate,
unsigned int nr_bytes)
{
int error = 0;

if (uptodate <= 0)
error = uptodate ? uptodate : -EIO;

__blk_end_request(rq, error, nr_bytes);
}

/**
* blk_rq_bytes - Returns bytes left to complete in the entire request
* @rq: the request being processed
Expand Down Expand Up @@ -1830,41 +1819,6 @@ unsigned int blk_rq_cur_bytes(struct request *rq)
}
EXPORT_SYMBOL_GPL(blk_rq_cur_bytes);

/**
* end_queued_request - end all I/O on a queued request
* @rq: the request being processed
* @uptodate: error value or %0/%1 uptodate flag
*
* Description:
* Ends all I/O on a request, and removes it from the block layer queues.
* Not suitable for normal I/O completion, unless the driver still has
* the request attached to the block layer.
*
**/
void end_queued_request(struct request *rq, int uptodate)
{
__end_request(rq, uptodate, blk_rq_bytes(rq));
}
EXPORT_SYMBOL(end_queued_request);

/**
* end_dequeued_request - end all I/O on a dequeued request
* @rq: the request being processed
* @uptodate: error value or %0/%1 uptodate flag
*
* Description:
* Ends all I/O on a request. The request must already have been
* dequeued using blkdev_dequeue_request(), as is normally the case
* for most drivers.
*
**/
void end_dequeued_request(struct request *rq, int uptodate)
{
__end_request(rq, uptodate, blk_rq_bytes(rq));
}
EXPORT_SYMBOL(end_dequeued_request);


/**
* end_request - end I/O on the current segment of the request
* @req: the request being processed
Expand All @@ -1879,14 +1833,16 @@ EXPORT_SYMBOL(end_dequeued_request);
* they have a residual value to account for. For that case this function
* isn't really useful, unless the residual just happens to be the
* full current segment. In other words, don't use this function in new
* code. Use blk_end_request() or __blk_end_request() to end partial parts
* of a request, or end_dequeued_request() and end_queued_request() to
* completely end IO on a dequeued/queued request.
*
* code. Use blk_end_request() or __blk_end_request() to end a request.
**/
void end_request(struct request *req, int uptodate)
{
__end_request(req, uptodate, req->hard_cur_sectors << 9);
int error = 0;

if (uptodate <= 0)
error = uptodate ? uptodate : -EIO;

__blk_end_request(req, error, req->hard_cur_sectors << 9);
}
EXPORT_SYMBOL(end_request);

Expand Down
2 changes: 0 additions & 2 deletions trunk/include/linux/blkdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -793,8 +793,6 @@ extern int __blk_end_request(struct request *rq, int error,
extern int blk_end_bidi_request(struct request *rq, int error,
unsigned int nr_bytes, unsigned int bidi_bytes);
extern void end_request(struct request *, int);
extern void end_queued_request(struct request *, int);
extern void end_dequeued_request(struct request *, int);
extern int blk_end_request_callback(struct request *rq, int error,
unsigned int nr_bytes,
int (drv_callback)(struct request *));
Expand Down

0 comments on commit 461fa1f

Please sign in to comment.