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
889a8e4c
Commit
889a8e4c
authored
Nov 20, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
White-space & comment cleanup
parent
5cbd8caa
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
64 deletions
+8
-64
common_vsm.c
bin/varnishd/common/common_vsm.c
+4
-4
mgt_shmem.c
bin/varnishd/mgt/mgt_shmem.c
+1
-57
cli_common.c
lib/libvarnish/cli_common.c
+1
-1
vsc.c
lib/libvarnishapi/vsc.c
+1
-1
vsm.c
lib/libvarnishapi/vsm.c
+1
-1
No files found.
bin/varnishd/common/common_vsm.c
View file @
889a8e4c
...
...
@@ -49,10 +49,10 @@
/*--------------------------------------------------------------------*/
struct
vsm_range
{
unsigned
magic
;
unsigned
magic
;
#define VSM_RANGE_MAGIC 0x8d30f14
VTAILQ_ENTRY
(
vsm_range
)
list
;
ssize_t
off
;
ssize_t
off
;
ssize_t
len
;
double
cool
;
struct
VSM_chunk
*
chunk
;
...
...
@@ -60,7 +60,7 @@ struct vsm_range {
};
struct
vsm_sc
{
unsigned
magic
;
unsigned
magic
;
#define VSM_SC_MAGIC 0x8b83270d
char
*
b
;
ssize_t
len
;
...
...
@@ -236,7 +236,7 @@ VSM_common_alloc(struct vsm_sc *sc, ssize_t size,
vr3
=
VTAILQ_FIRST
(
&
sc
->
r_used
);
VTAILQ_INSERT_HEAD
(
&
sc
->
r_used
,
vr
,
list
);
if
(
vr3
!=
NULL
)
{
if
(
vr3
!=
NULL
)
{
AZ
(
vr3
->
chunk
->
next
);
vr3
->
chunk
->
next
=
vr
->
off
;
}
else
{
...
...
bin/varnishd/mgt/mgt_shmem.c
View file @
889a8e4c
...
...
@@ -26,62 +26,6 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*
* TODO:
*
* There is a risk that the child process might corrupt the VSM segment
* and we should capture that event and recover gracefully.
*
* A possible state diagram could be:
*
* [manager start]
* |
* v
* Open old VSM,
* check pid --------> exit/fail (-n message)
* |
* +<----------------------+
* | ^
* v |
* Create new VSM |
* | |
* v |
* Init header |
* Alloc VSL |
* Alloc VSC:Main |
* Alloc Args etc. |
* | |
* +<--------------+ |
* | ^ |
* v | |
* start worker | |
* | | |
* | | +<---- worker crash
* v | ^
* Reset VSL ptr. | |
* Reset VSC counters | |
* | | |
* +<------+ | |
* | ^ | |
* v | | |
* alloc dynamics | | |
* free dynamics | | |
* | | | |
* v | | |
* +------>+ | |
* | | |
* v | |
* stop worker | |
* | | |
* v | |
* Check consist---------- | ----->+
* | |
* v |
* Free dynamics |
* | |
* v |
* +-------------->+
*
*/
#include "config.h"
...
...
@@ -241,7 +185,7 @@ mgt_SHM_Init(void)
bprintf
(
fnbuf
,
"%s.%jd"
,
VSM_FILENAME
,
(
intmax_t
)
getpid
());
vsm_fd
=
vsm_zerofile
(
fnbuf
,
size
);
if
(
vsm_fd
<
0
)
if
(
vsm_fd
<
0
)
exit
(
1
);
p
=
(
void
*
)
mmap
(
NULL
,
size
,
...
...
lib/libvarnish/cli_common.c
View file @
889a8e4c
...
...
@@ -212,7 +212,7 @@ VCLI_ReadResult(int fd, unsigned *status, char **ptr, double tmo)
break
;
if
(
p
[
v
]
!=
'\n'
)
break
;
p
[
v
]
=
'\0'
;
if
(
ptr
==
NULL
)
free
(
p
);
...
...
lib/libvarnishapi/vsc.c
View file @
889a8e4c
...
...
@@ -292,7 +292,7 @@ iter_call(const struct vsc *vsc, VSC_iter_f *func, void *priv,
int i; \
\
CHECK_OBJ_NOTNULL(vsc, VSC_MAGIC); \
st = vf->b;
\
st = vf->b; \
sp.class = t; \
sp.ident = vf->chunk->ident;
...
...
lib/libvarnishapi/vsm.c
View file @
889a8e4c
...
...
@@ -141,7 +141,7 @@ VSM_Delete(struct VSM_data *vd)
*
* Return:
* 0 = sucess
*
<0 = failure
* <0 = failure
*
*/
...
...
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