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()
252 "Virtual Unit Chain %d!\n", thisVUC); in NFTL_foldchain()
257 512-byte block within the Chain. in NFTL_foldchain()
295 "in Virtual Unit Chain %d for block %d\n", in NFTL_foldchain()
304 "in Virtual Unit Chain %d for block %d\n", in NFTL_foldchain()
317 printk(KERN_WARNING "Infinite loop in Virtual Unit Chain 0x%x\n", in NFTL_foldchain()
360 pr_debug("Cannot fold Virtual Unit Chain %d in place. " in NFTL_foldchain()
366 fold-in-place of another chain to make room in NFTL_foldchain()
368 which chain to fold, because makefreeblock will in NFTL_foldchain()
376 /* We put a fold mark in the chain we are folding only if we in NFTL_foldchain()
378 place, it is possible to find the valid chain by selecting the in NFTL_foldchain()
386 /* OK. We now know the location of every block in the Virtual Unit Chain, in NFTL_foldchain()
390 pr_debug("Folding chain %d into unit %d\n", thisVUC, targetEUN); in NFTL_foldchain()
427 /* add the header so that it is now a valid chain */ in NFTL_foldchain()
444 /* For each block in the old chain (except the targetEUN of course), in NFTL_foldchain()
463 /* Make this the new start of chain for thisVUC */ in NFTL_foldchain()
481 u16 chain, EUN; in NFTL_makefreeblock() local
483 for (chain = 0; chain < le32_to_cpu(nftl->MediaHdr.FormattedSize) / nftl->EraseSize; chain++) { in NFTL_makefreeblock()
484 EUN = nftl->EUNtable[chain]; in NFTL_makefreeblock()
489 //printk("VUC %d reaches len %d with EUN %d\n", chain, thislen, EUN); in NFTL_makefreeblock()
492 printk("Endless loop in Virtual Chain %d: Unit %x\n", in NFTL_makefreeblock()
493 chain, EUN); in NFTL_makefreeblock()
496 /* Actually, don't return failure. Just ignore this chain and in NFTL_makefreeblock()
504 //printk("New longest chain is %d with length %d\n", chain, thislen); in NFTL_makefreeblock()
506 LongestChain = chain; in NFTL_makefreeblock()
574 "Infinite loop in Virtual Unit Chain 0x%x\n", in NFTL_findwriteunit()
579 /* Skip to next block in chain */ in NFTL_findwriteunit()
583 /* OK. We didn't find one in the existing chain, or there in NFTL_findwriteunit()
584 is no existing chain. */ in NFTL_findwriteunit()
592 a chain to make room. in NFTL_findwriteunit()
595 /* First remember the start of this chain */ in NFTL_findwriteunit()
625 /* We've found a free block. Insert it into the chain. */ in NFTL_findwriteunit()
630 /* The first block in a new chain */ in NFTL_findwriteunit()
647 /* we link the new block to the chain only after the in NFTL_findwriteunit()
648 block is ready. It avoids the case where the chain in NFTL_findwriteunit()
668 printk(KERN_WARNING "Error folding to make room for Virtual Unit Chain 0x%x\n", in NFTL_findwriteunit()
743 printk(KERN_WARNING "Infinite loop in Virtual Unit Chain 0x%lx\n", in nftl_readblock()