scsi: target: Rename target_configure_unmap_from_queue()
Rename target_configure_unmap_from_queue() to target_configure_unmap_from_bdev() since it now takes a bdev. Signed-off-by: Mike Christie <michael.christie@oracle.com> Signed-off-by: John Garry <john.g.garry@oracle.com> Reviewed-by: John Garry <john.g.garry@oracle.com> Link: https://patch.msgid.link/20251020103820.2917593-2-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
committed by
Martin K. Petersen
parent
3a86608788
commit
3434be3920
@@ -844,7 +844,7 @@ free_device:
|
|||||||
* Check if the underlying struct block_device supports discard and if yes
|
* Check if the underlying struct block_device supports discard and if yes
|
||||||
* configure the UNMAP parameters.
|
* configure the UNMAP parameters.
|
||||||
*/
|
*/
|
||||||
bool target_configure_unmap_from_queue(struct se_dev_attrib *attrib,
|
bool target_configure_unmap_from_bdev(struct se_dev_attrib *attrib,
|
||||||
struct block_device *bdev)
|
struct block_device *bdev)
|
||||||
{
|
{
|
||||||
int block_size = bdev_logical_block_size(bdev);
|
int block_size = bdev_logical_block_size(bdev);
|
||||||
@@ -863,7 +863,7 @@ bool target_configure_unmap_from_queue(struct se_dev_attrib *attrib,
|
|||||||
bdev_discard_alignment(bdev) / block_size;
|
bdev_discard_alignment(bdev) / block_size;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(target_configure_unmap_from_queue);
|
EXPORT_SYMBOL(target_configure_unmap_from_bdev);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Convert from blocksize advertised to the initiator to the 512 byte
|
* Convert from blocksize advertised to the initiator to the 512 byte
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ static bool fd_configure_unmap(struct se_device *dev)
|
|||||||
struct inode *inode = file->f_mapping->host;
|
struct inode *inode = file->f_mapping->host;
|
||||||
|
|
||||||
if (S_ISBLK(inode->i_mode))
|
if (S_ISBLK(inode->i_mode))
|
||||||
return target_configure_unmap_from_queue(&dev->dev_attrib,
|
return target_configure_unmap_from_bdev(&dev->dev_attrib,
|
||||||
I_BDEV(inode));
|
I_BDEV(inode));
|
||||||
|
|
||||||
/* Limit UNMAP emulation to 8k Number of LBAs (NoLB) */
|
/* Limit UNMAP emulation to 8k Number of LBAs (NoLB) */
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ static bool iblock_configure_unmap(struct se_device *dev)
|
|||||||
{
|
{
|
||||||
struct iblock_dev *ib_dev = IBLOCK_DEV(dev);
|
struct iblock_dev *ib_dev = IBLOCK_DEV(dev);
|
||||||
|
|
||||||
return target_configure_unmap_from_queue(&dev->dev_attrib,
|
return target_configure_unmap_from_bdev(&dev->dev_attrib,
|
||||||
ib_dev->ibd_bd);
|
ib_dev->ibd_bd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ sense_reason_t passthrough_parse_cdb(struct se_cmd *cmd,
|
|||||||
|
|
||||||
bool target_sense_desc_format(struct se_device *dev);
|
bool target_sense_desc_format(struct se_device *dev);
|
||||||
sector_t target_to_linux_sector(struct se_device *dev, sector_t lb);
|
sector_t target_to_linux_sector(struct se_device *dev, sector_t lb);
|
||||||
bool target_configure_unmap_from_queue(struct se_dev_attrib *attrib,
|
bool target_configure_unmap_from_bdev(struct se_dev_attrib *attrib,
|
||||||
struct block_device *bdev);
|
struct block_device *bdev);
|
||||||
|
|
||||||
static inline bool target_dev_configured(struct se_device *se_dev)
|
static inline bool target_dev_configured(struct se_device *se_dev)
|
||||||
|
|||||||
Reference in New Issue
Block a user