D1(printk(KERN_DEBUG "JFFS2 trigger levels (size %d KiB, block size %d KiB, %d blocks)\n", c->flash_size / 1024, c->sector_size / 1024, c->nr_blocks)); D1(printk(KERN_DEBUG "Blocks required to allow deletion:    %d (%d KiB)\n", c->resv_blocks_deletion, c->resv_blocks_deletion*c->sector_size/1024)); D1(printk(KERN_DEBUG "Blocks required to allow writes:      %d (%d KiB)\n", c->resv_blocks_write, c->resv_blocks_write*c->sector_size/1024)); D1(printk(KERN_DEBUG "Blocks required to quiesce GC thread: %d (%d KiB)\n", c->resv_blocks_gctrigger, c->resv_blocks_gctrigger*c->sector_size/1024)); D1(printk(KERN_DEBUG "Blocks required to allow GC merges:   %d (%d KiB)\n", c->resv_blocks_gcmerge, c->resv_blocks_gcmerge*c->sector_size/1024)); D1(printk(KERN_DEBUG "Blocks required to GC bad blocks:     %d (%d KiB)\n", c->resv_blocks_gcbad, c->resv_blocks_gcbad*c->sector_size/1024)); D1(printk(KERN_DEBUG "Amount of dirty space required to GC: %d bytes\n", c->nospc_dirty_size)); 
dbg_fsbuild("JFFS2 trigger levels (size %d KiB, block size %d KiB, %d blocks)\n", c->flash_size / 1024, c->sector_size / 1024, c->nr_blocks); dbg_fsbuild("Blocks required to allow deletion:    %d (%d KiB)\n", c->resv_blocks_deletion, c->resv_blocks_deletion*c->sector_size/1024); dbg_fsbuild("Blocks required to allow writes:      %d (%d KiB)\n", c->resv_blocks_write, c->resv_blocks_write*c->sector_size/1024); dbg_fsbuild("Blocks required to quiesce GC thread: %d (%d KiB)\n", c->resv_blocks_gctrigger, c->resv_blocks_gctrigger*c->sector_size/1024); dbg_fsbuild("Blocks required to allow GC merges:   %d (%d KiB)\n", c->resv_blocks_gcmerge, c->resv_blocks_gcmerge*c->sector_size/1024); dbg_fsbuild("Blocks required to GC bad blocks:     %d (%d KiB)\n", c->resv_blocks_gcbad, c->resv_blocks_gcbad*c->sector_size/1024); dbg_fsbuild("Amount of dirty space required to GC: %d bytes\n", c->nospc_dirty_size); 
static void jffs2_calc_trigger_levels(struct jffs2_sb_info *c){	uint32_t size;	/* Deletion should almost _always_ be allowed. We're fairly	   buggered once we stop allowing people to delete stuff	   because there's not enough free space... */	c->resv_blocks_deletion = 2;	/* Be conservative about how much space we need before we allow writes. 	   On top of that which is required for deletia, require an extra 2%	   of the medium to be available, for overhead caused by nodes being	   split across blocks, etc. */	size = c->flash_size / 50; /* 2% of flash size */	size += c->nr_blocks * 100; /* And 100 bytes per eraseblock */	size += c->sector_size - 1; /* ... and round up */	c->resv_blocks_write = c->resv_blocks_deletion + (size / c->sector_size);	/* When do we let the GC thread run in the background */	c->resv_blocks_gctrigger = c->resv_blocks_write + 1;	/* When do we allow garbage collection to merge nodes to make 	   long-term progress at the expense of short-term space exhaustion? */	c->resv_blocks_gcmerge = c->resv_blocks_deletion + 1;	/* When do we allow garbage collection to eat from bad blocks rather	   than actually making progress? */	c->resv_blocks_gcbad = 0;//c->resv_blocks_deletion + 2;	/* If there's less than this amount of dirty space, don't bother	   trying to GC to make more space. It'll be a fruitless task */	c->nospc_dirty_size = c->sector_size + (c->flash_size / 100);	D1(printk(KERN_DEBUG "JFFS2 trigger levels (size %d KiB, block size %d KiB, %d blocks)\n",		  c->flash_size / 1024, c->sector_size / 1024, c->nr_blocks));	D1(printk(KERN_DEBUG "Blocks required to allow deletion:    %d (%d KiB)\n",		  c->resv_blocks_deletion, c->resv_blocks_deletion*c->sector_size/1024));	D1(printk(KERN_DEBUG "Blocks required to allow writes:      %d (%d KiB)\n",		  c->resv_blocks_write, c->resv_blocks_write*c->sector_size/1024));	D1(printk(KERN_DEBUG "Blocks required to quiesce GC thread: %d (%d KiB)\n",		  c->resv_blocks_gctrigger, c->resv_blocks_gctrigger*c->sector_size/1024));	D1(printk(KERN_DEBUG "Blocks required to allow GC merges:   %d (%d KiB)\n",		  c->resv_blocks_gcmerge, c->resv_blocks_gcmerge*c->sector_size/1024));	D1(printk(KERN_DEBUG "Blocks required to GC bad blocks:     %d (%d KiB)\n",		  c->resv_blocks_gcbad, c->resv_blocks_gcbad*c->sector_size/1024));	D1(printk(KERN_DEBUG "Amount of dirty space required to GC: %d bytes\n",		  c->nospc_dirty_size));} 
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/733802d974e5af42acb7cd61b16c0ce6dd03b7ed/build.c/buggy/fs/jffs2/build.c