From 78a6295c71cb276f8ab0bfc786f3543a4e756a8f Mon Sep 17 00:00:00 2001 From: Lee Duncan Date: Fri, 6 Apr 2018 11:31:41 -0700 Subject: scsi: target: prefer dbroot of /etc/target over /var/target The target database root directory, dbroot, has defaulted to /var/target for a while, but its main client, targetcli-fb, has been moving it to /etc/target for quite some time. With the plethora of target drivers now appearing, it has become more difficult to initialize this attribute before use by any child drivers. If the directory /etc/target exists, use that as the DB root. Otherwise, fall back to using /var/target. The ability to override this dbroot attribute still exists via sysfs. Signed-off-by: Lee Duncan Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen --- drivers/target/target_core_internal.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/target/target_core_internal.h') diff --git a/drivers/target/target_core_internal.h b/drivers/target/target_core_internal.h index 1d5afc3ae017..dead30b1d32c 100644 --- a/drivers/target/target_core_internal.h +++ b/drivers/target/target_core_internal.h @@ -166,6 +166,7 @@ extern struct se_portal_group xcopy_pt_tpg; /* target_core_configfs.c */ #define DB_ROOT_LEN 4096 #define DB_ROOT_DEFAULT "/var/target" +#define DB_ROOT_PREFERRED "/etc/target" extern char db_root[]; -- cgit v1.2.3-55-g7522