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
d863c0a8
Unverified
Commit
d863c0a8
authored
Dec 18, 2023
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
logcache needs 2 entries at least
parent
cd4a8c08
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
fellow_log.c
src/fellow_log.c
+5
-2
No files found.
src/fellow_log.c
View file @
d863c0a8
...
...
@@ -1179,6 +1179,8 @@ fellow_logcache_init(struct fellow_logcache *flc, struct fellow_fd *ffd,
n
=
(
typeof
(
n
))
sz
;
if
(
n
>
BUDDY_REQS_MAX
)
n
=
BUDDY_REQS_MAX
;
if
(
n
<
2
)
n
=
2
;
// fellow_logcache_(take|steal) assume 2 entries
INIT_OBJ
(
flc
,
FELLOW_LOGCACHE_MAGIC
);
flc
->
ffd
=
ffd
;
...
...
@@ -1192,7 +1194,8 @@ fellow_logcache_init(struct fellow_logcache *flc, struct fellow_fd *ffd,
sz
=
n
*
sizeof
*
fle
;
u
=
log2up
(
sz
);
l
=
log2up
(
sizeof
*
fle
);
cram
=
(
int
)
l
-
(
int
)
u
;
cram
=
((
int
)
l
-
(
int
)
u
)
+
1
;
assert
(
cram
<=
0
);
if
(
u
>
UINT8_MAX
)
...
...
@@ -1215,7 +1218,7 @@ fellow_logcache_init(struct fellow_logcache *flc, struct fellow_fd *ffd,
for
(
u
=
0
;
u
<
sz
;
u
++
)
AN
(
buddy_req_page
(
reqs
,
MIN_FELLOW_BITS
,
0
));
u
=
buddy_alloc_wait
(
reqs
);
AN
(
u
);
assert
(
u
>=
2
);
flc
->
n
=
u
;
for
(
fle
=
flc
->
alloc_entry
.
ptr
,
u
=
0
;
...
...
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