diff options
author | Lee Duncan <lduncan@suse.com> | 2016-04-14 18:18:50 -0700 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2016-05-09 23:06:15 -0700 |
commit | a96e9783e05851d5f06da0ae7635aec55a228e3d (patch) | |
tree | 20cda8f4cca0cee8d593f1af55f6e7b04b1096d5 /drivers/target/target_core_internal.h | |
parent | 44549e8f5eea4e0a41b487b63e616cb089922b99 (diff) |
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 <lduncan@suse.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_internal.h')
-rw-r--r-- | drivers/target/target_core_internal.h | 6 |
1 files changed, 6 insertions, 0 deletions
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 */ |