Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
slash
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
slash
Commits
132dd92c
Unverified
Commit
132dd92c
authored
Jan 17, 2024
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fellow_disk_obj: Tighten assertions on alloc.ptr cast
parent
0242113e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
fellow_cache.c
src/fellow_cache.c
+4
-3
No files found.
src/fellow_cache.c
View file @
132dd92c
...
...
@@ -594,7 +594,7 @@ struct fellow_disk_obj {
// shaved off one pointer...
#define FCO_FCS(fco) (&(fco)->fdo_fcs)
#define FCO_FDO(fco)
(void*)(fco)->fdo_fcs.alloc.ptr
#define FCO_FDO(fco)
fellow_disk_obj(FCO_FCS(fco))
#define FCO_REFCNT(fco) (fco)->fdo_fcs.refcnt
#define FCO_STATE(fco) (fco)->fdo_fcs.state
...
...
@@ -1018,11 +1018,12 @@ fellow_busy_io_submit(struct fellow_busy_io *fbio)
return (FC_ERRSTR("disk object wrong " x)); \
} while(0)
static
struct
fellow_disk_obj
*
static
inline
struct
fellow_disk_obj
*
fellow_disk_obj
(
const
struct
fellow_cache_seg
*
fcs
)
{
AN
(
fcs
);
AN
(
fcs
->
alloc
.
ptr
);
assert
(
FCOS_HIGH
(
fcs
->
state
)
==
FCO_HIGH
);
return
(
fcs
->
alloc
.
ptr
);
}
...
...
@@ -2167,7 +2168,7 @@ fellow_busy_obj_alloc(struct fellow_cache *fc,
fbo
->
segdskdowry
=
dskdowry
;
// disk object in memory
fdo
=
f
cs
->
alloc
.
ptr
;
fdo
=
f
ellow_disk_obj
(
fcs
)
;
memset
(
fdo
,
0
,
fcs
->
alloc
.
size
);
fdo
->
magic
=
FELLOW_DISK_OBJ_MAGIC
;
fdo
->
version
=
1
;
...
...
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