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
9d3458a2
Unverified
Commit
9d3458a2
authored
Jan 19, 2024
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fellow_cache: Assert that fcs->len is not used by FCO segments
parent
880be3b6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
19 deletions
+24
-19
fellow_cache.c
src/fellow_cache.c
+7
-2
fco_states.h
src/tbl/fco_states.h
+9
-9
fcs_states.h
src/tbl/fcs_states.h
+8
-8
No files found.
src/fellow_cache.c
View file @
9d3458a2
...
@@ -1415,7 +1415,11 @@ assert_cache_seg_consistency(const struct fellow_cache_seg *fcs)
...
@@ -1415,7 +1415,11 @@ assert_cache_seg_consistency(const struct fellow_cache_seg *fcs)
AZ(fcs->alloc.size); \
AZ(fcs->alloc.size); \
AZ(fcs->len); \
AZ(fcs->len); \
} while(0)
} while(0)
#define FCOSA_MEM do { \
#define FCSA_MEM do { \
AN(fcs->alloc.ptr); \
AN(fcs->alloc.size); \
} while(0)
#define FCOA_MEM do { \
AN(fcs->alloc.ptr); \
AN(fcs->alloc.ptr); \
AN(fcs->alloc.size); \
AN(fcs->alloc.size); \
} while(0)
} while(0)
...
@@ -1453,7 +1457,8 @@ assert_cache_seg_consistency(const struct fellow_cache_seg *fcs)
...
@@ -1453,7 +1457,8 @@ assert_cache_seg_consistency(const struct fellow_cache_seg *fcs)
#undef FCOSA_NOFDB
#undef FCOSA_NOFDB
#undef FCOSA_FDB
#undef FCOSA_FDB
#undef FCOSA_NOMEM
#undef FCOSA_NOMEM
#undef FCOSA_MEM
#undef FCOA_MEM
#undef FCSA_MEM
#undef FDSA_NULL
#undef FDSA_NULL
#undef FDSA_UN
#undef FDSA_UN
#undef FDSA_ALLOC
#undef FDSA_ALLOC
...
...
src/tbl/fco_states.h
View file @
9d3458a2
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
* FCOSA_MAYFDB
* FCOSA_MAYFDB
*
*
* FCOSA_NOMEM
* FCOSA_NOMEM
* FCO
S
A_MEM
* FCOA_MEM
*
*
* diskset: FDSA_NULL no disk_seg pointer
* diskset: FDSA_NULL no disk_seg pointer
* FDSA_MAY NULL or valid object (for READFAIL)
* FDSA_MAY NULL or valid object (for READFAIL)
...
@@ -42,18 +42,18 @@
...
@@ -42,18 +42,18 @@
FCOSD
(
FCO
,
INIT
,
"unused"
,
FCOSD
(
FCO
,
INIT
,
"unused"
,
FCOSA_NOLRU
,
FCOSA_NOFDB
,
FCOSA_NOMEM
,
FDSA_NULL
)
FCOSA_NOLRU
,
FCOSA_NOFDB
,
FCOSA_NOMEM
,
FDSA_NULL
)
FCOSD
(
FCO
,
BUSY
,
"in memory, incomplete"
,
FCOSD
(
FCO
,
BUSY
,
"in memory, incomplete"
,
FCOSA_NOLRU
,
FCOSA_NOFDB
,
FCO
S
A_MEM
,
FDSA_ALLOC
)
FCOSA_NOLRU
,
FCOSA_NOFDB
,
FCOA_MEM
,
FDSA_ALLOC
)
FCOSD
(
FCO
,
WRITING
,
"transitioning BUSY->INCORE, being written"
,
FCOSD
(
FCO
,
WRITING
,
"transitioning BUSY->INCORE, being written"
,
FCOSA_NOLRU
,
FCOSA_MAYFDB
,
FCO
S
A_MEM
,
FDSA_ALLOC
)
FCOSA_NOLRU
,
FCOSA_MAYFDB
,
FCOA_MEM
,
FDSA_ALLOC
)
FCOSD
(
FCO
,
READING
,
"being read, signal via cond"
,
FCOSD
(
FCO
,
READING
,
"being read, signal via cond"
,
FCOSA_NOLRU
,
FCOSA_MAYFDB
,
FCO
S
A_MEM
,
FDSA_NULL
)
FCOSA_NOLRU
,
FCOSA_MAYFDB
,
FCOA_MEM
,
FDSA_NULL
)
FCOSD
(
FCO
,
REDUNDANT
,
"aborted read"
,
FCOSD
(
FCO
,
REDUNDANT
,
"aborted read"
,
FCOSA_NOLRU
,
FCOSA_NOFDB
,
FCO
S
A_MEM
,
FDSA_NULL
)
FCOSA_NOLRU
,
FCOSA_NOFDB
,
FCOA_MEM
,
FDSA_NULL
)
FCOSD
(
FCO
,
MEM
,
"only in mem, on lru unless a private object"
,
FCOSD
(
FCO
,
MEM
,
"only in mem, on lru unless a private object"
,
FCOSA_MAYLRU
,
FCOSA_NOFDB
,
FCO
S
A_MEM
,
FDSA_UN
)
FCOSA_MAYLRU
,
FCOSA_NOFDB
,
FCOA_MEM
,
FDSA_UN
)
FCOSD
(
FCO
,
INCORE
,
"usable in mem, on lru unless a private object"
,
FCOSD
(
FCO
,
INCORE
,
"usable in mem, on lru unless a private object"
,
FCOSA_MAYLRU
,
FCOSA_MAYFDB
,
FCO
S
A_MEM
,
FDSA_ALLOC
)
FCOSA_MAYLRU
,
FCOSA_MAYFDB
,
FCOA_MEM
,
FDSA_ALLOC
)
FCOSD
(
FCO
,
READFAIL
,
"read/write error"
,
FCOSD
(
FCO
,
READFAIL
,
"read/write error"
,
FCOSA_NOLRU
,
FCOSA_MAYFDB
,
FCO
S
A_MEM
,
FDSA_MAY
)
FCOSA_NOLRU
,
FCOSA_MAYFDB
,
FCOA_MEM
,
FDSA_MAY
)
FCOSD
(
FCO
,
EVICT
,
"only for obj, not on LRU"
,
FCOSD
(
FCO
,
EVICT
,
"only for obj, not on LRU"
,
FCOSA_NOLRU
,
FCOSA_NOFDB
,
FCO
S
A_MEM
,
FDSA_MAY
)
FCOSA_NOLRU
,
FCOSA_NOFDB
,
FCOA_MEM
,
FDSA_MAY
)
src/tbl/fcs_states.h
View file @
9d3458a2
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
* FCOSA_FDB
* FCOSA_FDB
*
*
* FCOSA_NOMEM
* FCOSA_NOMEM
* FC
O
SA_MEM
* FCSA_MEM
*
*
* diskset: FDSA_NULL no disk_seg pointer
* diskset: FDSA_NULL no disk_seg pointer
* FDSA_UN disk seg off/sz = 0
* FDSA_UN disk seg off/sz = 0
...
@@ -43,18 +43,18 @@ FCOSD(FCS, INIT, "unused",
...
@@ -43,18 +43,18 @@ FCOSD(FCS, INIT, "unused",
FCOSD
(
FCS
,
USABLE
,
"has an fds associated"
,
FCOSD
(
FCS
,
USABLE
,
"has an fds associated"
,
FCOSA_NOLRU
,
FCOSA_NOFDB
,
FCOSA_NOMEM
,
FDSA_UN
)
FCOSA_NOLRU
,
FCOSA_NOFDB
,
FCOSA_NOMEM
,
FDSA_UN
)
FCOSD
(
FCS
,
BUSY
,
"in memory, incomplete"
,
FCOSD
(
FCS
,
BUSY
,
"in memory, incomplete"
,
FCOSA_NOLRU
,
FCOSA_NOFDB
,
FC
O
SA_MEM
,
FDSA_ALLOC
)
FCOSA_NOLRU
,
FCOSA_NOFDB
,
FCSA_MEM
,
FDSA_ALLOC
)
FCOSD
(
FCS
,
WRITING
,
"transitioning BUSY->INCORE, being written"
,
FCOSD
(
FCS
,
WRITING
,
"transitioning BUSY->INCORE, being written"
,
FCOSA_NOLRU
,
FCOSA_NOFDB
,
FC
O
SA_MEM
,
FDSA_ALLOC
)
FCOSA_NOLRU
,
FCOSA_NOFDB
,
FCSA_MEM
,
FDSA_ALLOC
)
FCOSD
(
FCS
,
DISK
,
"can be fetched, off/sz filled, mem not alloced"
,
FCOSD
(
FCS
,
DISK
,
"can be fetched, off/sz filled, mem not alloced"
,
FCOSA_NOLRU
,
FCOSA_NOFDB
,
FCOSA_NOMEM
,
FDSA_ALLOC
)
FCOSA_NOLRU
,
FCOSA_NOFDB
,
FCOSA_NOMEM
,
FDSA_ALLOC
)
FCOSD
(
FCS
,
READING
,
"being read, signal via cond"
,
FCOSD
(
FCS
,
READING
,
"being read, signal via cond"
,
FCOSA_NOLRU
,
FCOSA_NOFDB
,
FC
O
SA_MEM
,
FDSA_ALLOC
)
FCOSA_NOLRU
,
FCOSA_NOFDB
,
FCSA_MEM
,
FDSA_ALLOC
)
FCOSD
(
FCS
,
CHECK
,
"in mem, needs to be checked"
,
FCOSD
(
FCS
,
CHECK
,
"in mem, needs to be checked"
,
FCOSA_NOLRU
,
FCOSA_NOFDB
,
FC
O
SA_MEM
,
FDSA_ALLOC
)
FCOSA_NOLRU
,
FCOSA_NOFDB
,
FCSA_MEM
,
FDSA_ALLOC
)
FCOSD
(
FCS
,
INCORE
,
"usable in mem, on lru if refcnt == 0"
,
FCOSD
(
FCS
,
INCORE
,
"usable in mem, on lru if refcnt == 0"
,
FCOSA_MAYLRU
,
FCOSA_NOFDB
,
FC
O
SA_MEM
,
FDSA_ALLOC
)
FCOSA_MAYLRU
,
FCOSA_NOFDB
,
FCSA_MEM
,
FDSA_ALLOC
)
FCOSD
(
FCS
,
MEM
,
"only in mem, not on lru (only the fco is on lru)"
,
FCOSD
(
FCS
,
MEM
,
"only in mem, not on lru (only the fco is on lru)"
,
FCOSA_NOLRU
,
FCOSA_NOFDB
,
FC
O
SA_MEM
,
FDSA_UN
)
FCOSA_NOLRU
,
FCOSA_NOFDB
,
FCSA_MEM
,
FDSA_UN
)
FCOSD
(
FCS
,
READFAIL
,
"only for obj, not on LRU"
,
FCOSD
(
FCS
,
READFAIL
,
"only for obj, not on LRU"
,
FCOSA_NOLRU
,
FCOSA_NOFDB
,
FC
O
SA_MEM
,
FDSA_ALLOC
)
FCOSA_NOLRU
,
FCOSA_NOFDB
,
FCSA_MEM
,
FDSA_ALLOC
)
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