linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv2 0/2] target: make location of /var/targets configurable
@ 2016-04-13 20:25 Lee Duncan
  2016-04-13 20:25 ` [PATCHv2 1/2] target: make target db location configurable Lee Duncan
  2016-04-13 20:25 ` [PATCH 2/2] target: use new "dbroot" target attribute Lee Duncan
  0 siblings, 2 replies; 6+ messages in thread
From: Lee Duncan @ 2016-04-13 20:25 UTC (permalink / raw)
  To: linux-scsi, nab, target-devel
  Cc: linux-kernel, hch, hare, agrover, jxm, Lee Duncan

These patches make the location of "/var/target" configurable,
though it still defauls to "/var/target".

This "target database directory" can only be changed
after the target_core_mod loads but before any
fabric drivers are loaded, and must be the pathname
of an existing directory.

This configuration is accomplished via the configfs
top-level target attribute "dbroot", i.e. dumping
out "/sys/kernel/config/target/dbroot" will normally
return "/var/target". Writing to this attribute
changes the loation where the kernel looks for the
target database.

The first patch creates this configurable value for
the "dbroot", and the second patch modifies users
of this directory to use this new attribute.

Changes from v1:
 * Only allow changing target DB root before it
   can be used by others
 * Validate that new DB root is a valid directory

Lee Duncan (2):
  target: make target db location configurable
  target: use new "dbroot" target attribute

 drivers/target/target_core_alua.c     |  6 ++---
 drivers/target/target_core_configfs.c | 51 +++++++++++++++++++++++++++++++++++
 drivers/target/target_core_internal.h |  6 +++++
 drivers/target/target_core_pr.c       |  2 +-
 4 files changed, 61 insertions(+), 4 deletions(-)

-- 
2.1.4

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-04-15  0:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-13 20:25 [PATCHv2 0/2] target: make location of /var/targets configurable Lee Duncan
2016-04-13 20:25 ` [PATCHv2 1/2] target: make target db location configurable Lee Duncan
2016-04-14  6:10   ` Hannes Reinecke
2016-04-15  0:04     ` Lee Duncan
2016-04-13 20:25 ` [PATCH 2/2] target: use new "dbroot" target attribute Lee Duncan
2016-04-14  6:10   ` Hannes Reinecke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).