From a96e9783e05851d5f06da0ae7635aec55a228e3d Mon Sep 17 00:00:00 2001 From: Lee Duncan Date: Thu, 14 Apr 2016 18:18:50 -0700 Subject: target: make target db location configurable This commit adds the read-write attribute "dbroot", in the top-level CONFIGFS (core) target directory, normally /sys/kernel/config/target. This attribute defaults to "/var/target" but can be changed by writing a new pathname string to it. Changing this attribute is only allowed when no fabric drivers are loaded and the supplied value specifies an existing directory. Target modules that care about the target database root directory will be modified to use this attribute in a future commit. Signed-off-by: Lee Duncan Signed-off-by: Nicholas Bellinger --- drivers/target/target_core_internal.h | 6 ++++++ 1 file changed, 6 insertions(+) (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 86b4a8375628..fc91e85f54ba 100644 --- a/drivers/target/target_core_internal.h +++ b/drivers/target/target_core_internal.h @@ -155,4 +155,10 @@ void target_stat_setup_mappedlun_default_groups(struct se_lun_acl *); /* target_core_xcopy.c */ extern struct se_portal_group xcopy_pt_tpg; +/* target_core_configfs.c */ +#define DB_ROOT_LEN 4096 +#define DB_ROOT_DEFAULT "/var/target" + +extern char db_root[]; + #endif /* TARGET_CORE_INTERNAL_H */ -- cgit v1.2.3-55-g7522