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
02fd3c79
Commit
02fd3c79
authored
Dec 06, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement a getxid method that doesn't require full resurrection
of zombie objects.
parent
4f479297
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
storage_persistent_silo.c
bin/varnishd/storage/storage_persistent_silo.c
+30
-0
No files found.
bin/varnishd/storage/storage_persistent_silo.c
View file @
02fd3c79
...
...
@@ -365,6 +365,35 @@ smp_loaded_st(const struct smp_sc *sc, const struct smp_seg *sg,
return
(
0
);
}
/*---------------------------------------------------------------------
* objcore methods for persistent objects
*/
static
unsigned
__match_proto__
(
getxid_f
)
smp_oc_getxid
(
struct
worker
*
wrk
,
struct
objcore
*
oc
)
{
struct
object
*
o
;
struct
smp_seg
*
sg
;
struct
smp_object
*
so
;
(
void
)
wrk
;
CHECK_OBJ_NOTNULL
(
oc
,
OBJCORE_MAGIC
);
CAST_OBJ_NOTNULL
(
sg
,
oc
->
priv
,
SMP_SEG_MAGIC
);
so
=
smp_find_so
(
sg
,
oc
->
priv2
);
o
=
(
void
*
)(
sg
->
sc
->
base
+
so
->
ptr
);
/*
* The object may not be in this segment since we allocate it
* In a separate operation than the smp_object. We could check
* that it is in a later segment, but that would be complicated.
* XXX: For now, be happy if it is inside th silo
*/
ASSERT_PTR_IN_SILO
(
sg
->
sc
,
o
);
CHECK_OBJ_NOTNULL
(
o
,
OBJECT_MAGIC
);
return
(
o
->
xid
);
}
/*---------------------------------------------------------------------
* objcore methods for persistent objects
*/
...
...
@@ -506,6 +535,7 @@ smp_oc_getlru(const struct objcore *oc)
}
static
struct
objcore_methods
smp_oc_methods
=
{
.
getxid
=
smp_oc_getxid
,
.
getobj
=
smp_oc_getobj
,
.
updatemeta
=
smp_oc_updatemeta
,
.
freeobj
=
smp_oc_freeobj
,
...
...
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