Skip to content

target: make location of /var/targets configurable

Lee Duncan linux-scsi lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 4 repliesIn review
  2. v22 patches 3 repliesSuperseded
  3. v12 patches 8 repliesSuperseded

Changes in v3 from the cover letter

* Add locking around access to target driver list

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2target: make target db location configurabledrivers/target/target_core_configfs.c drivers/target/target_core_internal.h+68 -00 replies
2/2target: use new "dbroot" target attributedrivers/target/target_core_alua.c drivers/target/target_core_pr.c+4 -40 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchHannes Reinecke
1/2
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCHv3 0/2] target: make location of /var/targets configurable

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 v2:
* Add locking around access to target driver list

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 | 62 +++++++++++++++++++++++++++++++++++
 drivers/target/target_core_internal.h |  6 ++++
 drivers/target/target_core_pr.c       |  2 +-
 4 files changed, 72 insertions(+), 4 deletions(-)
Signature · 1 line
2.1.4