Commit fdddf932 authored by Lee Duncan's avatar Lee Duncan Committed by Nicholas Bellinger

target: use new "dbroot" target attribute

This commit updates the target core ALUA and PR
modules to use the new "dbroot" attribute instead
of assuming the target database is in "/var/target".
Signed-off-by: 's avatarLee Duncan <>
Reviewed-by: 's avatarHannes Reinecke <>
Signed-off-by: 's avatarNicholas Bellinger <>
parent a96e9783
......@@ -932,7 +932,7 @@ static int core_alua_update_tpg_primary_metadata(
snprintf(path, ALUA_METADATA_PATH_LEN,
"/var/target/alua/tpgs_%s/%s", &wwn->unit_serial[0],
"%s/alua/tpgs_%s/%s", db_root, &wwn->unit_serial[0],
rc = core_alua_write_tpg_metadata(path, md_buf, len);
......@@ -1275,8 +1275,8 @@ static int core_alua_update_tpg_secondary_metadata(struct se_lun *lun)
snprintf(path, ALUA_METADATA_PATH_LEN, "/var/target/alua/%s/%s/lun_%llu",
se_tpg->se_tpg_tfo->get_fabric_name(), wwn,
snprintf(path, ALUA_METADATA_PATH_LEN, "%s/alua/%s/%s/lun_%llu",
db_root, se_tpg->se_tpg_tfo->get_fabric_name(), wwn,
rc = core_alua_write_tpg_metadata(path, md_buf, len);
......@@ -1985,7 +1985,7 @@ static int __core_scsi3_write_aptpl_to_file(
return -EMSGSIZE;
snprintf(path, 512, "/var/target/pr/aptpl_%s", &wwn->unit_serial[0]);
snprintf(path, 512, "%s/pr/aptpl_%s", db_root, &wwn->unit_serial[0]);
file = filp_open(path, flags, 0600);
if (IS_ERR(file)) {
pr_err("filp_open(%s) for APTPL metadata"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment