tag | line | file | source code |
block | 38 | drivers/block/blk.h | #define SUBSECTOR(block) (CURRENT->current_nr_sectors > 0) |
block | 1134 | drivers/block/cdu31a.c | int block; |
block | 1181 | drivers/block/cdu31a.c | block = CURRENT->sector; |
block | 1196 | drivers/block/cdu31a.c | if ((block / 4) >= sony_toc->lead_out_start_lba) |
block | 1201 | drivers/block/cdu31a.c | if (((block + nsect) / 4) >= sony_toc->lead_out_start_lba) |
block | 1213 | drivers/block/cdu31a.c | if ((block < sony_first_block) || (block > sony_last_block)) |
block | 1215 | drivers/block/cdu31a.c | sony_first_block = (block / 4) * 4; |
block | 1216 | drivers/block/cdu31a.c | log_to_msf(block/4, params); |
block | 1222 | drivers/block/cdu31a.c | if (((block / 4) + sony_buffer_sectors) >= sony_toc->lead_out_start_lba) |
block | 1224 | drivers/block/cdu31a.c | read_size = sony_toc->lead_out_start_lba - (block / 4); |
block | 1265 | drivers/block/cdu31a.c | copyoff = (block - sony_first_block) * 512; |
block | 1268 | drivers/block/cdu31a.c | block += 1; |
block | 1673 | drivers/block/floppy.c | int block; |
block | 1686 | drivers/block/floppy.c | block = current_count_sectors + CURRENT->sector; |
block | 1687 | drivers/block/floppy.c | if (block > DRS->maxblock) |
block | 1688 | drivers/block/floppy.c | DRS->maxblock=block; |
block | 1689 | drivers/block/floppy.c | if ( block > floppy->sect) |
block | 669 | drivers/block/hd.c | unsigned int block,dev; |
block | 682 | drivers/block/hd.c | block = CURRENT->sector; |
block | 684 | drivers/block/hd.c | if (dev >= (NR_HD<<6) || block >= hd[dev].nr_sects) { |
block | 687 | drivers/block/hd.c | block, hd[dev].nr_sects); |
block | 692 | drivers/block/hd.c | block += hd[dev].start_sect; |
block | 694 | drivers/block/hd.c | sec = block % hd_info[dev].sect + 1; |
block | 695 | drivers/block/hd.c | track = block / hd_info[dev].sect; |
block | 101 | drivers/block/ramdisk.c | int block, tries; |
block | 115 | drivers/block/ramdisk.c | block = tries; |
block | 116 | drivers/block/ramdisk.c | bh = breada(ROOT_DEV,block+1,BLOCK_SIZE, 0, PAGE_SIZE); |
block | 144 | drivers/block/ramdisk.c | bh = breada(ROOT_DEV, block, BLOCK_SIZE, 0, PAGE_SIZE); |
block | 146 | drivers/block/ramdisk.c | bh = bread(ROOT_DEV, block, BLOCK_SIZE); |
block | 149 | drivers/block/ramdisk.c | block); |
block | 156 | drivers/block/ramdisk.c | block++; |
block | 1700 | drivers/block/sbpcd.c | int block, checksum; |
block | 1705 | drivers/block/sbpcd.c | for (block=CD_BLOCK_OFFSET+1;block<CD_BLOCK_OFFSET+200;block++) |
block | 1713 | drivers/block/sbpcd.c | drvcmd[1]=(block>>16)&0xFF; |
block | 1714 | drivers/block/sbpcd.c | drvcmd[2]=(block>>8)&0xFF; |
block | 1715 | drivers/block/sbpcd.c | drvcmd[3]=block&0xFF; |
block | 1724 | drivers/block/sbpcd.c | drvcmd[2]=(block>>16)&0xFF; |
block | 1725 | drivers/block/sbpcd.c | drvcmd[3]=(block>>8)&0xFF; |
block | 1726 | drivers/block/sbpcd.c | drvcmd[4]=block&0xFF; |
block | 2660 | drivers/block/sbpcd.c | int i=0, j=0, frame, block; |
block | 2684 | drivers/block/sbpcd.c | block=msf2lba(&read_audio.addr.msf.minute); |
block | 2686 | drivers/block/sbpcd.c | block=read_audio.addr.lba; |
block | 2689 | drivers/block/sbpcd.c | block, blk2msf(block))); |
block | 2720 | drivers/block/sbpcd.c | drvcmd[1]=(block>>16)&0x000000ff; |
block | 2721 | drivers/block/sbpcd.c | drvcmd[2]=(block>>8)&0x000000ff; |
block | 2722 | drivers/block/sbpcd.c | drvcmd[3]=block&0x000000ff; |
block | 2730 | drivers/block/sbpcd.c | lba2msf(block,&drvcmd[1]); /* msf-bin format required */ |
block | 2890 | drivers/block/sbpcd.c | u_int block; |
block | 2911 | drivers/block/sbpcd.c | block = CURRENT->sector; /* always numbered as 512-byte-pieces */ |
block | 2920 | drivers/block/sbpcd.c | DPRINTF((DBG_BSZ,"SBPCD: read sector %d (%d sectors)\n", block, nsect)); |
block | 2921 | drivers/block/sbpcd.c | DPRINTF((DBG_MUL,"SBPCD: read LBA %d\n", block/4)); |
block | 2988 | drivers/block/sbpcd.c | int block; |
block | 2991 | drivers/block/sbpcd.c | block=CURRENT->sector/4; |
block | 2996 | drivers/block/sbpcd.c | DPRINTF((DBG_MUL,"SBPCD: read MSF %08X\n", blk2msf(block))); |
block | 3000 | drivers/block/sbpcd.c | blk2msf(DriveStruct[d].lba_multi+block), |
block | 3001 | drivers/block/sbpcd.c | blk2msf(block))); |
block | 3002 | drivers/block/sbpcd.c | block=DriveStruct[d].lba_multi+block; |
block | 3005 | drivers/block/sbpcd.c | if ( (block==16) && (DriveStruct[d].f_multisession) && (multisession_valid) ) |
block | 3009 | drivers/block/sbpcd.c | blk2msf(block))); |
block | 3010 | drivers/block/sbpcd.c | block=DriveStruct[d].lba_multi+16; |
block | 3015 | drivers/block/sbpcd.c | if (block+SBP_BUFFER_FRAMES <= DriveStruct[d].CDsize_frm) |
block | 3019 | drivers/block/sbpcd.c | DriveStruct[d].sbp_read_frames=DriveStruct[d].CDsize_frm-block; |
block | 3024 | drivers/block/sbpcd.c | block, DriveStruct[d].CDsize_frm)); |
block | 3042 | drivers/block/sbpcd.c | drvcmd[1]=(block>>16)&0x000000ff; |
block | 3043 | drivers/block/sbpcd.c | drvcmd[2]=(block>>8)&0x000000ff; |
block | 3044 | drivers/block/sbpcd.c | drvcmd[3]=block&0x000000ff; |
block | 3055 | drivers/block/sbpcd.c | lba2msf(block,&drvcmd[1]); /* msf-bcd format required */ |
block | 3062 | drivers/block/sbpcd.c | drvcmd[1]=(block>>16)&0x000000ff; |
block | 3063 | drivers/block/sbpcd.c | drvcmd[2]=(block>>8)&0x000000ff; |
block | 3064 | drivers/block/sbpcd.c | drvcmd[3]=block&0x000000ff; |
block | 3074 | drivers/block/sbpcd.c | lba2msf(block,&drvcmd[1]); /* msf-bin format required */ |
block | 211 | drivers/block/xd.c | u_int block,count,retry; |
block | 219 | drivers/block/xd.c | block = CURRENT->sector + xd[MINOR(CURRENT->dev)].start_sect; |
block | 226 | drivers/block/xd.c | code = xd_readwrite(CURRENT->cmd,CURRENT_DEV,CURRENT->buffer,block,count); |
block | 323 | drivers/block/xd.c | static int xd_readwrite (u_char operation,u_char drive,char *buffer,u_int block,u_int count) |
block | 330 | 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 | 337 | drivers/block/xd.c | track = block / xd_info[drive].sectors; |
block | 340 | drivers/block/xd.c | sector = block % xd_info[drive].sectors; |
block | 367 | drivers/block/xd.c | count -= temp, buffer += temp * 0x200, block += temp; |
block | 70 | drivers/scsi/scsi_debug.c | if ((bh->b_blocknr << 1) + start != block) \ |
block | 71 | drivers/scsi/scsi_debug.c | { printk("Wrong bh block# %d %d ",bh->b_blocknr, block); \ |
block | 91 | drivers/scsi/scsi_debug.c | if (SCpnt->request.sector + start != block) panic("Wrong block."); \ |
block | 95 | drivers/scsi/scsi_debug.c | if ((SCpnt->request.bh->b_blocknr << 1) + start != block) \ |
block | 96 | drivers/scsi/scsi_debug.c | { printk("Wrong bh block# %d %d ",SCpnt->request.bh->b_blocknr, block); \ |
block | 159 | drivers/scsi/scsi_debug.c | int block, start; |
block | 237 | drivers/scsi/scsi_debug.c | block = cmd[5] + (cmd[4] << 8) + (cmd[3] << 16) + (cmd[2] << 24); |
block | 239 | drivers/scsi/scsi_debug.c | block = cmd[3] + (cmd[2] << 8) + ((cmd[1] & 0x1f) << 16); |
block | 273 | drivers/scsi/scsi_debug.c | if(block == 0 && target == 0) { |
block | 288 | drivers/scsi/scsi_debug.c | if (SCpnt->use_sg) printk("Block %x (%d %d)\n",block, SCpnt->request.nr_sectors, |
block | 294 | drivers/scsi/scsi_debug.c | if(block == 0xfff0) { |
block | 316 | drivers/scsi/scsi_debug.c | memcpy(buff+60, &block, sizeof(block)); |
block | 324 | drivers/scsi/scsi_debug.c | block += bufflen >> 9; |
block | 348 | drivers/scsi/scsi_debug.c | block = cmd[5] + (cmd[4] << 8) + (cmd[3] << 16) + (cmd[2] << 24); |
block | 350 | drivers/scsi/scsi_debug.c | block = cmd[3] + (cmd[2] << 8) + ((cmd[1] & 0x1f) << 16); |
block | 360 | drivers/scsi/scsi_debug.c | if (block != *((unsigned long *) (buff+60))) { |
block | 361 | drivers/scsi/scsi_debug.c | printk("%x %x :",block, *((unsigned long *) (buff+60))); |
block | 400 | drivers/scsi/sd.c | int dev, block, this_count; |
block | 415 | drivers/scsi/sd.c | block = SCpnt->request.sector; |
block | 419 | drivers/scsi/sd.c | printk("Doing sd request, dev = %d, block = %d\n", dev, block); |
block | 424 | drivers/scsi/sd.c | block + SCpnt->request.nr_sectors > sd[dev].nr_sects) |
block | 430 | drivers/scsi/sd.c | block += sd[dev].start_sect; |
block | 444 | drivers/scsi/sd.c | printk("sd%c : real dev = /dev/sd%c, block = %d\n", 'a' + MINOR(SCpnt->request.dev), dev, block); |
block | 700 | drivers/scsi/sd.c | if(block & 1) panic("sd.c:Bad block number requested"); |
block | 702 | drivers/scsi/sd.c | block = block >> 1; |
block | 707 | drivers/scsi/sd.c | block = block << 1; |
block | 711 | drivers/scsi/sd.c | if (((this_count > 0xff) || (block > 0x1fffff)) && rscsi_disks[dev].ten) |
block | 717 | drivers/scsi/sd.c | cmd[2] = (unsigned char) (block >> 24) & 0xff; |
block | 718 | drivers/scsi/sd.c | cmd[3] = (unsigned char) (block >> 16) & 0xff; |
block | 719 | drivers/scsi/sd.c | cmd[4] = (unsigned char) (block >> 8) & 0xff; |
block | 720 | drivers/scsi/sd.c | cmd[5] = (unsigned char) block & 0xff; |
block | 730 | drivers/scsi/sd.c | cmd[1] |= (unsigned char) ((block >> 16) & 0x1f); |
block | 731 | drivers/scsi/sd.c | cmd[2] = (unsigned char) ((block >> 8) & 0xff); |
block | 732 | drivers/scsi/sd.c | cmd[3] = (unsigned char) block & 0xff; |
block | 365 | drivers/scsi/sr.c | unsigned int dev, block, realcount; |
block | 378 | drivers/scsi/sr.c | block = SCpnt->request.sector; |
block | 558 | drivers/scsi/sr.c | start = block % 4; |
block | 580 | drivers/scsi/sr.c | block = block >> 2; /* These are the sectors that the cdrom uses */ |
block | 582 | drivers/scsi/sr.c | block = block & 0xfffffffc; |
block | 588 | drivers/scsi/sr.c | if (((realcount > 0xff) || (block > 0x1fffff)) && scsi_CDs[dev].ten) |
block | 597 | drivers/scsi/sr.c | cmd[2] = (unsigned char) (block >> 24) & 0xff; |
block | 598 | drivers/scsi/sr.c | cmd[3] = (unsigned char) (block >> 16) & 0xff; |
block | 599 | drivers/scsi/sr.c | cmd[4] = (unsigned char) (block >> 8) & 0xff; |
block | 600 | drivers/scsi/sr.c | cmd[5] = (unsigned char) block & 0xff; |
block | 613 | drivers/scsi/sr.c | cmd[1] |= (unsigned char) ((block >> 16) & 0x1f); |
block | 614 | drivers/scsi/sr.c | cmd[2] = (unsigned char) ((block >> 8) & 0xff); |
block | 615 | drivers/scsi/sr.c | cmd[3] = (unsigned char) block & 0xff; |
block | 623 | drivers/scsi/sr.c | printk("ReadCD: %d %d %d %d\n",block, realcount, buffer, this_count); |
block | 87 | drivers/sound/opl3.c | static void freq_to_fnum (int freq, int *block, int *fnum); |
block | 543 | drivers/sound/opl3.c | int block, fnum, freq, voice_mode; |
block | 720 | drivers/sound/opl3.c | freq_to_fnum (freq, &block, &fnum); |
block | 731 | drivers/sound/opl3.c | data = 0x20 | ((block & 0x7) << 2) | ((fnum >> 8) & 0x3); |
block | 741 | drivers/sound/opl3.c | freq_to_fnum (int freq, int *block, int *fnum) |
block | 779 | drivers/sound/opl3.c | *block = octave; |
block | 1005 | drivers/sound/opl3.c | int block, fnum, freq; |
block | 1024 | drivers/sound/opl3.c | freq_to_fnum (freq, &block, &fnum); |
block | 1031 | drivers/sound/opl3.c | data = 0x20 | ((block & 0x7) << 2) | ((fnum >> 8) & 0x3); /* |
block | 100 | drivers/sound/pss.c | static int pss_download_boot (unsigned char *block, int size); |
block | 643 | drivers/sound/pss.c | pss_download_boot (unsigned char *block, int size) |
block | 658 | drivers/sound/pss.c | pss_outpw (pss_base + PSS_DATA, *block++); |
block | 688 | drivers/sound/pss.c | pss_outpw (pss_base + PSS_DATA, *block++); |
block | 23 | fs/block_dev.c | int block, blocks; |
block | 52 | fs/block_dev.c | block = filp->f_pos >> blocksize_bits; |
block | 60 | fs/block_dev.c | if (block >= size) |
block | 68 | fs/block_dev.c | bh = getblk(dev, block, blocksize); |
block | 70 | fs/block_dev.c | bh = breada(dev,block,block+1,block+2,-1); |
block | 73 | fs/block_dev.c | for(i=0; i<blocks_per_cluster; i++) cluster_list[i] = block+i; |
block | 74 | fs/block_dev.c | if((block % blocks_per_cluster) == 0) |
block | 76 | fs/block_dev.c | bh = getblk(dev, block, blocksize); |
block | 83 | fs/block_dev.c | bh = bread(dev,block,blocksize); |
block | 87 | fs/block_dev.c | if (block + blocks > size) blocks = size - block; |
block | 89 | fs/block_dev.c | blocks -= (block % blocks_per_cluster); |
block | 93 | fs/block_dev.c | if(((i+block) % blocks_per_cluster) == 0) { |
block | 94 | fs/block_dev.c | for(j=0; j<blocks_per_cluster; j++) cluster_list[j] = block+i+j; |
block | 97 | fs/block_dev.c | bhlist[i] = getblk (dev, block+i, blocksize); |
block | 109 | fs/block_dev.c | block++; |
block | 156 | fs/block_dev.c | unsigned int block; |
block | 200 | fs/block_dev.c | block = offset >> blocksize_bits; |
block | 208 | fs/block_dev.c | blocks -= (block % blocks_per_cluster); |
block | 213 | fs/block_dev.c | if (block + blocks > size) |
block | 214 | fs/block_dev.c | blocks = size - block; |
block | 232 | fs/block_dev.c | if((block % blocks_per_cluster) == 0) { |
block | 233 | fs/block_dev.c | for(i=0; i<blocks_per_cluster; i++) cluster_list[i] = block+i; |
block | 237 | fs/block_dev.c | *bhb = getblk(dev, block++, blocksize); |
block | 270 | fs/buffer.c | #define _hashfn(dev,block) (((unsigned)(dev^block))%nr_hash) |
block | 271 | fs/buffer.c | #define hash(dev,block) hash_table[_hashfn(dev,block)] |
block | 407 | fs/buffer.c | static struct buffer_head * find_buffer(dev_t dev, int block, int size) |
block | 411 | fs/buffer.c | for (tmp = hash(dev,block) ; tmp != NULL ; tmp = tmp->b_next) |
block | 412 | fs/buffer.c | if (tmp->b_dev==dev && tmp->b_blocknr==block) |
block | 430 | fs/buffer.c | struct buffer_head * get_hash_table(dev_t dev, int block, int size) |
block | 435 | fs/buffer.c | if (!(bh=find_buffer(dev,block,size))) |
block | 439 | fs/buffer.c | if (bh->b_dev == dev && bh->b_blocknr == block && bh->b_size == size) |
block | 683 | fs/buffer.c | struct buffer_head * getblk(dev_t dev, int block, int size) |
block | 695 | fs/buffer.c | bh = get_hash_table(dev, block, size); |
block | 705 | fs/buffer.c | if (find_buffer(dev,block,size)) |
block | 720 | fs/buffer.c | bh->b_blocknr=block; |
block | 795 | fs/buffer.c | struct buffer_head * bread(dev_t dev, int block, int size) |
block | 799 | fs/buffer.c | if (!(bh = getblk(dev, block, size))) { |
block | 822 | fs/buffer.c | struct buffer_head * breada(dev_t dev, int block, int bufsize, |
block | 834 | fs/buffer.c | if (block < 0 || !(bh = getblk(dev,block,bufsize))) |
block | 852 | fs/buffer.c | bh = getblk(dev,block+i,bufsize); |
block | 984 | fs/buffer.c | int block; |
block | 996 | fs/buffer.c | block = *++b; |
block | 997 | fs/buffer.c | if (!block) |
block | 999 | fs/buffer.c | first = get_hash_table(dev, block, size); |
block | 1026 | fs/buffer.c | int block; |
block | 1034 | fs/buffer.c | block = *(p++); |
block | 1035 | fs/buffer.c | if (!block) |
block | 1037 | fs/buffer.c | if (find_buffer(dev, block, size)) |
block | 1042 | fs/buffer.c | block = 0; |
block | 1044 | fs/buffer.c | arr[block++] = bh; |
block | 1065 | fs/buffer.c | read_buffers(arr,block); |
block | 1066 | fs/buffer.c | while (block-- > 0) |
block | 1067 | fs/buffer.c | brelse(arr[block]); |
block | 1093 | fs/buffer.c | int block; |
block | 1095 | fs/buffer.c | block = b[0]; |
block | 1096 | fs/buffer.c | if (!block) |
block | 1098 | fs/buffer.c | bh = get_hash_table(dev, block, size); |
block | 1498 | fs/buffer.c | static unsigned long try_to_generate_cluster(dev_t dev, int block, int size) |
block | 1514 | fs/buffer.c | nblock = block; |
block | 1531 | 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 | 167 | fs/ext2/balloc.c | void ext2_free_blocks (struct super_block * sb, unsigned long block, |
block | 185 | fs/ext2/balloc.c | if (block < es->s_first_data_block || |
block | 186 | fs/ext2/balloc.c | (block + count) > es->s_blocks_count) { |
block | 189 | fs/ext2/balloc.c | "block = %lu, count = %lu", block, count); |
block | 194 | fs/ext2/balloc.c | ext2_debug ("freeing block %lu\n", block); |
block | 196 | fs/ext2/balloc.c | block_group = (block - es->s_first_data_block) / |
block | 198 | fs/ext2/balloc.c | bit = (block - es->s_first_data_block) % EXT2_BLOCKS_PER_GROUP(sb); |
block | 203 | fs/ext2/balloc.c | block, count); |
block | 209 | fs/ext2/balloc.c | (in_range (gdp->bg_block_bitmap, block, count) || |
block | 210 | fs/ext2/balloc.c | in_range (gdp->bg_inode_bitmap, block, count) || |
block | 211 | fs/ext2/balloc.c | in_range (block, gdp->bg_inode_table, |
block | 213 | fs/ext2/balloc.c | in_range (block + count - 1, gdp->bg_inode_table, |
block | 218 | fs/ext2/balloc.c | block, count); |
block | 224 | fs/ext2/balloc.c | block); |
block | 508 | fs/ext2/balloc.c | static inline int block_in_use (unsigned long block, |
block | 512 | fs/ext2/balloc.c | return test_bit ((block - sb->u.ext2_sb.s_es->s_first_data_block) % |
block | 83 | fs/ext2/file.c | int block, blocks, offset; |
block | 114 | fs/ext2/file.c | block = offset >> EXT2_BLOCK_SIZE_BITS(sb); |
block | 122 | fs/ext2/file.c | if (block + blocks > size) |
block | 123 | fs/ext2/file.c | blocks = size - block; |
block | 146 | fs/ext2/file.c | if(!clusterblocks) clusterblocks = ext2_getcluster(inode, block); |
block | 150 | 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 | 126 | fs/ext2/inode.c | int ext2_bmap (struct inode * inode, int block) |
block | 131 | fs/ext2/inode.c | if (block < 0) { |
block | 135 | fs/ext2/inode.c | if (block >= EXT2_NDIR_BLOCKS + addr_per_block + |
block | 141 | fs/ext2/inode.c | if (block < EXT2_NDIR_BLOCKS) |
block | 142 | fs/ext2/inode.c | return inode_bmap (inode, block); |
block | 143 | fs/ext2/inode.c | block -= EXT2_NDIR_BLOCKS; |
block | 144 | fs/ext2/inode.c | if (block < addr_per_block) { |
block | 149 | fs/ext2/inode.c | inode->i_sb->s_blocksize), block); |
block | 151 | fs/ext2/inode.c | block -= addr_per_block; |
block | 152 | fs/ext2/inode.c | if (block < addr_per_block * addr_per_block) { |
block | 158 | fs/ext2/inode.c | block / addr_per_block); |
block | 163 | fs/ext2/inode.c | block & (addr_per_block - 1)); |
block | 165 | fs/ext2/inode.c | block -= addr_per_block * addr_per_block; |
block | 170 | fs/ext2/inode.c | block / (addr_per_block * addr_per_block)); |
block | 174 | fs/ext2/inode.c | (block / addr_per_block) & (addr_per_block - 1)); |
block | 178 | fs/ext2/inode.c | block & (addr_per_block - 1)); |
block | 358 | fs/ext2/inode.c | struct buffer_head * ext2_getblk (struct inode * inode, long block, |
block | 366 | fs/ext2/inode.c | if (block < 0) { |
block | 370 | fs/ext2/inode.c | if (block > EXT2_NDIR_BLOCKS + addr_per_block + |
block | 382 | fs/ext2/inode.c | ext2_debug ("block %lu, next %lu, goal %lu.\n", block, |
block | 386 | fs/ext2/inode.c | if (block == inode->u.ext2_i.i_next_alloc_block + 1) { |
block | 392 | fs/ext2/inode.c | b = block; |
block | 393 | fs/ext2/inode.c | if (block < EXT2_NDIR_BLOCKS) |
block | 394 | fs/ext2/inode.c | return inode_getblk (inode, block, create, b, err); |
block | 395 | fs/ext2/inode.c | block -= EXT2_NDIR_BLOCKS; |
block | 396 | fs/ext2/inode.c | if (block < addr_per_block) { |
block | 398 | fs/ext2/inode.c | return block_getblk (inode, bh, block, create, |
block | 401 | fs/ext2/inode.c | block -= addr_per_block; |
block | 402 | fs/ext2/inode.c | if (block < addr_per_block * addr_per_block) { |
block | 404 | fs/ext2/inode.c | bh = block_getblk (inode, bh, block / addr_per_block, create, |
block | 406 | fs/ext2/inode.c | return block_getblk (inode, bh, block & (addr_per_block - 1), |
block | 409 | fs/ext2/inode.c | block -= addr_per_block * addr_per_block; |
block | 411 | fs/ext2/inode.c | bh = block_getblk (inode, bh, block/(addr_per_block * addr_per_block), |
block | 413 | fs/ext2/inode.c | bh = block_getblk (inode, bh, (block/addr_per_block) & (addr_per_block - 1), |
block | 415 | fs/ext2/inode.c | return block_getblk (inode, bh, block & (addr_per_block - 1), create, |
block | 419 | fs/ext2/inode.c | int ext2_getcluster (struct inode * inode, long block) |
block | 428 | fs/ext2/inode.c | if (block < 0) { |
block | 432 | fs/ext2/inode.c | if (block > EXT2_NDIR_BLOCKS + addr_per_block + |
block | 440 | fs/ext2/inode.c | b = block; |
block | 441 | fs/ext2/inode.c | if (block < EXT2_NDIR_BLOCKS) return 0; |
block | 443 | fs/ext2/inode.c | block -= EXT2_NDIR_BLOCKS; |
block | 445 | fs/ext2/inode.c | if (block < addr_per_block) { |
block | 447 | fs/ext2/inode.c | return block_getcluster (inode, bh, block, |
block | 450 | fs/ext2/inode.c | block -= addr_per_block; |
block | 451 | fs/ext2/inode.c | if (block < addr_per_block * addr_per_block) { |
block | 453 | fs/ext2/inode.c | bh = block_getblk (inode, bh, block / addr_per_block, create, |
block | 455 | fs/ext2/inode.c | return block_getcluster (inode, bh, block & (addr_per_block - 1), |
block | 458 | fs/ext2/inode.c | block -= addr_per_block * addr_per_block; |
block | 460 | fs/ext2/inode.c | bh = block_getblk (inode, bh, block/(addr_per_block * addr_per_block), |
block | 462 | fs/ext2/inode.c | bh = block_getblk (inode, bh, (block/addr_per_block) & (addr_per_block - 1), |
block | 464 | fs/ext2/inode.c | return block_getcluster (inode, bh, block & (addr_per_block - 1), |
block | 468 | fs/ext2/inode.c | struct buffer_head * ext2_bread (struct inode * inode, int block, |
block | 473 | fs/ext2/inode.c | bh = ext2_getblk (inode, block, create, err); |
block | 492 | fs/ext2/inode.c | unsigned long block; |
block | 513 | fs/ext2/inode.c | block = gdp[desc].bg_inode_table + |
block | 516 | fs/ext2/inode.c | if (!(bh = bread (inode->i_dev, block, inode->i_sb->s_blocksize))) |
block | 519 | fs/ext2/inode.c | "inode=%lu, block=%lu", inode->i_ino, block); |
block | 550 | fs/ext2/inode.c | else for (block = 0; block < EXT2_N_BLOCKS; block++) |
block | 551 | fs/ext2/inode.c | inode->u.ext2_i.i_data[block] = raw_inode->i_block[block]; |
block | 584 | fs/ext2/inode.c | unsigned long block; |
block | 604 | fs/ext2/inode.c | block = gdp[desc].bg_inode_table + |
block | 607 | fs/ext2/inode.c | if (!(bh = bread (inode->i_dev, block, inode->i_sb->s_blocksize))) |
block | 610 | fs/ext2/inode.c | "inode=%lu, block=%lu", inode->i_ino, block); |
block | 632 | fs/ext2/inode.c | else for (block = 0; block < EXT2_N_BLOCKS; block++) |
block | 633 | fs/ext2/inode.c | raw_inode->i_block[block] = inode->u.ext2_i.i_data[block]; |
block | 75 | fs/ext2/namei.c | int block, toread, i, err; |
block | 92 | fs/ext2/namei.c | for (block = 0; block < NAMEI_RA_SIZE; ++block) { |
block | 95 | fs/ext2/namei.c | if ((block << EXT2_BLOCK_SIZE_BITS (sb)) >= dir->i_size) |
block | 97 | fs/ext2/namei.c | bh = ext2_getblk (dir, block, 0, &err); |
block | 98 | fs/ext2/namei.c | bh_use[block] = bh; |
block | 103 | fs/ext2/namei.c | block = 0; |
block | 110 | fs/ext2/namei.c | if ((block % NAMEI_RA_BLOCKS) == 0 && toread) { |
block | 114 | fs/ext2/namei.c | bh = bh_use[block % NAMEI_RA_SIZE]; |
block | 146 | fs/ext2/namei.c | if (((block + NAMEI_RA_SIZE) << EXT2_BLOCK_SIZE_BITS (sb)) >= |
block | 150 | fs/ext2/namei.c | bh = ext2_getblk (dir, block + NAMEI_RA_SIZE, 0, &err); |
block | 151 | fs/ext2/namei.c | bh_use[block++ % NAMEI_RA_SIZE] = bh; |
block | 316 | fs/ext2/super.c | unsigned long block = sb->u.ext2_sb.s_es->s_first_data_block; |
block | 325 | fs/ext2/super.c | if (gdp->bg_block_bitmap < block || |
block | 326 | fs/ext2/super.c | gdp->bg_block_bitmap >= block + EXT2_BLOCKS_PER_GROUP(sb)) |
block | 334 | fs/ext2/super.c | if (gdp->bg_inode_bitmap < block || |
block | 335 | fs/ext2/super.c | gdp->bg_inode_bitmap >= block + EXT2_BLOCKS_PER_GROUP(sb)) |
block | 343 | fs/ext2/super.c | if (gdp->bg_inode_table < block || |
block | 345 | fs/ext2/super.c | block + EXT2_BLOCKS_PER_GROUP(sb)) |
block | 353 | 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 | 65 | fs/isofs/dir.c | unsigned int block,offset,i, j; |
block | 80 | fs/isofs/dir.c | block = isofs_bmap(inode,filp->f_pos>>bufbits); |
block | 82 | fs/isofs/dir.c | if(!block) return 0; |
block | 84 | fs/isofs/dir.c | if(!(bh = breada(inode->i_dev, block, bufsize, filp->f_pos, inode->i_size))) |
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 = breada(inode->i_dev, block, bufsize, filp->f_pos, |
block | 129 | fs/isofs/dir.c | block = isofs_bmap(inode,(filp->f_pos)>> bufbits); |
block | 130 | fs/isofs/dir.c | if (!block |
block | 131 | fs/isofs/dir.c | || !(bh = breada(inode->i_dev, block, bufsize, |
block | 96 | fs/isofs/file.c | int block; |
block | 101 | fs/isofs/file.c | block = isofs_bmap(inode,0); |
block | 102 | fs/isofs/file.c | if (block && (bh = bread(inode->i_dev,block, ISOFS_BUFFER_SIZE(inode)))) { |
block | 122 | fs/isofs/file.c | int block, blocks, offset; |
block | 148 | fs/isofs/file.c | block = filp->f_pos >> ISOFS_BUFFER_BITS(inode); |
block | 174 | fs/isofs/file.c | *bhb = getblk(inode->i_dev,isofs_bmap(inode, block++), ISOFS_BUFFER_SIZE(inode)); |
block | 316 | fs/isofs/inode.c | int isofs_bmap(struct inode * inode,int block) |
block | 319 | fs/isofs/inode.c | if (block<0) { |
block | 323 | fs/isofs/inode.c | return inode->u.isofs_i.i_first_extent + block; |
block | 334 | fs/isofs/inode.c | int block; |
block | 337 | fs/isofs/inode.c | block = inode->i_ino >> ISOFS_BUFFER_BITS(inode); |
block | 338 | fs/isofs/inode.c | if (!(bh=bread(inode->i_dev,block, bufsize))) { |
block | 361 | fs/isofs/inode.c | if (!(bh = bread(inode->i_dev,++block, bufsize))) { |
block | 434 | fs/isofs/inode.c | printk("Get inode %d: %d %d: %d\n",inode->i_ino, block, |
block | 541 | fs/isofs/inode.c | unsigned int block,offset; |
block | 551 | fs/isofs/inode.c | block = extent << (ISOFS_BLOCK_BITS - bufbits); |
block | 552 | fs/isofs/inode.c | if (!(bh = bread(parent->i_dev, block, bufsize))) return -1; |
block | 588 | fs/isofs/inode.c | block = parent_dir << (ISOFS_BLOCK_BITS - bufbits); |
block | 589 | fs/isofs/inode.c | if (!block || !(bh = bread(parent->i_dev,block, bufsize))) |
block | 595 | fs/isofs/inode.c | inode_number = (block << bufbits)+(offset & (bufsize - 1)); |
block | 605 | fs/isofs/inode.c | block++; |
block | 608 | fs/isofs/inode.c | if((block & 1) && (ISOFS_BLOCK_BITS - bufbits)) |
block | 610 | fs/isofs/inode.c | if (!block |
block | 611 | fs/isofs/inode.c | || !(bh = bread(parent->i_dev,block, bufsize))) |
block | 634 | fs/isofs/inode.c | block++; |
block | 635 | fs/isofs/inode.c | if(!(bh = bread(parent->i_dev,block,bufsize))) { |
block | 686 | fs/isofs/inode.c | struct buffer_head * leak_check_bread(int dev, int block, int size){ |
block | 688 | fs/isofs/inode.c | return bread(dev, block, size); |
block | 71 | fs/isofs/namei.c | unsigned int block, i, f_pos, offset, inode_number; |
block | 84 | fs/isofs/namei.c | if (!(block = dir->u.isofs_i.i_first_extent)) return NULL; |
block | 89 | fs/isofs/namei.c | block = isofs_bmap(dir,f_pos >> bufbits); |
block | 91 | fs/isofs/namei.c | if (!block || !(bh = bread(dir->i_dev,block,bufsize))) return NULL; |
block | 96 | fs/isofs/namei.c | inode_number = (block << bufbits) + (offset & (bufsize - 1)); |
block | 106 | fs/isofs/namei.c | block = isofs_bmap(dir,f_pos>>bufbits); |
block | 107 | fs/isofs/namei.c | if (!block || !(bh = bread(dir->i_dev,block,bufsize))) |
block | 127 | fs/isofs/namei.c | block = isofs_bmap(dir,f_pos>>bufbits); |
block | 128 | 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 | 78 | fs/isofs/rock.c | bh = bread(DEV->i_dev, block, ISOFS_BUFFER_SIZE(DEV)); \ |
block | 399 | fs/isofs/rock.c | int block; |
block | 411 | fs/isofs/rock.c | block = inode->i_ino >> bufbits; |
block | 412 | fs/isofs/rock.c | if (!(bh=bread(inode->i_dev,block, bufsize))) { |
block | 430 | 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 | 112 | fs/sysv/file.c | unsigned int block; |
block | 139 | fs/sysv/file.c | block = offset >> sb->sv_block_size_bits; |
block | 146 | fs/sysv/file.c | if (block + blocks > size) |
block | 147 | fs/sysv/file.c | blocks = size - block; |
block | 169 | 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 | 440 | include/linux/ext2_fs.h | extern int ext2_getcluster (struct inode * inode, long block); |
block | 82 | include/linux/ext_fs.h | extern void ext_free_block(struct super_block * sb, int block); |
block | 436 | include/linux/fs.h | extern int bmap(struct inode * inode,int block); |
block | 451 | include/linux/fs.h | extern struct buffer_head * get_hash_table(dev_t dev, int block, int size); |
block | 452 | include/linux/fs.h | extern struct buffer_head * getblk(dev_t dev, int block, int size); |
block | 459 | include/linux/fs.h | extern struct buffer_head * bread(dev_t dev, int block, int size); |
block | 461 | 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 | 201 | include/linux/iso_fs.h | extern struct buffer_head * leak_check_bread(int dev, int block, int size); |
block | 97 | include/linux/minix_fs.h | extern void minix_free_block(struct super_block * sb, int block); |
block | 175 | include/linux/msdos_fs.h | extern int msdos_bmap(struct inode *inode,int block); |
block | 354 | include/linux/sysv_fs.h | sysv_bread (struct super_block *sb, int dev, unsigned int block, char* * data) |
block | 358 | include/linux/sysv_fs.h | if (!(bh = bread (dev, (block >> sb->sv_block_size_ratio_bits) + sb->sv_block_base, BLOCK_SIZE))) |
block | 360 | include/linux/sysv_fs.h | *data = bh->b_data + ((block & sb->sv_block_size_ratio_1) << sb->sv_block_size_bits); |
block | 410 | 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 | 1287 | mm/memory.c | unsigned int block; |
block | 1292 | mm/memory.c | block = address - area->vm_start + area->vm_offset; |
block | 1293 | mm/memory.c | block >>= inode->i_sb->s_blocksize_bits; |
block | 1297 | mm/memory.c | *p = bmap(inode,block); |
block | 1299 | mm/memory.c | block++; |
block | 155 | mm/swap.c | unsigned int block = offset << 3; |
block | 158 | mm/swap.c | if (!(zones[i] = swapf->i_op->smap(swapf,block++))) { |
block | 165 | mm/swap.c | unsigned int block = offset |
block | 169 | mm/swap.c | if (!(zones[i] = bmap(swapf,block++))) { |