Lines Matching full:chain
188 * when the give Virtual Unit Chain
192 /* For a given Virtual Unit Chain: find or create a free block and in NFTL_findfreeblock()
193 add it to the chain */ in NFTL_findfreeblock()
194 /* We're passed the number of the last EUN in the chain, to save us from in NFTL_findfreeblock()
271 "Virtual Unit Chain %d!\n", thisVUC); in NFTL_foldchain()
276 512-byte block within the Chain. in NFTL_foldchain()
314 "in Virtual Unit Chain %d for block %d\n", in NFTL_foldchain()
323 "in Virtual Unit Chain %d for block %d\n", in NFTL_foldchain()
336 printk(KERN_WARNING "Infinite loop in Virtual Unit Chain 0x%x\n", in NFTL_foldchain()
379 pr_debug("Cannot fold Virtual Unit Chain %d in place. " in NFTL_foldchain()
385 fold-in-place of another chain to make room in NFTL_foldchain()
387 which chain to fold, because makefreeblock will in NFTL_foldchain()
395 /* We put a fold mark in the chain we are folding only if we in NFTL_foldchain()
397 place, it is possible to find the valid chain by selecting the in NFTL_foldchain()
405 /* OK. We now know the location of every block in the Virtual Unit Chain, in NFTL_foldchain()
409 pr_debug("Folding chain %d into unit %d\n", thisVUC, targetEUN); in NFTL_foldchain()
426 /* add the header so that it is now a valid chain */ in NFTL_foldchain()
443 /* For each block in the old chain (except the targetEUN of course), in NFTL_foldchain()
462 /* Make this the new start of chain for thisVUC */ in NFTL_foldchain()
480 u16 chain, EUN; in NFTL_makefreeblock() local
482 for (chain = 0; chain < le32_to_cpu(nftl->MediaHdr.FormattedSize) / nftl->EraseSize; chain++) { in NFTL_makefreeblock()
483 EUN = nftl->EUNtable[chain]; in NFTL_makefreeblock()
488 //printk("VUC %d reaches len %d with EUN %d\n", chain, thislen, EUN); in NFTL_makefreeblock()
491 printk("Endless loop in Virtual Chain %d: Unit %x\n", in NFTL_makefreeblock()
492 chain, EUN); in NFTL_makefreeblock()
495 /* Actually, don't return failure. Just ignore this chain and in NFTL_makefreeblock()
503 //printk("New longest chain is %d with length %d\n", chain, thislen); in NFTL_makefreeblock()
505 LongestChain = chain; in NFTL_makefreeblock()
573 "Infinite loop in Virtual Unit Chain 0x%x\n", in NFTL_findwriteunit()
578 /* Skip to next block in chain */ in NFTL_findwriteunit()
582 /* OK. We didn't find one in the existing chain, or there in NFTL_findwriteunit()
583 is no existing chain. */ in NFTL_findwriteunit()
591 a chain to make room. in NFTL_findwriteunit()
594 /* First remember the start of this chain */ in NFTL_findwriteunit()
624 /* We've found a free block. Insert it into the chain. */ in NFTL_findwriteunit()
629 /* The first block in a new chain */ in NFTL_findwriteunit()
646 /* we link the new block to the chain only after the in NFTL_findwriteunit()
647 block is ready. It avoids the case where the chain in NFTL_findwriteunit()
667 printk(KERN_WARNING "Error folding to make room for Virtual Unit Chain 0x%x\n", in NFTL_findwriteunit()
742 printk(KERN_WARNING "Infinite loop in Virtual Unit Chain 0x%lx\n", in nftl_readblock()