tag | line | file | source code |
block | 71 | drivers/block/blk.h | #define SUBSECTOR(block) (CURRENT->current_nr_sectors > 0) |
block | 981 | drivers/block/cdu31a.c | int block; |
block | 1011 | drivers/block/cdu31a.c | block = CURRENT->sector; |
block | 1026 | drivers/block/cdu31a.c | if ((block / 4) >= sony_toc->lead_out_start_lba) |
block | 1031 | drivers/block/cdu31a.c | if (((block + nsect) / 4) >= sony_toc->lead_out_start_lba) |
block | 1043 | drivers/block/cdu31a.c | if ((block < sony_first_block) || (block > sony_last_block)) |
block | 1045 | drivers/block/cdu31a.c | sony_first_block = (block / 4) * 4; |
block | 1046 | drivers/block/cdu31a.c | log_to_msf(block/4, params); |
block | 1052 | drivers/block/cdu31a.c | if (((block / 4) + sony_buffer_sectors) >= sony_toc->lead_out_start_lba) |
block | 1054 | drivers/block/cdu31a.c | read_size = sony_toc->lead_out_start_lba - (block / 4); |
block | 1095 | drivers/block/cdu31a.c | copyoff = (block - sony_first_block) * 512; |
block | 1098 | drivers/block/cdu31a.c | block += 1; |
block | 993 | drivers/block/floppy.c | unsigned int block; |
block | 1041 | drivers/block/floppy.c | block = CURRENT->sector; |
block | 1042 | drivers/block/floppy.c | if (block+2 > floppy->size) { |
block | 1046 | drivers/block/floppy.c | sector = block % floppy->sect; |
block | 1047 | drivers/block/floppy.c | block /= floppy->sect; |
block | 1048 | drivers/block/floppy.c | head = block % floppy->head; |
block | 1049 | drivers/block/floppy.c | track = block / floppy->head; |
block | 445 | drivers/block/hd.c | unsigned int block,dev; |
block | 458 | drivers/block/hd.c | block = CURRENT->sector; |
block | 460 | drivers/block/hd.c | if (dev >= (NR_HD<<6) || block >= hd[dev].nr_sects) { |
block | 463 | drivers/block/hd.c | block, hd[dev].nr_sects); |
block | 468 | drivers/block/hd.c | block += hd[dev].start_sect; |
block | 470 | drivers/block/hd.c | sec = block % hd_info[dev].sect + 1; |
block | 471 | drivers/block/hd.c | track = block / hd_info[dev].sect; |
block | 551 | drivers/block/mcd.c | unsigned int block,dev; |
block | 558 | drivers/block/mcd.c | block = CURRENT->sector; |
block | 663 | drivers/block/mcd.c | long block; |
block | 688 | drivers/block/mcd.c | block = CURRENT -> sector / 4; |
block | 689 | drivers/block/mcd.c | hsg2msf(block, &mcdcmd.start); /* cvt to msf format */ |
block | 106 | drivers/block/ramdisk.c | int block, tries; |
block | 128 | drivers/block/ramdisk.c | block = tries; |
block | 129 | drivers/block/ramdisk.c | bh = breada(ROOT_DEV,block+1,BLOCK_SIZE, 0, PAGE_SIZE); |
block | 157 | drivers/block/ramdisk.c | bh = breada(ROOT_DEV, block, BLOCK_SIZE, 0, PAGE_SIZE); |
block | 159 | drivers/block/ramdisk.c | bh = bread(ROOT_DEV, block, BLOCK_SIZE); |
block | 162 | drivers/block/ramdisk.c | block); |
block | 169 | drivers/block/ramdisk.c | block++; |
block | 2430 | drivers/block/sbpcd.c | u_int block; |
block | 2451 | drivers/block/sbpcd.c | block = CURRENT->sector; |
block | 2461 | drivers/block/sbpcd.c | DPRINTF((DBG_MUL,"SBPCD: read LBA %d\n", block/4)); |
block | 2521 | drivers/block/sbpcd.c | int block; |
block | 2524 | drivers/block/sbpcd.c | block=CURRENT->sector/4; |
block | 2529 | drivers/block/sbpcd.c | DPRINTF((DBG_MUL,"SBPCD: read MSF %08X\n", blk2msf(block))); |
block | 2533 | drivers/block/sbpcd.c | blk2msf(DS[d].lba_multi+block), |
block | 2534 | drivers/block/sbpcd.c | blk2msf(block))); |
block | 2535 | drivers/block/sbpcd.c | block=DS[d].lba_multi+block; |
block | 2538 | drivers/block/sbpcd.c | if ( (block==166) && (DS[d].f_multisession) && (multisession_valid) ) |
block | 2542 | drivers/block/sbpcd.c | blk2msf(block))); |
block | 2543 | drivers/block/sbpcd.c | block=DS[d].lba_multi+16; |
block | 2548 | drivers/block/sbpcd.c | if (block+SBP_BUFFER_FRAMES <= DS[d].CDsize_frm) |
block | 2552 | drivers/block/sbpcd.c | DS[d].sbp_read_frames=DS[d].CDsize_frm-block; |
block | 2557 | drivers/block/sbpcd.c | block, DS[d].CDsize_frm)); |
block | 2575 | drivers/block/sbpcd.c | drvcmd[1]=(block>>16)&0x000000ff; |
block | 2576 | drivers/block/sbpcd.c | drvcmd[2]=(block>>8)&0x000000ff; |
block | 2577 | drivers/block/sbpcd.c | drvcmd[3]=block&0x000000ff; |
block | 2588 | drivers/block/sbpcd.c | lba2msf(block,&drvcmd[1]); /* msf-bcd format required */ |
block | 2595 | drivers/block/sbpcd.c | drvcmd[1]=(block>>16)&0x000000ff; |
block | 2596 | drivers/block/sbpcd.c | drvcmd[2]=(block>>8)&0x000000ff; |
block | 2597 | drivers/block/sbpcd.c | drvcmd[3]=block&0x000000ff; |
block | 2607 | drivers/block/sbpcd.c | lba2msf(block,&drvcmd[1]); /* msf-bin format required */ |
block | 210 | drivers/block/xd.c | u_int block,count,retry; |
block | 218 | drivers/block/xd.c | block = CURRENT->sector + xd[MINOR(CURRENT->dev)].start_sect; |
block | 225 | drivers/block/xd.c | code = xd_readwrite(CURRENT->cmd,CURRENT_DEV,CURRENT->buffer,block,count); |
block | 322 | drivers/block/xd.c | static int xd_readwrite (u_char operation,u_char drive,char *buffer,u_int block,u_int count) |
block | 329 | drivers/block/xd.c | printk("xd_readwrite: operation = %s, drive = %d, buffer = 0x%X, block = %d, count = %d\n",operation == READ ? "read" : "write",drive,buffer,block,count); |
block | 336 | drivers/block/xd.c | track = block / xd_info[drive].sectors; |
block | 339 | drivers/block/xd.c | sector = block % xd_info[drive].sectors; |
block | 366 | drivers/block/xd.c | count -= temp, buffer += temp * 0x200, block += temp; |
block | 68 | drivers/scsi/scsi_debug.c | if ((bh->b_blocknr << 1) + start != block) \ |
block | 69 | drivers/scsi/scsi_debug.c | { printk("Wrong bh block# %d %d ",bh->b_blocknr, block); \ |
block | 89 | drivers/scsi/scsi_debug.c | if (SCpnt->request.sector + start != block) panic("Wrong block."); \ |
block | 93 | drivers/scsi/scsi_debug.c | if ((SCpnt->request.bh->b_blocknr << 1) + start != block) \ |
block | 94 | drivers/scsi/scsi_debug.c | { printk("Wrong bh block# %d %d ",SCpnt->request.bh->b_blocknr, block); \ |
block | 158 | drivers/scsi/scsi_debug.c | int block, start; |
block | 236 | drivers/scsi/scsi_debug.c | block = cmd[5] + (cmd[4] << 8) + (cmd[3] << 16) + (cmd[2] << 24); |
block | 238 | drivers/scsi/scsi_debug.c | block = cmd[3] + (cmd[2] << 8) + ((cmd[1] & 0x1f) << 16); |
block | 272 | drivers/scsi/scsi_debug.c | if(block == 0 && target == 0) { |
block | 287 | drivers/scsi/scsi_debug.c | if (SCpnt->use_sg) printk("Block %x (%d %d)\n",block, SCpnt->request.nr_sectors, |
block | 293 | drivers/scsi/scsi_debug.c | if(block == 0xfff0) { |
block | 315 | drivers/scsi/scsi_debug.c | memcpy(buff+60, &block, sizeof(block)); |
block | 323 | drivers/scsi/scsi_debug.c | block += bufflen >> 9; |
block | 347 | drivers/scsi/scsi_debug.c | block = cmd[5] + (cmd[4] << 8) + (cmd[3] << 16) + (cmd[2] << 24); |
block | 349 | drivers/scsi/scsi_debug.c | block = cmd[3] + (cmd[2] << 8) + ((cmd[1] & 0x1f) << 16); |
block | 359 | drivers/scsi/scsi_debug.c | if (block != *((unsigned long *) (buff+60))) { |
block | 360 | drivers/scsi/scsi_debug.c | printk("%x %x :",block, *((unsigned long *) (buff+60))); |
block | 384 | drivers/scsi/sd.c | int dev, block, this_count; |
block | 399 | drivers/scsi/sd.c | block = SCpnt->request.sector; |
block | 403 | drivers/scsi/sd.c | printk("Doing sd request, dev = %d, block = %d\n", dev, block); |
block | 406 | drivers/scsi/sd.c | if (dev >= (NR_SD << 4) || block + SCpnt->request.nr_sectors > sd[dev].nr_sects) |
block | 412 | drivers/scsi/sd.c | block += sd[dev].start_sect; |
block | 426 | drivers/scsi/sd.c | printk("sd%d : real dev = /dev/sd%d, block = %d\n", MINOR(SCpnt->request.dev), dev, block); |
block | 682 | drivers/scsi/sd.c | if(block & 1) panic("sd.c:Bad block number requested"); |
block | 684 | drivers/scsi/sd.c | block = block >> 1; |
block | 689 | drivers/scsi/sd.c | block = block << 1; |
block | 693 | drivers/scsi/sd.c | if (((this_count > 0xff) || (block > 0x1fffff)) && rscsi_disks[dev].ten) |
block | 699 | drivers/scsi/sd.c | cmd[2] = (unsigned char) (block >> 24) & 0xff; |
block | 700 | drivers/scsi/sd.c | cmd[3] = (unsigned char) (block >> 16) & 0xff; |
block | 701 | drivers/scsi/sd.c | cmd[4] = (unsigned char) (block >> 8) & 0xff; |
block | 702 | drivers/scsi/sd.c | cmd[5] = (unsigned char) block & 0xff; |
block | 712 | drivers/scsi/sd.c | cmd[1] |= (unsigned char) ((block >> 16) & 0x1f); |
block | 713 | drivers/scsi/sd.c | cmd[2] = (unsigned char) ((block >> 8) & 0xff); |
block | 714 | drivers/scsi/sd.c | cmd[3] = (unsigned char) block & 0xff; |
block | 348 | drivers/scsi/sr.c | unsigned int dev, block, realcount; |
block | 361 | drivers/scsi/sr.c | block = SCpnt->request.sector; |
block | 541 | drivers/scsi/sr.c | start = block % 4; |
block | 563 | drivers/scsi/sr.c | block = block >> 2; /* These are the sectors that the cdrom uses */ |
block | 565 | drivers/scsi/sr.c | block = block & 0xfffffffc; |
block | 571 | drivers/scsi/sr.c | if (((realcount > 0xff) || (block > 0x1fffff)) && scsi_CDs[dev].ten) |
block | 580 | drivers/scsi/sr.c | cmd[2] = (unsigned char) (block >> 24) & 0xff; |
block | 581 | drivers/scsi/sr.c | cmd[3] = (unsigned char) (block >> 16) & 0xff; |
block | 582 | drivers/scsi/sr.c | cmd[4] = (unsigned char) (block >> 8) & 0xff; |
block | 583 | drivers/scsi/sr.c | cmd[5] = (unsigned char) block & 0xff; |
block | 596 | drivers/scsi/sr.c | cmd[1] |= (unsigned char) ((block >> 16) & 0x1f); |
block | 597 | drivers/scsi/sr.c | cmd[2] = (unsigned char) ((block >> 8) & 0xff); |
block | 598 | drivers/scsi/sr.c | cmd[3] = (unsigned char) block & 0xff; |
block | 606 | drivers/scsi/sr.c | printk("ReadCD: %d %d %d %d\n",block, realcount, buffer, this_count); |
block | 76 | drivers/sound/opl3.c | static void freq_to_fnum (int freq, int *block, int *fnum); |
block | 431 | drivers/sound/opl3.c | int block, fnum, freq, voice_mode; |
block | 566 | drivers/sound/opl3.c | freq_to_fnum (freq, &block, &fnum); |
block | 573 | drivers/sound/opl3.c | data = 0x20 | ((block & 0x7) << 2) | ((fnum >> 8) & 0x3); |
block | 583 | drivers/sound/opl3.c | freq_to_fnum (int freq, int *block, int *fnum) |
block | 617 | drivers/sound/opl3.c | *block = octave; |
block | 826 | drivers/sound/opl3.c | int block, fnum, freq; |
block | 849 | drivers/sound/opl3.c | freq_to_fnum (freq, &block, &fnum); |
block | 854 | drivers/sound/opl3.c | data = 0x20 | ((block & 0x7) << 2) | ((fnum >> 8) & 0x3); /* KEYON|OCTAVE|MS bits |
block | 22 | fs/block_dev.c | int block, blocks; |
block | 48 | fs/block_dev.c | block = filp->f_pos >> blocksize_bits; |
block | 56 | fs/block_dev.c | if (block >= size) |
block | 64 | fs/block_dev.c | bh = getblk(dev, block, blocksize); |
block | 66 | fs/block_dev.c | bh = breada(dev,block,block+1,block+2,-1); |
block | 69 | fs/block_dev.c | for(i=0; i<blocks_per_cluster; i++) cluster_list[i] = block+i; |
block | 70 | fs/block_dev.c | if((block % blocks_per_cluster) == 0) |
block | 72 | fs/block_dev.c | bh = getblk(dev, block, blocksize); |
block | 79 | fs/block_dev.c | bh = bread(dev,block,blocksize); |
block | 83 | fs/block_dev.c | if (block + blocks > size) blocks = size - block; |
block | 85 | fs/block_dev.c | blocks -= (block % blocks_per_cluster); |
block | 89 | fs/block_dev.c | if(((i+block) % blocks_per_cluster) == 0) { |
block | 90 | fs/block_dev.c | for(j=0; j<blocks_per_cluster; j++) cluster_list[j] = block+i+j; |
block | 93 | fs/block_dev.c | bhlist[i] = getblk (dev, block+i, blocksize); |
block | 105 | fs/block_dev.c | block++; |
block | 126 | fs/block_dev.c | unsigned int block; |
block | 170 | fs/block_dev.c | block = offset >> blocksize_bits; |
block | 178 | fs/block_dev.c | if (block + blocks > size) |
block | 179 | fs/block_dev.c | blocks = size - block; |
block | 180 | fs/block_dev.c | blocks -= (block % blocks_per_cluster); |
block | 201 | fs/block_dev.c | if((block % blocks_per_cluster) == 0) { |
block | 202 | fs/block_dev.c | for(i=0; i<blocks_per_cluster; i++) cluster_list[i] = block+i; |
block | 206 | fs/block_dev.c | *bhb = getblk(dev, block++, blocksize); |
block | 362 | fs/buffer.c | #define _hashfn(dev,block) (((unsigned)(dev^block))%nr_hash) |
block | 363 | fs/buffer.c | #define hash(dev,block) hash_table[_hashfn(dev,block)] |
block | 499 | fs/buffer.c | static struct buffer_head * find_buffer(dev_t dev, int block, int size) |
block | 503 | fs/buffer.c | for (tmp = hash(dev,block) ; tmp != NULL ; tmp = tmp->b_next) |
block | 504 | fs/buffer.c | if (tmp->b_dev==dev && tmp->b_blocknr==block) |
block | 522 | fs/buffer.c | struct buffer_head * get_hash_table(dev_t dev, int block, int size) |
block | 527 | fs/buffer.c | if (!(bh=find_buffer(dev,block,size))) |
block | 531 | fs/buffer.c | if (bh->b_dev == dev && bh->b_blocknr == block && bh->b_size == size) |
block | 775 | fs/buffer.c | struct buffer_head * getblk(dev_t dev, int block, int size) |
block | 787 | fs/buffer.c | bh = get_hash_table(dev, block, size); |
block | 797 | fs/buffer.c | if (find_buffer(dev,block,size)) |
block | 812 | fs/buffer.c | bh->b_blocknr=block; |
block | 887 | fs/buffer.c | struct buffer_head * bread(dev_t dev, int block, int size) |
block | 891 | fs/buffer.c | if (!(bh = getblk(dev, block, size))) { |
block | 914 | fs/buffer.c | struct buffer_head * breada(dev_t dev, int block, int bufsize, |
block | 926 | fs/buffer.c | if (block < 0 || !(bh = getblk(dev,block,bufsize))) |
block | 944 | fs/buffer.c | bh = getblk(dev,block+i,bufsize); |
block | 1076 | fs/buffer.c | int block; |
block | 1088 | fs/buffer.c | block = *++b; |
block | 1089 | fs/buffer.c | if (!block) |
block | 1091 | fs/buffer.c | first = get_hash_table(dev, block, size); |
block | 1118 | fs/buffer.c | int block; |
block | 1126 | fs/buffer.c | block = *(p++); |
block | 1127 | fs/buffer.c | if (!block) |
block | 1129 | fs/buffer.c | if (find_buffer(dev, block, size)) |
block | 1134 | fs/buffer.c | block = 0; |
block | 1136 | fs/buffer.c | arr[block++] = bh; |
block | 1157 | fs/buffer.c | read_buffers(arr,block); |
block | 1158 | fs/buffer.c | while (block-- > 0) |
block | 1159 | fs/buffer.c | brelse(arr[block]); |
block | 1185 | fs/buffer.c | int block; |
block | 1187 | fs/buffer.c | block = b[0]; |
block | 1188 | fs/buffer.c | if (!block) |
block | 1190 | fs/buffer.c | bh = get_hash_table(dev, block, size); |
block | 1590 | fs/buffer.c | static unsigned long try_to_generate_cluster(dev_t dev, int block, int size) |
block | 1606 | fs/buffer.c | nblock = block; |
block | 1623 | fs/buffer.c | bh->b_blocknr = block++; |
block | 75 | fs/ext/file.c | int block, blocks, offset; |
block | 101 | fs/ext/file.c | block = offset >> BLOCK_SIZE_BITS; |
block | 109 | fs/ext/file.c | if (block + blocks > size) |
block | 110 | fs/ext/file.c | blocks = size - block; |
block | 128 | fs/ext/file.c | *bhb = ext_getblk(inode, block++, 0); |
block | 47 | fs/ext/freelists.c | void ext_free_block(struct super_block * sb, int block) |
block | 57 | fs/ext/freelists.c | if (block < sb->u.ext_sb.s_firstdatazone || |
block | 58 | fs/ext/freelists.c | block >= sb->u.ext_sb.s_nzones) { |
block | 62 | fs/ext/freelists.c | bh = get_hash_table(sb->s_dev, block, sb->s_blocksize); |
block | 70 | fs/ext/freelists.c | printk("ext_free_block: block full, skipping to %d\n", block); |
block | 75 | fs/ext/freelists.c | block, sb->s_blocksize))) |
block | 80 | fs/ext/freelists.c | sb->u.ext_sb.s_firstfreeblocknumber = block; |
block | 82 | fs/ext/freelists.c | efb->free[efb->count++] = block; |
block | 152 | fs/ext/freelists.c | unsigned long count, block; |
block | 160 | fs/ext/freelists.c | block = efb->next; |
block | 161 | fs/ext/freelists.c | while (block) { |
block | 162 | fs/ext/freelists.c | if (!(bh = bread (sb->s_dev, block, sb->s_blocksize))) { |
block | 164 | fs/ext/freelists.c | block = 0; |
block | 168 | fs/ext/freelists.c | block = efb->next; |
block | 187 | fs/ext/freelists.c | unsigned long block; |
block | 228 | fs/ext/freelists.c | block = 2 + (ino - 1) / EXT_INODES_PER_BLOCK; |
block | 229 | fs/ext/freelists.c | if (!(bh = bread(dev, block, sb->s_blocksize))) |
block | 251 | fs/ext/freelists.c | unsigned long block; |
block | 277 | fs/ext/freelists.c | block = 2 + (((unsigned long) efi->next) - 1) / EXT_INODES_PER_BLOCK; |
block | 283 | fs/ext/freelists.c | bread(sb->s_dev, block, sb->s_blocksize))) |
block | 312 | fs/ext/freelists.c | unsigned long count, block, ino; |
block | 328 | fs/ext/freelists.c | block = 2 + ((ino - 1) / EXT_INODES_PER_BLOCK); |
block | 329 | fs/ext/freelists.c | if (!(bh = bread (sb->s_dev, block, sb->s_blocksize))) { |
block | 331 | fs/ext/freelists.c | block = 0; |
block | 30 | fs/ext/fsync.c | static int sync_block (struct inode * inode, unsigned long * block, int wait) |
block | 35 | fs/ext/fsync.c | if (!*block) |
block | 37 | fs/ext/fsync.c | tmp = *block; |
block | 38 | fs/ext/fsync.c | bh = get_hash_table(inode->i_dev, *block, blocksize); |
block | 41 | fs/ext/fsync.c | if (*block != tmp) { |
block | 62 | fs/ext/inode.c | int dev = s->s_dev,block; |
block | 107 | fs/ext/inode.c | block = 2 + (s->u.ext_sb.s_firstfreeinodenumber - 1) / EXT_INODES_PER_BLOCK; |
block | 108 | fs/ext/inode.c | if (!(s->u.ext_sb.s_firstfreeinodeblock = bread(dev, block, BLOCK_SIZE))) { |
block | 177 | fs/ext/inode.c | int ext_bmap(struct inode * inode,int block) |
block | 181 | fs/ext/inode.c | if (block<0) { |
block | 185 | fs/ext/inode.c | if (block >= 9+256+256*256+256*256*256) { |
block | 189 | fs/ext/inode.c | if (block<9) |
block | 190 | fs/ext/inode.c | return inode_bmap(inode,block); |
block | 191 | fs/ext/inode.c | block -= 9; |
block | 192 | fs/ext/inode.c | if (block<256) { |
block | 196 | fs/ext/inode.c | return block_bmap(bread(inode->i_dev,i,BLOCK_SIZE),block); |
block | 198 | fs/ext/inode.c | block -= 256; |
block | 199 | fs/ext/inode.c | if (block<256*256) { |
block | 203 | fs/ext/inode.c | i = block_bmap(bread(inode->i_dev,i,BLOCK_SIZE),block>>8); |
block | 206 | fs/ext/inode.c | return block_bmap(bread(inode->i_dev,i,BLOCK_SIZE),block & 255); |
block | 208 | fs/ext/inode.c | block -= 256*256; |
block | 212 | fs/ext/inode.c | i = block_bmap(bread(inode->i_dev,i,BLOCK_SIZE),block>>16); |
block | 215 | fs/ext/inode.c | i = block_bmap(bread(inode->i_dev,i,BLOCK_SIZE),(block>>8) & 255); |
block | 218 | fs/ext/inode.c | return block_bmap(bread(inode->i_dev,i,BLOCK_SIZE),block & 255); |
block | 304 | fs/ext/inode.c | struct buffer_head * ext_getblk(struct inode * inode, int block, int create) |
block | 308 | fs/ext/inode.c | if (block<0) { |
block | 312 | fs/ext/inode.c | if (block >= 9+256+256*256+256*256*256) { |
block | 316 | fs/ext/inode.c | if (block<9) |
block | 317 | fs/ext/inode.c | return inode_getblk(inode,block,create); |
block | 318 | fs/ext/inode.c | block -= 9; |
block | 319 | fs/ext/inode.c | if (block<256) { |
block | 321 | fs/ext/inode.c | return block_getblk(inode,bh,block,create); |
block | 323 | fs/ext/inode.c | block -= 256; |
block | 324 | fs/ext/inode.c | if (block<256*256) { |
block | 326 | fs/ext/inode.c | bh = block_getblk(inode,bh,block>>8,create); |
block | 327 | fs/ext/inode.c | return block_getblk(inode,bh,block & 255,create); |
block | 329 | fs/ext/inode.c | block -= 256*256; |
block | 331 | fs/ext/inode.c | bh = block_getblk(inode,bh,block>>16,create); |
block | 332 | fs/ext/inode.c | bh = block_getblk(inode,bh,(block>>8) & 255,create); |
block | 333 | fs/ext/inode.c | return block_getblk(inode,bh,block & 255,create); |
block | 336 | fs/ext/inode.c | struct buffer_head * ext_bread(struct inode * inode, int block, int create) |
block | 340 | fs/ext/inode.c | bh = ext_getblk(inode,block,create); |
block | 355 | fs/ext/inode.c | int block; |
block | 357 | fs/ext/inode.c | block = 2 + (inode->i_ino-1)/EXT_INODES_PER_BLOCK; |
block | 358 | fs/ext/inode.c | if (!(bh=bread(inode->i_dev, block, BLOCK_SIZE))) |
block | 371 | fs/ext/inode.c | else for (block = 0; block < 12; block++) |
block | 372 | fs/ext/inode.c | inode->u.ext_i.i_data[block] = raw_inode->i_zone[block]; |
block | 393 | fs/ext/inode.c | int block; |
block | 395 | fs/ext/inode.c | block = 2 + (inode->i_ino-1)/EXT_INODES_PER_BLOCK; |
block | 396 | fs/ext/inode.c | if (!(bh=bread(inode->i_dev, block, BLOCK_SIZE))) |
block | 408 | fs/ext/inode.c | else for (block = 0; block < 12; block++) |
block | 409 | fs/ext/inode.c | raw_inode->i_zone[block] = inode->u.ext_i.i_data[block]; |
block | 249 | fs/ext2/balloc.c | void ext2_free_blocks (struct super_block * sb, unsigned long block, |
block | 267 | fs/ext2/balloc.c | if (block < es->s_first_data_block || |
block | 268 | fs/ext2/balloc.c | (block + count) > es->s_blocks_count) { |
block | 271 | fs/ext2/balloc.c | "block = %lu, count = %lu", block, count); |
block | 276 | fs/ext2/balloc.c | ext2_debug ("freeing block %lu\n", block); |
block | 278 | fs/ext2/balloc.c | block_group = (block - es->s_first_data_block) / |
block | 280 | fs/ext2/balloc.c | bit = (block - es->s_first_data_block) % EXT2_BLOCKS_PER_GROUP(sb); |
block | 285 | fs/ext2/balloc.c | block, count); |
block | 291 | fs/ext2/balloc.c | (in_range (gdp->bg_block_bitmap, block, count) || |
block | 292 | fs/ext2/balloc.c | in_range (gdp->bg_inode_bitmap, block, count) || |
block | 293 | fs/ext2/balloc.c | in_range (block, gdp->bg_inode_table, |
block | 295 | fs/ext2/balloc.c | in_range (block + count - 1, gdp->bg_inode_table, |
block | 300 | fs/ext2/balloc.c | block, count); |
block | 306 | fs/ext2/balloc.c | block); |
block | 595 | fs/ext2/balloc.c | static inline int block_in_use (unsigned long block, |
block | 599 | fs/ext2/balloc.c | return test_bit ((block - sb->u.ext2_sb.s_es->s_first_data_block) % |
block | 79 | fs/ext2/file.c | int block, blocks, offset; |
block | 110 | fs/ext2/file.c | block = offset >> EXT2_BLOCK_SIZE_BITS(sb); |
block | 118 | fs/ext2/file.c | if (block + blocks > size) |
block | 119 | fs/ext2/file.c | blocks = size - block; |
block | 142 | fs/ext2/file.c | if(!clusterblocks) clusterblocks = ext2_getcluster(inode, block); |
block | 146 | fs/ext2/file.c | *bhb = ext2_getblk (inode, block++, 0, &err); |
block | 30 | fs/ext2/fsync.c | static int sync_block (struct inode * inode, unsigned long * block, int wait) |
block | 35 | fs/ext2/fsync.c | if (!*block) |
block | 37 | fs/ext2/fsync.c | tmp = *block; |
block | 38 | fs/ext2/fsync.c | bh = get_hash_table (inode->i_dev, *block, blocksize); |
block | 41 | fs/ext2/fsync.c | if (*block != tmp) { |
block | 134 | fs/ext2/inode.c | int ext2_bmap (struct inode * inode, int block) |
block | 139 | fs/ext2/inode.c | if (block < 0) { |
block | 143 | fs/ext2/inode.c | if (block >= EXT2_NDIR_BLOCKS + addr_per_block + |
block | 149 | fs/ext2/inode.c | if (block < EXT2_NDIR_BLOCKS) |
block | 150 | fs/ext2/inode.c | return inode_bmap (inode, block); |
block | 151 | fs/ext2/inode.c | block -= EXT2_NDIR_BLOCKS; |
block | 152 | fs/ext2/inode.c | if (block < addr_per_block) { |
block | 157 | fs/ext2/inode.c | inode->i_sb->s_blocksize), block); |
block | 159 | fs/ext2/inode.c | block -= addr_per_block; |
block | 160 | fs/ext2/inode.c | if (block < addr_per_block * addr_per_block) { |
block | 166 | fs/ext2/inode.c | block / addr_per_block); |
block | 171 | fs/ext2/inode.c | block & (addr_per_block - 1)); |
block | 173 | fs/ext2/inode.c | block -= addr_per_block * addr_per_block; |
block | 178 | fs/ext2/inode.c | block / (addr_per_block * addr_per_block)); |
block | 182 | fs/ext2/inode.c | (block / addr_per_block) & (addr_per_block - 1)); |
block | 186 | fs/ext2/inode.c | block & (addr_per_block - 1)); |
block | 366 | fs/ext2/inode.c | struct buffer_head * ext2_getblk (struct inode * inode, long block, |
block | 374 | fs/ext2/inode.c | if (block < 0) { |
block | 378 | fs/ext2/inode.c | if (block > EXT2_NDIR_BLOCKS + addr_per_block + |
block | 390 | fs/ext2/inode.c | ext2_debug ("block %lu, next %lu, goal %lu.\n", block, |
block | 394 | fs/ext2/inode.c | if (block == inode->u.ext2_i.i_next_alloc_block + 1) { |
block | 400 | fs/ext2/inode.c | b = block; |
block | 401 | fs/ext2/inode.c | if (block < EXT2_NDIR_BLOCKS) |
block | 402 | fs/ext2/inode.c | return inode_getblk (inode, block, create, b, err); |
block | 403 | fs/ext2/inode.c | block -= EXT2_NDIR_BLOCKS; |
block | 404 | fs/ext2/inode.c | if (block < addr_per_block) { |
block | 406 | fs/ext2/inode.c | return block_getblk (inode, bh, block, create, |
block | 409 | fs/ext2/inode.c | block -= addr_per_block; |
block | 410 | fs/ext2/inode.c | if (block < addr_per_block * addr_per_block) { |
block | 412 | fs/ext2/inode.c | bh = block_getblk (inode, bh, block / addr_per_block, create, |
block | 414 | fs/ext2/inode.c | return block_getblk (inode, bh, block & (addr_per_block - 1), |
block | 417 | fs/ext2/inode.c | block -= addr_per_block * addr_per_block; |
block | 419 | fs/ext2/inode.c | bh = block_getblk (inode, bh, block/(addr_per_block * addr_per_block), |
block | 421 | fs/ext2/inode.c | bh = block_getblk (inode, bh, (block/addr_per_block) & (addr_per_block - 1), |
block | 423 | fs/ext2/inode.c | return block_getblk (inode, bh, block & (addr_per_block - 1), create, |
block | 427 | fs/ext2/inode.c | int ext2_getcluster (struct inode * inode, long block) |
block | 436 | fs/ext2/inode.c | if (block < 0) { |
block | 440 | fs/ext2/inode.c | if (block > EXT2_NDIR_BLOCKS + addr_per_block + |
block | 448 | fs/ext2/inode.c | b = block; |
block | 449 | fs/ext2/inode.c | if (block < EXT2_NDIR_BLOCKS) return 0; |
block | 451 | fs/ext2/inode.c | block -= EXT2_NDIR_BLOCKS; |
block | 453 | fs/ext2/inode.c | if (block < addr_per_block) { |
block | 455 | fs/ext2/inode.c | return block_getcluster (inode, bh, block, |
block | 458 | fs/ext2/inode.c | block -= addr_per_block; |
block | 459 | fs/ext2/inode.c | if (block < addr_per_block * addr_per_block) { |
block | 461 | fs/ext2/inode.c | bh = block_getblk (inode, bh, block / addr_per_block, create, |
block | 463 | fs/ext2/inode.c | return block_getcluster (inode, bh, block & (addr_per_block - 1), |
block | 466 | fs/ext2/inode.c | block -= addr_per_block * addr_per_block; |
block | 468 | fs/ext2/inode.c | bh = block_getblk (inode, bh, block/(addr_per_block * addr_per_block), |
block | 470 | fs/ext2/inode.c | bh = block_getblk (inode, bh, (block/addr_per_block) & (addr_per_block - 1), |
block | 472 | fs/ext2/inode.c | return block_getcluster (inode, bh, block & (addr_per_block - 1), |
block | 476 | fs/ext2/inode.c | struct buffer_head * ext2_bread (struct inode * inode, int block, |
block | 481 | fs/ext2/inode.c | bh = ext2_getblk (inode, block, create, err); |
block | 500 | fs/ext2/inode.c | unsigned long block; |
block | 521 | fs/ext2/inode.c | block = gdp[desc].bg_inode_table + |
block | 524 | fs/ext2/inode.c | if (!(bh = bread (inode->i_dev, block, inode->i_sb->s_blocksize))) |
block | 527 | fs/ext2/inode.c | "inode=%lu, block=%lu", inode->i_ino, block); |
block | 556 | fs/ext2/inode.c | else for (block = 0; block < EXT2_N_BLOCKS; block++) |
block | 557 | fs/ext2/inode.c | inode->u.ext2_i.i_data[block] = raw_inode->i_block[block]; |
block | 586 | fs/ext2/inode.c | unsigned long block; |
block | 606 | fs/ext2/inode.c | block = gdp[desc].bg_inode_table + |
block | 609 | fs/ext2/inode.c | if (!(bh = bread (inode->i_dev, block, inode->i_sb->s_blocksize))) |
block | 612 | fs/ext2/inode.c | "inode=%lu, block=%lu", inode->i_ino, block); |
block | 634 | fs/ext2/inode.c | else for (block = 0; block < EXT2_N_BLOCKS; block++) |
block | 635 | fs/ext2/inode.c | raw_inode->i_block[block] = inode->u.ext2_i.i_data[block]; |
block | 83 | fs/ext2/namei.c | int block, toread, i, err; |
block | 100 | fs/ext2/namei.c | for (block = 0; block < NAMEI_RA_SIZE; ++block) { |
block | 103 | fs/ext2/namei.c | if ((block << EXT2_BLOCK_SIZE_BITS (sb)) >= dir->i_size) |
block | 105 | fs/ext2/namei.c | bh = ext2_getblk (dir, block, 0, &err); |
block | 106 | fs/ext2/namei.c | bh_use[block] = bh; |
block | 111 | fs/ext2/namei.c | block = 0; |
block | 118 | fs/ext2/namei.c | if ((block % NAMEI_RA_BLOCKS) == 0 && toread) { |
block | 122 | fs/ext2/namei.c | bh = bh_use[block % NAMEI_RA_SIZE]; |
block | 154 | fs/ext2/namei.c | if (((block + NAMEI_RA_SIZE) << EXT2_BLOCK_SIZE_BITS (sb)) >= |
block | 158 | fs/ext2/namei.c | bh = ext2_getblk (dir, block + NAMEI_RA_SIZE, 0, &err); |
block | 159 | fs/ext2/namei.c | bh_use[block++ % NAMEI_RA_SIZE] = bh; |
block | 312 | fs/ext2/super.c | unsigned long block = sb->u.ext2_sb.s_es->s_first_data_block; |
block | 321 | fs/ext2/super.c | if (gdp->bg_block_bitmap < block || |
block | 322 | fs/ext2/super.c | gdp->bg_block_bitmap >= block + EXT2_BLOCKS_PER_GROUP(sb)) |
block | 330 | fs/ext2/super.c | if (gdp->bg_inode_bitmap < block || |
block | 331 | fs/ext2/super.c | gdp->bg_inode_bitmap >= block + EXT2_BLOCKS_PER_GROUP(sb)) |
block | 339 | fs/ext2/super.c | if (gdp->bg_inode_table < block || |
block | 341 | fs/ext2/super.c | block + EXT2_BLOCKS_PER_GROUP(sb)) |
block | 349 | fs/ext2/super.c | block += EXT2_BLOCKS_PER_GROUP(sb); |
block | 868 | fs/hpfs/hpfs_fs.c | char *block; |
block | 899 | fs/hpfs/hpfs_fs.c | block = map_sector(inode->i_dev, hpfs_bmap(inode, q), &bh); |
block | 900 | fs/hpfs/hpfs_fs.c | if (!block) |
block | 908 | fs/hpfs/hpfs_fs.c | inode->i_hpfs_conv = choose_conv(block + r, n); |
block | 915 | fs/hpfs/hpfs_fs.c | memcpy_tofs(buf, block + r, n); |
block | 922 | fs/hpfs/hpfs_fs.c | n0 = convcpy_tofs(buf, block + r, n); |
block | 262 | fs/inode.c | int bmap(struct inode * inode, int block) |
block | 265 | fs/inode.c | return inode->i_op->bmap(inode,block); |
block | 19 | fs/ioctl.c | int block; |
block | 30 | fs/ioctl.c | block = get_fs_long((long *) arg); |
block | 31 | fs/ioctl.c | block = filp->f_inode->i_op->bmap(filp->f_inode,block); |
block | 32 | fs/ioctl.c | put_fs_long(block,(long *) arg); |
block | 71 | fs/isofs/dir.c | unsigned int block,offset,i, j; |
block | 85 | fs/isofs/dir.c | block = isofs_bmap(inode,filp->f_pos>>bufbits); |
block | 87 | fs/isofs/dir.c | if(!block) return 0; |
block | 89 | fs/isofs/dir.c | if(!(bh = breada(inode->i_dev, block, bufsize, filp->f_pos, inode->i_size))) |
block | 95 | fs/isofs/dir.c | block, offset, filp->f_pos); |
block | 98 | fs/isofs/dir.c | inode_number = (block << bufbits) + (offset & (bufsize - 1)); |
block | 109 | fs/isofs/dir.c | block = isofs_bmap(inode,(filp->f_pos)>>bufbits); |
block | 110 | fs/isofs/dir.c | if (!block |
block | 111 | fs/isofs/dir.c | || !(bh = breada(inode->i_dev, block, bufsize, filp->f_pos, |
block | 133 | fs/isofs/dir.c | block = isofs_bmap(inode,(filp->f_pos)>> bufbits); |
block | 134 | fs/isofs/dir.c | if (!block |
block | 135 | fs/isofs/dir.c | || !(bh = breada(inode->i_dev, block, bufsize, |
block | 91 | fs/isofs/file.c | int block; |
block | 96 | fs/isofs/file.c | block = isofs_bmap(inode,0); |
block | 97 | fs/isofs/file.c | if (block && (bh = bread(inode->i_dev,block, ISOFS_BUFFER_SIZE(inode)))) { |
block | 117 | fs/isofs/file.c | int block, blocks, offset; |
block | 143 | fs/isofs/file.c | block = filp->f_pos >> ISOFS_BUFFER_BITS(inode); |
block | 169 | fs/isofs/file.c | *bhb = getblk(inode->i_dev,isofs_bmap(inode, block++), ISOFS_BUFFER_SIZE(inode)); |
block | 322 | fs/isofs/inode.c | int isofs_bmap(struct inode * inode,int block) |
block | 325 | fs/isofs/inode.c | if (block<0) { |
block | 329 | fs/isofs/inode.c | return inode->u.isofs_i.i_first_extent + block; |
block | 340 | fs/isofs/inode.c | int block; |
block | 343 | fs/isofs/inode.c | block = inode->i_ino >> ISOFS_BUFFER_BITS(inode); |
block | 344 | fs/isofs/inode.c | if (!(bh=bread(inode->i_dev,block, bufsize))) { |
block | 363 | fs/isofs/inode.c | if (!(bh = bread(inode->i_dev,++block, bufsize))) { |
block | 442 | fs/isofs/inode.c | printk("Get inode %d: %d %d: %d\n",inode->i_ino, block, |
block | 538 | fs/isofs/inode.c | unsigned int block,offset; |
block | 547 | fs/isofs/inode.c | block = extent << (ISOFS_BLOCK_BITS - bufbits); |
block | 548 | fs/isofs/inode.c | if (!(bh = bread(parent->i_dev, block, bufsize))) return -1; |
block | 585 | fs/isofs/inode.c | block = parent_dir << (ISOFS_BLOCK_BITS - bufbits); |
block | 586 | fs/isofs/inode.c | if (!block || !(bh = bread(parent->i_dev,block, bufsize))) |
block | 592 | fs/isofs/inode.c | inode_number = (block << bufbits)+(offset & (bufsize - 1)); |
block | 602 | fs/isofs/inode.c | block++; |
block | 603 | fs/isofs/inode.c | if((block & 1) && (ISOFS_BLOCK_BITS - bufbits)) |
block | 605 | fs/isofs/inode.c | if (!block |
block | 606 | fs/isofs/inode.c | || !(bh = bread(parent->i_dev,block, bufsize))) |
block | 620 | fs/isofs/inode.c | if((block & 1) != 0) return -1; |
block | 627 | fs/isofs/inode.c | block++; |
block | 628 | fs/isofs/inode.c | if (!(bh = bread(parent->i_dev,block,bufsize))) { |
block | 679 | fs/isofs/inode.c | struct buffer_head * leak_check_bread(int dev, int block, int size){ |
block | 681 | fs/isofs/inode.c | return bread(dev, block, size); |
block | 70 | fs/isofs/namei.c | unsigned int block, i, f_pos, offset, inode_number; |
block | 83 | fs/isofs/namei.c | if (!(block = dir->u.isofs_i.i_first_extent)) return NULL; |
block | 88 | fs/isofs/namei.c | block = isofs_bmap(dir,f_pos >> bufbits); |
block | 90 | fs/isofs/namei.c | if (!block || !(bh = bread(dir->i_dev,block,bufsize))) return NULL; |
block | 95 | fs/isofs/namei.c | inode_number = (block << bufbits) + (offset & (bufsize - 1)); |
block | 105 | fs/isofs/namei.c | block = isofs_bmap(dir,f_pos>>bufbits); |
block | 106 | fs/isofs/namei.c | if (!block || !(bh = bread(dir->i_dev,block,bufsize))) |
block | 124 | fs/isofs/namei.c | block = isofs_bmap(dir,f_pos>>bufbits); |
block | 125 | fs/isofs/namei.c | if (!block || !(bh = bread(dir->i_dev,block,bufsize))) { |
block | 56 | fs/isofs/rock.c | int block, offset, offset1; \ |
block | 59 | fs/isofs/rock.c | block = cont_extent; \ |
block | 63 | fs/isofs/rock.c | block <<= 1; \ |
block | 64 | fs/isofs/rock.c | if (offset >= 1024) block++; \ |
block | 67 | fs/isofs/rock.c | bh = bread(DEV->i_dev, block++, ISOFS_BUFFER_SIZE(DEV)); \ |
block | 74 | fs/isofs/rock.c | bh = bread(DEV->i_dev, block, ISOFS_BUFFER_SIZE(DEV)); \ |
block | 394 | fs/isofs/rock.c | int block; |
block | 406 | fs/isofs/rock.c | block = inode->i_ino >> bufbits; |
block | 407 | fs/isofs/rock.c | if (!(bh=bread(inode->i_dev,block, bufsize))) { |
block | 420 | fs/isofs/rock.c | if (!(bh = bread(inode->i_dev,++block, bufsize))) { |
block | 68 | fs/minix/bitmap.c | void minix_free_block(struct super_block * sb, int block) |
block | 77 | fs/minix/bitmap.c | if (block < sb->u.minix_sb.s_firstdatazone || |
block | 78 | fs/minix/bitmap.c | block >= sb->u.minix_sb.s_nzones) { |
block | 82 | fs/minix/bitmap.c | bh = get_hash_table(sb->s_dev,block,BLOCK_SIZE); |
block | 86 | fs/minix/bitmap.c | zone = block - sb->u.minix_sb.s_firstdatazone + 1; |
block | 95 | fs/minix/bitmap.c | printk("free_block (%04x:%d): bit already cleared\n",sb->s_dev,block); |
block | 69 | fs/minix/file.c | int block, blocks, offset; |
block | 95 | fs/minix/file.c | block = offset >> BLOCK_SIZE_BITS; |
block | 103 | fs/minix/file.c | if (block + blocks > size) |
block | 104 | fs/minix/file.c | blocks = size - block; |
block | 122 | fs/minix/file.c | *bhb = minix_getblk(inode, block++, 0); |
block | 27 | fs/minix/fsync.c | static int sync_block (struct inode * inode, unsigned short * block, int wait) |
block | 32 | fs/minix/fsync.c | if (!*block) |
block | 34 | fs/minix/fsync.c | tmp = *block; |
block | 35 | fs/minix/fsync.c | bh = get_hash_table(inode->i_dev, *block, blocksize); |
block | 38 | fs/minix/fsync.c | if (*block != tmp) { |
block | 120 | fs/minix/inode.c | int i,dev=s->s_dev,block; |
block | 163 | fs/minix/inode.c | block=2; |
block | 165 | fs/minix/inode.c | if ((s->u.minix_sb.s_imap[i]=bread(dev,block,BLOCK_SIZE)) != NULL) |
block | 166 | fs/minix/inode.c | block++; |
block | 170 | fs/minix/inode.c | if ((s->u.minix_sb.s_zmap[i]=bread(dev,block,BLOCK_SIZE)) != NULL) |
block | 171 | fs/minix/inode.c | block++; |
block | 174 | fs/minix/inode.c | if (block != 2+s->u.minix_sb.s_imap_blocks+s->u.minix_sb.s_zmap_blocks) { |
block | 243 | fs/minix/inode.c | int minix_bmap(struct inode * inode,int block) |
block | 247 | fs/minix/inode.c | if (block<0) { |
block | 251 | fs/minix/inode.c | if (block >= 7+512+512*512) { |
block | 255 | fs/minix/inode.c | if (block < 7) |
block | 256 | fs/minix/inode.c | return inode_bmap(inode,block); |
block | 257 | fs/minix/inode.c | block -= 7; |
block | 258 | fs/minix/inode.c | if (block < 512) { |
block | 262 | fs/minix/inode.c | return block_bmap(bread(inode->i_dev,i,BLOCK_SIZE),block); |
block | 264 | fs/minix/inode.c | block -= 512; |
block | 268 | fs/minix/inode.c | i = block_bmap(bread(inode->i_dev,i,BLOCK_SIZE),block>>9); |
block | 271 | fs/minix/inode.c | return block_bmap(bread(inode->i_dev,i,BLOCK_SIZE),block & 511); |
block | 357 | fs/minix/inode.c | struct buffer_head * minix_getblk(struct inode * inode, int block, int create) |
block | 361 | fs/minix/inode.c | if (block<0) { |
block | 365 | fs/minix/inode.c | if (block >= 7+512+512*512) { |
block | 369 | fs/minix/inode.c | if (block < 7) |
block | 370 | fs/minix/inode.c | return inode_getblk(inode,block,create); |
block | 371 | fs/minix/inode.c | block -= 7; |
block | 372 | fs/minix/inode.c | if (block < 512) { |
block | 374 | fs/minix/inode.c | return block_getblk(inode, bh, block, create); |
block | 376 | fs/minix/inode.c | block -= 512; |
block | 378 | fs/minix/inode.c | bh = block_getblk(inode, bh, block>>9, create); |
block | 379 | fs/minix/inode.c | return block_getblk(inode, bh, block & 511, create); |
block | 382 | fs/minix/inode.c | struct buffer_head * minix_bread(struct inode * inode, int block, int create) |
block | 386 | fs/minix/inode.c | bh = minix_getblk(inode,block,create); |
block | 401 | fs/minix/inode.c | int block, ino; |
block | 411 | fs/minix/inode.c | block = 2 + inode->i_sb->u.minix_sb.s_imap_blocks + |
block | 414 | fs/minix/inode.c | if (!(bh=bread(inode->i_dev,block, BLOCK_SIZE))) { |
block | 430 | fs/minix/inode.c | else for (block = 0; block < 9; block++) |
block | 431 | fs/minix/inode.c | inode->u.minix_i.i_data[block] = raw_inode->i_zone[block]; |
block | 451 | fs/minix/inode.c | int ino, block; |
block | 460 | fs/minix/inode.c | block = 2 + inode->i_sb->u.minix_sb.s_imap_blocks + inode->i_sb->u.minix_sb.s_zmap_blocks + |
block | 462 | fs/minix/inode.c | if (!(bh=bread(inode->i_dev, block, BLOCK_SIZE))) { |
block | 477 | fs/minix/inode.c | else for (block = 0; block < 9; block++) |
block | 478 | fs/minix/inode.c | raw_inode->i_zone[block] = inode->u.minix_i.i_data[block]; |
block | 71 | fs/minix/namei.c | unsigned long block, offset; |
block | 87 | fs/minix/namei.c | block = offset = 0; |
block | 88 | fs/minix/namei.c | while (block*BLOCK_SIZE+offset < dir->i_size) { |
block | 90 | fs/minix/namei.c | bh = minix_bread(dir,block,0); |
block | 92 | fs/minix/namei.c | block++; |
block | 104 | fs/minix/namei.c | block++; |
block | 155 | fs/minix/namei.c | unsigned long block, offset; |
block | 175 | fs/minix/namei.c | block = offset = 0; |
block | 178 | fs/minix/namei.c | bh = minix_bread(dir,block,1); |
block | 184 | fs/minix/namei.c | if (block*bh->b_size + offset > dir->i_size) { |
block | 186 | fs/minix/namei.c | dir->i_size = block*bh->b_size + offset; |
block | 207 | fs/minix/namei.c | block++; |
block | 378 | fs/minix/namei.c | unsigned int block, offset; |
block | 386 | fs/minix/namei.c | block = 0; |
block | 402 | fs/minix/namei.c | while (block*BLOCK_SIZE+offset < inode->i_size) { |
block | 404 | fs/minix/namei.c | bh = minix_bread(inode,block,0); |
block | 406 | fs/minix/namei.c | block++; |
block | 421 | fs/minix/namei.c | block++; |
block | 287 | fs/msdos/inode.c | int msdos_bmap(struct inode *inode,int block) |
block | 296 | fs/msdos/inode.c | return (sb->dir_start >> 1)+block; |
block | 298 | fs/msdos/inode.c | cluster = (block*2)/sb->cluster_size; |
block | 299 | fs/msdos/inode.c | offset = (block*2) % sb->cluster_size; |
block | 42 | fs/sysv/balloc.c | void sysv_free_block(struct super_block * sb, unsigned int block) |
block | 51 | fs/sysv/balloc.c | if (block < sb->sv_firstdatazone || block >= sb->sv_nzones) { |
block | 69 | fs/sysv/balloc.c | bh = bread(sb->s_dev, (block >> sb->sv_block_size_ratio_bits) + sb->sv_block_base, BLOCK_SIZE); |
block | 71 | fs/sysv/balloc.c | bh = getblk(sb->s_dev, (block >> sb->sv_block_size_ratio_bits) + sb->sv_block_base, BLOCK_SIZE); |
block | 77 | fs/sysv/balloc.c | bh_data = bh->b_data + ((block & sb->sv_block_size_ratio_1) << sb->sv_block_size_bits); |
block | 109 | fs/sysv/balloc.c | bh = bread(sb->s_dev, (block >> sb->sv_block_size_ratio_bits) + sb->sv_block_base, BLOCK_SIZE); |
block | 111 | fs/sysv/balloc.c | bh = getblk(sb->s_dev, (block >> sb->sv_block_size_ratio_bits) + sb->sv_block_base, BLOCK_SIZE); |
block | 117 | fs/sysv/balloc.c | bh_data = bh->b_data + ((block & sb->sv_block_size_ratio_1) << sb->sv_block_size_bits); |
block | 127 | fs/sysv/balloc.c | bh = get_hash_table(sb->s_dev, (block >> sb->sv_block_size_ratio_bits) + sb->sv_block_base, BLOCK_SIZE); |
block | 134 | fs/sysv/balloc.c | block = to_coh_ulong(block); |
block | 135 | fs/sysv/balloc.c | sb->sv_sb_flc_blocks[(*sb->sv_sb_flc_count)++] = block; |
block | 148 | fs/sysv/balloc.c | unsigned int block; |
block | 161 | fs/sysv/balloc.c | block = sb->sv_sb_flc_blocks[(*sb->sv_sb_flc_count)-1]; |
block | 163 | fs/sysv/balloc.c | block = from_coh_ulong(block); |
block | 164 | fs/sysv/balloc.c | if (block == 0) { /* Applies only to Xenix FS, SystemV FS */ |
block | 169 | fs/sysv/balloc.c | if (block < sb->sv_firstdatazone || block >= sb->sv_nzones) { |
block | 170 | fs/sysv/balloc.c | printk("sysv_new_block: new block %d is not in data zone\n",block); |
block | 178 | fs/sysv/balloc.c | if (!(bh = sysv_bread(sb, sb->s_dev, block, &bh_data))) { |
block | 216 | fs/sysv/balloc.c | bh = bread(sb->s_dev, (block >> sb->sv_block_size_ratio_bits) + sb->sv_block_base, BLOCK_SIZE); |
block | 218 | fs/sysv/balloc.c | bh = getblk(sb->s_dev, (block >> sb->sv_block_size_ratio_bits) + sb->sv_block_base, BLOCK_SIZE); |
block | 224 | fs/sysv/balloc.c | bh_data = bh->b_data + ((block & sb->sv_block_size_ratio_1) << sb->sv_block_size_bits); |
block | 243 | fs/sysv/balloc.c | return block; |
block | 250 | fs/sysv/balloc.c | unsigned int block; |
block | 260 | fs/sysv/balloc.c | block = sb->sv_sb_flc_blocks[--i]; |
block | 262 | fs/sysv/balloc.c | block = from_coh_ulong(block); |
block | 263 | fs/sysv/balloc.c | if (block == 0) /* block 0 terminates list */ |
block | 274 | fs/sysv/balloc.c | if (block < sb->sv_firstdatazone || block >= sb->sv_nzones) { |
block | 275 | fs/sysv/balloc.c | printk("sysv_count_free_blocks: new block %d is not in data zone\n",block); |
block | 278 | fs/sysv/balloc.c | if (!(bh = sysv_bread(sb, sb->s_dev, block, &bh_data))) { |
block | 311 | fs/sysv/balloc.c | block = flc_blocks[--i]; |
block | 313 | fs/sysv/balloc.c | block = from_coh_ulong(block); |
block | 314 | fs/sysv/balloc.c | if (block == 0) /* block 0 terminates list */ |
block | 322 | fs/sysv/balloc.c | if (block == 0) /* Applies only to Xenix FS and SystemV FS */ |
block | 113 | fs/sysv/file.c | unsigned int block; |
block | 140 | fs/sysv/file.c | block = offset >> sb->sv_block_size_bits; |
block | 147 | fs/sysv/file.c | if (block + blocks > size) |
block | 148 | fs/sysv/file.c | blocks = size - block; |
block | 170 | fs/sysv/file.c | bhb->bh = sysv_getblk(inode, block++, 0, &bhb->bh_data); |
block | 32 | fs/sysv/fsync.c | unsigned long tmp, block; |
block | 35 | fs/sysv/fsync.c | block = tmp = *blockp; |
block | 37 | fs/sysv/fsync.c | block = from_coh_ulong(block); |
block | 38 | fs/sysv/fsync.c | if (!block) |
block | 41 | fs/sysv/fsync.c | bh = get_hash_table(inode->i_dev, (block >> sb->sv_block_size_ratio_bits) + sb->sv_block_base, BLOCK_SIZE); |
block | 66 | fs/sysv/fsync.c | unsigned long tmp, block; |
block | 69 | fs/sysv/fsync.c | block = tmp = *iblockp; |
block | 71 | fs/sysv/fsync.c | block = from_coh_ulong(block); |
block | 72 | fs/sysv/fsync.c | if (!block) |
block | 77 | fs/sysv/fsync.c | *bh = sysv_bread(inode->i_sb, inode->i_dev, block, bh_data); |
block | 93 | fs/sysv/ialloc.c | int i,j,ino,block; |
block | 111 | fs/sysv/ialloc.c | for (i = 0, ino = SYSV_ROOT_INO+1, block = sb->sv_firstinodezone, j = SYSV_ROOT_INO ; i < sb->sv_fic_size && block < sb->sv_firstdatazone ; block++, j = 0) { |
block | 112 | fs/sysv/ialloc.c | if (!(bh = sysv_bread(sb, sb->s_dev, block, &bh_data))) { |
block | 167 | fs/sysv/ialloc.c | int j,block,count; |
block | 178 | fs/sysv/ialloc.c | for (block = sb->sv_firstinodezone, j = SYSV_ROOT_INO ; block < sb->sv_firstdatazone ; block++, j = 0) { |
block | 179 | fs/sysv/ialloc.c | if (!(bh = sysv_bread(sb, sb->s_dev, block, &bh_data))) { |
block | 414 | fs/sysv/inode.c | unsigned int block = block_nr; |
block | 420 | fs/sysv/inode.c | if (block < 10) |
block | 421 | fs/sysv/inode.c | return inode_bmap(sb,inode,block); |
block | 422 | fs/sysv/inode.c | block -= 10; |
block | 424 | fs/sysv/inode.c | if (block < IND_PER_BLOCK) { |
block | 429 | fs/sysv/inode.c | return block_bmap(sb,bh,block,convert); |
block | 431 | fs/sysv/inode.c | block -= IND_PER_BLOCK; |
block | 432 | fs/sysv/inode.c | if (block < IND_PER_BLOCK*IND_PER_BLOCK) { |
block | 437 | fs/sysv/inode.c | i = block_bmap(sb,bh,block/IND_PER_BLOCK,convert); |
block | 441 | fs/sysv/inode.c | return block_bmap(sb,bh,block%IND_PER_BLOCK,convert); |
block | 443 | fs/sysv/inode.c | block -= IND_PER_BLOCK*IND_PER_BLOCK; |
block | 444 | fs/sysv/inode.c | if (block < IND_PER_BLOCK*IND_PER_BLOCK*IND_PER_BLOCK) { |
block | 449 | fs/sysv/inode.c | i = block_bmap(sb,bh,block/(IND_PER_BLOCK*IND_PER_BLOCK),convert); |
block | 453 | fs/sysv/inode.c | i = block_bmap(sb,bh,(block/IND_PER_BLOCK)%IND_PER_BLOCK,convert); |
block | 457 | fs/sysv/inode.c | return block_bmap(sb,bh,block%IND_PER_BLOCK,convert); |
block | 459 | fs/sysv/inode.c | if ((int)block<0) { |
block | 514 | fs/sysv/inode.c | unsigned long tmp, block; |
block | 531 | fs/sysv/inode.c | block = tmp = *p; |
block | 533 | fs/sysv/inode.c | block = from_coh_ulong(block); |
block | 535 | fs/sysv/inode.c | result = getblk(bh->b_dev, (block >> sb->sv_block_size_ratio_bits) + sb->sv_block_base, BLOCK_SIZE); |
block | 538 | fs/sysv/inode.c | *start = result->b_data + ((block & sb->sv_block_size_ratio_1) << sb->sv_block_size_bits); |
block | 548 | fs/sysv/inode.c | block = sysv_new_block(sb); |
block | 549 | fs/sysv/inode.c | if (!block) { |
block | 553 | fs/sysv/inode.c | result = getblk(bh->b_dev, (block >> sb->sv_block_size_ratio_bits) + sb->sv_block_base, BLOCK_SIZE); |
block | 555 | fs/sysv/inode.c | sysv_free_block(sb,block); |
block | 559 | fs/sysv/inode.c | *p = (sb->sv_convert ? to_coh_ulong(block) : block); |
block | 562 | fs/sysv/inode.c | *start = result->b_data + ((block & sb->sv_block_size_ratio_1) << sb->sv_block_size_bits); |
block | 566 | fs/sysv/inode.c | struct buffer_head * sysv_getblk(struct inode * inode, unsigned int block, |
block | 572 | fs/sysv/inode.c | if (block < 10) |
block | 573 | fs/sysv/inode.c | return inode_getblk(inode,block,create,start); |
block | 574 | fs/sysv/inode.c | block -= 10; |
block | 575 | fs/sysv/inode.c | if (block < sb->sv_ind_per_block) { |
block | 577 | fs/sysv/inode.c | return block_getblk(inode, bh, block, create, start); |
block | 579 | fs/sysv/inode.c | block -= sb->sv_ind_per_block; |
block | 580 | fs/sysv/inode.c | if (block < sb->sv_ind_per_block_2) { |
block | 582 | fs/sysv/inode.c | bh = block_getblk(inode, bh, block >> sb->sv_ind_per_block_bits, create, start); |
block | 583 | fs/sysv/inode.c | return block_getblk(inode, bh, block & sb->sv_ind_per_block_1, create, start); |
block | 585 | fs/sysv/inode.c | block -= sb->sv_ind_per_block_2; |
block | 586 | fs/sysv/inode.c | if (block < sb->sv_ind_per_block_3) { |
block | 588 | fs/sysv/inode.c | bh = block_getblk(inode, bh, block >> sb->sv_ind_per_block_2_bits, create, start); |
block | 589 | fs/sysv/inode.c | bh = block_getblk(inode, bh, (block >> sb->sv_ind_per_block_bits) & sb->sv_ind_per_block_1, create, start); |
block | 590 | fs/sysv/inode.c | return block_getblk(inode, bh, block & sb->sv_ind_per_block_1, create, start); |
block | 592 | fs/sysv/inode.c | if ((int)block<0) { |
block | 600 | fs/sysv/inode.c | struct buffer_head * sysv_file_bread(struct inode * inode, int block, int create, char * *start) |
block | 604 | fs/sysv/inode.c | bh = sysv_getblk(inode,block,create,start); |
block | 646 | fs/sysv/inode.c | unsigned int block, ino; |
block | 657 | fs/sysv/inode.c | block = sb->sv_firstinodezone + ((ino-1) >> sb->sv_inodes_per_block_bits); |
block | 658 | fs/sysv/inode.c | if (!(bh=sysv_bread(sb,inode->i_dev,block,&bh_data))) { |
block | 688 | fs/sysv/inode.c | for (block = 0; block < 10+1+1+1; block++) |
block | 689 | fs/sysv/inode.c | inode->u.sysv_i.i_data[block] = |
block | 690 | fs/sysv/inode.c | coh_read3byte(&raw_inode->i_a.i_addb[3*block]); |
block | 692 | fs/sysv/inode.c | for (block = 0; block < 10+1+1+1; block++) |
block | 693 | fs/sysv/inode.c | inode->u.sysv_i.i_data[block] = |
block | 694 | fs/sysv/inode.c | read3byte(&raw_inode->i_a.i_addb[3*block]); |
block | 731 | fs/sysv/inode.c | unsigned int ino, block; |
block | 741 | fs/sysv/inode.c | block = sb->sv_firstinodezone + ((ino-1) >> sb->sv_inodes_per_block_bits); |
block | 742 | fs/sysv/inode.c | if (!(bh = sysv_bread(sb,inode->i_dev,block,&bh_data))) { |
block | 770 | fs/sysv/inode.c | for (block = 0; block < 10+1+1+1; block++) |
block | 771 | fs/sysv/inode.c | coh_write3byte(&raw_inode->i_a.i_addb[3*block],inode->u.sysv_i.i_data[block]); |
block | 773 | fs/sysv/inode.c | for (block = 0; block < 10+1+1+1; block++) |
block | 774 | fs/sysv/inode.c | write3byte(&raw_inode->i_a.i_addb[3*block],inode->u.sysv_i.i_data[block]); |
block | 69 | fs/sysv/namei.c | unsigned long pos, block, offset; /* pos = block * block_size + offset */ |
block | 83 | fs/sysv/namei.c | pos = block = offset = 0; |
block | 86 | fs/sysv/namei.c | bh = sysv_file_bread(dir,block,0,&bh_data); |
block | 88 | fs/sysv/namei.c | /* offset = 0; */ block++; |
block | 102 | fs/sysv/namei.c | offset = 0; block++; |
block | 154 | fs/sysv/namei.c | unsigned long pos, block, offset; /* pos = block * block_size + offset */ |
block | 172 | fs/sysv/namei.c | pos = block = offset = 0; |
block | 175 | fs/sysv/namei.c | bh = sysv_file_bread(dir,block,1,&bh_data); |
block | 204 | fs/sysv/namei.c | offset = 0; block++; |
block | 381 | fs/sysv/namei.c | unsigned long pos, block, offset; /* pos = block * block_size + offset */ |
block | 388 | fs/sysv/namei.c | block = 0; |
block | 407 | fs/sysv/namei.c | bh = sysv_file_bread(inode,block,0,&bh_data); |
block | 409 | fs/sysv/namei.c | /* offset = 0; */ block++; |
block | 425 | fs/sysv/namei.c | offset = 0; block++; |
block | 36 | fs/sysv/truncate.c | unsigned long block; |
block | 40 | fs/sysv/truncate.c | block = *p; |
block | 41 | fs/sysv/truncate.c | if (!block) |
block | 45 | fs/sysv/truncate.c | sysv_free_block(inode->i_sb,block); |
block | 56 | fs/sysv/truncate.c | unsigned long tmp, block, indblock; |
block | 64 | fs/sysv/truncate.c | block = tmp = *p; |
block | 66 | fs/sysv/truncate.c | block = from_coh_ulong(block); |
block | 67 | fs/sysv/truncate.c | if (!block) |
block | 69 | fs/sysv/truncate.c | bh = sysv_bread(sb,inode->i_dev,block,&bh_data); |
block | 99 | fs/sysv/truncate.c | sysv_free_block(sb,block); |
block | 111 | fs/sysv/truncate.c | unsigned long tmp, block, dindblock; |
block | 120 | fs/sysv/truncate.c | block = tmp = *p; |
block | 122 | fs/sysv/truncate.c | block = from_coh_ulong(block); |
block | 123 | fs/sysv/truncate.c | if (!block) |
block | 125 | fs/sysv/truncate.c | bh = sysv_bread(sb,inode->i_dev,block,&bh_data); |
block | 156 | fs/sysv/truncate.c | sysv_free_block(sb,block); |
block | 168 | fs/sysv/truncate.c | unsigned long block, tindblock; |
block | 177 | fs/sysv/truncate.c | block = *p; |
block | 178 | fs/sysv/truncate.c | if (!block) |
block | 180 | fs/sysv/truncate.c | bh = sysv_bread(sb,inode->i_dev,block,&bh_data); |
block | 181 | fs/sysv/truncate.c | if (block != *p) { |
block | 205 | fs/sysv/truncate.c | if (block != *p) { |
block | 211 | fs/sysv/truncate.c | sysv_free_block(sb,block); |
block | 260 | fs/sysv/truncate.c | unsigned long block; |
block | 268 | fs/sysv/truncate.c | block = *p; |
block | 269 | fs/sysv/truncate.c | if (!block) |
block | 271 | fs/sysv/truncate.c | bh = get_hash_table(inode->i_dev,block+sb->sv_block_base,BLOCK_SIZE); |
block | 276 | fs/sysv/truncate.c | if ((bh && bh->b_count != 1) || (block != *p)) { |
block | 284 | fs/sysv/truncate.c | sysv_free_block(sb,block); |
block | 298 | fs/sysv/truncate.c | unsigned long tmp, block; |
block | 325 | fs/sysv/truncate.c | block = tmp = *ind; |
block | 327 | fs/sysv/truncate.c | block = from_coh_ulong(block); |
block | 328 | fs/sysv/truncate.c | if (!block) |
block | 330 | fs/sysv/truncate.c | bh = get_hash_table(inode->i_dev,block+sb->sv_block_base,BLOCK_SIZE); |
block | 343 | fs/sysv/truncate.c | sysv_free_block(sb,block); |
block | 367 | fs/sysv/truncate.c | unsigned long tmp, block; |
block | 392 | fs/sysv/truncate.c | block = tmp = *ind; |
block | 394 | fs/sysv/truncate.c | block = from_coh_ulong(block); |
block | 395 | fs/sysv/truncate.c | if (!block) |
block | 421 | fs/sysv/truncate.c | unsigned long tmp, block; |
block | 446 | fs/sysv/truncate.c | block = tmp = *ind; |
block | 448 | fs/sysv/truncate.c | block = from_coh_ulong(block); |
block | 449 | fs/sysv/truncate.c | if (!block) |
block | 29 | fs/xiafs/fsync.c | static int sync_block (struct inode * inode, unsigned long * block, int wait) |
block | 34 | fs/xiafs/fsync.c | if (!*block) |
block | 36 | fs/xiafs/fsync.c | tmp = *block; |
block | 37 | fs/xiafs/fsync.c | bh = get_hash_table(inode->i_dev, *block, blocksize); |
block | 40 | fs/xiafs/fsync.c | if (*block != tmp) { |
block | 393 | include/linux/ext2_fs.h | extern int ext2_getcluster (struct inode * inode, long block); |
block | 81 | include/linux/ext_fs.h | extern void ext_free_block(struct super_block * sb, int block); |
block | 406 | include/linux/fs.h | extern int bmap(struct inode * inode,int block); |
block | 422 | include/linux/fs.h | extern struct buffer_head * get_hash_table(dev_t dev, int block, int size); |
block | 423 | include/linux/fs.h | extern struct buffer_head * getblk(dev_t dev, int block, int size); |
block | 429 | include/linux/fs.h | extern struct buffer_head * bread(dev_t dev, int block, int size); |
block | 431 | include/linux/fs.h | extern struct buffer_head * breada(dev_t dev,int block, int size, |
block | 173 | include/linux/iso_fs.h | extern int isofs_free_block(int dev, int block); |
block | 211 | include/linux/iso_fs.h | extern struct buffer_head * leak_check_bread(int dev, int block, int size); |
block | 95 | include/linux/minix_fs.h | extern void minix_free_block(struct super_block * sb, int block); |
block | 174 | include/linux/msdos_fs.h | extern int msdos_bmap(struct inode *inode,int block); |
block | 352 | include/linux/sysv_fs.h | sysv_bread (struct super_block *sb, int dev, unsigned int block, char* * data) |
block | 356 | include/linux/sysv_fs.h | if (!(bh = bread (dev, (block >> sb->sv_block_size_ratio_bits) + sb->sv_block_base, BLOCK_SIZE))) |
block | 358 | include/linux/sysv_fs.h | *data = bh->b_data + ((block & sb->sv_block_size_ratio_1) << sb->sv_block_size_bits); |
block | 408 | include/linux/sysv_fs.h | extern void sysv_free_block(struct super_block * sb, unsigned int block); |
block | 118 | include/linux/xd.h | static int xd_readwrite (u_char operation,u_char drive,char *buffer,u_int block,u_int count); |
block | 85 | include/linux/xia_fs.h | extern void xiafs_free_zone(struct super_block * sb, int block); |
block | 1164 | mm/memory.c | unsigned int block; |
block | 1171 | mm/memory.c | block = address - area->vm_start + area->vm_offset; |
block | 1172 | mm/memory.c | block >>= inode->i_sb->s_blocksize_bits; |
block | 1186 | mm/memory.c | for (i=0, j=0; i< PAGE_SIZE ; j++, block++, i += inode->i_sb->s_blocksize) |
block | 1187 | mm/memory.c | nr[j] = bmap(inode,block); |
block | 87 | mm/swap.c | unsigned int block; |
block | 90 | mm/swap.c | block = offset << (12 - p->swap_file->i_sb->s_blocksize_bits); |
block | 93 | mm/swap.c | if (!(zones[i] = bmap(p->swap_file,block++))) { |