target: Rename spc_get_write_same_sectors -> sbc_get_write_same_sectors
authorRoland Dreier <roland@purestorage.com>
Fri, 22 Feb 2013 17:52:57 +0000 (09:52 -0800)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sat, 23 Feb 2013 20:46:14 +0000 (12:46 -0800)
Trivial, but WRITE SAME is an SBC command so it seems strange for a
related function (defined in target_core_sbc.c) to be in the spc_
namespace.

Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_file.c
drivers/target/target_core_iblock.c
drivers/target/target_core_sbc.c
include/target/target_core_backend.h

index 94383a5..ca36a38 100644 (file)
@@ -381,7 +381,7 @@ fd_execute_write_same(struct se_cmd *cmd)
        struct scatterlist *sg;
        struct iovec *iov;
        mm_segment_t old_fs;
-       sector_t nolb = spc_get_write_same_sectors(cmd);
+       sector_t nolb = sbc_get_write_same_sectors(cmd);
        loff_t pos = cmd->t_task_lba * se_dev->dev_attrib.block_size;
        unsigned int len, len_tmp, iov_num;
        int i, rc;
index facee5f..c73f4a9 100644 (file)
@@ -473,7 +473,7 @@ iblock_execute_write_same_unmap(struct se_cmd *cmd)
        int rc;
 
        rc = blkdev_issue_discard(ib_dev->ibd_bd, cmd->t_task_lba,
-                       spc_get_write_same_sectors(cmd), GFP_KERNEL, 0);
+                       sbc_get_write_same_sectors(cmd), GFP_KERNEL, 0);
        if (rc < 0) {
                pr_warn("blkdev_issue_discard() failed: %d\n", rc);
                return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
@@ -491,7 +491,7 @@ iblock_execute_write_same(struct se_cmd *cmd)
        struct bio *bio;
        struct bio_list list;
        sector_t block_lba = cmd->t_task_lba;
-       sector_t sectors = spc_get_write_same_sectors(cmd);
+       sector_t sectors = sbc_get_write_same_sectors(cmd);
 
        sg = &cmd->t_data_sg[0];
 
index 170f1f7..290230d 100644 (file)
@@ -105,7 +105,7 @@ sbc_emulate_readcapacity_16(struct se_cmd *cmd)
        return 0;
 }
 
-sector_t spc_get_write_same_sectors(struct se_cmd *cmd)
+sector_t sbc_get_write_same_sectors(struct se_cmd *cmd)
 {
        u32 num_blocks;
 
@@ -126,7 +126,7 @@ sector_t spc_get_write_same_sectors(struct se_cmd *cmd)
        return cmd->se_dev->transport->get_blocks(cmd->se_dev) -
                cmd->t_task_lba + 1;
 }
-EXPORT_SYMBOL(spc_get_write_same_sectors);
+EXPORT_SYMBOL(sbc_get_write_same_sectors);
 
 static sense_reason_t
 sbc_emulate_noop(struct se_cmd *cmd)
@@ -233,7 +233,7 @@ static inline unsigned long long transport_lba_64_ext(unsigned char *cdb)
 static sense_reason_t
 sbc_setup_write_same(struct se_cmd *cmd, unsigned char *flags, struct sbc_ops *ops)
 {
-       unsigned int sectors = spc_get_write_same_sectors(cmd);
+       unsigned int sectors = sbc_get_write_same_sectors(cmd);
 
        if ((flags[0] & 0x04) || (flags[0] & 0x02)) {
                pr_err("WRITE_SAME PBDATA and LBDATA"
index f9a8016..b128c20 100644 (file)
@@ -53,13 +53,13 @@ void        target_complete_cmd(struct se_cmd *, u8);
 
 sense_reason_t spc_parse_cdb(struct se_cmd *cmd, unsigned int *size);
 sense_reason_t spc_emulate_report_luns(struct se_cmd *cmd);
-sector_t       spc_get_write_same_sectors(struct se_cmd *cmd);
 sense_reason_t spc_emulate_inquiry_std(struct se_cmd *, unsigned char *);
 sense_reason_t spc_emulate_evpd_83(struct se_cmd *, unsigned char *);
 
 sense_reason_t sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops);
 u32    sbc_get_device_rev(struct se_device *dev);
 u32    sbc_get_device_type(struct se_device *dev);
+sector_t       sbc_get_write_same_sectors(struct se_cmd *cmd);
 
 void   transport_set_vpd_proto_id(struct t10_vpd *, unsigned char *);
 int    transport_set_vpd_assoc(struct t10_vpd *, unsigned char *);