Channel circle › core 2 Memory › raid
raid (core 2, sub 8, flat id 40)
154 functions
| Signature | Purpose | Source | Scope |
|---|---|---|---|
| static void CrcInit(void) | (no comment) | MemRaid.c:23 | static |
| static uint32_t CrcSoft(uint32_t crc, const void *p, size_t n) | (no comment) | MemRaid.c:38 | static |
| __attribute__((target(" "))) static uint32_t CrcHw(uint32_t crc, const void *p, size_t n) | (no comment) | MemRaid.c:49 | static |
| static const struct MemRaidCrcOps * CrcSelect(int pref) | (no comment) | MemRaid.c:62 | static |
| uint32_t Crc32cRAIDChannel(uint32_t crc, const void *p, size_t n) | (no comment) | MemRaid.c:73 | public |
| static void WipeRAIDChannel(void *p, size_t n) | (no comment) | MemRaid.c:78 | static |
| static inline void XorInto(uint8_t *d, const uint8_t *s, size_t n) | (no comment) | MemRaid.c:85 | static |
| static inline uint32_t LaneSeed(const struct MemRaid *r, uint32_t slot, uint32_t lane) | (no comment) | MemRaid.c:90 | static |
| static inline uint8_t * LaneUnit(const struct MemRaid *r, uint32_t lane, uint32_t slot) | (no comment) | MemRaid.c:95 | static |
| static inline uint32_t UnitCrc(const struct MemRaid *r, uint32_t lane, uint32_t slot, const void *p) | (no comment) | MemRaid.c:98 | static |
| static inline int LaneOk(struct MemRaid *r, uint32_t lane, uint32_t slot) | verify one unit against its stored CRC | MemRaid.c:102 | static |
| static inline void LaneStore(struct MemRaid *r, uint32_t lane, uint32_t slot, const uint8_t *src) | (no comment) | MemRaid.c:110 | static |
| static inline void LaneRepair(struct MemRaid *r, int canwrite, uint32_t lane, uint32_t slot, const uint8_t *src) | (no comment) | MemRaid.c:115 | static |
| static int SlotResolve(struct MemRaid *r, uint32_t slot, uint8_t *out, int canwrite, int deep) | deep=1: also verify the redundancy that a plain read does not touch (parity lane, mirror equality). out may be NULL. | MemRaid.c:126 | static |
| int GetSlotRawRAIDChannel(struct MemRaid *r, uint32_t slot, void *out, int canwrite) | (no comment) | MemRaid.c:201 | public |
| int PutSlotRawRAIDChannel(struct MemRaid *r, uint32_t slot, const void *in, size_t len) | (no comment) | MemRaid.c:207 | public |
| int FreeSlotRawRAIDChannel(struct MemRaid *r, uint32_t slot) | (no comment) | MemRaid.c:240 | public |
| int AllocSlotRawRAIDChannel(struct MemRaid *r, uint32_t *slot) | (no comment) | MemRaid.c:252 | public |
| int WindowBusyRAIDChannel(struct MemRaid *r) | (no comment) | MemRaid.c:271 | public |
| int WindowBusyWriterRAIDChannel(struct MemRaid *r, uint64_t w) | a writer was refused: if readers are the reason, hold back NEW readers for a short, self-expiring time so the writer cannot starve | MemRaid.c:278 | public |
| int CheckWindowRAIDChannel(struct MemRaid *r) | (no comment) | MemRaid.c:285 | public |
| int WindowFirstRAIDChannel(struct MemRaid *r, int mode) | called with the BUSY bit held by the caller; changes protection, then publishes the new state | MemRaid.c:299 | public |
| int WindowLastRAIDChannel(struct MemRaid *r) | called with the BUSY bit held; last owner leaves | MemRaid.c:317 | public |
| static int GuardNoneAttach(struct MemRaid *r) | (no comment) | MemRaid.c:334 | static |
| static void GuardNoneDetach(struct MemRaid *r) | (no comment) | MemRaid.c:335 | static |
| static int GuardNoneSet(struct MemRaid *r, int mode) | (no comment) | MemRaid.c:336 | static |
| static int GuardMpSet(struct MemRaid *r, int mode) | (no comment) | MemRaid.c:339 | static |
| static size_t PagePlatHeap(void) | (no comment) | MemRaid.c:352 | static |
| static int AllocPlatHeap(struct MemRaidRegion *g, size_t min) | (no comment) | MemRaid.c:353 | static |
| static void FreePlatHeap(struct MemRaidRegion *g) | (no comment) | MemRaid.c:363 | static |
| static int LockPlatHeap(struct MemRaidRegion *g) | (no comment) | MemRaid.c:364 | static |
| static void NodumpPlatHeap(struct MemRaidRegion *g) | (no comment) | MemRaid.c:365 | static |
| static uint64_t NowPlatHeap(void) | clock comes from the native seam | MemRaid.c:366 | static |
| static void RegistryAdd(struct MemRaid *r) | (no comment) | MemRaid.c:376 | static |
| static void RegistryDel(struct MemRaid *r) | (no comment) | MemRaid.c:380 | static |
| void FaultSetHookRAIDChannel(void (*h)(int cls)) | (no comment) | MemRaid.c:384 | public |
| void FaultHookCallRAIDChannel(int cls) | (no comment) | MemRaid.c:385 | public |
| int FaultNoteRAIDChannel(const void *addr) | (no comment) | MemRaid.c:387 | public |
| static int CfgValidate(const struct MemRaidCfg *c) | (no comment) | MemRaid.c:408 | static |
| void CfgDefaultRAIDChannel(struct MemRaidCfg *c) | (no comment) | MemRaid.c:426 | public |
| int EncodeCfgRAIDChannel(const struct MemRaidCfg *c, uint8_t out[MEMRAID_CFG_SIZE]) | (no comment) | MemRaid.c:434 | public |
| int DecodeCfgRAIDChannel(const void *rec, size_t len, struct MemRaidCfg *c) | (no comment) | MemRaid.c:447 | public |
| void GetStatRAIDChannel(const struct MemRaid *r, struct MemRaidStats *s) | (no comment) | MemRaid.c:466 | public |
| int EncodeStatRAIDChannel(const struct MemRaid *r, uint8_t out[MEMRAID_STAT_SIZE]) | (no comment) | MemRaid.c:485 | public |
| int DecodeStatRAIDChannel(const void *rec, size_t len, struct MemRaidStatRec *out) | (no comment) | MemRaid.c:498 | public |
| int EncodeIoHdrRAIDChannel(uint8_t out[MEMRAID_IOHDR_SIZE], int op, int code, uint32_t slot, uint32_t len) | (no comment) | MemRaid.c:508 | public |
| int MapLaneRAIDChannel(struct MemRaid *r, uint32_t lane, uint8_t **data, size_t *bytes, uint32_t **crc) | (no comment) | MemRaid.c:520 | public |
| static void FreeLanes(struct MemRaid *r) | (no comment) | MemRaid.c:530 | static |
| int OpenMemRaid(struct MemRaid *r, const struct MemRaidCfg *cfg) | (no comment) | MemRaid.c:536 | public |
| int OpenMemRaidRec(struct MemRaid *r, const void *rec, size_t len) | (no comment) | MemRaid.c:600 | public |
| int CloseMemRaid(struct MemRaid *r) | (no comment) | MemRaid.c:607 | public |
| static int CtlTry(struct MemRaid *r) | (no comment) | MemRaid.c:626 | static |
| static void CtlEnd(struct MemRaid *r) | (no comment) | MemRaid.c:627 | static |
| int JoinRAIDChannel(struct MemRaid *r, struct Channel *user) | (no comment) | MemRaid.c:629 | public |
| int LeaveRAIDChannel(struct MemRaid *r, struct Channel *user) | (no comment) | MemRaid.c:649 | public |
| int ScrubEngineRAIDChannel(struct MemRaid *r, const struct Channel *who, uint32_t budget, struct MemRaidScrubReport *rep) | (no comment) | MemRaid.c:667 | public |
| static int RingRoom(struct MemRaid *r) | (no comment) | MemRaid.c:694 | static |
| long WriteRAIDChannel(struct MemRaid *r, const void *rec, size_t len) | (no comment) | MemRaid.c:699 | public |
| long ReadRAIDChannel(struct MemRaid *r, void *out, size_t cap) | (no comment) | MemRaid.c:748 | public |
| static size_t PxPage(void) | (no comment) | MemRaidPosix.c:19 | static |
| static int PxAlloc(struct MemRaidRegion *g, size_t min) | (no comment) | MemRaidPosix.c:21 | static |
| static void PxFree(struct MemRaidRegion *g) | (no comment) | MemRaidPosix.c:30 | static |
| static int PxLock(struct MemRaidRegion *g) | (no comment) | MemRaidPosix.c:31 | static |
| static void PxNodump(struct MemRaidRegion *g) | (no comment) | MemRaidPosix.c:32 | static |
| static int PxProtect(void *p, size_t n, int mode) | (no comment) | MemRaidPosix.c:41 | static |
| static uint64_t PxNow(void) | (no comment) | MemRaidPosix.c:46 | static |
| const struct MemRaidPlat * PlatNativeRAIDChannel(void) | (no comment) | MemRaidPosix.c:53 | public |
| static inline uint32_t Rdpkru(void) | (no comment) | MemRaidPosix.c:57 | static |
| static inline void Wrpkru(uint32_t v) | (no comment) | MemRaidPosix.c:58 | static |
| static int PkAttach(struct MemRaid *r) | (no comment) | MemRaidPosix.c:60 | static |
| static void PkDetach(struct MemRaid *r) | (no comment) | MemRaidPosix.c:74 | static |
| static int PkSet(struct MemRaid *r, int mode) | (no comment) | MemRaidPosix.c:82 | static |
| const struct MemRaidGuard * GetGuardPkeyRAIDChannel(void) | (no comment) | MemRaidPosix.c:91 | public |
| const struct MemRaidGuard * GetGuardPkeyRAIDChannel(void) | (no comment) | MemRaidPosix.c:93 | public |
| static void OnFault(int sig, siginfo_t *si, void *ctx) | (no comment) | MemRaidPosix.c:100 | static |
| int FaultInstallRAIDChannel(void) | (no comment) | MemRaidPosix.c:110 | public |
| static size_t WnPage(void) | (no comment) | MemRaidWin.c:10 | static |
| static int WnAlloc(struct MemRaidRegion *g, size_t min) | (no comment) | MemRaidWin.c:11 | static |
| static void WnFree(struct MemRaidRegion *g) | (no comment) | MemRaidWin.c:21 | static |
| static int WnLock(struct MemRaidRegion *g) | (no comment) | MemRaidWin.c:22 | static |
| static void WnNodump(struct MemRaidRegion *g) | no MADV_DONTDUMP equivalent; WER dumps may include it: README | MemRaidWin.c:23 | static |
| static int WnProtect(void *p, size_t n, int mode) | (no comment) | MemRaidWin.c:24 | static |
| static uint64_t WnNow(void) | (no comment) | MemRaidWin.c:29 | static |
| const struct MemRaidPlat * PlatNativeRAIDChannel(void) | (no comment) | MemRaidWin.c:38 | public |
| const struct MemRaidGuard * GetGuardPkeyRAIDChannel(void) | (no comment) | MemRaidWin.c:39 | public |
| static LONG CALLBACK OnVeh(PEXCEPTION_POINTERS ep) | (no comment) | MemRaidWin.c:41 | static |
| int FaultInstallRAIDChannel(void) | (no comment) | MemRaidWin.c:50 | public |
| static int MRJSync(FILE *f) | (no comment) | MemoryRaid.c:40 | static |
| static int MRJTruncate(FILE *f, int64_t off) | (no comment) | MemoryRaid.c:41 | static |
| static int MRJReplace(const char *tmp, const char *path) | (no comment) | MemoryRaid.c:42 | static |
| static int MRJSeek(FILE *f, int64_t off, int whence) | (no comment) | MemoryRaid.c:46 | static |
| static int64_t MRJTell(FILE *f) | (no comment) | MemoryRaid.c:47 | static |
| static int MRJSync(FILE *f) | (no comment) | MemoryRaid.c:49 | static |
| static int MRJTruncate(FILE *f, int64_t off) | (no comment) | MemoryRaid.c:50 | static |
| static int MRJReplace(const char *tmp, const char *path) | (no comment) | MemoryRaid.c:51 | static |
| static int MRJSeek(FILE *f, int64_t off, int whence) | (no comment) | MemoryRaid.c:52 | static |
| static int64_t MRJTell(FILE *f) | (no comment) | MemoryRaid.c:53 | static |
| static uint64_t MrdNowMs(void) | (no comment) | MemoryRaid.c:55 | static |
| static uint64_t MrdNowS(void) | (no comment) | MemoryRaid.c:56 | static |
| MRD_INLINE void MrdLock(struct MemoryRaid *m) | (no comment) | MemoryRaid.c:63 | public |
| MRD_INLINE void MrdUnlock(struct MemoryRaid *m) | (no comment) | MemoryRaid.c:64 | public |
| MRD_INLINE int MrdHasStripes(const struct MemoryRaid *m) | (no comment) | MemoryRaid.c:65 | public |
| MRD_INLINE int MrdHasJournal(const struct MemoryRaid *m) | (no comment) | MemoryRaid.c:66 | public |
| MRD_INLINE uint32_t MrdCrc(const void *p, size_t n) | (no comment) | MemoryRaid.c:67 | public |
| struct MemoryRaid * GetRAIDChannel(void) | (no comment) | MemoryRaid.c:69 | public |
| int ActiveRAIDChannel(void) | (no comment) | MemoryRaid.c:70 | public |
| int ModeRAIDChannel(void) | (no comment) | MemoryRaid.c:71 | public |
| void GetStatsRAIDChannel(struct MemoryRaidStats *out) | (no comment) | MemoryRaid.c:73 | public |
| uint32_t RecSizeRAIDChannel(uint8_t type) | Journal records | MemoryRaid.c:91 | public |
| int EncodeJHdrRAIDChannel(uint8_t out[MRD_JHDR_SIZE], uint64_t created, uint64_t jid) | (no comment) | MemoryRaid.c:101 | public |
| int CheckJHdrRAIDChannel(const uint8_t *p, size_t len) | (no comment) | MemoryRaid.c:113 | public |
| int CheckJRecRAIDChannel(const uint8_t *p, size_t len) | (no comment) | MemoryRaid.c:124 | public |
| static void MrdEncKey(uint8_t *rec, uint8_t type, uint8_t kind, const uint8_t *key, uint32_t klen, uint64_t seq) | (no comment) | MemoryRaid.c:149 | static |
| static size_t MrdEncPut(uint8_t **outp, uint8_t kind, const uint8_t *key, uint32_t klen, const uint8_t *val, uint32_t vlen, uint32_t vcrc, uint64_t expiry, uint64_t seq) | PUT + DATA chunks in one buffer (one write). Returns bytes, 0 on allocation failure. | MemoryRaid.c:157 | static |
| MRD_INLINE uint32_t MrdHash(uint8_t kind, const uint8_t *key, uint32_t klen) | Index (open addressing, linear probe, tombstones) | MemoryRaid.c:182 | public |
| static MRD_HOT struct MemoryRaidEntry * MrdFind(struct MemoryRaid *m, uint8_t kind, const uint8_t *key, uint32_t klen) | (no comment) | MemoryRaid.c:187 | static |
| static struct MemoryRaidEntry * MrdSlotFor(struct MemoryRaid *m, uint8_t kind, const uint8_t *key, uint32_t klen) | (no comment) | MemoryRaid.c:198 | static |
| static int MrdWin(struct MemoryRaid *m) | Striped value storage (MemRaid slots), lock held | MemoryRaid.c:211 | static |
| static void MrdStripesFree(struct MemoryRaid *m, struct MemoryRaidEntry *e) | (no comment) | MemoryRaid.c:216 | static |
| static int MrdStripesPut(struct MemoryRaid *m, struct MemoryRaidEntry *e, const uint8_t *val, uint32_t vlen) | (no comment) | MemoryRaid.c:229 | static |
| static MRD_HOT int MrdStripesGet(struct MemoryRaid *m, const struct MemoryRaidEntry *e, uint8_t *out) | (no comment) | MemoryRaid.c:263 | static |
| static int MrdJwrite(struct MemoryRaid *m, const uint8_t *b, size_t n, uint32_t nrec) | Journal append, lock held | MemoryRaid.c:282 | static |
| static void MrdEntryClear(struct MemoryRaid *m, struct MemoryRaidEntry *e) | Store / fetch / delete, lock held | MemoryRaid.c:312 | static |
| static int MrdStore(struct MemoryRaid *m, uint8_t kind, const uint8_t *key, uint32_t klen, const uint8_t *val, uint32_t vlen, uint64_t expiry, uint64_t seq, int journal) | (no comment) | MemoryRaid.c:321 | static |
| static MRD_HOT int MrdFetch(struct MemoryRaid *m, struct MemoryRaidEntry *e, uint8_t *out) | (no comment) | MemoryRaid.c:371 | static |
| MRD_INLINE int MrdExpired(const struct MemoryRaidEntry *e, uint64_t now) | (no comment) | MemoryRaid.c:384 | public |
| static int MrdArgsOk(uint8_t kind, const uint8_t *key, uint32_t klen) | (no comment) | MemoryRaid.c:389 | static |
| int PutRAIDChannel(uint8_t kind, const uint8_t *key, uint32_t klen, const void *val, uint32_t vlen, uint32_t ttl_s) | (no comment) | MemoryRaid.c:394 | public |
| int GetValueRAIDChannel(uint8_t kind, const uint8_t *key, uint32_t klen, void *out, uint32_t cap, uint32_t *vlen) | (no comment) | MemoryRaid.c:414 | public |
| static int MrdDelLocked(struct MemoryRaid *m, uint8_t kind, const uint8_t *key, uint32_t klen, int journal) | (no comment) | MemoryRaid.c:434 | static |
| int DelRAIDChannel(uint8_t kind, const uint8_t *key, uint32_t klen) | (no comment) | MemoryRaid.c:451 | public |
| int EachRAIDChannel(uint8_t kind, int (*fn)(void *arg, const uint8_t *key, uint32_t klen, const uint8_t *val, uint32_t vlen, uint32_t ttl_left_s), void *arg) | (no comment) | MemoryRaid.c:464 | public |
| int ScrubRAIDChannel(uint32_t budget) | (no comment) | MemoryRaid.c:497 | public |
| int SyncRAIDChannel(void) | (no comment) | MemoryRaid.c:509 | public |
| static int MrdReplay(struct MemoryRaid *m, FILE *f, int64_t fsize) | (no comment) | MemoryRaid.c:536 | static |
| static int MrdJournalOpen(struct MemoryRaid *m) | (no comment) | MemoryRaid.c:596 | static |
| static int MrdCompactLocked(struct MemoryRaid *m) | (no comment) | MemoryRaid.c:638 | static |
| int CompactRAIDChannel(void) | (no comment) | MemoryRaid.c:686 | public |
| static void MrdEngineCfg(const struct PodCfg *c, struct MemRaidCfg *rc, uint64_t raidid) | Open / Close / Boot | MemoryRaid.c:700 | static |
| int OpenRAIDChannel(const struct PodCfg *cfg) | (no comment) | MemoryRaid.c:716 | public |
| int CloseRAIDChannel(void) | (no comment) | MemoryRaid.c:781 | public |
| int BootRAIDChannel(void) | (no comment) | MemoryRaid.c:806 | public |
| static uint32_t MrdBlockKey(const struct MemoryHandle *mh, uint8_t key[MRD_KEY_MAX]) | AllocMem named durable blocks | MemoryRaid.c:823 | static |
| MRD_INLINE struct MemoryHandle * MrdHandleOf(const void *payload) | (no comment) | MemoryRaid.c:842 | public |
| int AttachBlockRAIDChannel(struct MemoryHandle *mh) | (no comment) | MemoryRaid.c:849 | public |
| int CommitRAIDChannel(const void *payload) | (no comment) | MemoryRaid.c:866 | public |
| int RestoreRAIDChannel(void *payload) | (no comment) | MemoryRaid.c:881 | public |
| int DropRAIDChannel(const void *payload) | (no comment) | MemoryRaid.c:899 | public |
| static int MrdCCode(int rc) | CacheChannel durability layer (CacheChannel.h struct cch_durable_ops) | MemoryRaid.c:914 | static |
| static int MrdCPut(void *ctx, const uint8_t *key, uint32_t klen, const uint8_t *val, uint32_t vlen, uint32_t ttl_s) | (no comment) | MemoryRaid.c:925 | static |
| static int MrdCGet(void *ctx, const uint8_t *key, uint32_t klen, uint8_t *out, uint32_t cap, uint32_t *vlen) | (no comment) | MemoryRaid.c:930 | static |
| static int MrdCDel(void *ctx, const uint8_t *key, uint32_t klen) | (no comment) | MemoryRaid.c:935 | static |
| static int MrdCEach(void *ctx, int (*fn)(void *arg, const uint8_t *key, uint32_t klen, const uint8_t *val, uint32_t vlen, uint32_t ttl_left_s), void *arg) | (no comment) | MemoryRaid.c:940 | static |
| int CacheOpsRAIDChannel(const struct cch_durable_ops **ops, void **ctx) | (no comment) | MemoryRaid.c:948 | public |