mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 22:51:37 +00:00
block: introduce blk_rq_is_passthrough
This can be used to check for fs vs non-fs requests and basically removes all knowledge of BLOCK_PC specific from the block layer, as well as preparing for removing the cmd_type field in struct request. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
parent
09fc54ccc4
commit
57292b58dd
21 changed files with 59 additions and 53 deletions
|
@ -114,12 +114,12 @@ extern void blk_fill_rwbs(char *rwbs, unsigned int op, int bytes);
|
|||
|
||||
static inline sector_t blk_rq_trace_sector(struct request *rq)
|
||||
{
|
||||
return (rq->cmd_type != REQ_TYPE_FS) ? 0 : blk_rq_pos(rq);
|
||||
return blk_rq_is_passthrough(rq) ? 0 : blk_rq_pos(rq);
|
||||
}
|
||||
|
||||
static inline unsigned int blk_rq_trace_nr_sectors(struct request *rq)
|
||||
{
|
||||
return (rq->cmd_type != REQ_TYPE_FS) ? 0 : blk_rq_sectors(rq);
|
||||
return blk_rq_is_passthrough(rq) ? 0 : blk_rq_sectors(rq);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue