Lines Matching defs:iflow

105 static uint8_t *getBlock (DataHandle *hndl, unsigned iflow, unsigned ichunk);
106 static int remapBlock (DataHandle *hndl, unsigned iflow, unsigned ichunk);
107 static int newBlock (DataHandle *hndl, unsigned iflow, unsigned ichunk);
108 static void deleteBlock (DataHandle *hndl, unsigned iflow, unsigned ichunk);
562 * Get the address for block (iflow,ichunk).
565 getBlock (DataHandle *hndl, unsigned iflow, unsigned ichunk)
567 return hndl->chunks[ichunk] + iflow * blksz;
571 * Map block (iflow,ichunk) to the next part of the file.
574 remapBlock (DataHandle *hndl, unsigned iflow, unsigned ichunk)
664 hndl->blkoff[iflow * NCHUNKS + ichunk] = 0;
667 uint8_t *bptr = getBlock (hndl, iflow, ichunk);
699 newBlock (DataHandle *hndl, unsigned iflow, unsigned ichunk)
703 if (remapBlock (hndl, iflow, ichunk) != 0)
712 deleteBlock (DataHandle *hndl, unsigned iflow, unsigned ichunk)
714 uint8_t *bptr = getBlock (hndl, iflow, ichunk);
716 hndl->blkstate[iflow * NCHUNKS + ichunk] = ST_INIT;
787 unsigned iflow = (unsigned) (((unsigned long) tid) % hndl->nflow);
790 uint32_t *sptr = &hndl->blkstate[iflow * NCHUNKS];
817 NCHUNKS, iflow, hndl->fname);
821 if (state == ST_INIT && newBlock (hndl, iflow, ichunk) != 0)
823 uint8_t *bptr = getBlock (hndl, iflow, ichunk);
824 uint32_t blkoff = hndl->blkoff[iflow * NCHUNKS + ichunk];
834 if (remapBlock (hndl, iflow, ichunk) != 0)
836 blkoff = hndl->blkoff[iflow * NCHUNKS + ichunk];
850 deleteBlock (hndl, iflow, ichunk);
853 hndl->blkoff[iflow * NCHUNKS + ichunk] += recsz;