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
aef83370
Commit
aef83370
authored
Nov 01, 2011
by
Tollef Fog Heen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use new-style backend naming in output
Prefer vcl_name(ipv4,ipv6,port) to the old vcl_name in output.
parent
bced3f5b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
15 deletions
+15
-15
cache_backend.c
bin/varnishd/cache_backend.c
+7
-9
cache_backend.h
bin/varnishd/cache_backend.h
+1
-0
cache_backend_cfg.c
bin/varnishd/cache_backend_cfg.c
+4
-3
cache_dir.c
bin/varnishd/cache_dir.c
+2
-2
cache_panic.c
bin/varnishd/cache_panic.c
+1
-1
No files found.
bin/varnishd/cache_backend.c
View file @
aef83370
...
...
@@ -143,8 +143,8 @@ bes_conn_try(const struct sess *sp, struct vbc *vc, const struct vdi_simple *vs)
{
int
s
;
struct
backend
*
bp
=
vs
->
backend
;
char
abuf1
[
VTCP_ADDRBUFSIZE
]
,
abuf2
[
VTCP_ADDRBUFSIZE
]
;
char
pbuf1
[
VTCP_PORTBUFSIZE
]
,
pbuf2
[
VTCP_PORTBUFSIZE
]
;
char
abuf1
[
VTCP_ADDRBUFSIZE
];
char
pbuf1
[
VTCP_PORTBUFSIZE
];
CHECK_OBJ_NOTNULL
(
vs
,
VDI_SIMPLE_MAGIC
);
...
...
@@ -185,10 +185,8 @@ bes_conn_try(const struct sess *sp, struct vbc *vc, const struct vdi_simple *vs)
}
else
{
vc
->
vsl_id
=
s
|
VSL_BACKENDMARKER
;
VTCP_myname
(
s
,
abuf1
,
sizeof
abuf1
,
pbuf1
,
sizeof
pbuf1
);
VTCP_name
(
vc
->
addr
,
vc
->
addrlen
,
abuf2
,
sizeof
abuf2
,
pbuf2
,
sizeof
pbuf2
);
WSL
(
sp
->
wrk
,
SLT_BackendOpen
,
vc
->
vsl_id
,
"%s %s %s %s %s"
,
vs
->
backend
->
vcl_name
,
abuf1
,
pbuf1
,
abuf2
,
pbuf2
);
WSL
(
sp
->
wrk
,
SLT_BackendOpen
,
vc
->
vsl_id
,
"%s %s %s "
,
vs
->
backend
->
display_name
,
abuf1
,
pbuf1
);
}
}
...
...
@@ -347,13 +345,13 @@ vbe_GetVbe(const struct sess *sp, struct vdi_simple *vs)
/* XXX locking of stats */
VSC_C_main
->
backend_reuse
+=
1
;
WSP
(
sp
,
SLT_Backend
,
"%d %s %s"
,
vc
->
fd
,
sp
->
director
->
vcl_name
,
bp
->
vcl
_name
);
vc
->
fd
,
sp
->
director
->
vcl_name
,
bp
->
display
_name
);
vc
->
vdis
=
vs
;
vc
->
recycled
=
1
;
return
(
vc
);
}
VSC_C_main
->
backend_toolate
++
;
WSL
(
sp
->
wrk
,
SLT_BackendClose
,
vc
->
vsl_id
,
"%s"
,
bp
->
vcl
_name
);
WSL
(
sp
->
wrk
,
SLT_BackendClose
,
vc
->
vsl_id
,
"%s"
,
bp
->
display
_name
);
/* Checkpoint log to flush all info related to this connection
before the OS reuses the FD */
...
...
@@ -388,7 +386,7 @@ vbe_GetVbe(const struct sess *sp, struct vdi_simple *vs)
vc
->
backend
=
bp
;
VSC_C_main
->
backend_conn
++
;
WSP
(
sp
,
SLT_Backend
,
"%d %s %s"
,
vc
->
fd
,
sp
->
director
->
vcl_name
,
bp
->
vcl
_name
);
vc
->
fd
,
sp
->
director
->
vcl_name
,
bp
->
display
_name
);
vc
->
vdis
=
vs
;
return
(
vc
);
}
...
...
bin/varnishd/cache_backend.h
View file @
aef83370
...
...
@@ -115,6 +115,7 @@ struct backend {
struct
lock
mtx
;
char
*
vcl_name
;
char
*
display_name
;
char
*
ipv4_addr
;
char
*
ipv6_addr
;
char
*
port
;
...
...
bin/varnishd/cache_backend_cfg.c
View file @
aef83370
...
...
@@ -213,6 +213,7 @@ VBE_AddBackend(struct cli *cli, const struct vrt_backend *vb)
* so we cannot simply reference the VCL's copy of things.
*/
REPLACE
(
b
->
vcl_name
,
vb
->
vcl_name
);
REPLACE
(
b
->
display_name
,
buf
);
REPLACE
(
b
->
ipv4_addr
,
vb
->
ipv4_addr
);
REPLACE
(
b
->
ipv6_addr
,
vb
->
ipv6_addr
);
REPLACE
(
b
->
port
,
vb
->
port
);
...
...
@@ -283,9 +284,9 @@ cli_debug_backend(struct cli *cli, const char * const *av, void *priv)
ASSERT_CLI
();
VTAILQ_FOREACH
(
b
,
&
backends
,
list
)
{
CHECK_OBJ_NOTNULL
(
b
,
BACKEND_MAGIC
);
VCLI_Out
(
cli
,
"%p %s
(%s,%s,:%s)
%d %d
\n
"
,
b
,
b
->
vcl_name
,
b
->
ipv4_addr
,
b
->
ipv6_addr
,
b
->
port
,
b
->
refcount
,
b
->
n_conn
);
VCLI_Out
(
cli
,
"%p %s %d %d
\n
"
,
b
,
b
->
display_name
,
b
->
refcount
,
b
->
n_conn
);
}
}
...
...
bin/varnishd/cache_dir.c
View file @
aef83370
...
...
@@ -50,7 +50,7 @@ VDI_CloseFd(struct worker *wrk)
bp
=
wrk
->
vbc
->
backend
;
WSL
(
wrk
,
SLT_BackendClose
,
wrk
->
vbc
->
vsl_id
,
"%s"
,
bp
->
vcl
_name
);
WSL
(
wrk
,
SLT_BackendClose
,
wrk
->
vbc
->
vsl_id
,
"%s"
,
bp
->
display
_name
);
/* Checkpoint log to flush all info related to this connection
before the OS reuses the FD */
...
...
@@ -78,7 +78,7 @@ VDI_RecycleFd(struct worker *wrk)
bp
=
wrk
->
vbc
->
backend
;
WSL
(
wrk
,
SLT_BackendReuse
,
wrk
->
vbc
->
vsl_id
,
"%s"
,
bp
->
vcl
_name
);
WSL
(
wrk
,
SLT_BackendReuse
,
wrk
->
vbc
->
vsl_id
,
"%s"
,
bp
->
display
_name
);
/*
* Flush the shmlog, so that another session reusing this backend
* will log chronologically later than our use of it.
...
...
bin/varnishd/cache_panic.c
View file @
aef83370
...
...
@@ -96,7 +96,7 @@ pan_vbc(const struct vbc *vbc)
be
=
vbc
->
backend
;
VSB_printf
(
vsp
,
" backend = %p fd = %d {
\n
"
,
be
,
vbc
->
fd
);
VSB_printf
(
vsp
,
"
vcl_name =
\"
%s
\"
,
\n
"
,
be
->
vcl
_name
);
VSB_printf
(
vsp
,
"
display_name =
\"
%s
\"
,
\n
"
,
be
->
display
_name
);
VSB_printf
(
vsp
,
" },
\n
"
);
}
...
...
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