You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
target: enhance and export target_alloc_sgl/target_free_sgl
The SRP target driver will need to allocate and chain it's own SGLs soon. For this export target_alloc_sgl, and add a new argument to it so that it can allocate an additional chain entry that doesn't point to a page. Also export transport_free_sgl after renaming it to target_free_sgl to free these SGLs again. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
committed by
Doug Ledford
parent
a060b5629a
commit
e64aa657c3
@@ -85,7 +85,6 @@ extern struct configfs_attribute *passthrough_attrib_attrs[];
|
||||
void *transport_kmap_data_sg(struct se_cmd *);
|
||||
void transport_kunmap_data_sg(struct se_cmd *);
|
||||
/* core helpers also used by xcopy during internal command setup */
|
||||
int target_alloc_sgl(struct scatterlist **, unsigned int *, u32, bool);
|
||||
sense_reason_t transport_generic_map_mem_to_cmd(struct se_cmd *,
|
||||
struct scatterlist *, u32, struct scatterlist *, u32);
|
||||
|
||||
|
||||
@@ -185,6 +185,10 @@ int core_tpg_set_initiator_node_tag(struct se_portal_group *,
|
||||
int core_tpg_register(struct se_wwn *, struct se_portal_group *, int);
|
||||
int core_tpg_deregister(struct se_portal_group *);
|
||||
|
||||
int target_alloc_sgl(struct scatterlist **sgl, unsigned int *nents,
|
||||
u32 length, bool zero_page, bool chainable);
|
||||
void target_free_sgl(struct scatterlist *sgl, int nents);
|
||||
|
||||
/*
|
||||
* The LIO target core uses DMA_TO_DEVICE to mean that data is going
|
||||
* to the target (eg handling a WRITE) and DMA_FROM_DEVICE to mean
|
||||
|
||||
Reference in New Issue
Block a user