scsi: target: add helper to check if dev is configured
This just adds a helper function to check if a device is configured and it converts the target users to use it. The next patch will add a backend module user so those types of modules do not have to know the lio core details. Signed-off-by: Mike Christie <mchristi@redhat.com> Reviewed-by: Xiubo Li <xiubli@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:

committed by
Martin K. Petersen

parent
ff07e4a414
commit
cb0f32e12c
@@ -111,6 +111,10 @@ sector_t target_to_linux_sector(struct se_device *dev, sector_t lb);
|
||||
bool target_configure_unmap_from_queue(struct se_dev_attrib *attrib,
|
||||
struct request_queue *q);
|
||||
|
||||
static inline bool target_dev_configured(struct se_device *se_dev)
|
||||
{
|
||||
return !!(se_dev->dev_flags & DF_CONFIGURED);
|
||||
}
|
||||
|
||||
/* Only use get_unaligned_be24() if reading p - 1 is allowed. */
|
||||
static inline uint32_t get_unaligned_be24(const uint8_t *const p)
|
||||
|
Reference in New Issue
Block a user