scsi: Rename sd_pr_command

Rename sd_pr_command to sd_pr_out_command to match a
sd_pr_in_command helper added in the next patches.

Signed-off-by: Mike Christie <michael.christie@oracle.com>
Link: https://lore.kernel.org/r/20230407200551.12660-4-michael.christie@oracle.com
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Mike Christie 2023-04-07 15:05:36 -05:00 committed by Martin K. Petersen
parent 7ba150834b
commit 20bebccbc4

View File

@ -1742,7 +1742,7 @@ static int sd_scsi_to_pr_err(struct scsi_sense_hdr *sshdr, int result)
}
}
static int sd_pr_command(struct block_device *bdev, u8 sa,
static int sd_pr_out_command(struct block_device *bdev, u8 sa,
u64 key, u64 sa_key, u8 type, u8 flags)
{
struct scsi_disk *sdkp = scsi_disk(bdev->bd_disk);
@ -1785,7 +1785,7 @@ static int sd_pr_register(struct block_device *bdev, u64 old_key, u64 new_key,
{
if (flags & ~PR_FL_IGNORE_KEY)
return -EOPNOTSUPP;
return sd_pr_command(bdev, (flags & PR_FL_IGNORE_KEY) ? 0x06 : 0x00,
return sd_pr_out_command(bdev, (flags & PR_FL_IGNORE_KEY) ? 0x06 : 0x00,
old_key, new_key, 0,
(1 << 0) /* APTPL */);
}
@ -1795,24 +1795,24 @@ static int sd_pr_reserve(struct block_device *bdev, u64 key, enum pr_type type,
{
if (flags)
return -EOPNOTSUPP;
return sd_pr_command(bdev, 0x01, key, 0, sd_pr_type(type), 0);
return sd_pr_out_command(bdev, 0x01, key, 0, sd_pr_type(type), 0);
}
static int sd_pr_release(struct block_device *bdev, u64 key, enum pr_type type)
{
return sd_pr_command(bdev, 0x02, key, 0, sd_pr_type(type), 0);
return sd_pr_out_command(bdev, 0x02, key, 0, sd_pr_type(type), 0);
}
static int sd_pr_preempt(struct block_device *bdev, u64 old_key, u64 new_key,
enum pr_type type, bool abort)
{
return sd_pr_command(bdev, abort ? 0x05 : 0x04, old_key, new_key,
return sd_pr_out_command(bdev, abort ? 0x05 : 0x04, old_key, new_key,
sd_pr_type(type), 0);
}
static int sd_pr_clear(struct block_device *bdev, u64 key)
{
return sd_pr_command(bdev, 0x03, key, 0, 0, 0);
return sd_pr_out_command(bdev, 0x03, key, 0, 0, 0);
}
static const struct pr_ops sd_pr_ops = {