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
3e3e7a27
Unverified
Commit
3e3e7a27
authored
Jan 17, 2024
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fellow_disk_obj: macro for fdsl access
parent
13c7ad3b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
fellow_cache.c
src/fellow_cache.c
+6
-3
No files found.
src/fellow_cache.c
View file @
3e3e7a27
...
@@ -595,6 +595,10 @@ struct fellow_disk_obj {
...
@@ -595,6 +595,10 @@ struct fellow_disk_obj {
uint8_t
va_data
[];
uint8_t
va_data
[];
};
};
// pointer to the embedded fdsl
#define fellow_disk_obj_fdsl(fdo) \
(void *)((uint8_t *)fdo + sizeof *fdo + fdo->va_data_len)
// shaved off one pointer...
// shaved off one pointer...
#define FCO_FCS(fco) (&(fco)->fdo_fcs)
#define FCO_FCS(fco) (&(fco)->fdo_fcs)
#define FCO_FDO(fco) fellow_disk_obj(FCO_FCS(fco))
#define FCO_FDO(fco) fellow_disk_obj(FCO_FCS(fco))
...
@@ -2221,8 +2225,7 @@ fellow_busy_obj_alloc(struct fellow_cache *fc,
...
@@ -2221,8 +2225,7 @@ fellow_busy_obj_alloc(struct fellow_cache *fc,
fcs
->
refcnt
=
2
;
fcs
->
refcnt
=
2
;
fellow_cache_seg_transition_locked_notincore
(
fcs
,
FCO_BUSY
);
fellow_cache_seg_transition_locked_notincore
(
fcs
,
FCO_BUSY
);
fdsl
=
fellow_disk_seglist_init
(
fdsl
=
fellow_disk_seglist_init
(
fellow_disk_obj_fdsl
(
fdo
),
(
void
*
)((
uint8_t
*
)
fdo
+
sizeof
*
fdo
+
wsl
),
ldsegs
,
fc
->
tune
->
hash_obj
);
ldsegs
,
fc
->
tune
->
hash_obj
);
fellow_cache_seglist_associate
(
&
fco
->
seglist
,
fdsl
,
FCS_USABLE
);
fellow_cache_seglist_associate
(
&
fco
->
seglist
,
fdsl
,
FCS_USABLE
);
// DBG("fdsl lsegs %u fcsl lsegs %u", fdsl->lsegs, fco->seglist.lsegs);
// DBG("fdsl lsegs %u fcsl lsegs %u", fdsl->lsegs, fco->seglist.lsegs);
...
@@ -5304,7 +5307,7 @@ struct objcore **ocp, uintptr_t priv2, unsigned crit)
...
@@ -5304,7 +5307,7 @@ struct objcore **ocp, uintptr_t priv2, unsigned crit)
if
(
fco
->
oc
)
if
(
fco
->
oc
)
fco
->
oc
->
oa_present
|=
fdoa2oa_present
(
fdo
->
fdoa_present
);
fco
->
oc
->
oa_present
|=
fdoa2oa_present
(
fdo
->
fdoa_present
);
fdsl
=
(
void
*
)((
uint8_t
*
)
fdo
+
sizeof
*
fdo
+
fdo
->
va_data_len
);
fdsl
=
fellow_disk_obj_fdsl
(
fdo
);
assert
(
PAOK
(
fdsl
));
assert
(
PAOK
(
fdsl
));
// XXX load of folow-up seglists could be async
// XXX load of folow-up seglists could be async
// should not be a common case though, we try to make the first
// should not be a common case though, we try to make the first
...
...
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