target: make target db location configurable
authorLee Duncan <lduncan@suse.com>
Fri, 15 Apr 2016 01:18:50 +0000 (18:18 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Tue, 10 May 2016 06:06:15 +0000 (23:06 -0700)
commita96e9783e05851d5f06da0ae7635aec55a228e3d
tree20cda8f4cca0cee8d593f1af55f6e7b04b1096d5
parent44549e8f5eea4e0a41b487b63e616cb089922b99
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>
drivers/target/target_core_configfs.c
drivers/target/target_core_internal.h