Message ID | e2b3b2a176b28155e43365e30c58e5a00cfab673.1459278305.git.lduncan@suse.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
On 2016-03-31 20:05, Lee Duncan wrote: > 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". Same goes for this one, Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> as soon as it has a Signed-off-by line -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 04/01/2016 12:58 AM, Johannes Thumshirn wrote: > On 2016-03-31 20:05, Lee Duncan wrote: >> 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". > > Same goes for this one, > > Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> > as soon as it has a Signed-off-by line Thanks Johannes. I will wait to see if there are any other comments, then resubmit v2.
On 04/01/2016 11:01 AM, Lee Duncan wrote: > On 04/01/2016 12:58 AM, Johannes Thumshirn wrote: >> On 2016-03-31 20:05, Lee Duncan wrote: >>> 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". >> >> Same goes for this one, >> >> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> >> as soon as it has a Signed-off-by line > > Thanks Johannes. > > I will wait to see if there are any other comments, then resubmit v2. Seems fine to me, too. So, if not /var/target, where do you recommend we be pointing this to? -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 04/01/2016 11:18 AM, Andy Grover wrote: > On 04/01/2016 11:01 AM, Lee Duncan wrote: >> On 04/01/2016 12:58 AM, Johannes Thumshirn wrote: >>> On 2016-03-31 20:05, Lee Duncan wrote: >>>> 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". >>> >>> Same goes for this one, >>> >>> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> >>> as soon as it has a Signed-off-by line >> >> Thanks Johannes. >> >> I will wait to see if there are any other comments, then resubmit v2. > > Seems fine to me, too. Thank you for your review. > > So, if not /var/target, where do you recommend we be pointing this to? > Good question! For testing, I put it in /etc/target/target_db. But /etc is supposed to be for configuration data. Part of my problem in picking a place was that there seems to be two different kinds of data there: policy, and state. Since it was not my intention to sort that out, I just picked the /etc location mentioned and verified it could work. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/target/target_core_alua.c b/drivers/target/target_core_alua.c index 49aba4a31747..22a6a9b18a86 100644 --- a/drivers/target/target_core_alua.c +++ b/drivers/target/target_core_alua.c @@ -932,7 +932,7 @@ static int core_alua_update_tpg_primary_metadata( tg_pt_gp->tg_pt_gp_alua_access_status); 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], config_item_name(&tg_pt_gp->tg_pt_gp_group.cg_item)); 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) atomic_read(&lun->lun_tg_pt_secondary_offline), lun->lun_tg_pt_secondary_stat); - 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, lun->unpacked_lun); rc = core_alua_write_tpg_metadata(path, md_buf, len); diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c index b1795735eafc..47463c99c318 100644 --- a/drivers/target/target_core_pr.c +++ b/drivers/target/target_core_pr.c @@ -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"