Movatterモバイル変換


[0]ホーム

URL:


blk_rq_prep_clone
Prev Chapter 14. Block Devices Next

Name

blk_rq_prep_clone — Helper function to setup clone request

Synopsis

intblk_rq_prep_clone(struct request *rq,
 struct request *rq_src,
 struct bio_set *bs,
 gfp_tgfp_mask,
 int (*bio_ctr)(struct bio *, struct bio *, void *),
 void *data);
 

Arguments

struct request * rq

the request to be setup

struct request * rq_src

original request to be cloned

struct bio_set * bs

bio_set that bios for clone are allocated from

gfp_t gfp_mask

memory allocation mask for bio

int (*)(struct bio *, struct bio *, void *) bio_ctr

setup function to be called for each clone bio. Returns0 for success, non0 for failure.

void * data

private data to be passed tobio_ctr

Description

Clones bios inrq_src torq, and copies attributes ofrq_src torq. The actual data parts ofrq_src (e.g. ->cmd, ->sense) are not copied, and copying such parts is the caller's responsibility. Also, pages which the original bios are pointing to are not copied and the cloned bios just point same pages. So cloned bios must be completed before original bios, which means the caller must completerq beforerq_src.


Prev Up Next
blk_rq_unprep_clone Home blk_start_plug

[8]ページ先頭

©2009-2025 Movatter.jp