aboutsummaryrefslogtreecommitdiffstats
path: root/include/target
diff options
context:
space:
mode:
authorAndy Grover <agrover@redhat.com>2016-02-25 15:14:32 -0800
committerNicholas Bellinger <nab@linux-iscsi.org>2016-03-10 21:48:55 -0800
commit03a68b44faff1b3eef5424952044747c9c555f0e (patch)
tree4a1e59d4735b892ff4f41ef1bffe3be29060bbe3 /include/target
parenttarget/iblock: pass WRITE_SAME to device if possible (diff)
downloadlinux-dev-03a68b44faff1b3eef5424952044747c9c555f0e.tar.xz
linux-dev-03a68b44faff1b3eef5424952044747c9c555f0e.zip
target: Remove enum transport_lunflags_table
se_dev_entry.lun_flags and se_lun.lun_access are only used for keeping track of read-write vs. read-only state. Since this is an either/or thing we can represent it as bool, and remove the unneeded enum transport_lunflags_table, which is left over from when there were more flags. Change code that uses this enum to just use true/false, and make it clear through variable and param names that true means read-only, false means read-write. Signed-off-by: Andy Grover <agrover@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'include/target')
-rw-r--r--include/target/target_core_base.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index e8c8c08bf575..fca03b993bec 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -144,12 +144,6 @@ enum se_cmd_flags_table {
SCF_USE_CPUID = 0x00800000,
};
-/* struct se_dev_entry->lun_flags and struct se_lun->lun_access */
-enum transport_lunflags_table {
- TRANSPORT_LUNFLAGS_READ_ONLY = 0x01,
- TRANSPORT_LUNFLAGS_READ_WRITE = 0x02,
-};
-
/*
* Used by transport_send_check_condition_and_sense()
* to signal which ASC/ASCQ sense payload should be built.
@@ -634,11 +628,10 @@ struct se_lun_acl {
};
struct se_dev_entry {
- /* See transport_lunflags_table */
u64 mapped_lun;
u64 pr_res_key;
u64 creation_time;
- u32 lun_flags;
+ bool lun_access_ro;
u32 attach_count;
atomic_long_t total_cmds;
atomic_long_t read_bytes;
@@ -712,7 +705,7 @@ struct se_lun {
u64 unpacked_lun;
#define SE_LUN_LINK_MAGIC 0xffff7771
u32 lun_link_magic;
- u32 lun_access;
+ bool lun_access_ro;
u32 lun_index;
/* RELATIVE TARGET PORT IDENTIFER */