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
f40079aa
Unverified
Commit
f40079aa
authored
Nov 13, 2023
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor fellow_busy_body_seg_next(): Introduce fdsl variable
parent
6bdb638a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
fellow_cache.c
src/fellow_cache.c
+10
-7
No files found.
src/fellow_cache.c
View file @
f40079aa
...
@@ -3977,27 +3977,30 @@ static struct fellow_cache_res
...
@@ -3977,27 +3977,30 @@ static struct fellow_cache_res
fellow_busy_body_seg_next
(
struct
fellow_busy
*
fbo
)
fellow_busy_body_seg_next
(
struct
fellow_busy
*
fbo
)
{
{
struct
fellow_cache_seglist
*
fcsl
;
struct
fellow_cache_seglist
*
fcsl
;
struct
fellow_disk_seglist
*
fdsl
;
struct
fellow_cache_seg
*
fcs
;
struct
fellow_cache_seg
*
fcs
;
struct
fellow_cache_res
fcr
;
struct
fellow_cache_res
fcr
;
CHECK_OBJ_NOTNULL
(
fbo
,
FELLOW_BUSY_MAGIC
);
CHECK_OBJ_NOTNULL
(
fbo
,
FELLOW_BUSY_MAGIC
);
fcsl
=
fbo
->
body_seglist
;
fcsl
=
fbo
->
body_seglist
;
CHECK_OBJ_NOTNULL
(
fcsl
,
FELLOW_CACHE_SEGLIST_MAGIC
);
CHECK_OBJ_NOTNULL
(
fcsl
,
FELLOW_CACHE_SEGLIST_MAGIC
);
CHECK_OBJ_NOTNULL
(
fcsl
->
fdsl
,
FELLOW_DISK_SEGLIST_MAGIC
);
fdsl
=
fcsl
->
fdsl
;
assert
(
fcsl
->
fdsl
->
nsegs
<=
fcsl
->
lsegs
);
CHECK_OBJ_NOTNULL
(
fdsl
,
FELLOW_DISK_SEGLIST_MAGIC
);
if
(
fcsl
->
fdsl
->
nsegs
==
fcsl
->
lsegs
||
assert
(
fdsl
->
nsegs
<=
fcsl
->
lsegs
);
fcsl
->
segs
[
fcsl
->
fdsl
->
nsegs
].
state
==
FCS_INIT
)
{
if
(
fdsl
->
nsegs
==
fcsl
->
lsegs
||
fcsl
->
segs
[
fdsl
->
nsegs
].
state
==
FCS_INIT
)
{
fcr
=
fellow_busy_body_seglist_alloc
(
fbo
,
fcsl
);
fcr
=
fellow_busy_body_seglist_alloc
(
fbo
,
fcsl
);
if
(
fcr
.
status
!=
fcr_ok
)
if
(
fcr
.
status
!=
fcr_ok
)
return
(
fcr
);
return
(
fcr
);
CAST_OBJ_NOTNULL
(
fcsl
,
fcr
.
r
.
ptr
,
FELLOW_CACHE_SEGLIST_MAGIC
);
CAST_OBJ_NOTNULL
(
fcsl
,
fcr
.
r
.
ptr
,
FELLOW_CACHE_SEGLIST_MAGIC
);
fbo
->
body_seglist
=
fcsl
;
fbo
->
body_seglist
=
fcsl
;
fdsl
=
fcsl
->
fdsl
;
}
}
AN
(
fcsl
->
fdsl
);
CHECK_OBJ_NOTNULL
(
fdsl
,
FELLOW_DISK_SEGLIST_MAGIC
);
assert
(
f
csl
->
f
dsl
->
nsegs
<
fcsl
->
lsegs
);
assert
(
fdsl
->
nsegs
<
fcsl
->
lsegs
);
fcs
=
&
fcsl
->
segs
[
f
csl
->
f
dsl
->
nsegs
];
fcs
=
&
fcsl
->
segs
[
fdsl
->
nsegs
];
fbo
->
body_seg
=
fcs
;
fbo
->
body_seg
=
fcs
;
assert
(
fcs
->
state
==
FCS_USABLE
);
assert
(
fcs
->
state
==
FCS_USABLE
);
assert
(
fcs
->
fco
==
fbo
->
fco
);
assert
(
fcs
->
fco
==
fbo
->
fco
);
...
...
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