Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
unique-xids
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
unique-xids
Commits
052473dd
Commit
052473dd
authored
Feb 08, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Split the silo-centric from the policy parts of persistent storage code.
parent
63105cc2
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
230 additions
and
1345 deletions
+230
-1345
Makefile.am
bin/varnishd/Makefile.am
+1
-0
storage_persistent.c
bin/varnishd/storage_persistent.c
+1
-480
storage_persistent.h
bin/varnishd/storage_persistent.h
+24
-4
storage_persistent_silo.c
bin/varnishd/storage_persistent_silo.c
+203
-860
storage_persistent_subr.c
bin/varnishd/storage_persistent_subr.c
+1
-1
No files found.
bin/varnishd/Makefile.am
View file @
052473dd
...
...
@@ -65,6 +65,7 @@ varnishd_SOURCES = \
storage_malloc.c
\
storage_persistent.c
\
storage_persistent_mgt.c
\
storage_persistent_silo.c
\
storage_persistent_subr.c
\
storage_synth.c
\
storage_umem.c
\
...
...
bin/varnishd/storage_persistent.c
View file @
052473dd
This diff is collapsed.
Click to expand it.
bin/varnishd/storage_persistent.h
View file @
052473dd
...
...
@@ -174,20 +174,26 @@ struct smp_sc {
#define SIGN_DATA(ctx) ((void *)((ctx)->ss + 1))
#define SIGN_END(ctx) ((void *)((int8_t *)SIGN_DATA(ctx) + (ctx)->ss->length))
/* storage_persistent.c */
/* storage_persistent_mgt.c */
void
smp_mgt_init
(
struct
stevedore
*
parent
,
int
ac
,
char
*
const
*
av
);
/* storage_persistent_silo.c */
void
smp_load_seg
(
const
struct
sess
*
sp
,
const
struct
smp_sc
*
sc
,
struct
smp_seg
*
sg
);
void
smp_new_seg
(
struct
smp_sc
*
sc
);
void
smp_close_seg
(
struct
smp_sc
*
sc
,
struct
smp_seg
*
sg
);
void
smp_init_oc
(
struct
objcore
*
oc
,
struct
smp_seg
*
sg
,
unsigned
objidx
);
/* storage_persistent_subr.c */
void
smp_def_sign
(
const
struct
smp_sc
*
sc
,
struct
smp_signctx
*
ctx
,
uint64_t
off
,
const
char
*
id
);
int
smp_chk_sign
(
struct
smp_signctx
*
ctx
);
void
smp_append_sign
(
struct
smp_signctx
*
ctx
,
const
void
*
ptr
,
uint32_t
len
);
void
smp_reset_sign
(
struct
smp_signctx
*
ctx
);
void
smp_sync_sign
(
const
struct
smp_signctx
*
ctx
);
void
smp_new_sign
(
const
struct
smp_sc
*
sc
,
struct
smp_signctx
*
ctx
,
uint64_t
off
,
const
char
*
id
);
void
smp_newsilo
(
struct
smp_sc
*
sc
);
int
smp_valid_silo
(
struct
smp_sc
*
sc
);
...
...
@@ -206,6 +212,20 @@ smp_stuff_len(const struct smp_sc *sc, unsigned stuff)
return
(
l
);
}
static
inline
uint64_t
smp_segend
(
const
struct
smp_seg
*
sg
)
{
return
(
sg
->
p
.
offset
+
sg
->
p
.
length
);
}
static
inline
uint64_t
smp_spaceleft
(
const
struct
smp_sc
*
sc
,
const
struct
smp_seg
*
sg
)
{
IASSERTALIGN
(
sc
,
sc
->
next_bot
);
assert
(
sc
->
next_bot
<=
sc
->
next_top
-
IRNUP
(
sc
,
SMP_SIGN_SPACE
));
assert
(
sc
->
next_bot
>=
sg
->
p
.
offset
);
assert
(
sc
->
next_top
<
sg
->
p
.
offset
+
sg
->
p
.
length
);
return
((
sc
->
next_top
-
sc
->
next_bot
)
-
IRNUP
(
sc
,
SMP_SIGN_SPACE
));
}
bin/varnishd/storage_persistent_silo.c
View file @
052473dd
This diff is collapsed.
Click to expand it.
bin/varnishd/storage_persistent_subr.c
View file @
052473dd
...
...
@@ -169,7 +169,7 @@ smp_sync_sign(const struct smp_signctx *ctx)
* Create and force a new signature to backing store
*/
void
static
void
smp_new_sign
(
const
struct
smp_sc
*
sc
,
struct
smp_signctx
*
ctx
,
uint64_t
off
,
const
char
*
id
)
{
...
...
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