tag | line | file | source code |
block | 71 | drivers/block/blk.h | #define SUBSECTOR(block) (CURRENT->current_nr_sectors > 0) |
block | 847 | drivers/block/cdu31a.c | int block; |
block | 876 | drivers/block/cdu31a.c | block = CURRENT->sector; |
block | 891 | drivers/block/cdu31a.c | if ((block / 4) >= sony_toc->lead_out_start_lba) |
block | 896 | drivers/block/cdu31a.c | if (((block + nsect) / 4) >= sony_toc->lead_out_start_lba) |
block | 908 | drivers/block/cdu31a.c | if ((block < sony_first_block) || (block > sony_last_block)) |
block | 910 | drivers/block/cdu31a.c | sony_first_block = (block / 4) * 4; |
block | 911 | drivers/block/cdu31a.c | log_to_msf(block/4, params); |
block | 917 | drivers/block/cdu31a.c | if (((block / 4) + sony_buffer_sectors) >= sony_toc->lead_out_start_lba) |
block | 920 | drivers/block/cdu31a.c | read_size = sony_toc->lead_out_start_lba - (block / 4); |
block | 957 | drivers/block/cdu31a.c | copyoff = (block - sony_first_block) * 512; |
block | 960 | drivers/block/cdu31a.c | block += 1; |
block | 996 | drivers/block/floppy.c | unsigned int block; |
block | 1044 | drivers/block/floppy.c | block = CURRENT->sector; |
block | 1045 | drivers/block/floppy.c | if (block+2 > floppy->size) { |
block | 1049 | drivers/block/floppy.c | sector = block % floppy->sect; |
block | 1050 | drivers/block/floppy.c | block /= floppy->sect; |
block | 1051 | drivers/block/floppy.c | head = block % floppy->head; |
block | 1052 | drivers/block/floppy.c | track = block / floppy->head; |
block | 451 | drivers/block/hd.c | unsigned int block,dev; |
block | 464 | drivers/block/hd.c | block = CURRENT->sector; |
block | 466 | drivers/block/hd.c | if (dev >= (NR_HD<<6) || block >= hd[dev].nr_sects) { |
block | 469 | drivers/block/hd.c | block, hd[dev].nr_sects); |
block | 474 | drivers/block/hd.c | block += hd[dev].start_sect; |
block | 476 | drivers/block/hd.c | sec = block % hd_info[dev].sect + 1; |
block | 477 | drivers/block/hd.c | track = block / hd_info[dev].sect; |
block | 537 | drivers/block/mcd.c | unsigned int block,dev; |
block | 544 | drivers/block/mcd.c | block = CURRENT->sector; |
block | 649 | drivers/block/mcd.c | long block; |
block | 674 | drivers/block/mcd.c | block = CURRENT -> sector / 4; |
block | 675 | 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,block+2,-1); |
block | 157 | drivers/block/ramdisk.c | bh = breada(ROOT_DEV, block, block+1, block+2, -1); |
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 | 177 | drivers/block/xd.c | u_int block,count,retry; |
block | 185 | drivers/block/xd.c | block = CURRENT->sector + xd[MINOR(CURRENT->dev)].start_sect; |
block | 191 | drivers/block/xd.c | code = xd_readwrite(CURRENT->cmd,CURRENT_DEV,CURRENT->buffer,block,count); |
block | 278 | drivers/block/xd.c | static int xd_readwrite (u_char operation,u_char drive,char *buffer,u_int block,u_int count) |
block | 285 | 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 | 292 | drivers/block/xd.c | track = block / xd_info[drive].sectors; |
block | 295 | drivers/block/xd.c | sector = block % xd_info[drive].sectors; |
block | 318 | drivers/block/xd.c | count -= temp, buffer += temp * 0x200, block += temp; |
block | 52 | drivers/scsi/scsi_debug.c | if ((bh->b_blocknr << 1) + start != block) \ |
block | 53 | drivers/scsi/scsi_debug.c | { printk("Wrong bh block# %d %d ",bh->b_blocknr, block); \ |
block | 73 | drivers/scsi/scsi_debug.c | if (SCpnt->request.sector + start != block) panic("Wrong block."); \ |
block | 77 | drivers/scsi/scsi_debug.c | if ((SCpnt->request.bh->b_blocknr << 1) + start != block) \ |
block | 78 | drivers/scsi/scsi_debug.c | { printk("Wrong bh block# %d %d ",SCpnt->request.bh->b_blocknr, block); \ |
block | 141 | drivers/scsi/scsi_debug.c | int block, start; |
block | 218 | drivers/scsi/scsi_debug.c | block = cmd[5] + (cmd[4] << 8) + (cmd[3] << 16) + (cmd[2] << 24); |
block | 220 | drivers/scsi/scsi_debug.c | block = cmd[3] + (cmd[2] << 8) + ((cmd[1] & 0x1f) << 16); |
block | 237 | drivers/scsi/scsi_debug.c | if(block == 0 && target == 0) { |
block | 252 | drivers/scsi/scsi_debug.c | if (SCpnt->use_sg) printk("Block %x (%d %d)\n",block, SCpnt->request.nr_sectors, |
block | 256 | drivers/scsi/scsi_debug.c | if(block == 0xfff0) { |
block | 276 | drivers/scsi/scsi_debug.c | memcpy(buff+60, &block, sizeof(block)); |
block | 281 | drivers/scsi/scsi_debug.c | block += bufflen >> 9; |
block | 300 | drivers/scsi/scsi_debug.c | block = cmd[5] + (cmd[4] << 8) + (cmd[3] << 16) + (cmd[2] << 24); |
block | 302 | drivers/scsi/scsi_debug.c | block = cmd[3] + (cmd[2] << 8) + ((cmd[1] & 0x1f) << 16); |
block | 312 | drivers/scsi/scsi_debug.c | if (block != *((unsigned long *) (buff+60))) { |
block | 313 | drivers/scsi/scsi_debug.c | printk("%x %x :",block, *((unsigned long *) (buff+60))); |
block | 382 | drivers/scsi/sd.c | int dev, block, this_count; |
block | 394 | drivers/scsi/sd.c | block = SCpnt->request.sector; |
block | 398 | drivers/scsi/sd.c | printk("Doing sd request, dev = %d, block = %d\n", dev, block); |
block | 401 | drivers/scsi/sd.c | if (dev >= (NR_SD << 4) || block + SCpnt->request.nr_sectors > sd[dev].nr_sects) |
block | 407 | drivers/scsi/sd.c | block += sd[dev].start_sect; |
block | 421 | drivers/scsi/sd.c | printk("sd%d : real dev = /dev/sd%d, block = %d\n", MINOR(SCpnt->request.dev), dev, block); |
block | 565 | drivers/scsi/sd.c | if(block & 1) panic("sd.c:Bad block number requested"); |
block | 567 | drivers/scsi/sd.c | block = block >> 1; |
block | 572 | drivers/scsi/sd.c | block = block << 1; |
block | 576 | drivers/scsi/sd.c | if (((this_count > 0xff) || (block > 0x1fffff)) && rscsi_disks[dev].ten) |
block | 582 | drivers/scsi/sd.c | cmd[2] = (unsigned char) (block >> 24) & 0xff; |
block | 583 | drivers/scsi/sd.c | cmd[3] = (unsigned char) (block >> 16) & 0xff; |
block | 584 | drivers/scsi/sd.c | cmd[4] = (unsigned char) (block >> 8) & 0xff; |
block | 585 | drivers/scsi/sd.c | cmd[5] = (unsigned char) block & 0xff; |
block | 595 | drivers/scsi/sd.c | cmd[1] |= (unsigned char) ((block >> 16) & 0x1f); |
block | 596 | drivers/scsi/sd.c | cmd[2] = (unsigned char) ((block >> 8) & 0xff); |
block | 597 | drivers/scsi/sd.c | cmd[3] = (unsigned char) block & 0xff; |
block | 343 | drivers/scsi/sr.c | unsigned int dev, block, realcount; |
block | 356 | drivers/scsi/sr.c | block = SCpnt->request.sector; |
block | 536 | drivers/scsi/sr.c | start = block % 4; |
block | 558 | drivers/scsi/sr.c | block = block >> 2; /* These are the sectors that the cdrom uses */ |
block | 560 | drivers/scsi/sr.c | block = block & 0xfffffffc; |
block | 566 | drivers/scsi/sr.c | if (((realcount > 0xff) || (block > 0x1fffff)) && scsi_CDs[dev].ten) |
block | 575 | drivers/scsi/sr.c | cmd[2] = (unsigned char) (block >> 24) & 0xff; |
block | 576 | drivers/scsi/sr.c | cmd[3] = (unsigned char) (block >> 16) & 0xff; |
block | 577 | drivers/scsi/sr.c | cmd[4] = (unsigned char) (block >> 8) & 0xff; |
block | 578 | drivers/scsi/sr.c | cmd[5] = (unsigned char) block & 0xff; |
block | 591 | drivers/scsi/sr.c | cmd[1] |= (unsigned char) ((block >> 16) & 0x1f); |
block | 592 | drivers/scsi/sr.c | cmd[2] = (unsigned char) ((block >> 8) & 0xff); |
block | 593 | drivers/scsi/sr.c | cmd[3] = (unsigned char) block & 0xff; |
block | 601 | drivers/scsi/sr.c | printk("ReadCD: %d %d %d %d\n",block, realcount, buffer, this_count); |
block | 77 | drivers/sound/opl3.c | static void freq_to_fnum (int freq, int *block, int *fnum); |
block | 432 | drivers/sound/opl3.c | int block, fnum, freq, voice_mode; |
block | 567 | drivers/sound/opl3.c | freq_to_fnum (freq, &block, &fnum); |
block | 574 | drivers/sound/opl3.c | data = 0x20 | ((block & 0x7) << 2) | ((fnum >> 8) & 0x3); |
block | 584 | drivers/sound/opl3.c | freq_to_fnum (int freq, int *block, int *fnum) |
block | 618 | drivers/sound/opl3.c | *block = octave; |
block | 827 | drivers/sound/opl3.c | int block, fnum, freq; |
block | 850 | drivers/sound/opl3.c | freq_to_fnum (freq, &block, &fnum); |
block | 855 | drivers/sound/opl3.c | data = 0x20 | ((block & 0x7) << 2) | ((fnum >> 8) & 0x3); /* KEYON|OCTAVE|MS bits |
block | 20 | fs/block_dev.c | int block; |
block | 41 | fs/block_dev.c | block = filp->f_pos >> blocksize_bits; |
block | 49 | fs/block_dev.c | if (block >= size) |
block | 55 | fs/block_dev.c | bh = getblk(dev, block, blocksize); |
block | 57 | fs/block_dev.c | bh = breada(dev,block,block+1,block+2,-1); |
block | 58 | fs/block_dev.c | block++; |
block | 80 | fs/block_dev.c | unsigned int block; |
block | 121 | fs/block_dev.c | block = offset >> blocksize_bits; |
block | 128 | fs/block_dev.c | if (block + blocks > size) |
block | 129 | fs/block_dev.c | blocks = size - block; |
block | 147 | fs/block_dev.c | *bhb = getblk(dev, block++, blocksize); |
block | 279 | fs/buffer.c | #define _hashfn(dev,block) (((unsigned)(dev^block))%NR_HASH) |
block | 280 | fs/buffer.c | #define hash(dev,block) hash_table[_hashfn(dev,block)] |
block | 357 | fs/buffer.c | static struct buffer_head * find_buffer(dev_t dev, int block, int size) |
block | 361 | fs/buffer.c | for (tmp = hash(dev,block) ; tmp != NULL ; tmp = tmp->b_next) |
block | 362 | fs/buffer.c | if (tmp->b_dev==dev && tmp->b_blocknr==block) |
block | 380 | fs/buffer.c | struct buffer_head * get_hash_table(dev_t dev, int block, int size) |
block | 385 | fs/buffer.c | if (!(bh=find_buffer(dev,block,size))) |
block | 389 | fs/buffer.c | if (bh->b_dev == dev && bh->b_blocknr == block && bh->b_size == size) |
block | 447 | fs/buffer.c | struct buffer_head * getblk(dev_t dev, int block, int size) |
block | 454 | fs/buffer.c | bh = get_hash_table(dev, block, size); |
block | 507 | fs/buffer.c | if (find_buffer(dev,block,size)) |
block | 517 | fs/buffer.c | bh->b_blocknr=block; |
block | 540 | fs/buffer.c | struct buffer_head * bread(dev_t dev, int block, int size) |
block | 544 | fs/buffer.c | if (!(bh = getblk(dev, block, size))) { |
block | 707 | fs/buffer.c | int block; |
block | 719 | fs/buffer.c | block = *++b; |
block | 720 | fs/buffer.c | if (!block) |
block | 722 | fs/buffer.c | first = get_hash_table(dev, block, size); |
block | 748 | fs/buffer.c | int block; |
block | 755 | fs/buffer.c | block = *(p++); |
block | 756 | fs/buffer.c | if (!block) |
block | 758 | fs/buffer.c | tmp = get_hash_table(dev, block, size); |
block | 766 | fs/buffer.c | block = 0; |
block | 768 | fs/buffer.c | arr[block++] = bh; |
block | 784 | fs/buffer.c | read_buffers(arr,block); |
block | 785 | fs/buffer.c | while (block-- > 0) |
block | 786 | fs/buffer.c | brelse(arr[block]); |
block | 812 | fs/buffer.c | int block; |
block | 814 | fs/buffer.c | block = b[0]; |
block | 815 | fs/buffer.c | if (!block) |
block | 817 | fs/buffer.c | bh = get_hash_table(dev, block, size); |
block | 75 | fs/ext/file.c | int block, blocks, offset; |
block | 101 | fs/ext/file.c | block = offset >> BLOCK_SIZE_BITS; |
block | 108 | fs/ext/file.c | if (block + blocks > size) |
block | 109 | fs/ext/file.c | blocks = size - block; |
block | 127 | 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 | 31 | fs/ext/fsync.c | static int sync_block (struct inode * inode, unsigned long * block, int wait) |
block | 36 | fs/ext/fsync.c | if (!*block) |
block | 38 | fs/ext/fsync.c | tmp = *block; |
block | 39 | fs/ext/fsync.c | bh = get_hash_table(inode->i_dev, *block, blocksize); |
block | 42 | 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 | 228 | fs/ext2/balloc.c | void ext2_free_block (struct super_block * sb, unsigned long block) |
block | 246 | fs/ext2/balloc.c | if (block < es->s_first_data_block || block >= es->s_blocks_count) { |
block | 252 | fs/ext2/balloc.c | ext2_debug ("freeing block %lu\n", block); |
block | 255 | fs/ext2/balloc.c | bh = get_hash_table (sb->s_dev, block, sb->s_blocksize); |
block | 260 | fs/ext2/balloc.c | block_group = (block - es->s_first_data_block) / |
block | 262 | fs/ext2/balloc.c | bit = (block - es->s_first_data_block) % EXT2_BLOCKS_PER_GROUP(sb); |
block | 271 | fs/ext2/balloc.c | "bit already cleared for block %lu", block); |
block | 77 | fs/ext2/file.c | int block, blocks, offset; |
block | 107 | fs/ext2/file.c | block = offset >> EXT2_BLOCK_SIZE_BITS(sb); |
block | 115 | fs/ext2/file.c | if (block + blocks > size) |
block | 116 | fs/ext2/file.c | blocks = size - block; |
block | 134 | fs/ext2/file.c | *bhb = ext2_getblk (inode, block++, 0, &err); |
block | 28 | fs/ext2/fsync.c | static int sync_block (struct inode * inode, unsigned long * block, int wait) |
block | 33 | fs/ext2/fsync.c | if (!*block) |
block | 35 | fs/ext2/fsync.c | tmp = *block; |
block | 36 | fs/ext2/fsync.c | bh = get_hash_table (inode->i_dev, *block, blocksize); |
block | 39 | fs/ext2/fsync.c | if (*block != tmp) { |
block | 51 | fs/ext2/inode.c | int ext2_bmap (struct inode * inode, int block) |
block | 56 | fs/ext2/inode.c | if (block < 0) { |
block | 60 | fs/ext2/inode.c | if (block >= EXT2_NDIR_BLOCKS + addr_per_block + |
block | 66 | fs/ext2/inode.c | if (block < EXT2_NDIR_BLOCKS) |
block | 67 | fs/ext2/inode.c | return inode_bmap (inode, block); |
block | 68 | fs/ext2/inode.c | block -= EXT2_NDIR_BLOCKS; |
block | 69 | fs/ext2/inode.c | if (block < addr_per_block) { |
block | 74 | fs/ext2/inode.c | inode->i_sb->s_blocksize), block); |
block | 76 | fs/ext2/inode.c | block -= addr_per_block; |
block | 77 | fs/ext2/inode.c | if (block < addr_per_block * addr_per_block) { |
block | 83 | fs/ext2/inode.c | block / addr_per_block); |
block | 88 | fs/ext2/inode.c | block & (addr_per_block - 1)); |
block | 90 | fs/ext2/inode.c | block -= addr_per_block * addr_per_block; |
block | 95 | fs/ext2/inode.c | block / (addr_per_block * addr_per_block)); |
block | 99 | fs/ext2/inode.c | (block / addr_per_block) & (addr_per_block - 1)); |
block | 103 | fs/ext2/inode.c | block & (addr_per_block - 1)); |
block | 248 | fs/ext2/inode.c | struct buffer_head * ext2_getblk (struct inode * inode, long block, |
block | 256 | fs/ext2/inode.c | if (block < 0) { |
block | 260 | fs/ext2/inode.c | if (block > EXT2_NDIR_BLOCKS + addr_per_block + |
block | 270 | fs/ext2/inode.c | ext2_debug ("block %lu, next %lu, goal %lu.\n", block, |
block | 274 | fs/ext2/inode.c | if (block == inode->u.ext2_i.i_next_alloc_block + 1) { |
block | 280 | fs/ext2/inode.c | b = block; |
block | 281 | fs/ext2/inode.c | if (block < EXT2_NDIR_BLOCKS) |
block | 282 | fs/ext2/inode.c | return inode_getblk (inode, block, create, b, err); |
block | 283 | fs/ext2/inode.c | block -= EXT2_NDIR_BLOCKS; |
block | 284 | fs/ext2/inode.c | if (block < addr_per_block) { |
block | 286 | fs/ext2/inode.c | return block_getblk (inode, bh, block, create, |
block | 289 | fs/ext2/inode.c | block -= addr_per_block; |
block | 290 | fs/ext2/inode.c | if (block < addr_per_block * addr_per_block) { |
block | 292 | fs/ext2/inode.c | bh = block_getblk (inode, bh, block / addr_per_block, create, |
block | 294 | fs/ext2/inode.c | return block_getblk (inode, bh, block & (addr_per_block - 1), |
block | 297 | fs/ext2/inode.c | block -= addr_per_block * addr_per_block; |
block | 299 | fs/ext2/inode.c | bh = block_getblk (inode, bh, block/(addr_per_block * addr_per_block), |
block | 301 | fs/ext2/inode.c | bh = block_getblk (inode, bh, (block/addr_per_block) & (addr_per_block - 1), |
block | 303 | fs/ext2/inode.c | return block_getblk (inode, bh, block & (addr_per_block - 1), create, |
block | 307 | fs/ext2/inode.c | struct buffer_head * ext2_bread (struct inode * inode, int block, |
block | 312 | fs/ext2/inode.c | bh = ext2_getblk (inode, block, create, err); |
block | 331 | fs/ext2/inode.c | unsigned long block; |
block | 352 | fs/ext2/inode.c | block = gdp[desc].bg_inode_table + |
block | 355 | fs/ext2/inode.c | if (!(bh = bread (inode->i_dev, block, inode->i_sb->s_blocksize))) |
block | 358 | fs/ext2/inode.c | "inode=%lu, block=%lu", inode->i_ino, block); |
block | 384 | fs/ext2/inode.c | else for (block = 0; block < EXT2_N_BLOCKS; block++) |
block | 385 | fs/ext2/inode.c | inode->u.ext2_i.i_data[block] = raw_inode->i_block[block]; |
block | 414 | fs/ext2/inode.c | unsigned long block; |
block | 434 | fs/ext2/inode.c | block = gdp[desc].bg_inode_table + |
block | 437 | fs/ext2/inode.c | if (!(bh = bread (inode->i_dev, block, inode->i_sb->s_blocksize))) |
block | 440 | fs/ext2/inode.c | "inode=%lu, block=%lu", inode->i_ino, block); |
block | 462 | fs/ext2/inode.c | else for (block = 0; block < EXT2_N_BLOCKS; block++) |
block | 463 | fs/ext2/inode.c | raw_inode->i_block[block] = inode->u.ext2_i.i_data[block]; |
block | 867 | fs/hpfs/hpfs_fs.c | char *block; |
block | 898 | fs/hpfs/hpfs_fs.c | block = map_sector(inode->i_dev, hpfs_bmap(inode, q), &bh); |
block | 899 | fs/hpfs/hpfs_fs.c | if (!block) |
block | 907 | fs/hpfs/hpfs_fs.c | inode->i_hpfs_conv = choose_conv(block + r, n); |
block | 914 | fs/hpfs/hpfs_fs.c | memcpy_tofs(buf, block + r, n); |
block | 921 | fs/hpfs/hpfs_fs.c | n0 = convcpy_tofs(buf, block + r, n); |
block | 258 | fs/inode.c | int bmap(struct inode * inode, int block) |
block | 261 | 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 | 69 | fs/isofs/dir.c | unsigned int block,offset,i, j; |
block | 83 | fs/isofs/dir.c | block = isofs_bmap(inode,filp->f_pos>>bufbits); |
block | 84 | fs/isofs/dir.c | if (!block || !(bh = bread(inode->i_dev,block,bufsize))) |
block | 90 | fs/isofs/dir.c | block, offset, filp->f_pos); |
block | 93 | fs/isofs/dir.c | inode_number = (block << bufbits) + (offset & (bufsize - 1)); |
block | 104 | fs/isofs/dir.c | block = isofs_bmap(inode,(filp->f_pos)>>bufbits); |
block | 105 | fs/isofs/dir.c | if (!block |
block | 106 | fs/isofs/dir.c | || !(bh = bread(inode->i_dev,block,bufsize))) |
block | 127 | fs/isofs/dir.c | block = isofs_bmap(inode,(filp->f_pos)>> bufbits); |
block | 128 | fs/isofs/dir.c | if (!block |
block | 129 | fs/isofs/dir.c | || !(bh = bread(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 | 167 | fs/isofs/file.c | *bhb = getblk(inode->i_dev,isofs_bmap(inode, block++), ISOFS_BUFFER_SIZE(inode)); |
block | 190 | fs/isofs/file.c | if (block >= max_block) break; |
block | 193 | fs/isofs/file.c | *bhb = getblk(inode->i_dev,isofs_bmap(inode, block++), ISOFS_BUFFER_SIZE(inode)); |
block | 312 | fs/isofs/inode.c | int isofs_bmap(struct inode * inode,int block) |
block | 315 | fs/isofs/inode.c | if (block<0) { |
block | 319 | fs/isofs/inode.c | return inode->u.isofs_i.i_first_extent + block; |
block | 330 | fs/isofs/inode.c | int block; |
block | 333 | fs/isofs/inode.c | block = inode->i_ino >> ISOFS_BUFFER_BITS(inode); |
block | 334 | fs/isofs/inode.c | if (!(bh=bread(inode->i_dev,block, bufsize))) |
block | 346 | fs/isofs/inode.c | if (!(bh = bread(inode->i_dev,++block, bufsize))) |
block | 426 | fs/isofs/inode.c | printk("Get inode %d: %d %d: %d\n",inode->i_ino, block, |
block | 507 | fs/isofs/inode.c | unsigned int block,offset; |
block | 516 | fs/isofs/inode.c | block = extent << (ISOFS_BLOCK_BITS - bufbits); |
block | 517 | fs/isofs/inode.c | if (!(bh = bread(parent->i_dev, block, bufsize))) return -1; |
block | 554 | fs/isofs/inode.c | block = parent_dir << (ISOFS_BLOCK_BITS - bufbits); |
block | 555 | fs/isofs/inode.c | if (!block || !(bh = bread(parent->i_dev,block, bufsize))) |
block | 561 | fs/isofs/inode.c | inode_number = (block << bufbits)+(offset & (bufsize - 1)); |
block | 571 | fs/isofs/inode.c | block++; |
block | 572 | fs/isofs/inode.c | if(block & 1) return -1; |
block | 573 | fs/isofs/inode.c | if (!block |
block | 574 | fs/isofs/inode.c | || !(bh = bread(parent->i_dev,block, bufsize))) |
block | 588 | fs/isofs/inode.c | if((block & 1) != 0) return -1; |
block | 595 | fs/isofs/inode.c | block++; |
block | 596 | fs/isofs/inode.c | if (!(bh = bread(parent->i_dev,block,bufsize))) { |
block | 647 | fs/isofs/inode.c | struct buffer_head * leak_check_bread(int dev, int block, int size){ |
block | 649 | 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; \ |
block | 59 | fs/isofs/rock.c | block = cont_extent; \ |
block | 62 | fs/isofs/rock.c | block <<= 1; \ |
block | 63 | fs/isofs/rock.c | if (offset >= 1024) block++; \ |
block | 66 | fs/isofs/rock.c | bh = bread(DEV->i_dev, block, ISOFS_BUFFER_SIZE(DEV)); \ |
block | 378 | fs/isofs/rock.c | int block; |
block | 390 | fs/isofs/rock.c | block = inode->i_ino >> bufbits; |
block | 391 | fs/isofs/rock.c | if (!(bh=bread(inode->i_dev,block, bufsize))) |
block | 402 | 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 | 102 | fs/minix/file.c | if (block + blocks > size) |
block | 103 | fs/minix/file.c | blocks = size - block; |
block | 121 | fs/minix/file.c | *bhb = minix_getblk(inode, block++, 0); |
block | 28 | fs/minix/fsync.c | static int sync_block (struct inode * inode, unsigned short * block, int wait) |
block | 33 | fs/minix/fsync.c | if (!*block) |
block | 35 | fs/minix/fsync.c | tmp = *block; |
block | 36 | fs/minix/fsync.c | bh = get_hash_table(inode->i_dev, *block, blocksize); |
block | 39 | fs/minix/fsync.c | if (*block != tmp) { |
block | 58 | fs/minix/inode.c | int i,dev=s->s_dev,block; |
block | 99 | fs/minix/inode.c | block=2; |
block | 101 | fs/minix/inode.c | if ((s->u.minix_sb.s_imap[i]=bread(dev,block,BLOCK_SIZE)) != NULL) |
block | 102 | fs/minix/inode.c | block++; |
block | 106 | fs/minix/inode.c | if ((s->u.minix_sb.s_zmap[i]=bread(dev,block,BLOCK_SIZE)) != NULL) |
block | 107 | fs/minix/inode.c | block++; |
block | 110 | fs/minix/inode.c | if (block != 2+s->u.minix_sb.s_imap_blocks+s->u.minix_sb.s_zmap_blocks) { |
block | 166 | fs/minix/inode.c | int minix_bmap(struct inode * inode,int block) |
block | 170 | fs/minix/inode.c | if (block<0) { |
block | 174 | fs/minix/inode.c | if (block >= 7+512+512*512) { |
block | 178 | fs/minix/inode.c | if (block < 7) |
block | 179 | fs/minix/inode.c | return inode_bmap(inode,block); |
block | 180 | fs/minix/inode.c | block -= 7; |
block | 181 | fs/minix/inode.c | if (block < 512) { |
block | 185 | fs/minix/inode.c | return block_bmap(bread(inode->i_dev,i,BLOCK_SIZE),block); |
block | 187 | fs/minix/inode.c | block -= 512; |
block | 191 | fs/minix/inode.c | i = block_bmap(bread(inode->i_dev,i,BLOCK_SIZE),block>>9); |
block | 194 | fs/minix/inode.c | return block_bmap(bread(inode->i_dev,i,BLOCK_SIZE),block & 511); |
block | 280 | fs/minix/inode.c | struct buffer_head * minix_getblk(struct inode * inode, int block, int create) |
block | 284 | fs/minix/inode.c | if (block<0) { |
block | 288 | fs/minix/inode.c | if (block >= 7+512+512*512) { |
block | 292 | fs/minix/inode.c | if (block < 7) |
block | 293 | fs/minix/inode.c | return inode_getblk(inode,block,create); |
block | 294 | fs/minix/inode.c | block -= 7; |
block | 295 | fs/minix/inode.c | if (block < 512) { |
block | 297 | fs/minix/inode.c | return block_getblk(inode, bh, block, create); |
block | 299 | fs/minix/inode.c | block -= 512; |
block | 301 | fs/minix/inode.c | bh = block_getblk(inode, bh, block>>9, create); |
block | 302 | fs/minix/inode.c | return block_getblk(inode, bh, block & 511, create); |
block | 305 | fs/minix/inode.c | struct buffer_head * minix_bread(struct inode * inode, int block, int create) |
block | 309 | fs/minix/inode.c | bh = minix_getblk(inode,block,create); |
block | 324 | fs/minix/inode.c | int block, ino; |
block | 334 | fs/minix/inode.c | block = 2 + inode->i_sb->u.minix_sb.s_imap_blocks + |
block | 337 | fs/minix/inode.c | if (!(bh=bread(inode->i_dev,block, BLOCK_SIZE))) { |
block | 353 | fs/minix/inode.c | else for (block = 0; block < 9; block++) |
block | 354 | fs/minix/inode.c | inode->u.minix_i.i_data[block] = raw_inode->i_zone[block]; |
block | 374 | fs/minix/inode.c | int ino, block; |
block | 383 | 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 | 385 | fs/minix/inode.c | if (!(bh=bread(inode->i_dev, block, BLOCK_SIZE))) { |
block | 400 | fs/minix/inode.c | else for (block = 0; block < 9; block++) |
block | 401 | 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 | 30 | fs/xiafs/fsync.c | static int sync_block (struct inode * inode, unsigned long * block, int wait) |
block | 35 | fs/xiafs/fsync.c | if (!*block) |
block | 37 | fs/xiafs/fsync.c | tmp = *block; |
block | 38 | fs/xiafs/fsync.c | bh = get_hash_table(inode->i_dev, *block, blocksize); |
block | 41 | fs/xiafs/fsync.c | if (*block != tmp) { |
block | 81 | include/linux/ext_fs.h | extern void ext_free_block(struct super_block * sb, int block); |
block | 361 | include/linux/fs.h | extern int bmap(struct inode * inode,int block); |
block | 377 | include/linux/fs.h | extern struct buffer_head * get_hash_table(dev_t dev, int block, int size); |
block | 378 | include/linux/fs.h | extern struct buffer_head * getblk(dev_t dev, int block, int size); |
block | 384 | include/linux/fs.h | extern struct buffer_head * bread(dev_t dev, int block, int size); |
block | 386 | include/linux/fs.h | extern struct buffer_head * breada(dev_t dev,int block,...); |
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 | 92 | 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 | 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 | 1153 | mm/memory.c | unsigned int block; |
block | 1160 | mm/memory.c | block = address - area->vm_start + area->vm_offset; |
block | 1161 | mm/memory.c | block >>= inode->i_sb->s_blocksize_bits; |
block | 1175 | mm/memory.c | for (i=0, j=0; i< PAGE_SIZE ; j++, block++, i += inode->i_sb->s_blocksize) |
block | 1176 | mm/memory.c | nr[j] = bmap(inode,block); |
block | 83 | mm/swap.c | unsigned int block; |
block | 86 | mm/swap.c | block = offset << (12 - p->swap_file->i_sb->s_blocksize_bits); |
block | 89 | mm/swap.c | if (!(zones[i] = bmap(p->swap_file,block++))) { |