Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1378274 > unrolled thread
| Started by | Lee Duncan <lduncan@suse.com> |
|---|---|
| First post | 2016-04-13 22:40 +0200 |
| Last post | 2016-04-14 08:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 2/2] target: use new "dbroot" target attribute Lee Duncan <lduncan@suse.com> - 2016-04-13 22:40 +0200
Re: [PATCH 2/2] target: use new "dbroot" target attribute Hannes Reinecke <hare@suse.de> - 2016-04-14 08:20 +0200
| From | Lee Duncan <lduncan@suse.com> |
|---|---|
| Date | 2016-04-13 22:40 +0200 |
| Subject | [PATCH 2/2] target: use new "dbroot" target attribute |
| Message-ID | <rnzJT-74K-3@gated-at.bofh.it> |
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: Lee Duncan <lduncan@suse.com>
---
drivers/target/target_core_alua.c | 6 +++---
drivers/target/target_core_pr.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/target/target_core_alua.c b/drivers/target/target_core_alua.c
index 49aba4a31747..4c82bbe19003 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"
--
2.1.4
[toc] | [next] | [standalone]
| From | Hannes Reinecke <hare@suse.de> |
|---|---|
| Date | 2016-04-14 08:20 +0200 |
| Message-ID | <rnINc-5LS-1@gated-at.bofh.it> |
| In reply to | #1378274 |
On 04/13/2016 10:25 PM, 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". > > Signed-off-by: Lee Duncan <lduncan@suse.com> > --- > drivers/target/target_core_alua.c | 6 +++--- > drivers/target/target_core_pr.c | 2 +- > 2 files changed, 4 insertions(+), 4 deletions(-) > Reviewed-by: Hannes Reinecke <hare@suse.com> Cheers, Hannes -- Dr. Hannes Reinecke Teamlead Storage & Networking hare@suse.de +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB 21284 (AG Nürnberg)
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web