Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
slash
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
slash
Commits
2266fd97
Unverified
Commit
2266fd97
authored
Feb 27, 2023
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Consistently name the path to the storage just that
parent
f35d12b2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
12 deletions
+10
-12
vmod_slash.c
src/vmod_slash.c
+2
-2
vmod_slash.man.rst
src/vmod_slash.man.rst
+5
-6
vmod_slash.vcc
src/vmod_slash.vcc
+3
-4
No files found.
src/vmod_slash.c
View file @
2266fd97
...
@@ -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"
,
...
...
src/vmod_slash.man.rst
View file @
2266fd97
...
@@ -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
...
...
src/vmod_slash.vcc
View file @
2266fd97
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment