linux/include/target/target_core_tmr.h
Roland Dreier dd503a5fcc target: Have core_tmr_alloc_req() take an explicit GFP_xxx flag
Testing in_interrupt() to know when sleeping is allowed is not really
reliable (since eg it won't be true if the caller is holding a spinlock).
Instead have the caller tell core_tmr_alloc_req() what GFP_xxx to use;
every caller except tcm_qla2xxx can use GFP_KERNEL.

Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2011-10-24 03:20:53 +00:00

36 lines
1015 B
C

#ifndef TARGET_CORE_TMR_H
#define TARGET_CORE_TMR_H
/* fabric independent task management function values */
enum tcm_tmreq_table {
TMR_ABORT_TASK = 1,
TMR_ABORT_TASK_SET = 2,
TMR_CLEAR_ACA = 3,
TMR_CLEAR_TASK_SET = 4,
TMR_LUN_RESET = 5,
TMR_TARGET_WARM_RESET = 6,
TMR_TARGET_COLD_RESET = 7,
TMR_FABRIC_TMR = 255,
};
/* fabric independent task management response values */
enum tcm_tmrsp_table {
TMR_FUNCTION_COMPLETE = 0,
TMR_TASK_DOES_NOT_EXIST = 1,
TMR_LUN_DOES_NOT_EXIST = 2,
TMR_TASK_STILL_ALLEGIANT = 3,
TMR_TASK_FAILOVER_NOT_SUPPORTED = 4,
TMR_TASK_MGMT_FUNCTION_NOT_SUPPORTED = 5,
TMR_FUNCTION_AUTHORIZATION_FAILED = 6,
TMR_FUNCTION_REJECTED = 255,
};
extern struct kmem_cache *se_tmr_req_cache;
extern struct se_tmr_req *core_tmr_alloc_req(struct se_cmd *, void *, u8, gfp_t);
extern void core_tmr_release_req(struct se_tmr_req *);
extern int core_tmr_lun_reset(struct se_device *, struct se_tmr_req *,
struct list_head *, struct se_cmd *);
#endif /* TARGET_CORE_TMR_H */