Consistently name the path to the storage just that

parent f35d12b2
...@@ -278,7 +278,7 @@ vmod_tune_buddy(VRT_CTX, struct VARGS(tune_buddy)*args) ...@@ -278,7 +278,7 @@ vmod_tune_buddy(VRT_CTX, struct VARGS(tune_buddy)*args)
VCL_VOID VCL_VOID
vmod_fellow__init(VRT_CTX, struct VPFX(slash_stv) **sbp, vmod_fellow__init(VRT_CTX, struct VPFX(slash_stv) **sbp,
const char *vcl_name, VCL_STRING filename, const char *vcl_name, VCL_STRING path,
VCL_BYTES dsksizea, VCL_BYTES memsizea, VCL_BYTES objsize_hinta, VCL_BYTES dsksizea, VCL_BYTES memsizea, VCL_BYTES objsize_hinta,
VCL_BOOL delete) VCL_BOOL delete)
{ {
...@@ -303,7 +303,7 @@ vmod_fellow__init(VRT_CTX, struct VPFX(slash_stv) **sbp, ...@@ -303,7 +303,7 @@ vmod_fellow__init(VRT_CTX, struct VPFX(slash_stv) **sbp,
stv = stv_find(vcl_name); stv = stv_find(vcl_name);
if (stv == NULL) if (stv == NULL)
stv = sfe_new(vcl_name, filename, stv = sfe_new(vcl_name, path,
dsksize, memsize, objsize_hint, delete); dsksize, memsize, objsize_hint, delete);
if (stv == NULL) { if (stv == NULL) {
VRT_fail(ctx, "fellow %s configuration failed: %s", VRT_fail(ctx, "fellow %s configuration failed: %s",
......
...@@ -410,26 +410,25 @@ parameters see `xbuddy.tune()`. ...@@ -410,26 +410,25 @@ parameters see `xbuddy.tune()`.
.. _slash.fellow(): .. _slash.fellow():
new xfellow = slash.fellow(STRING filename, BYTES dsksize, BYTES memsize, BYTES objsize_hint, BOOL delete) new xfellow = slash.fellow(STRING path, BYTES dsksize, BYTES memsize, BYTES objsize_hint, BOOL delete)
---------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------
:: ::
new xfellow = slash.fellow( new xfellow = slash.fellow(
STRING filename, STRING path,
BYTES dsksize, BYTES dsksize,
BYTES memsize, BYTES memsize,
BYTES objsize_hint=262144, BYTES objsize_hint=262144,
BOOL delete=0 BOOL delete=0
) )
Create or reference a fellow storage on *filename* of size *dsksize* Create or reference a fellow storage on *path* of size *dsksize*
with a memory cache of size *memsize*. with a memory cache of size *memsize*.
A VCL-defined fellow storage can not load persisted objects, so to A VCL-defined fellow storage can not load persisted objects, so to
avoid accidentally emptying a storage, either the storage referenced avoid accidentally emptying a storage, either the storage referenced
by *filename* must be empty, or the *delete* argument must be by *path* must be empty, or the *delete* argument must be ``true``.
``true``.
When a VCL-defined fellow storage goes out of scope because the last When a VCL-defined fellow storage goes out of scope because the last
VCL referencing it is discarded, all of its objects are removed from VCL referencing it is discarded, all of its objects are removed from
......
...@@ -366,16 +366,15 @@ $Function STRING tune_buddy( ...@@ -366,16 +366,15 @@ $Function STRING tune_buddy(
Tune the given globally defined fellow storage, for all other Tune the given globally defined fellow storage, for all other
parameters see `xbuddy.tune()`. parameters see `xbuddy.tune()`.
$Object fellow(STRING filename, BYTES dsksize, BYTES memsize, $Object fellow(STRING path, BYTES dsksize, BYTES memsize,
BYTES objsize_hint=262144, BOOL delete=0) BYTES objsize_hint=262144, BOOL delete=0)
Create or reference a fellow storage on *filename* of size *dsksize* Create or reference a fellow storage on *path* of size *dsksize*
with a memory cache of size *memsize*. with a memory cache of size *memsize*.
A VCL-defined fellow storage can not load persisted objects, so to A VCL-defined fellow storage can not load persisted objects, so to
avoid accidentally emptying a storage, either the storage referenced avoid accidentally emptying a storage, either the storage referenced
by *filename* must be empty, or the *delete* argument must be by *path* must be empty, or the *delete* argument must be ``true``.
``true``.
When a VCL-defined fellow storage goes out of scope because the last When a VCL-defined fellow storage goes out of scope because the last
VCL referencing it is discarded, all of its objects are removed from VCL referencing it is discarded, all of its objects are removed from
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment