Home | History | Annotate | Download | only in genext2fs

Lines Matching defs:BLOCKSIZE

157 #define BLOCKSIZE         1024
165 // inode block size (why is it != BLOCKSIZE ?!?)
171 #define INOBLK (BLOCKSIZE / INODE_BLOCKSIZE)
538 BLOCKSIZE];
577 #if BLOCKSIZE == 1024
585 #error UNHANDLED BLOCKSIZE
659 for(i = 0; i < BLOCKSIZE/4; i++)
796 unsigned char* b=calloc(1,BLOCKSIZE);
823 return (uint8*)fs + blk*BLOCKSIZE;
848 for(i = 0; i < BLOCKSIZE; i++)
858 if(i == BLOCKSIZE)
1026 else if((bw->bpdir == EXT2_IND_BLOCK) && (bw->bpind < BLOCKSIZE/4 - 1))
1060 else if((bw->bpdir == EXT2_DIND_BLOCK) && (bw->bpdind < BLOCKSIZE/4 - 1))
1072 else if((bw->bpdir == EXT2_DIND_BLOCK) && (bw->bpind < BLOCKSIZE/4 - 1))
1126 (bw->bptind < BLOCKSIZE/4 -1) )
1143 (bw->bpdind < BLOCKSIZE/4 -1) )
1165 (bw->bpind < BLOCKSIZE/4 - 1) )
1232 for(i = 0; i < BLOCKSIZE / 4; i++)
1233 if(((int32*)(b + BLOCKSIZE * (amount - create)))[i])
1241 memcpy(get_blk(fs, bk), b + BLOCKSIZE * (amount - create - 1), BLOCKSIZE);
1267 if(reclen > BLOCKSIZE)
1274 for(d = (directory*)b; (int8*)d + sizeof(*d) < (int8*)b + BLOCKSIZE; d = (directory*)((int8*)d + d->d_rec_len))
1310 d->d_rec_len = BLOCKSIZE;
1314 get_nod(fs, dnod)->i_size += BLOCKSIZE;
1331 for(d = (directory*)b; (int8*)d + sizeof(*d) < (int8*)b + BLOCKSIZE; d = (directory*)((int8*)d + d->d_rec_len))
1431 extend_blk(fs, nod, b, rndup(size, BLOCKSIZE) / BLOCKSIZE);
1444 if(!(b = (uint8*)calloc(rndup(size, BLOCKSIZE), 1)))
1448 extend_blk(fs, nod, b, rndup(size, BLOCKSIZE) / BLOCKSIZE);
1700 stats->nblocks += (st.st_size + BLOCKSIZE - 1) / BLOCKSIZE;
1810 if(nblk <= EXT2_DIND_BLOCK + BLOCKSIZE/4)
1826 for(i = 0; i < BLOCKSIZE/4; i++)
1827 if(nblk > EXT2_IND_BLOCK + BLOCKSIZE/4 + (BLOCKSIZE/4)*i )
1830 if(nblk <= EXT2_IND_BLOCK + BLOCKSIZE/4 + BLOCKSIZE/4 * BLOCKSIZE/4)
1834 for(i=0;i < BLOCKSIZE/4 && !done ; i++) {
1836 for(j=0; j<BLOCKSIZE/4;j++) {
1837 if (nblk > ( EXT2_IND_BLOCK + BLOCKSIZE/4 +
1838 (BLOCKSIZE/4)*(BLOCKSIZE/4) +
1839 i*(BLOCKSIZE/4)*(BLOCKSIZE/4) +
1840 j*(BLOCKSIZE/4)) )
1867 if(nblk <= EXT2_DIND_BLOCK + BLOCKSIZE/4)
1872 for(i = 0; i < BLOCKSIZE/4; i++)
1873 if(nblk > EXT2_IND_BLOCK + BLOCKSIZE/4 + (BLOCKSIZE/4)*i )
1875 if(nblk <= EXT2_IND_BLOCK + BLOCKSIZE/4 + BLOCKSIZE/4 * BLOCKSIZE/4)
1880 for(i=0;i < BLOCKSIZE/4 && !done ; i++) {
1883 for(j=0; j<BLOCKSIZE/4;j++) {
1884 if (nblk > ( EXT2_IND_BLOCK + BLOCKSIZE/4 +
1885 (BLOCKSIZE/4)*(BLOCKSIZE/4) +
1886 i*(BLOCKSIZE/4)*(BLOCKSIZE/4) +
1887 j*(BLOCKSIZE/4)) )
1916 for(d = (directory*)b; (int8*)d + sizeof(*d) < (int8*)b + BLOCKSIZE; d = (directory*)((int8*)d + swab16(d->d_rec_len)))
1950 for(d = (directory*)b; (int8*)d + sizeof(*d) < (int8*)b + BLOCKSIZE; d = (directory*)((int8*)d + d->d_rec_len))
1988 first_block = (BLOCKSIZE == 1024);
1993 (BLOCKSIZE/sizeof(inode)));
1997 gdsz = rndup(nbgroups*sizeof(groupdescriptor),BLOCKSIZE)/BLOCKSIZE;
1998 itblsz = nbinodes_per_group * sizeof(inode)/BLOCKSIZE;
2005 if(!(fs = (filesystem*)calloc(nbblocks, BLOCKSIZE)))
2015 fs->sb.s_log_block_size = BLOCKSIZE >> 11;
2016 fs->sb.s_log_frag_size = BLOCKSIZE >> 11;
2055 + overhead_per_group + 1; j <= BLOCKSIZE * 8; j++)
2064 for(j = fs->sb.s_inodes_per_group+1; j <= BLOCKSIZE * 8; j++)
2083 itab0[EXT2_ROOT_INO-1].i_size = BLOCKSIZE;
2095 d->d_rec_len = BLOCKSIZE - (sizeof(directory)+4);
2104 memset(b, 0, BLOCKSIZE);
2105 ((directory*)b)->d_rec_len = BLOCKSIZE;
2113 get_nod(fs, nod)->i_size = fs->sb.s_r_blocks_count * BLOCKSIZE;
2137 fssize = (fssize + BLOCKSIZE - 1) / BLOCKSIZE;
2140 if(!(fs = (filesystem*)calloc(fssize, BLOCKSIZE)))
2142 if(fread(fs, BLOCKSIZE, fssize, fh) != fssize)
2180 printf("\n%d blocks (%d bytes)\n", bn, bn * BLOCKSIZE);
2195 if(fwrite(get_blk(fs, bk), (fsize > BLOCKSIZE) ? BLOCKSIZE : fsize, 1, f) != 1)
2197 fsize -= BLOCKSIZE;
2225 for(d = (directory*)b; (int8*)d + sizeof(*d) < (int8*)b + BLOCKSIZE; d = (directory*)((int8*)d + d->d_rec_len))
2398 (int)(fs->sb.s_inodes_per_group * sizeof(inode) / BLOCKSIZE));
2422 if(fwrite(fs, BLOCKSIZE, nbblocks, fh) < nbblocks)
2681 int tmp_nbinodes = nbblocks * BLOCKSIZE / bytes_per_inode;
2696 memset(get_blk(fs, b), emptyval, BLOCKSIZE);