Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
1d9ba3fc
Commit
1d9ba3fc
authored
Dec 20, 2017
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a (presently constant at zero) offset field to the VSM index.
parent
9343c467
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
vsmw.c
lib/libvarnish/vsmw.c
+1
-1
vsm.c
lib/libvarnishapi/vsm.c
+9
-9
No files found.
lib/libvarnish/vsmw.c
View file @
1d9ba3fc
...
...
@@ -109,7 +109,7 @@ vsmw_write_index(const struct vsmw *vsmw, int fd, const struct vsmwseg *seg)
CHECK_OBJ_NOTNULL
(
vsmw
,
VSMW_MAGIC
);
CHECK_OBJ_NOTNULL
(
seg
,
VSMWSEG_MAGIC
);
VSB_clear
(
vsmw
->
vsb
);
VSB_printf
(
vsmw
->
vsb
,
"%s %zu %s %s
\n
"
,
VSB_printf
(
vsmw
->
vsb
,
"%s
0
%zu %s %s
\n
"
,
seg
->
fn
,
seg
->
len
,
seg
->
class
,
...
...
lib/libvarnishapi/vsm.c
View file @
1d9ba3fc
...
...
@@ -156,7 +156,7 @@ vsm_unmapseg(struct vsm_seg *vg)
AN
(
vg
->
b
);
AN
(
vg
->
e
);
sz
=
strtoul
(
vg
->
av
[
2
],
NULL
,
10
);
sz
=
strtoul
(
vg
->
av
[
3
],
NULL
,
10
);
assert
(
sz
>
0
);
ps
=
getpagesize
();
len
=
RUP2
(
sz
,
ps
);
...
...
@@ -468,13 +468,14 @@ vsm_refresh_set2(struct vsm *vd, struct vsm_set *vs, struct vsb *vsb)
av
=
VAV_Parse
(
p
,
&
ac
,
0
);
p
=
e
+
1
;
if
(
av
[
0
]
!=
NULL
||
ac
<
4
||
ac
>
5
)
{
if
(
av
[
0
]
!=
NULL
||
ac
<
5
||
ac
>
6
)
{
(
void
)(
vsm_diag
(
vd
,
"vsm_refresh_set2: bad index (%d/%s)"
,
ac
,
av
[
0
]));
VAV_Free
(
av
);
break
;
}
xxxassert
(
!
strcmp
(
av
[
2
],
"0"
));
if
(
vg
==
NULL
)
{
ALLOC_OBJ
(
vg2
,
VSM_SEG_MAGIC
);
...
...
@@ -487,9 +488,8 @@ vsm_refresh_set2(struct vsm *vd, struct vsm_set *vs, struct vsb *vsb)
continue
;
}
while
(
vg
!=
NULL
&&
vsm_cmp_av
(
&
vg
->
av
[
1
],
&
av
[
1
]))
{
while
(
vg
!=
NULL
&&
vsm_cmp_av
(
&
vg
->
av
[
1
],
&
av
[
1
]))
vg
=
VTAILQ_NEXT
(
vg
,
list
);
}
VAV_Free
(
av
);
...
...
@@ -681,8 +681,8 @@ VSM__itern(struct vsm *vd, struct vsm_fantom *vf)
return
(
0
);
memset
(
vf
,
0
,
sizeof
*
vf
);
vf
->
priv
=
vg2
->
serial
;
vf
->
class
=
vg2
->
av
[
3
];
vf
->
ident
=
vg2
->
av
[
4
];
vf
->
class
=
vg2
->
av
[
4
];
vf
->
ident
=
vg2
->
av
[
5
];
return
(
1
);
}
...
...
@@ -704,8 +704,8 @@ VSM_Map(struct vsm *vd, struct vsm_fantom *vf)
return
(
vsm_diag
(
vd
,
"VSM_Map: bad fantom"
));
assert
(
vg
->
serial
==
vf
->
priv
);
assert
(
vg
->
av
[
3
]
==
vf
->
class
);
assert
(
vg
->
av
[
4
]
==
vf
->
ident
);
assert
(
vg
->
av
[
4
]
==
vf
->
class
);
assert
(
vg
->
av
[
5
]
==
vf
->
ident
);
if
(
vg
->
b
!=
NULL
)
{
assert
(
vg
->
refs
>
0
);
...
...
@@ -716,7 +716,7 @@ VSM_Map(struct vsm *vd, struct vsm_fantom *vf)
return
(
0
);
}
sz
=
strtoul
(
vg
->
av
[
2
],
NULL
,
10
);
sz
=
strtoul
(
vg
->
av
[
3
],
NULL
,
10
);
assert
(
sz
>
0
);
ps
=
getpagesize
();
len
=
RUP2
(
sz
,
ps
);
...
...
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