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
b4916ea1
Commit
b4916ea1
authored
Feb 07, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change a fieldname that keeps confusing me.
parent
b70e6312
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
15 deletions
+11
-15
storage_persistent.c
bin/varnishd/storage_persistent.c
+7
-11
persistent.h
include/persistent.h
+4
-4
No files found.
bin/varnishd/storage_persistent.c
View file @
b4916ea1
...
...
@@ -105,7 +105,6 @@ struct smp_seg {
uint32_t
nobj
;
/* Number of objects */
uint32_t
nalloc
;
/* Allocations */
uint32_t
nalloc1
;
/* Allocated objects */
uint32_t
nfixed
;
/* How many fixed objects */
/* Only for open segment */
...
...
@@ -683,8 +682,8 @@ smp_find_so(const struct smp_seg *sg, const struct objcore *oc)
smp_idx
=
oc
->
priv2
;
assert
(
smp_idx
>
0
);
assert
(
smp_idx
<=
sg
->
nalloc1
);
so
=
&
sg
->
objs
[
sg
->
nalloc1
-
smp_idx
];
assert
(
smp_idx
<=
sg
->
p
.
lobjlist
);
so
=
&
sg
->
objs
[
sg
->
p
.
lobjlist
-
smp_idx
];
return
(
so
);
}
...
...
@@ -968,8 +967,7 @@ smp_load_seg(const struct sess *sp, const struct smp_sc *sc, struct smp_seg *sg)
/* test OBJIDX */
so
=
(
void
*
)(
sc
->
base
+
sg
->
p
.
objlist
);
sg
->
objs
=
so
;
sg
->
nalloc1
=
sg
->
p
.
nalloc
;
no
=
sg
->
p
.
nalloc
;
no
=
sg
->
p
.
lobjlist
;
/* Clear the bogus "hold" count */
sg
->
nobj
=
0
;
for
(;
no
>
0
;
so
++
,
no
--
)
{
...
...
@@ -1184,7 +1182,6 @@ smp_new_seg(struct smp_sc *sc)
IASSERTALIGN
(
sc
,
sc
->
next_bot
);
IASSERTALIGN
(
sc
,
sc
->
next_top
);
sg
->
objs
=
(
void
*
)(
sc
->
base
+
sc
->
next_top
);
sg
->
nalloc1
=
0
;
}
/*--------------------------------------------------------------------
...
...
@@ -1216,7 +1213,7 @@ smp_close_seg(struct smp_sc *sc, struct smp_seg *sg)
* compact the segment.
*/
left
=
smp_spaceleft
(
sc
,
sg
);
len
=
sizeof
(
struct
smp_object
)
*
sg
->
nalloc1
;
len
=
sizeof
(
struct
smp_object
)
*
sg
->
p
.
lobjlist
;
if
(
len
<
left
)
{
dst
=
sc
->
next_bot
+
IRNUP
(
sc
,
SMP_SIGN_SPACE
);
dp
=
sc
->
base
+
dst
;
...
...
@@ -1232,7 +1229,6 @@ smp_close_seg(struct smp_sc *sc, struct smp_seg *sg)
/* Update the segment header */
sg
->
p
.
objlist
=
sc
->
next_top
;
sg
->
p
.
nalloc
=
sg
->
nalloc1
;
/* Write the (empty) OBJIDX signature */
sc
->
next_top
-=
IRNUP
(
sc
,
SMP_SIGN_SPACE
);
...
...
@@ -1408,7 +1404,7 @@ smp_allocx(struct stevedore *st, size_t min_size, size_t max_size,
(
*
so
)
->
ban
=
0
.;
(
*
so
)
->
ptr
=
NULL
;
sg
->
objs
=
*
so
;
*
idx
=
++
sg
->
nalloc1
;
*
idx
=
++
sg
->
p
.
lobjlist
;
}
(
void
)
smp_spaceleft
(
sc
,
sg
);
/* for the assert */
}
...
...
@@ -1594,8 +1590,8 @@ debug_report_silo(struct cli *cli, const struct smp_sc *sc)
(
uintmax_t
)(
sc
->
next_bot
),
(
uintmax_t
)(
sc
->
next_top
),
(
uintmax_t
)(
sc
->
next_top
-
sc
->
next_bot
));
cli_out
(
cli
,
"
\t
%u nobj, %u alloc, %u
alloc1
, %u fixed
\n
"
,
sg
->
nobj
,
sg
->
nalloc
,
sg
->
nalloc1
,
sg
->
nfixed
);
cli_out
(
cli
,
"
\t
%u nobj, %u alloc, %u
lobjlist
, %u fixed
\n
"
,
sg
->
nobj
,
sg
->
nalloc
,
sg
->
p
.
lobjlist
,
sg
->
nfixed
);
VLIST_FOREACH
(
oc
,
&
sg
->
lru
->
lru_head
,
lru_list
)
{
if
(
oc
==
&
sg
->
lru
->
senteniel
)
cli_out
(
cli
,
"
\t\t
(senteniel) %p
\n
"
,
oc
);
...
...
include/persistent.h
View file @
b4916ea1
...
...
@@ -122,10 +122,10 @@ struct smp_sign {
*/
struct
smp_segptr
{
uint64_t
offset
;
uint64_t
length
;
uint64_t
objlist
;
uint32_t
nalloc
;
uint64_t
offset
;
/* rel to silo */
uint64_t
length
;
/* rel to offset */
uint64_t
objlist
;
/* rel to silo */
uint32_t
lobjlist
;
/* len of objlist */
};
/*
...
...
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