taglinefilesource code
sb108drivers/block/ramdisk.c} sb;
sb110drivers/block/ramdisk.c(struct minix_super_block *)&sb;
sb112drivers/block/ramdisk.c(struct ext2_super_block *)&sb;
sb135drivers/block/ramdisk.c*((struct super_block *) &sb) =
sb777drivers/char/tpqic02.cstatic int send_qic02_data(char sb[], unsigned size, int ignore_ex)
sb787drivers/char/tpqic02.cstat = notify_cmd(sb[i], ignore_ex);
sb40fs/ext/freelists.cvoid ext_free_block(struct super_block * sb, int block)
sb45fs/ext/freelists.cif (!sb) {
sb49fs/ext/freelists.clock_super (sb);
sb50fs/ext/freelists.cif (block < sb->u.ext_sb.s_firstdatazone ||
sb51fs/ext/freelists.cblock >= sb->u.ext_sb.s_nzones) {
sb55fs/ext/freelists.cbh = get_hash_table(sb->s_dev, block, sb->s_blocksize);
sb59fs/ext/freelists.cif (sb->u.ext_sb.s_firstfreeblock)
sb60fs/ext/freelists.cefb = (struct ext_free_block *) sb->u.ext_sb.s_firstfreeblock->b_data;
sb61fs/ext/freelists.cif (!sb->u.ext_sb.s_firstfreeblock || efb->count == 254) {
sb65fs/ext/freelists.cif (sb->u.ext_sb.s_firstfreeblock)
sb66fs/ext/freelists.cbrelse (sb->u.ext_sb.s_firstfreeblock);
sb67fs/ext/freelists.cif (!(sb->u.ext_sb.s_firstfreeblock = bread (sb->s_dev,
sb68fs/ext/freelists.cblock, sb->s_blocksize)))
sb70fs/ext/freelists.cefb = (struct ext_free_block *) sb->u.ext_sb.s_firstfreeblock->b_data;
sb71fs/ext/freelists.cefb->next = sb->u.ext_sb.s_firstfreeblocknumber;
sb73fs/ext/freelists.csb->u.ext_sb.s_firstfreeblocknumber = block;
sb77fs/ext/freelists.csb->u.ext_sb.s_freeblockscount ++;
sb78fs/ext/freelists.csb->s_dirt = 1;
sb79fs/ext/freelists.cmark_buffer_dirty(sb->u.ext_sb.s_firstfreeblock, 1);
sb80fs/ext/freelists.cunlock_super (sb);
sb84fs/ext/freelists.cint ext_new_block(struct super_block * sb)
sb90fs/ext/freelists.cif (!sb) {
sb94fs/ext/freelists.cif (!sb->u.ext_sb.s_firstfreeblock)
sb96fs/ext/freelists.clock_super (sb);
sb97fs/ext/freelists.cefb = (struct ext_free_block *) sb->u.ext_sb.s_firstfreeblock->b_data;
sb100fs/ext/freelists.cmark_buffer_dirty(sb->u.ext_sb.s_firstfreeblock, 1);
sb105fs/ext/freelists.cj = sb->u.ext_sb.s_firstfreeblocknumber;
sb106fs/ext/freelists.csb->u.ext_sb.s_firstfreeblocknumber = efb->next;
sb107fs/ext/freelists.cbrelse (sb->u.ext_sb.s_firstfreeblock);
sb108fs/ext/freelists.cif (!sb->u.ext_sb.s_firstfreeblocknumber) {
sb109fs/ext/freelists.csb->u.ext_sb.s_firstfreeblock = NULL;
sb111fs/ext/freelists.cif (!(sb->u.ext_sb.s_firstfreeblock = bread (sb->s_dev,
sb112fs/ext/freelists.csb->u.ext_sb.s_firstfreeblocknumber,
sb113fs/ext/freelists.csb->s_blocksize)))
sb117fs/ext/freelists.cif (j < sb->u.ext_sb.s_firstdatazone || j > sb->u.ext_sb.s_nzones) {
sb122fs/ext/freelists.csb->u.ext_sb.s_freeblockscount --;
sb123fs/ext/freelists.csb->s_dirt = 1;
sb125fs/ext/freelists.cif (!(bh=getblk(sb->s_dev, j, sb->s_blocksize))) {
sb136fs/ext/freelists.cunlock_super (sb);
sb140fs/ext/freelists.cunsigned long ext_count_free_blocks(struct super_block *sb)
sb147fs/ext/freelists.clock_super (sb);
sb148fs/ext/freelists.cif (!sb->u.ext_sb.s_firstfreeblock)
sb151fs/ext/freelists.cefb = (struct ext_free_block *) sb->u.ext_sb.s_firstfreeblock->b_data;
sb155fs/ext/freelists.cif (!(bh = bread (sb->s_dev, block, sb->s_blocksize))) {
sb167fs/ext/freelists.csb->u.ext_sb.s_freeblockscount, count);
sb168fs/ext/freelists.cunlock_super (sb);
sb171fs/ext/freelists.creturn sb->u.ext_sb.s_freeblockscount;
sb179fs/ext/freelists.cstruct super_block * sb;
sb202fs/ext/freelists.csb = inode->i_sb;
sb206fs/ext/freelists.clock_super (sb);
sb207fs/ext/freelists.cif (ino < 1 || ino > sb->u.ext_sb.s_ninodes) {
sb209fs/ext/freelists.cunlock_super (sb);
sb212fs/ext/freelists.cif (sb->u.ext_sb.s_firstfreeinodeblock)
sb213fs/ext/freelists.cefi = ((struct ext_free_inode *) sb->u.ext_sb.s_firstfreeinodeblock->b_data) +
sb214fs/ext/freelists.c(sb->u.ext_sb.s_firstfreeinodenumber-1)%EXT_INODES_PER_BLOCK;
sb215fs/ext/freelists.cif (!sb->u.ext_sb.s_firstfreeinodeblock || efi->count == 14) {
sb219fs/ext/freelists.cif (sb->u.ext_sb.s_firstfreeinodeblock)
sb220fs/ext/freelists.cbrelse (sb->u.ext_sb.s_firstfreeinodeblock);
sb222fs/ext/freelists.cif (!(bh = bread(dev, block, sb->s_blocksize)))
sb226fs/ext/freelists.cefi->next = sb->u.ext_sb.s_firstfreeinodenumber;
sb228fs/ext/freelists.csb->u.ext_sb.s_firstfreeinodenumber = ino;
sb229fs/ext/freelists.csb->u.ext_sb.s_firstfreeinodeblock = bh;
sb233fs/ext/freelists.csb->u.ext_sb.s_freeinodescount ++;
sb234fs/ext/freelists.csb->s_dirt = 1;
sb235fs/ext/freelists.cmark_buffer_dirty(sb->u.ext_sb.s_firstfreeinodeblock, 1);
sb236fs/ext/freelists.cunlock_super (sb);
sb241fs/ext/freelists.cstruct super_block * sb;
sb249fs/ext/freelists.csb = dir->i_sb;
sb250fs/ext/freelists.cinode->i_sb = sb;
sb251fs/ext/freelists.cinode->i_flags = sb->s_flags;
sb252fs/ext/freelists.cif (!sb->u.ext_sb.s_firstfreeinodeblock)
sb254fs/ext/freelists.clock_super (sb);
sb255fs/ext/freelists.cefi = ((struct ext_free_inode *) sb->u.ext_sb.s_firstfreeinodeblock->b_data) +
sb256fs/ext/freelists.c(sb->u.ext_sb.s_firstfreeinodenumber-1)%EXT_INODES_PER_BLOCK;
sb259fs/ext/freelists.cmark_buffer_dirty(sb->u.ext_sb.s_firstfreeinodeblock, 1);
sb264fs/ext/freelists.cj = sb->u.ext_sb.s_firstfreeinodenumber;
sb265fs/ext/freelists.cif (efi->next > sb->u.ext_sb.s_ninodes) {
sb269fs/ext/freelists.csb->u.ext_sb.s_firstfreeinodenumber = efi->next;
sb271fs/ext/freelists.cbrelse (sb->u.ext_sb.s_firstfreeinodeblock);
sb272fs/ext/freelists.cif (!sb->u.ext_sb.s_firstfreeinodenumber) {
sb273fs/ext/freelists.csb->u.ext_sb.s_firstfreeinodeblock = NULL;
sb275fs/ext/freelists.cif (!(sb->u.ext_sb.s_firstfreeinodeblock =
sb276fs/ext/freelists.cbread(sb->s_dev, block, sb->s_blocksize)))
sb280fs/ext/freelists.csb->u.ext_sb.s_freeinodescount --;
sb281fs/ext/freelists.csb->s_dirt = 1;
sb284fs/ext/freelists.cinode->i_dev = sb->s_dev;
sb296fs/ext/freelists.cunlock_super (sb);
sb300fs/ext/freelists.cunsigned long ext_count_free_inodes(struct super_block *sb)
sb307fs/ext/freelists.clock_super (sb);
sb308fs/ext/freelists.cif (!sb->u.ext_sb.s_firstfreeinodeblock)
sb311fs/ext/freelists.cefi = ((struct ext_free_inode *) sb->u.ext_sb.s_firstfreeinodeblock->b_data) +
sb312fs/ext/freelists.c((sb->u.ext_sb.s_firstfreeinodenumber-1)%EXT_INODES_PER_BLOCK);
sb316fs/ext/freelists.cif (ino < 1 || ino > sb->u.ext_sb.s_ninodes) {
sb318fs/ext/freelists.c(int) sb->u.ext_sb.s_firstfreeinodenumber,ino);
sb322fs/ext/freelists.cif (!(bh = bread (sb->s_dev, block, sb->s_blocksize))) {
sb335fs/ext/freelists.csb->u.ext_sb.s_freeinodescount, count);
sb336fs/ext/freelists.cunlock_super (sb);
sb339fs/ext/freelists.creturn sb->u.ext_sb.s_freeinodescount;
sb33fs/ext/inode.cvoid ext_put_super(struct super_block *sb)
sb36fs/ext/inode.clock_super(sb);
sb37fs/ext/inode.csb->s_dev = 0;
sb38fs/ext/inode.cif (sb->u.ext_sb.s_firstfreeinodeblock)
sb39fs/ext/inode.cbrelse (sb->u.ext_sb.s_firstfreeinodeblock);
sb40fs/ext/inode.cif (sb->u.ext_sb.s_firstfreeblock)
sb41fs/ext/inode.cbrelse (sb->u.ext_sb.s_firstfreeblock);
sb42fs/ext/inode.cunlock_super(sb);
sb128fs/ext/inode.cvoid ext_write_super (struct super_block *sb)
sb133fs/ext/inode.cif (!(bh = bread(sb->s_dev, 1, BLOCK_SIZE))) {
sb138fs/ext/inode.ces->s_firstfreeblock = sb->u.ext_sb.s_firstfreeblocknumber;
sb139fs/ext/inode.ces->s_freeblockscount = sb->u.ext_sb.s_freeblockscount;
sb140fs/ext/inode.ces->s_firstfreeinode = sb->u.ext_sb.s_firstfreeinodenumber;
sb141fs/ext/inode.ces->s_freeinodescount = sb->u.ext_sb.s_freeinodescount;
sb144fs/ext/inode.csb->s_dirt = 0;
sb147fs/ext/inode.cvoid ext_statfs (struct super_block *sb, struct statfs *buf)
sb153fs/ext/inode.cput_fs_long(sb->u.ext_sb.s_nzones << sb->u.ext_sb.s_log_zone_size,
sb155fs/ext/inode.ctmp = ext_count_free_blocks(sb);
sb158fs/ext/inode.cput_fs_long(sb->u.ext_sb.s_ninodes, &buf->f_files);
sb159fs/ext/inode.cput_fs_long(ext_count_free_inodes(sb), &buf->f_ffree);
sb37fs/ext2/balloc.cstatic struct ext2_group_desc * get_group_desc (struct super_block * sb,
sb45fs/ext2/balloc.cif (block_group >= sb->u.ext2_sb.s_groups_count)
sb46fs/ext2/balloc.cext2_panic (sb, "get_group_desc",
sb49fs/ext2/balloc.cblock_group, sb->u.ext2_sb.s_groups_count);
sb51fs/ext2/balloc.cgroup_desc = block_group / EXT2_DESC_PER_BLOCK(sb);
sb52fs/ext2/balloc.cdesc = block_group % EXT2_DESC_PER_BLOCK(sb);
sb53fs/ext2/balloc.cif (!sb->u.ext2_sb.s_group_desc[group_desc])
sb54fs/ext2/balloc.cext2_panic (sb, "get_group_desc",
sb59fs/ext2/balloc.csb->u.ext2_sb.s_group_desc[group_desc]->b_data;
sb61fs/ext2/balloc.c*bh = sb->u.ext2_sb.s_group_desc[group_desc];
sb65fs/ext2/balloc.cstatic void read_block_bitmap (struct super_block * sb,
sb72fs/ext2/balloc.cgdp = get_group_desc (sb, block_group, NULL);
sb73fs/ext2/balloc.cbh = bread (sb->s_dev, gdp->bg_block_bitmap, sb->s_blocksize);
sb75fs/ext2/balloc.cext2_panic (sb, "read_block_bitmap",
sb79fs/ext2/balloc.csb->u.ext2_sb.s_block_bitmap_number[bitmap_nr] = block_group;
sb80fs/ext2/balloc.csb->u.ext2_sb.s_block_bitmap[bitmap_nr] = bh;
sb94fs/ext2/balloc.cstatic int load__block_bitmap (struct super_block * sb,
sb101fs/ext2/balloc.cif (block_group >= sb->u.ext2_sb.s_groups_count)
sb102fs/ext2/balloc.cext2_panic (sb, "load_block_bitmap",
sb105fs/ext2/balloc.cblock_group, sb->u.ext2_sb.s_groups_count);
sb107fs/ext2/balloc.cif (sb->u.ext2_sb.s_groups_count <= EXT2_MAX_GROUP_LOADED) {
sb108fs/ext2/balloc.cif (sb->u.ext2_sb.s_block_bitmap[block_group]) {
sb109fs/ext2/balloc.cif (sb->u.ext2_sb.s_block_bitmap_number[block_group] !=
sb111fs/ext2/balloc.cext2_panic (sb, "load_block_bitmap",
sb116fs/ext2/balloc.cread_block_bitmap (sb, block_group, block_group);
sb121fs/ext2/balloc.cfor (i = 0; i < sb->u.ext2_sb.s_loaded_block_bitmaps &&
sb122fs/ext2/balloc.csb->u.ext2_sb.s_block_bitmap_number[i] != block_group; i++)
sb124fs/ext2/balloc.cif (i < sb->u.ext2_sb.s_loaded_block_bitmaps &&
sb125fs/ext2/balloc.csb->u.ext2_sb.s_block_bitmap_number[i] == block_group) {
sb126fs/ext2/balloc.cblock_bitmap_number = sb->u.ext2_sb.s_block_bitmap_number[i];
sb127fs/ext2/balloc.cblock_bitmap = sb->u.ext2_sb.s_block_bitmap[i];
sb129fs/ext2/balloc.csb->u.ext2_sb.s_block_bitmap_number[j] =
sb130fs/ext2/balloc.csb->u.ext2_sb.s_block_bitmap_number[j - 1];
sb131fs/ext2/balloc.csb->u.ext2_sb.s_block_bitmap[j] =
sb132fs/ext2/balloc.csb->u.ext2_sb.s_block_bitmap[j - 1];
sb134fs/ext2/balloc.csb->u.ext2_sb.s_block_bitmap_number[0] = block_bitmap_number;
sb135fs/ext2/balloc.csb->u.ext2_sb.s_block_bitmap[0] = block_bitmap;
sb137fs/ext2/balloc.cif (sb->u.ext2_sb.s_loaded_block_bitmaps < EXT2_MAX_GROUP_LOADED)
sb138fs/ext2/balloc.csb->u.ext2_sb.s_loaded_block_bitmaps++;
sb140fs/ext2/balloc.cbrelse (sb->u.ext2_sb.s_block_bitmap[EXT2_MAX_GROUP_LOADED - 1]);
sb141fs/ext2/balloc.cfor (j = sb->u.ext2_sb.s_loaded_block_bitmaps - 1; j > 0;  j--) {
sb142fs/ext2/balloc.csb->u.ext2_sb.s_block_bitmap_number[j] =
sb143fs/ext2/balloc.csb->u.ext2_sb.s_block_bitmap_number[j - 1];
sb144fs/ext2/balloc.csb->u.ext2_sb.s_block_bitmap[j] =
sb145fs/ext2/balloc.csb->u.ext2_sb.s_block_bitmap[j - 1];
sb147fs/ext2/balloc.cread_block_bitmap (sb, block_group, 0);
sb152fs/ext2/balloc.cstatic inline int load_block_bitmap (struct super_block * sb,
sb155fs/ext2/balloc.cif (sb->u.ext2_sb.s_loaded_block_bitmaps > 0 &&
sb156fs/ext2/balloc.csb->u.ext2_sb.s_block_bitmap_number[0] == block_group)
sb159fs/ext2/balloc.cif (sb->u.ext2_sb.s_groups_count <= EXT2_MAX_GROUP_LOADED && 
sb160fs/ext2/balloc.csb->u.ext2_sb.s_block_bitmap_number[block_group] == block_group &&
sb161fs/ext2/balloc.csb->u.ext2_sb.s_block_bitmap[block_group]) 
sb164fs/ext2/balloc.creturn load__block_bitmap (sb, block_group);
sb167fs/ext2/balloc.cvoid ext2_free_blocks (struct super_block * sb, unsigned long block,
sb179fs/ext2/balloc.cif (!sb) {
sb183fs/ext2/balloc.clock_super (sb);
sb184fs/ext2/balloc.ces = sb->u.ext2_sb.s_es;
sb187fs/ext2/balloc.cext2_error (sb, "ext2_free_blocks",
sb190fs/ext2/balloc.cunlock_super (sb);
sb197fs/ext2/balloc.cEXT2_BLOCKS_PER_GROUP(sb);
sb198fs/ext2/balloc.cbit = (block - es->s_first_data_block) % EXT2_BLOCKS_PER_GROUP(sb);
sb199fs/ext2/balloc.cif (bit + count > EXT2_BLOCKS_PER_GROUP(sb))
sb200fs/ext2/balloc.cext2_panic (sb, "ext2_free_blocks",
sb204fs/ext2/balloc.cbitmap_nr = load_block_bitmap (sb, block_group);
sb205fs/ext2/balloc.cbh = sb->u.ext2_sb.s_block_bitmap[bitmap_nr];
sb206fs/ext2/balloc.cgdp = get_group_desc (sb, block_group, &bh2);
sb208fs/ext2/balloc.cif (test_opt (sb, CHECK_STRICT) &&
sb212fs/ext2/balloc.csb->u.ext2_sb.s_itb_per_group) ||
sb214fs/ext2/balloc.csb->u.ext2_sb.s_itb_per_group)))
sb215fs/ext2/balloc.cext2_panic (sb, "ext2_free_blocks",
sb222fs/ext2/balloc.cext2_warning (sb, "ext2_free_blocks",
sb232fs/ext2/balloc.cmark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1);
sb235fs/ext2/balloc.cif (sb->s_flags & MS_SYNC) {
sb239fs/ext2/balloc.csb->s_dirt = 1;
sb240fs/ext2/balloc.cunlock_super (sb);
sb251fs/ext2/balloc.cint ext2_new_block (struct super_block * sb, unsigned long goal,
sb267fs/ext2/balloc.cif (!sb) {
sb271fs/ext2/balloc.clock_super (sb);
sb272fs/ext2/balloc.ces = sb->u.ext2_sb.s_es;
sb274fs/ext2/balloc.c(!fsuser() && (sb->u.ext2_sb.s_resuid != current->fsuid) &&
sb275fs/ext2/balloc.c(sb->u.ext2_sb.s_resgid == 0 ||
sb276fs/ext2/balloc.c!in_group_p (sb->u.ext2_sb.s_resgid)))) {
sb277fs/ext2/balloc.cunlock_super (sb);
sb289fs/ext2/balloc.ci = (goal - es->s_first_data_block) / EXT2_BLOCKS_PER_GROUP(sb);
sb290fs/ext2/balloc.cgdp = get_group_desc (sb, i, &bh2);
sb292fs/ext2/balloc.cj = ((goal - es->s_first_data_block) % EXT2_BLOCKS_PER_GROUP(sb));
sb297fs/ext2/balloc.cbitmap_nr = load_block_bitmap (sb, i);
sb298fs/ext2/balloc.cbh = sb->u.ext2_sb.s_block_bitmap[bitmap_nr];
sb316fs/ext2/balloc.cif (j < EXT2_BLOCKS_PER_GROUP(sb) - 32)
sb323fs/ext2/balloc.cif ((j + k) < EXT2_BLOCKS_PER_GROUP(sb)) {
sb342fs/ext2/balloc.cr = memscan(p, 0, (EXT2_BLOCKS_PER_GROUP(sb) - j + 7) >> 3);
sb344fs/ext2/balloc.cif (k < EXT2_BLOCKS_PER_GROUP(sb)) {
sb349fs/ext2/balloc.cEXT2_BLOCKS_PER_GROUP(sb),
sb351fs/ext2/balloc.cif (k < EXT2_BLOCKS_PER_GROUP(sb)) {
sb363fs/ext2/balloc.cfor (k = 0; k < sb->u.ext2_sb.s_groups_count; k++) {
sb365fs/ext2/balloc.cif (i >= sb->u.ext2_sb.s_groups_count)
sb367fs/ext2/balloc.cgdp = get_group_desc (sb, i, &bh2);
sb371fs/ext2/balloc.cif (k >= sb->u.ext2_sb.s_groups_count) {
sb372fs/ext2/balloc.cunlock_super (sb);
sb375fs/ext2/balloc.cbitmap_nr = load_block_bitmap (sb, i);
sb376fs/ext2/balloc.cbh = sb->u.ext2_sb.s_block_bitmap[bitmap_nr];
sb377fs/ext2/balloc.cr = memscan(bh->b_data, 0, EXT2_BLOCKS_PER_GROUP(sb) >> 3);
sb379fs/ext2/balloc.cif (j < EXT2_BLOCKS_PER_GROUP(sb))
sb383fs/ext2/balloc.cEXT2_BLOCKS_PER_GROUP(sb));
sb384fs/ext2/balloc.cif (j >= EXT2_BLOCKS_PER_GROUP(sb)) {
sb385fs/ext2/balloc.cext2_error (sb, "ext2_new_block",
sb387fs/ext2/balloc.cunlock_super (sb);
sb403fs/ext2/balloc.ctmp = j + i * EXT2_BLOCKS_PER_GROUP(sb) + es->s_first_data_block;
sb405fs/ext2/balloc.cif (test_opt (sb, CHECK_STRICT) &&
sb408fs/ext2/balloc.cin_range (tmp, gdp->bg_inode_table, sb->u.ext2_sb.s_itb_per_group)))
sb409fs/ext2/balloc.cext2_panic (sb, "ext2_new_block",
sb414fs/ext2/balloc.cext2_warning (sb, "ext2_new_block",
sb429fs/ext2/balloc.ck < 8 && (j + k) < EXT2_BLOCKS_PER_GROUP(sb); k++) {
sb444fs/ext2/balloc.cif (sb->s_flags & MS_SYNC) {
sb450fs/ext2/balloc.cext2_error (sb, "ext2_new_block",
sb453fs/ext2/balloc.cunlock_super (sb);
sb456fs/ext2/balloc.cif (!(bh = getblk (sb->s_dev, j, sb->s_blocksize))) {
sb457fs/ext2/balloc.cext2_error (sb, "ext2_new_block", "cannot get block %d", j);
sb458fs/ext2/balloc.cunlock_super (sb);
sb461fs/ext2/balloc.cmemset(bh->b_data, 0, sb->s_blocksize);
sb472fs/ext2/balloc.cmark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1);
sb473fs/ext2/balloc.csb->s_dirt = 1;
sb474fs/ext2/balloc.cunlock_super (sb);
sb478fs/ext2/balloc.cunsigned long ext2_count_free_blocks (struct super_block * sb)
sb487fs/ext2/balloc.clock_super (sb);
sb488fs/ext2/balloc.ces = sb->u.ext2_sb.s_es;
sb492fs/ext2/balloc.cfor (i = 0; i < sb->u.ext2_sb.s_groups_count; i++) {
sb493fs/ext2/balloc.cgdp = get_group_desc (sb, i, NULL);
sb495fs/ext2/balloc.cbitmap_nr = load_block_bitmap (sb, i);
sb496fs/ext2/balloc.cx = ext2_count_free (sb->u.ext2_sb.s_block_bitmap[bitmap_nr],
sb497fs/ext2/balloc.csb->s_blocksize);
sb504fs/ext2/balloc.cunlock_super (sb);
sb507fs/ext2/balloc.creturn sb->u.ext2_sb.s_es->s_free_blocks_count;
sb512fs/ext2/balloc.cstruct super_block * sb,
sb515fs/ext2/balloc.creturn test_bit ((block - sb->u.ext2_sb.s_es->s_first_data_block) %
sb516fs/ext2/balloc.cEXT2_BLOCKS_PER_GROUP(sb), map);
sb519fs/ext2/balloc.cvoid ext2_check_blocks_bitmap (struct super_block * sb)
sb529fs/ext2/balloc.clock_super (sb);
sb530fs/ext2/balloc.ces = sb->u.ext2_sb.s_es;
sb534fs/ext2/balloc.cdesc_blocks = (sb->u.ext2_sb.s_groups_count + EXT2_DESC_PER_BLOCK(sb) - 1) /
sb535fs/ext2/balloc.cEXT2_DESC_PER_BLOCK(sb);
sb536fs/ext2/balloc.cfor (i = 0; i < sb->u.ext2_sb.s_groups_count; i++) {
sb537fs/ext2/balloc.cgdp = get_group_desc (sb, i, NULL);
sb539fs/ext2/balloc.cbitmap_nr = load_block_bitmap (sb, i);
sb540fs/ext2/balloc.cbh = sb->u.ext2_sb.s_block_bitmap[bitmap_nr];
sb543fs/ext2/balloc.cext2_error (sb, "ext2_check_blocks_bitmap",
sb548fs/ext2/balloc.cext2_error (sb, "ext2_check_blocks_bitmap",
sb552fs/ext2/balloc.cif (!block_in_use (gdp->bg_block_bitmap, sb, bh->b_data))
sb553fs/ext2/balloc.cext2_error (sb, "ext2_check_blocks_bitmap",
sb557fs/ext2/balloc.cif (!block_in_use (gdp->bg_inode_bitmap, sb, bh->b_data))
sb558fs/ext2/balloc.cext2_error (sb, "ext2_check_blocks_bitmap",
sb562fs/ext2/balloc.cfor (j = 0; j < sb->u.ext2_sb.s_itb_per_group; j++)
sb563fs/ext2/balloc.cif (!block_in_use (gdp->bg_inode_table + j, sb, bh->b_data))
sb564fs/ext2/balloc.cext2_error (sb, "ext2_check_blocks_bitmap",
sb568fs/ext2/balloc.cx = ext2_count_free (bh, sb->s_blocksize);
sb570fs/ext2/balloc.cext2_error (sb, "ext2_check_blocks_bitmap",
sb577fs/ext2/balloc.cext2_error (sb, "ext2_check_blocks_bitmap",
sb581fs/ext2/balloc.cunlock_super (sb);
sb107fs/ext2/dir.cstruct super_block * sb;
sb112fs/ext2/dir.csb = inode->i_sb;
sb116fs/ext2/dir.coffset = filp->f_pos & (sb->s_blocksize - 1);
sb119fs/ext2/dir.cblk = (filp->f_pos) >> EXT2_BLOCK_SIZE_BITS(sb);
sb122fs/ext2/dir.cfilp->f_pos += sb->s_blocksize - offset;
sb130fs/ext2/dir.cfor (i = 16 >> (EXT2_BLOCK_SIZE_BITS(sb) - 9), num = 0;
sb151fs/ext2/dir.cfor (i = 0; i < sb->s_blocksize && i < offset; ) {
sb165fs/ext2/dir.cfilp->f_pos = (filp->f_pos & ~(sb->s_blocksize - 1))
sb171fs/ext2/dir.c&& offset < sb->s_blocksize) {
sb177fs/ext2/dir.cfilp->f_pos = (filp->f_pos & (sb->s_blocksize - 1))
sb178fs/ext2/dir.c+ sb->s_blocksize;
sb89fs/ext2/file.cstruct super_block * sb;
sb97fs/ext2/file.csb = inode->i_sb;
sb99fs/ext2/file.cext2_warning (sb, "ext2_file_read", "mode = %07o",
sb114fs/ext2/file.cblock = offset >> EXT2_BLOCK_SIZE_BITS(sb);
sb115fs/ext2/file.coffset &= (sb->s_blocksize - 1);
sb116fs/ext2/file.csize = (size + sb->s_blocksize - 1) >> EXT2_BLOCK_SIZE_BITS(sb);
sb117fs/ext2/file.cblocks = (left + offset + sb->s_blocksize - 1) >> EXT2_BLOCK_SIZE_BITS(sb);
sb120fs/ext2/file.cif (blocks < read_ahead[MAJOR(inode->i_dev)] >> (EXT2_BLOCK_SIZE_BITS(sb) - 9))
sb121fs/ext2/file.cblocks = read_ahead[MAJOR(inode->i_dev)] >> (EXT2_BLOCK_SIZE_BITS(sb) - 9);
sb190fs/ext2/file.cif (left < sb->s_blocksize - offset)
sb193fs/ext2/file.cchars = sb->s_blocksize - offset;
sb239fs/ext2/file.cstruct super_block * sb;
sb248fs/ext2/file.csb = inode->i_sb;
sb249fs/ext2/file.cif (sb->s_flags & MS_RDONLY)
sb256fs/ext2/file.cext2_warning (sb, "ext2_file_write", "mode = %07o",
sb281fs/ext2/file.cbh = ext2_getblk (inode, pos2 / sb->s_blocksize, 1, &err);
sb287fs/ext2/file.cc = sb->s_blocksize - (pos2 % sb->s_blocksize);
sb290fs/ext2/file.cif (c != sb->s_blocksize && !bh->b_uptodate) {
sb300fs/ext2/file.cp = (pos2 % sb->s_blocksize) + bh->b_data;
sb36fs/ext2/ialloc.cstatic struct ext2_group_desc * get_group_desc (struct super_block * sb,
sb44fs/ext2/ialloc.cif (block_group >= sb->u.ext2_sb.s_groups_count)
sb45fs/ext2/ialloc.cext2_panic (sb, "get_group_desc",
sb48fs/ext2/ialloc.cblock_group, sb->u.ext2_sb.s_groups_count);
sb50fs/ext2/ialloc.cgroup_desc = block_group / EXT2_DESC_PER_BLOCK(sb);
sb51fs/ext2/ialloc.cdesc = block_group % EXT2_DESC_PER_BLOCK(sb);
sb52fs/ext2/ialloc.cif (!sb->u.ext2_sb.s_group_desc[group_desc])
sb53fs/ext2/ialloc.cext2_panic (sb, "get_group_desc",
sb58fs/ext2/ialloc.csb->u.ext2_sb.s_group_desc[group_desc]->b_data;
sb60fs/ext2/ialloc.c*bh = sb->u.ext2_sb.s_group_desc[group_desc];
sb64fs/ext2/ialloc.cstatic void read_inode_bitmap (struct super_block * sb,
sb71fs/ext2/ialloc.cgdp = get_group_desc (sb, block_group, NULL);
sb72fs/ext2/ialloc.cbh = bread (sb->s_dev, gdp->bg_inode_bitmap, sb->s_blocksize);
sb74fs/ext2/ialloc.cext2_panic (sb, "read_inode_bitmap",
sb78fs/ext2/ialloc.csb->u.ext2_sb.s_inode_bitmap_number[bitmap_nr] = block_group;
sb79fs/ext2/ialloc.csb->u.ext2_sb.s_inode_bitmap[bitmap_nr] = bh;
sb93fs/ext2/ialloc.cstatic int load_inode_bitmap (struct super_block * sb,
sb100fs/ext2/ialloc.cif (block_group >= sb->u.ext2_sb.s_groups_count)
sb101fs/ext2/ialloc.cext2_panic (sb, "load_inode_bitmap",
sb104fs/ext2/ialloc.cblock_group, sb->u.ext2_sb.s_groups_count);
sb105fs/ext2/ialloc.cif (sb->u.ext2_sb.s_loaded_inode_bitmaps > 0 &&
sb106fs/ext2/ialloc.csb->u.ext2_sb.s_inode_bitmap_number[0] == block_group)
sb108fs/ext2/ialloc.cif (sb->u.ext2_sb.s_groups_count <= EXT2_MAX_GROUP_LOADED) {
sb109fs/ext2/ialloc.cif (sb->u.ext2_sb.s_inode_bitmap[block_group]) {
sb110fs/ext2/ialloc.cif (sb->u.ext2_sb.s_inode_bitmap_number[block_group] != block_group)
sb111fs/ext2/ialloc.cext2_panic (sb, "load_inode_bitmap",
sb116fs/ext2/ialloc.cread_inode_bitmap (sb, block_group, block_group);
sb121fs/ext2/ialloc.cfor (i = 0; i < sb->u.ext2_sb.s_loaded_inode_bitmaps &&
sb122fs/ext2/ialloc.csb->u.ext2_sb.s_inode_bitmap_number[i] != block_group;
sb125fs/ext2/ialloc.cif (i < sb->u.ext2_sb.s_loaded_inode_bitmaps &&
sb126fs/ext2/ialloc.csb->u.ext2_sb.s_inode_bitmap_number[i] == block_group) {
sb127fs/ext2/ialloc.cinode_bitmap_number = sb->u.ext2_sb.s_inode_bitmap_number[i];
sb128fs/ext2/ialloc.cinode_bitmap = sb->u.ext2_sb.s_inode_bitmap[i];
sb130fs/ext2/ialloc.csb->u.ext2_sb.s_inode_bitmap_number[j] =
sb131fs/ext2/ialloc.csb->u.ext2_sb.s_inode_bitmap_number[j - 1];
sb132fs/ext2/ialloc.csb->u.ext2_sb.s_inode_bitmap[j] =
sb133fs/ext2/ialloc.csb->u.ext2_sb.s_inode_bitmap[j - 1];
sb135fs/ext2/ialloc.csb->u.ext2_sb.s_inode_bitmap_number[0] = inode_bitmap_number;
sb136fs/ext2/ialloc.csb->u.ext2_sb.s_inode_bitmap[0] = inode_bitmap;
sb138fs/ext2/ialloc.cif (sb->u.ext2_sb.s_loaded_inode_bitmaps < EXT2_MAX_GROUP_LOADED)
sb139fs/ext2/ialloc.csb->u.ext2_sb.s_loaded_inode_bitmaps++;
sb141fs/ext2/ialloc.cbrelse (sb->u.ext2_sb.s_inode_bitmap[EXT2_MAX_GROUP_LOADED - 1]);
sb142fs/ext2/ialloc.cfor (j = sb->u.ext2_sb.s_loaded_inode_bitmaps - 1; j > 0; j--) {
sb143fs/ext2/ialloc.csb->u.ext2_sb.s_inode_bitmap_number[j] =
sb144fs/ext2/ialloc.csb->u.ext2_sb.s_inode_bitmap_number[j - 1];
sb145fs/ext2/ialloc.csb->u.ext2_sb.s_inode_bitmap[j] =
sb146fs/ext2/ialloc.csb->u.ext2_sb.s_inode_bitmap[j - 1];
sb148fs/ext2/ialloc.cread_inode_bitmap (sb, block_group, 0);
sb190fs/ext2/ialloc.cstruct super_block * sb;
sb222fs/ext2/ialloc.csb = inode->i_sb;
sb223fs/ext2/ialloc.clock_super (sb);
sb225fs/ext2/ialloc.cinode->i_ino > sb->u.ext2_sb.s_es->s_inodes_count) {
sb226fs/ext2/ialloc.cext2_error (sb, "free_inode",
sb228fs/ext2/ialloc.cunlock_super (sb);
sb231fs/ext2/ialloc.ces = sb->u.ext2_sb.s_es;
sb232fs/ext2/ialloc.cblock_group = (inode->i_ino - 1) / EXT2_INODES_PER_GROUP(sb);
sb233fs/ext2/ialloc.cbit = (inode->i_ino - 1) % EXT2_INODES_PER_GROUP(sb);
sb234fs/ext2/ialloc.cbitmap_nr = load_inode_bitmap (sb, block_group);
sb235fs/ext2/ialloc.cbh = sb->u.ext2_sb.s_inode_bitmap[bitmap_nr];
sb237fs/ext2/ialloc.cext2_warning (sb, "ext2_free_inode",
sb240fs/ext2/ialloc.cgdp = get_group_desc (sb, block_group, &bh2);
sb246fs/ext2/ialloc.cmark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1);
sb250fs/ext2/ialloc.cif (sb->s_flags & MS_SYNC) {
sb255fs/ext2/ialloc.csb->s_dirt = 1;
sb257fs/ext2/ialloc.cunlock_super (sb);
sb307fs/ext2/ialloc.cstruct super_block * sb;
sb319fs/ext2/ialloc.csb = dir->i_sb;
sb320fs/ext2/ialloc.cinode->i_sb = sb;
sb321fs/ext2/ialloc.cinode->i_flags = sb->s_flags;
sb322fs/ext2/ialloc.clock_super (sb);
sb323fs/ext2/ialloc.ces = sb->u.ext2_sb.s_es;
sb329fs/ext2/ialloc.csb->u.ext2_sb.s_groups_count;
sb344fs/ext2/ialloc.cfor (j = 0; j < sb->u.ext2_sb.s_groups_count; j++) {
sb345fs/ext2/ialloc.ctmp = get_group_desc (sb, j, &bh2);
sb364fs/ext2/ialloc.ctmp = get_group_desc (sb, i, &bh2);
sb373fs/ext2/ialloc.cfor (j = 1; j < sb->u.ext2_sb.s_groups_count; j <<= 1) {
sb375fs/ext2/ialloc.cif (i >= sb->u.ext2_sb.s_groups_count)
sb376fs/ext2/ialloc.ci -= sb->u.ext2_sb.s_groups_count;
sb377fs/ext2/ialloc.ctmp = get_group_desc (sb, i, &bh2);
sb389fs/ext2/ialloc.cfor (j = 2; j < sb->u.ext2_sb.s_groups_count; j++) {
sb390fs/ext2/ialloc.cif (++i >= sb->u.ext2_sb.s_groups_count)
sb392fs/ext2/ialloc.ctmp = get_group_desc (sb, i, &bh2);
sb402fs/ext2/ialloc.cunlock_super (sb);
sb406fs/ext2/ialloc.cbitmap_nr = load_inode_bitmap (sb, i);
sb407fs/ext2/ialloc.cbh = sb->u.ext2_sb.s_inode_bitmap[bitmap_nr];
sb409fs/ext2/ialloc.cEXT2_INODES_PER_GROUP(sb))) <
sb410fs/ext2/ialloc.cEXT2_INODES_PER_GROUP(sb)) {
sb412fs/ext2/ialloc.cext2_warning (sb, "ext2_new_inode",
sb417fs/ext2/ialloc.cif (sb->s_flags & MS_SYNC) {
sb423fs/ext2/ialloc.cext2_error (sb, "ext2_new_inode",
sb426fs/ext2/ialloc.cunlock_super (sb);
sb432fs/ext2/ialloc.cj += i * EXT2_INODES_PER_GROUP(sb) + 1;
sb434fs/ext2/ialloc.cext2_error (sb, "ext2_new_inode",
sb437fs/ext2/ialloc.cunlock_super (sb);
sb446fs/ext2/ialloc.cmark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1);
sb447fs/ext2/ialloc.csb->s_dirt = 1;
sb449fs/ext2/ialloc.cinode->i_sb = sb;
sb452fs/ext2/ialloc.cinode->i_dev = sb->s_dev;
sb454fs/ext2/ialloc.cif (test_opt (sb, GRPID))
sb464fs/ext2/ialloc.cinode->i_blksize = sb->s_blocksize;
sb485fs/ext2/ialloc.cunlock_super (sb);
sb489fs/ext2/ialloc.cunsigned long ext2_count_free_inodes (struct super_block * sb)
sb498fs/ext2/ialloc.clock_super (sb);
sb499fs/ext2/ialloc.ces = sb->u.ext2_sb.s_es;
sb503fs/ext2/ialloc.cfor (i = 0; i < sb->u.ext2_sb.s_groups_count; i++) {
sb504fs/ext2/ialloc.cgdp = get_group_desc (sb, i, NULL);
sb506fs/ext2/ialloc.cbitmap_nr = load_inode_bitmap (sb, i);
sb507fs/ext2/ialloc.cx = ext2_count_free (sb->u.ext2_sb.s_inode_bitmap[bitmap_nr],
sb508fs/ext2/ialloc.cEXT2_INODES_PER_GROUP(sb) / 8);
sb515fs/ext2/ialloc.cunlock_super (sb);
sb518fs/ext2/ialloc.creturn sb->u.ext2_sb.s_es->s_free_inodes_count;
sb522fs/ext2/ialloc.cvoid ext2_check_inodes_bitmap (struct super_block * sb)
sb530fs/ext2/ialloc.clock_super (sb);
sb531fs/ext2/ialloc.ces = sb->u.ext2_sb.s_es;
sb535fs/ext2/ialloc.cfor (i = 0; i < sb->u.ext2_sb.s_groups_count; i++) {
sb536fs/ext2/ialloc.cgdp = get_group_desc (sb, i, NULL);
sb538fs/ext2/ialloc.cbitmap_nr = load_inode_bitmap (sb, i);
sb539fs/ext2/ialloc.cx = ext2_count_free (sb->u.ext2_sb.s_inode_bitmap[bitmap_nr],
sb540fs/ext2/ialloc.cEXT2_INODES_PER_GROUP(sb) / 8);
sb542fs/ext2/ialloc.cext2_error (sb, "ext2_check_inodes_bitmap",
sb549fs/ext2/ialloc.cext2_error (sb, "ext2_check_inodes_bitmap",
sb553fs/ext2/ialloc.cunlock_super (sb);
sb71fs/ext2/namei.cstruct super_block * sb;
sb80fs/ext2/namei.csb = dir->i_sb;
sb95fs/ext2/namei.cif ((block << EXT2_BLOCK_SIZE_BITS (sb)) >= dir->i_size)
sb116fs/ext2/namei.cext2_panic (sb, "ext2_find_entry",
sb127fs/ext2/namei.cdlimit = bh->b_data + sb->s_blocksize;
sb146fs/ext2/namei.cif (((block + NAMEI_RA_SIZE) << EXT2_BLOCK_SIZE_BITS (sb)) >=
sb225fs/ext2/namei.cstruct super_block * sb;
sb231fs/ext2/namei.csb = dir->i_sb;
sb257fs/ext2/namei.cif ((char *)de >= sb->s_blocksize + bh->b_data) {
sb260fs/ext2/namei.cbh = ext2_bread (dir, offset >> EXT2_BLOCK_SIZE_BITS(sb), 1, err);
sb273fs/ext2/namei.cde->rec_len = sb->s_blocksize;
sb274fs/ext2/namei.cdir->i_size = offset + sb->s_blocksize;
sb553fs/ext2/namei.cstruct super_block * sb;
sb556fs/ext2/namei.csb = inode->i_sb;
sb574fs/ext2/namei.cif ((void *) de >= (void *) (bh->b_data + sb->s_blocksize)) {
sb576fs/ext2/namei.cbh = ext2_bread (inode, offset >> EXT2_BLOCK_SIZE_BITS(sb), 1, &err);
sb578fs/ext2/namei.coffset += sb->s_blocksize;
sb29fs/ext2/super.cvoid ext2_error (struct super_block * sb, const char * function,
sb35fs/ext2/super.cif (!(sb->s_flags & MS_RDONLY)) {
sb36fs/ext2/super.csb->u.ext2_sb.s_mount_state |= EXT2_ERROR_FS;
sb37fs/ext2/super.csb->u.ext2_sb.s_es->s_state |= EXT2_ERROR_FS;
sb38fs/ext2/super.cmark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1);
sb39fs/ext2/super.csb->s_dirt = 1;
sb44fs/ext2/super.cif (test_opt (sb, ERRORS_PANIC) ||
sb45fs/ext2/super.c(sb->u.ext2_sb.s_es->s_errors == EXT2_ERRORS_PANIC &&
sb46fs/ext2/super.c!test_opt (sb, ERRORS_CONT) && !test_opt (sb, ERRORS_RO)))
sb48fs/ext2/super.cMAJOR(sb->s_dev), MINOR(sb->s_dev), function, buf);
sb50fs/ext2/super.cMAJOR(sb->s_dev), MINOR(sb->s_dev), function, buf);
sb51fs/ext2/super.cif (test_opt (sb, ERRORS_RO) ||
sb52fs/ext2/super.c(sb->u.ext2_sb.s_es->s_errors == EXT2_ERRORS_RO &&
sb53fs/ext2/super.c!test_opt (sb, ERRORS_CONT) && !test_opt (sb, ERRORS_PANIC))) {
sb55fs/ext2/super.csb->s_flags |= MS_RDONLY;
sb59fs/ext2/super.cNORET_TYPE void ext2_panic (struct super_block * sb, const char * function,
sb65fs/ext2/super.cif (!(sb->s_flags & MS_RDONLY)) {
sb66fs/ext2/super.csb->u.ext2_sb.s_mount_state |= EXT2_ERROR_FS;
sb67fs/ext2/super.csb->u.ext2_sb.s_es->s_state |= EXT2_ERROR_FS;
sb68fs/ext2/super.cmark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1);
sb69fs/ext2/super.csb->s_dirt = 1;
sb75fs/ext2/super.cMAJOR(sb->s_dev), MINOR(sb->s_dev), function, buf);
sb78fs/ext2/super.cvoid ext2_warning (struct super_block * sb, const char * function,
sb88fs/ext2/super.cMAJOR(sb->s_dev), MINOR(sb->s_dev), function, buf);
sb91fs/ext2/super.cvoid ext2_put_super (struct super_block * sb)
sb96fs/ext2/super.clock_super (sb);
sb97fs/ext2/super.cif (!(sb->s_flags & MS_RDONLY)) {
sb98fs/ext2/super.csb->u.ext2_sb.s_es->s_state = sb->u.ext2_sb.s_mount_state;
sb99fs/ext2/super.cmark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1);
sb101fs/ext2/super.csb->s_dev = 0;
sb102fs/ext2/super.cdb_count = sb->u.ext2_sb.s_db_per_group;
sb104fs/ext2/super.cif (sb->u.ext2_sb.s_group_desc[i])
sb105fs/ext2/super.cbrelse (sb->u.ext2_sb.s_group_desc[i]);
sb106fs/ext2/super.ckfree_s (sb->u.ext2_sb.s_group_desc,
sb109fs/ext2/super.cif (sb->u.ext2_sb.s_inode_bitmap[i])
sb110fs/ext2/super.cbrelse (sb->u.ext2_sb.s_inode_bitmap[i]);
sb112fs/ext2/super.cif (sb->u.ext2_sb.s_block_bitmap[i])
sb113fs/ext2/super.cbrelse (sb->u.ext2_sb.s_block_bitmap[i]);
sb114fs/ext2/super.cbrelse (sb->u.ext2_sb.s_sbh);
sb115fs/ext2/super.cunlock_super (sb);
sb132fs/ext2/super.cstatic int convert_pre_02b_fs (struct super_block * sb,
sb143fs/ext2/super.cbh2 = bread (sb->s_dev, 2, BLOCK_SIZE);
sb149fs/ext2/super.cgroups_count = (sb->u.ext2_sb.s_blocks_count - 
sb150fs/ext2/super.csb->u.ext2_sb.s_first_data_block +
sb151fs/ext2/super.c(EXT2_BLOCK_SIZE(sb) * 8) - 1) /
sb152fs/ext2/super.c(EXT2_BLOCK_SIZE(sb) * 8);
sb166fs/ext2/super.csb->s_magic = EXT2_SUPER_MAGIC;
sb298fs/ext2/super.cstatic void ext2_setup_super (struct super_block * sb,
sb304fs/ext2/super.csb->s_flags |= MS_RDONLY;
sb306fs/ext2/super.cif (!(sb->s_flags & MS_RDONLY)) {
sb307fs/ext2/super.cif (!(sb->u.ext2_sb.s_mount_state & EXT2_VALID_FS))
sb310fs/ext2/super.celse if ((sb->u.ext2_sb.s_mount_state & EXT2_ERROR_FS))
sb326fs/ext2/super.cmark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1);
sb327fs/ext2/super.csb->s_dirt = 1;
sb328fs/ext2/super.cif (test_opt (sb, DEBUG))
sb331fs/ext2/super.cEXT2FS_VERSION, EXT2FS_DATE, sb->s_blocksize,
sb332fs/ext2/super.csb->u.ext2_sb.s_frag_size,
sb333fs/ext2/super.csb->u.ext2_sb.s_groups_count,
sb334fs/ext2/super.cEXT2_BLOCKS_PER_GROUP(sb),
sb335fs/ext2/super.cEXT2_INODES_PER_GROUP(sb),
sb336fs/ext2/super.csb->u.ext2_sb.s_mount_opt);
sb337fs/ext2/super.cif (test_opt (sb, CHECK)) {
sb338fs/ext2/super.cext2_check_blocks_bitmap (sb);
sb339fs/ext2/super.cext2_check_inodes_bitmap (sb);
sb344fs/ext2/super.cstatic int ext2_check_descriptors (struct super_block * sb)
sb348fs/ext2/super.cunsigned long block = sb->u.ext2_sb.s_es->s_first_data_block;
sb353fs/ext2/super.cfor (i = 0; i < sb->u.ext2_sb.s_groups_count; i++)
sb355fs/ext2/super.cif ((i % EXT2_DESC_PER_BLOCK(sb)) == 0)
sb356fs/ext2/super.cgdp = (struct ext2_group_desc *) sb->u.ext2_sb.s_group_desc[desc_block++]->b_data;
sb358fs/ext2/super.cgdp->bg_block_bitmap >= block + EXT2_BLOCKS_PER_GROUP(sb))
sb360fs/ext2/super.cext2_error (sb, "ext2_check_descriptors",
sb367fs/ext2/super.cgdp->bg_inode_bitmap >= block + EXT2_BLOCKS_PER_GROUP(sb))
sb369fs/ext2/super.cext2_error (sb, "ext2_check_descriptors",
sb376fs/ext2/super.cgdp->bg_inode_table + sb->u.ext2_sb.s_itb_per_group >=
sb377fs/ext2/super.cblock + EXT2_BLOCKS_PER_GROUP(sb))
sb379fs/ext2/super.cext2_error (sb, "ext2_check_descriptors",
sb385fs/ext2/super.cblock += EXT2_BLOCKS_PER_GROUP(sb);
sb391fs/ext2/super.cstruct super_block * ext2_read_super (struct super_block * sb, void * data,
sb400fs/ext2/super.cint dev = sb->s_dev;
sb407fs/ext2/super.cset_opt (sb->u.ext2_sb.s_mount_opt, CHECK_NORMAL);
sb409fs/ext2/super.c&sb->u.ext2_sb.s_mount_opt)) {
sb410fs/ext2/super.csb->s_dev = 0;
sb414fs/ext2/super.clock_super (sb);
sb417fs/ext2/super.csb->s_dev = 0;
sb418fs/ext2/super.cunlock_super (sb);
sb427fs/ext2/super.csb->u.ext2_sb.s_es = es;
sb428fs/ext2/super.csb->s_magic = es->s_magic;
sb429fs/ext2/super.cif (sb->s_magic != EXT2_SUPER_MAGIC
sb431fs/ext2/super.c&& sb->s_magic != EXT2_PRE_02B_MAGIC
sb434fs/ext2/super.csb->s_dev = 0;
sb435fs/ext2/super.cunlock_super (sb);
sb442fs/ext2/super.csb->s_blocksize = EXT2_MIN_BLOCK_SIZE << es->s_log_block_size;
sb443fs/ext2/super.csb->s_blocksize_bits = EXT2_BLOCK_SIZE_BITS(sb);
sb444fs/ext2/super.cif (sb->s_blocksize != BLOCK_SIZE && 
sb445fs/ext2/super.c(sb->s_blocksize == 1024 || sb->s_blocksize == 2048 ||  
sb446fs/ext2/super.csb->s_blocksize == 4096)) {
sb450fs/ext2/super.cset_blocksize (dev, sb->s_blocksize);
sb451fs/ext2/super.clogic_sb_block = (sb_block*BLOCK_SIZE) / sb->s_blocksize;
sb452fs/ext2/super.coffset = (sb_block*BLOCK_SIZE) % sb->s_blocksize;
sb453fs/ext2/super.cbh = bread (dev, logic_sb_block, sb->s_blocksize);
sb457fs/ext2/super.csb->u.ext2_sb.s_es = es;
sb459fs/ext2/super.csb->s_dev = 0;
sb460fs/ext2/super.cunlock_super (sb);
sb466fs/ext2/super.csb->u.ext2_sb.s_frag_size = EXT2_MIN_FRAG_SIZE <<
sb468fs/ext2/super.cif (sb->u.ext2_sb.s_frag_size)
sb469fs/ext2/super.csb->u.ext2_sb.s_frags_per_block = sb->s_blocksize /
sb470fs/ext2/super.csb->u.ext2_sb.s_frag_size;
sb472fs/ext2/super.csb->s_magic = 0;
sb473fs/ext2/super.csb->u.ext2_sb.s_blocks_per_group = es->s_blocks_per_group;
sb474fs/ext2/super.csb->u.ext2_sb.s_frags_per_group = es->s_frags_per_group;
sb475fs/ext2/super.csb->u.ext2_sb.s_inodes_per_group = es->s_inodes_per_group;
sb476fs/ext2/super.csb->u.ext2_sb.s_inodes_per_block = sb->s_blocksize /
sb478fs/ext2/super.csb->u.ext2_sb.s_itb_per_group = sb->u.ext2_sb.s_inodes_per_group /
sb479fs/ext2/super.csb->u.ext2_sb.s_inodes_per_block;
sb480fs/ext2/super.csb->u.ext2_sb.s_desc_per_block = sb->s_blocksize /
sb482fs/ext2/super.csb->u.ext2_sb.s_sbh = bh;
sb483fs/ext2/super.csb->u.ext2_sb.s_es = es;
sb485fs/ext2/super.csb->u.ext2_sb.s_resuid = resuid;
sb487fs/ext2/super.csb->u.ext2_sb.s_resuid = es->s_def_resuid;
sb489fs/ext2/super.csb->u.ext2_sb.s_resgid = resgid;
sb491fs/ext2/super.csb->u.ext2_sb.s_resgid = es->s_def_resgid;
sb492fs/ext2/super.csb->u.ext2_sb.s_mount_state = es->s_state;
sb493fs/ext2/super.csb->u.ext2_sb.s_rename_lock = 0;
sb494fs/ext2/super.csb->u.ext2_sb.s_rename_wait = NULL;
sb496fs/ext2/super.cif (sb->s_magic == EXT2_PRE_02B_MAGIC) {
sb501fs/ext2/super.csb->s_dev = 0;
sb502fs/ext2/super.cunlock_super (sb);
sb510fs/ext2/super.cif (!(sb->s_flags & MS_RDONLY)) {
sb511fs/ext2/super.csb->s_dev = 0;
sb512fs/ext2/super.cunlock_super (sb);
sb517fs/ext2/super.cif (!convert_pre_02b_fs (sb, bh)) {
sb518fs/ext2/super.csb->s_dev = 0;
sb519fs/ext2/super.cunlock_super (sb);
sb528fs/ext2/super.cif (sb->s_magic != EXT2_SUPER_MAGIC) {
sb529fs/ext2/super.csb->s_dev = 0;
sb530fs/ext2/super.cunlock_super (sb);
sb537fs/ext2/super.cif (sb->s_blocksize != bh->b_size) {
sb538fs/ext2/super.csb->s_dev = 0;
sb539fs/ext2/super.cunlock_super (sb);
sb547fs/ext2/super.cif (sb->s_blocksize != sb->u.ext2_sb.s_frag_size) {
sb548fs/ext2/super.csb->s_dev = 0;
sb549fs/ext2/super.cunlock_super (sb);
sb552fs/ext2/super.csb->u.ext2_sb.s_frag_size, sb->s_blocksize);
sb556fs/ext2/super.csb->u.ext2_sb.s_groups_count = (es->s_blocks_count -
sb558fs/ext2/super.cEXT2_BLOCKS_PER_GROUP(sb) - 1) /
sb559fs/ext2/super.cEXT2_BLOCKS_PER_GROUP(sb);
sb560fs/ext2/super.cdb_count = (sb->u.ext2_sb.s_groups_count + EXT2_DESC_PER_BLOCK(sb) - 1) /
sb561fs/ext2/super.cEXT2_DESC_PER_BLOCK(sb);
sb562fs/ext2/super.csb->u.ext2_sb.s_group_desc = kmalloc (db_count * sizeof (struct buffer_head *), GFP_KERNEL);
sb563fs/ext2/super.cif (sb->u.ext2_sb.s_group_desc == NULL) {
sb564fs/ext2/super.csb->s_dev = 0;
sb565fs/ext2/super.cunlock_super (sb);
sb571fs/ext2/super.csb->u.ext2_sb.s_group_desc[i] = bread (dev, logic_sb_block + i + 1,
sb572fs/ext2/super.csb->s_blocksize);
sb573fs/ext2/super.cif (!sb->u.ext2_sb.s_group_desc[i]) {
sb574fs/ext2/super.csb->s_dev = 0;
sb575fs/ext2/super.cunlock_super (sb);
sb577fs/ext2/super.cbrelse (sb->u.ext2_sb.s_group_desc[j]);
sb578fs/ext2/super.ckfree_s (sb->u.ext2_sb.s_group_desc,
sb585fs/ext2/super.cif (!ext2_check_descriptors (sb)) {
sb586fs/ext2/super.csb->s_dev = 0;
sb587fs/ext2/super.cunlock_super (sb);
sb589fs/ext2/super.cbrelse (sb->u.ext2_sb.s_group_desc[j]);
sb590fs/ext2/super.ckfree_s (sb->u.ext2_sb.s_group_desc,
sb597fs/ext2/super.csb->u.ext2_sb.s_inode_bitmap_number[i] = 0;
sb598fs/ext2/super.csb->u.ext2_sb.s_inode_bitmap[i] = NULL;
sb599fs/ext2/super.csb->u.ext2_sb.s_block_bitmap_number[i] = 0;
sb600fs/ext2/super.csb->u.ext2_sb.s_block_bitmap[i] = NULL;
sb602fs/ext2/super.csb->u.ext2_sb.s_loaded_inode_bitmaps = 0;
sb603fs/ext2/super.csb->u.ext2_sb.s_loaded_block_bitmaps = 0;
sb604fs/ext2/super.csb->u.ext2_sb.s_db_per_group = db_count;
sb605fs/ext2/super.cunlock_super (sb);
sb609fs/ext2/super.csb->s_dev = dev;
sb610fs/ext2/super.csb->s_op = &ext2_sops;
sb611fs/ext2/super.cif (!(sb->s_mounted = iget (sb, EXT2_ROOT_INO))) {
sb612fs/ext2/super.csb->s_dev = 0;
sb614fs/ext2/super.cif (sb->u.ext2_sb.s_group_desc[i])
sb615fs/ext2/super.cbrelse (sb->u.ext2_sb.s_group_desc[i]);
sb616fs/ext2/super.ckfree_s (sb->u.ext2_sb.s_group_desc,
sb625fs/ext2/super.cmark_buffer_dirty(sb->u.ext2_sb.s_group_desc[i], 1);
sb626fs/ext2/super.csb->s_dirt = 1;
sb629fs/ext2/super.cext2_setup_super (sb, es);
sb630fs/ext2/super.creturn sb;
sb633fs/ext2/super.cstatic void ext2_commit_super (struct super_block * sb,
sb637fs/ext2/super.cmark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1);
sb638fs/ext2/super.csb->s_dirt = 0;
sb652fs/ext2/super.cvoid ext2_write_super (struct super_block * sb)
sb656fs/ext2/super.cif (!(sb->s_flags & MS_RDONLY)) {
sb657fs/ext2/super.ces = sb->u.ext2_sb.s_es;
sb665fs/ext2/super.cext2_commit_super (sb, es);
sb667fs/ext2/super.csb->s_dirt = 0;
sb670fs/ext2/super.cint ext2_remount (struct super_block * sb, int * flags, char * data)
sb673fs/ext2/super.cunsigned short resuid = sb->u.ext2_sb.s_resuid;
sb674fs/ext2/super.cunsigned short resgid = sb->u.ext2_sb.s_resgid;
sb681fs/ext2/super.cset_opt (sb->u.ext2_sb.s_mount_opt, CHECK_NORMAL);
sb686fs/ext2/super.csb->u.ext2_sb.s_mount_opt = new_mount_opt;
sb687fs/ext2/super.csb->u.ext2_sb.s_resuid = resuid;
sb688fs/ext2/super.csb->u.ext2_sb.s_resgid = resgid;
sb689fs/ext2/super.ces = sb->u.ext2_sb.s_es;
sb690fs/ext2/super.cif ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY))
sb694fs/ext2/super.c!(sb->u.ext2_sb.s_mount_state & EXT2_VALID_FS))
sb700fs/ext2/super.ces->s_state = sb->u.ext2_sb.s_mount_state;
sb702fs/ext2/super.cmark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1);
sb703fs/ext2/super.csb->s_dirt = 1;
sb704fs/ext2/super.cext2_commit_super (sb, es);
sb712fs/ext2/super.csb->u.ext2_sb.s_mount_state = es->s_state;
sb713fs/ext2/super.csb->s_flags &= ~MS_RDONLY;
sb714fs/ext2/super.cext2_setup_super (sb, es);
sb719fs/ext2/super.cvoid ext2_statfs (struct super_block * sb, struct statfs * buf)
sb725fs/ext2/super.cif (test_opt (sb, MINIX_DF))
sb732fs/ext2/super.csb->u.ext2_sb.s_db_per_group /* descriptors */ +
sb735fs/ext2/super.csb->u.ext2_sb.s_itb_per_group /* inode table */;
sb736fs/ext2/super.coverhead = sb->u.ext2_sb.s_es->s_first_data_block +
sb737fs/ext2/super.csb->u.ext2_sb.s_groups_count * overhead_per_group;
sb741fs/ext2/super.cput_fs_long (sb->s_blocksize, &buf->f_bsize);
sb742fs/ext2/super.cput_fs_long (sb->u.ext2_sb.s_es->s_blocks_count - overhead,
sb744fs/ext2/super.ctmp = ext2_count_free_blocks (sb);
sb746fs/ext2/super.cif (tmp >= sb->u.ext2_sb.s_es->s_r_blocks_count)
sb747fs/ext2/super.cput_fs_long (tmp - sb->u.ext2_sb.s_es->s_r_blocks_count,
sb751fs/ext2/super.cput_fs_long (sb->u.ext2_sb.s_es->s_inodes_count, &buf->f_files);
sb752fs/ext2/super.cput_fs_long (ext2_count_free_inodes (sb), &buf->f_ffree);
sb494fs/inode.cstruct inode * __iget(struct super_block * sb, int nr, int crossmntp)
sb501fs/inode.cif (!sb)
sb503fs/inode.ch = hash(sb->s_dev, nr);
sb506fs/inode.cif (inode->i_dev == sb->s_dev && inode->i_ino == nr)
sb518fs/inode.cinode->i_sb = sb;
sb519fs/inode.cinode->i_dev = sb->s_dev;
sb521fs/inode.cinode->i_flags = sb->s_flags;
sb532fs/inode.cif (inode->i_dev != sb->s_dev || inode->i_ino != nr) {
sb28fs/isofs/inode.cvoid isofs_put_super(struct super_block *sb)
sb30fs/isofs/inode.clock_super(sb);
sb36fs/isofs/inode.csb->s_dev = 0;
sb37fs/isofs/inode.cunlock_super(sb);
sb312fs/isofs/inode.cvoid isofs_statfs (struct super_block *sb, struct statfs *buf)
sb316fs/isofs/inode.cput_fs_long(sb->u.isofs_sb.s_nzones, &buf->f_blocks);
sb319fs/isofs/inode.cput_fs_long(sb->u.isofs_sb.s_ninodes, &buf->f_files);
sb46fs/minix/bitmap.cvoid minix_free_block(struct super_block * sb, int block)
sb51fs/minix/bitmap.cif (!sb) {
sb55fs/minix/bitmap.cif (block < sb->u.minix_sb.s_firstdatazone ||
sb56fs/minix/bitmap.cblock >= sb->u.minix_sb.s_nzones) {
sb60fs/minix/bitmap.cbh = get_hash_table(sb->s_dev,block,BLOCK_SIZE);
sb64fs/minix/bitmap.czone = block - sb->u.minix_sb.s_firstdatazone + 1;
sb67fs/minix/bitmap.cbh = sb->u.minix_sb.s_zmap[zone];
sb73fs/minix/bitmap.cprintk("free_block (%04x:%d): bit already cleared\n",sb->s_dev,block);
sb78fs/minix/bitmap.cint minix_new_block(struct super_block * sb)
sb83fs/minix/bitmap.cif (!sb) {
sb90fs/minix/bitmap.cif ((bh=sb->u.minix_sb.s_zmap[i]) != NULL)
sb100fs/minix/bitmap.cj += i*8192 + sb->u.minix_sb.s_firstdatazone-1;
sb101fs/minix/bitmap.cif (j < sb->u.minix_sb.s_firstdatazone ||
sb102fs/minix/bitmap.cj >= sb->u.minix_sb.s_nzones)
sb104fs/minix/bitmap.cif (!(bh = getblk(sb->s_dev,j,BLOCK_SIZE))) {
sb115fs/minix/bitmap.cunsigned long minix_count_free_blocks(struct super_block *sb)
sb117fs/minix/bitmap.creturn (sb->u.minix_sb.s_nzones - count_used(sb->u.minix_sb.s_zmap,sb->u.minix_sb.s_zmap_blocks,sb->u.minix_sb.s_nzones))
sb118fs/minix/bitmap.c<< sb->u.minix_sb.s_log_zone_size;
sb161fs/minix/bitmap.cstruct super_block * sb;
sb168fs/minix/bitmap.csb = dir->i_sb;
sb169fs/minix/bitmap.cinode->i_sb = sb;
sb193fs/minix/bitmap.cinode->i_dev = sb->s_dev;
sb205fs/minix/bitmap.cunsigned long minix_count_free_inodes(struct super_block *sb)
sb207fs/minix/bitmap.creturn sb->u.minix_sb.s_ninodes - count_used(sb->u.minix_sb.s_imap,sb->u.minix_sb.s_imap_blocks,sb->u.minix_sb.s_ninodes);
sb28fs/minix/inode.cstatic void minix_commit_super (struct super_block * sb,
sb31fs/minix/inode.cmark_buffer_dirty(sb->u.minix_sb.s_sbh, 1);
sb32fs/minix/inode.csb->s_dirt = 0;
sb35fs/minix/inode.cvoid minix_write_super (struct super_block * sb)
sb39fs/minix/inode.cif (!(sb->s_flags & MS_RDONLY)) {
sb40fs/minix/inode.cms = sb->u.minix_sb.s_ms;
sb44fs/minix/inode.cminix_commit_super (sb, ms);
sb46fs/minix/inode.csb->s_dirt = 0;
sb50fs/minix/inode.cvoid minix_put_super(struct super_block *sb)
sb54fs/minix/inode.clock_super(sb);
sb55fs/minix/inode.cif (!(sb->s_flags & MS_RDONLY)) {
sb56fs/minix/inode.csb->u.minix_sb.s_ms->s_state = sb->u.minix_sb.s_mount_state;
sb57fs/minix/inode.cmark_buffer_dirty(sb->u.minix_sb.s_sbh, 1);
sb59fs/minix/inode.csb->s_dev = 0;
sb61fs/minix/inode.cbrelse(sb->u.minix_sb.s_imap[i]);
sb63fs/minix/inode.cbrelse(sb->u.minix_sb.s_zmap[i]);
sb64fs/minix/inode.cbrelse (sb->u.minix_sb.s_sbh);
sb65fs/minix/inode.cunlock_super(sb);
sb80fs/minix/inode.cint minix_remount (struct super_block * sb, int * flags, char * data)
sb84fs/minix/inode.cms = sb->u.minix_sb.s_ms;
sb85fs/minix/inode.cif ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY))
sb89fs/minix/inode.c!(sb->u.minix_sb.s_mount_state & MINIX_VALID_FS))
sb92fs/minix/inode.cms->s_state = sb->u.minix_sb.s_mount_state;
sb93fs/minix/inode.cmark_buffer_dirty(sb->u.minix_sb.s_sbh, 1);
sb94fs/minix/inode.csb->s_dirt = 1;
sb95fs/minix/inode.cminix_commit_super (sb, ms);
sb99fs/minix/inode.csb->u.minix_sb.s_mount_state = ms->s_state;
sb101fs/minix/inode.cmark_buffer_dirty(sb->u.minix_sb.s_sbh, 1);
sb102fs/minix/inode.csb->s_dirt = 1;
sb104fs/minix/inode.cif (!(sb->u.minix_sb.s_mount_state & MINIX_VALID_FS))
sb107fs/minix/inode.celse if ((sb->u.minix_sb.s_mount_state & MINIX_ERROR_FS))
sb213fs/minix/inode.cvoid minix_statfs(struct super_block *sb, struct statfs *buf)
sb219fs/minix/inode.ctmp = sb->u.minix_sb.s_nzones - sb->u.minix_sb.s_firstdatazone;
sb220fs/minix/inode.ctmp <<= sb->u.minix_sb.s_log_zone_size;
sb222fs/minix/inode.ctmp = minix_count_free_blocks(sb);
sb225fs/minix/inode.cput_fs_long(sb->u.minix_sb.s_ninodes, &buf->f_files);
sb226fs/minix/inode.cput_fs_long(minix_count_free_inodes(sb), &buf->f_ffree);
sb227fs/minix/inode.cput_fs_long(sb->u.minix_sb.s_namelen, &buf->f_namelen);
sb19fs/msdos/fat.cint fat_access(struct super_block *sb,int nr,int new_value)
sb25fs/msdos/fat.cif ((unsigned) (nr-2) >= MSDOS_SB(sb)->clusters) return 0;
sb26fs/msdos/fat.cif (MSDOS_SB(sb)->fat_bits == 16) first = last = nr*2;
sb31fs/msdos/fat.cif (!(bh = msdos_sread(sb->s_dev,MSDOS_SB(sb)->fat_start+(first >>
sb39fs/msdos/fat.cif (!(bh2 = msdos_sread(sb->s_dev,MSDOS_SB(sb)->fat_start+(last
sb46fs/msdos/fat.cif (MSDOS_SB(sb)->fat_bits == 16) {
sb61fs/msdos/fat.cif (MSDOS_SB(sb)->fat_bits == 16)
sb76fs/msdos/fat.cfor (copy = 1; copy < MSDOS_SB(sb)->fats; copy++) {
sb77fs/msdos/fat.cif (!(c_bh = msdos_sread(sb->s_dev,MSDOS_SB(sb)->
sb78fs/msdos/fat.cfat_start+(first >> SECTOR_BITS)+MSDOS_SB(sb)->
sb83fs/msdos/fat.cif (!(c_bh2 = msdos_sread(sb->s_dev,
sb84fs/msdos/fat.cMSDOS_SB(sb)->fat_start+(first >>
sb85fs/msdos/fat.cSECTOR_BITS)+MSDOS_SB(sb)->fat_length*copy
sb238fs/msdos/fat.cstruct msdos_sb_info *sb;
sb241fs/msdos/fat.csb = MSDOS_SB(inode->i_sb);
sb244fs/msdos/fat.cif (sector >= sb->dir_entries >> MSDOS_DPS_BITS) return 0;
sb245fs/msdos/fat.creturn sector+sb->dir_start;
sb247fs/msdos/fat.ccluster = sector/sb->cluster_size;
sb248fs/msdos/fat.coffset = sector % sb->cluster_size;
sb250fs/msdos/fat.creturn (cluster-2)*sb->cluster_size+sb->data_start+offset;
sb30fs/msdos/inode.cstruct super_block *sb;
sb39fs/msdos/inode.csb = inode->i_sb;
sb46fs/msdos/inode.cfs_panic(sb,"...");
sb55fs/msdos/inode.cvoid msdos_put_super(struct super_block *sb)
sb57fs/msdos/inode.ccache_inval_dev(sb->s_dev);
sb58fs/msdos/inode.cset_blocksize (sb->s_dev,BLOCK_SIZE);
sb59fs/msdos/inode.clock_super(sb);
sb60fs/msdos/inode.csb->s_dev = 0;
sb61fs/msdos/inode.cunlock_super(sb);
sb281fs/msdos/inode.cvoid msdos_statfs(struct super_block *sb,struct statfs *buf)
sb285fs/msdos/inode.cput_fs_long(sb->s_magic,&buf->f_type);
sb286fs/msdos/inode.cput_fs_long(MSDOS_SB(sb)->cluster_size*SECTOR_SIZE,&buf->f_bsize);
sb287fs/msdos/inode.cput_fs_long(MSDOS_SB(sb)->clusters,&buf->f_blocks);
sb288fs/msdos/inode.clock_fat(sb);
sb289fs/msdos/inode.cif (MSDOS_SB(sb)->free_clusters != -1)
sb290fs/msdos/inode.cfree = MSDOS_SB(sb)->free_clusters;
sb293fs/msdos/inode.cfor (nr = 2; nr < MSDOS_SB(sb)->clusters+2; nr++)
sb294fs/msdos/inode.cif (!fat_access(sb,nr,-1)) free++;
sb295fs/msdos/inode.cMSDOS_SB(sb)->free_clusters = free;
sb297fs/msdos/inode.cunlock_fat(sb);
sb308fs/msdos/inode.cstruct msdos_sb_info *sb;
sb311fs/msdos/inode.csb = MSDOS_SB(inode->i_sb);
sb313fs/msdos/inode.creturn sb->dir_start + block;
sb315fs/msdos/inode.ccluster = block/sb->cluster_size;
sb316fs/msdos/inode.coffset = block % sb->cluster_size;
sb318fs/msdos/inode.creturn (cluster-2)*sb->cluster_size+sb->data_start+offset;
sb93fs/msdos/misc.cvoid lock_fat(struct super_block *sb)
sb95fs/msdos/misc.cwhile (MSDOS_SB(sb)->fat_lock) sleep_on(&MSDOS_SB(sb)->fat_wait);
sb96fs/msdos/misc.cMSDOS_SB(sb)->fat_lock = 1;
sb100fs/msdos/misc.cvoid unlock_fat(struct super_block *sb)
sb102fs/msdos/misc.cMSDOS_SB(sb)->fat_lock = 0;
sb103fs/msdos/misc.cwake_up(&MSDOS_SB(sb)->fat_wait);
sb321fs/msdos/misc.cinode = iget(sb,sector*MSDOS_DPS+entry); \
sb337fs/msdos/misc.cstatic int raw_scan_sector(struct super_block *sb,int sector,char *name,
sb346fs/msdos/misc.cif (!(bh = msdos_sread(sb->s_dev,sector))) return -EIO;
sb378fs/msdos/misc.cstatic int raw_scan_root(struct super_block *sb,char *name,int *number,int *ino,
sb383fs/msdos/misc.cfor (count = 0; count < MSDOS_SB(sb)->dir_entries/MSDOS_DPS; count++) {
sb384fs/msdos/misc.cif ((cluster = raw_scan_sector(sb,MSDOS_SB(sb)->dir_start+count,
sb396fs/msdos/misc.cstatic int raw_scan_nonroot(struct super_block *sb,int start,char *name,
sb406fs/msdos/misc.cfor (count = 0; count < MSDOS_SB(sb)->cluster_size; count++) {
sb407fs/msdos/misc.cif ((cluster = raw_scan_sector(sb,(start-2)*
sb408fs/msdos/misc.cMSDOS_SB(sb)->cluster_size+MSDOS_SB(sb)->data_start+
sb412fs/msdos/misc.cif (!(start = fat_access(sb,start,-1))) {
sb413fs/msdos/misc.cfs_panic(sb,"FAT error");
sb432fs/msdos/misc.cstatic int raw_scan(struct super_block *sb,int start,char *name,int *number,
sb436fs/msdos/misc.creturn raw_scan_nonroot(sb,start,name,number,ino,res_bh,res_de);
sb437fs/msdos/misc.celse return raw_scan_root(sb,name,number,ino,res_bh,res_de);
sb239fs/msdos/namei.cstatic void dump_fat(struct super_block *sb,int start)
sb244fs/msdos/namei.cstart = fat_access(sb,start,-1);
sb160fs/namei.cstruct super_block * sb;
sb172fs/namei.c} else if ((sb = dir->i_sb) && (dir == sb->s_mounted)) {
sb173fs/namei.csb = dir->i_sb;
sb175fs/namei.cdir = sb->s_covered;
sb44fs/nfs/inode.cvoid nfs_put_super(struct super_block *sb)
sb47fs/nfs/inode.cclose_fp(sb->u.nfs_sb.s_server.file, 0);
sb48fs/nfs/inode.clock_super(sb);
sb49fs/nfs/inode.csb->s_dev = 0;
sb50fs/nfs/inode.cunlock_super(sb);
sb61fs/nfs/inode.cstruct super_block *nfs_read_super(struct super_block *sb, void *raw_data,
sb68fs/nfs/inode.cdev_t dev = sb->s_dev;
sb72fs/nfs/inode.csb->s_dev = 0;
sb82fs/nfs/inode.csb->s_dev = 0;
sb87fs/nfs/inode.csb->s_dev = 0;
sb91fs/nfs/inode.clock_super(sb);
sb92fs/nfs/inode.csb->s_blocksize = 1024; /* XXX */
sb93fs/nfs/inode.csb->s_blocksize_bits = 10;
sb94fs/nfs/inode.csb->s_magic = NFS_SUPER_MAGIC;
sb95fs/nfs/inode.csb->s_dev = dev;
sb96fs/nfs/inode.csb->s_op = &nfs_sops;
sb97fs/nfs/inode.cserver = &sb->u.nfs_sb.s_server;
sb119fs/nfs/inode.csb->u.nfs_sb.s_root = data->root;
sb120fs/nfs/inode.cunlock_super(sb);
sb121fs/nfs/inode.cif (!(sb->s_mounted = nfs_fhget(sb, &data->root, NULL))) {
sb122fs/nfs/inode.csb->s_dev = 0;
sb126fs/nfs/inode.creturn sb;
sb129fs/nfs/inode.cvoid nfs_statfs(struct super_block *sb, struct statfs *buf)
sb135fs/nfs/inode.cerror = nfs_proc_statfs(&sb->u.nfs_sb.s_server, &sb->u.nfs_sb.s_root,
sb161fs/nfs/inode.cstruct inode *nfs_fhget(struct super_block *sb, struct nfs_fh *fhandle,
sb168fs/nfs/inode.cif (!sb) {
sb173fs/nfs/inode.cerror = nfs_proc_getattr(&sb->u.nfs_sb.s_server, fhandle,
sb181fs/nfs/inode.cif (!(inode = iget(sb, fattr->fileid))) {
sb185fs/nfs/inode.cif (inode->i_dev == sb->s_dev) {
sb58fs/proc/fd.cstruct super_block * sb;
sb68fs/proc/fd.csb = dir->i_sb;
sb79fs/proc/fd.cif (!(*result = iget(sb,(pid << 16)+2))) {
sb113fs/proc/fd.cif (!(*result = iget(sb,ino)))
sb26fs/proc/inode.cvoid proc_put_super(struct super_block *sb)
sb28fs/proc/inode.clock_super(sb);
sb29fs/proc/inode.csb->s_dev = 0;
sb30fs/proc/inode.cunlock_super(sb);
sb61fs/proc/inode.cvoid proc_statfs(struct super_block *sb, struct statfs *buf)
sb35fs/super.cstatic int do_remount_sb(struct super_block *sb, int flags, char * data);
sb185fs/super.cvoid __wait_on_super(struct super_block * sb)
sb189fs/super.cadd_wait_queue(&sb->s_wait, &wait);
sb192fs/super.cif (sb->s_lock) {
sb196fs/super.cremove_wait_queue(&sb->s_wait, &wait);
sb202fs/super.cstruct super_block * sb;
sb204fs/super.cfor (sb = super_blocks + 0 ; sb < super_blocks + NR_SUPER ; sb++) {
sb205fs/super.cif (!sb->s_dev)
sb207fs/super.cif (dev && sb->s_dev != dev)
sb209fs/super.cwait_on_super(sb);
sb210fs/super.cif (!sb->s_dev || !sb->s_dirt)
sb212fs/super.cif (dev && (dev != sb->s_dev))
sb214fs/super.cif (sb->s_op && sb->s_op->write_super)
sb215fs/super.csb->s_op->write_super(sb);
sb239fs/super.cstruct super_block * sb;
sb246fs/super.cif (!(sb = get_super(dev)))
sb248fs/super.cif (sb->s_covered) {
sb253fs/super.cif (sb->s_op && sb->s_op->put_super)
sb254fs/super.csb->s_op->put_super(sb);
sb324fs/super.cstruct super_block * sb;
sb330fs/super.cif (!(sb=get_super(dev)))
sb332fs/super.cif (!(sb->s_flags & MS_RDONLY)) {
sb334fs/super.cretval = do_remount_sb(sb, MS_RDONLY, 0);
sb340fs/super.cif (!(sb=get_super(dev)) || !(sb->s_covered))
sb342fs/super.cif (!sb->s_covered->i_mount)
sb345fs/super.cif (!fs_may_umount(dev, sb->s_mounted))
sb347fs/super.csb->s_covered->i_mount = NULL;
sb348fs/super.ciput(sb->s_covered);
sb349fs/super.csb->s_covered = NULL;
sb350fs/super.ciput(sb->s_mounted);
sb351fs/super.csb->s_mounted = NULL;
sb352fs/super.cif (sb->s_op && sb->s_op->write_super && sb->s_dirt)
sb353fs/super.csb->s_op->write_super(sb);
sb433fs/super.cstruct super_block * sb;
sb451fs/super.csb = read_super(dev,type,flags,data,0);
sb452fs/super.cif (!sb || sb->s_covered) {
sb456fs/super.csb->s_covered = dir_i;
sb457fs/super.cdir_i->i_mount = sb->s_mounted;
sb468fs/super.cstatic int do_remount_sb(struct super_block *sb, int flags, char *data)
sb472fs/super.cif (!(flags & MS_RDONLY ) && sb->s_dev && is_read_only(sb->s_dev))
sb476fs/super.cif ((flags & MS_RDONLY) && !(sb->s_flags & MS_RDONLY))
sb477fs/super.cif (!fs_may_remount_ro(sb->s_dev))
sb479fs/super.cif (sb->s_op && sb->s_op->remount_fs) {
sb480fs/super.cretval = sb->s_op->remount_fs(sb, &flags, data);
sb484fs/super.csb->s_flags = (sb->s_flags & ~MS_RMT_MASK) |
sb637fs/super.cstruct super_block * sb;
sb671fs/super.csb = read_super(ROOT_DEV,fs_type->name,root_mountflags,NULL,1);
sb672fs/super.cif (sb) {
sb673fs/super.cinode = sb->s_mounted;
sb675fs/super.csb->s_covered = inode;
sb676fs/super.csb->s_flags = root_mountflags;
sb681fs/super.c(sb->s_flags & MS_RDONLY) ? " readonly" : "");
sb32fs/sysv/balloc.cvoid sysv_free_block(struct super_block * sb, unsigned int block)
sb37fs/sysv/balloc.cif (!sb) {
sb41fs/sysv/balloc.cif (block < sb->sv_firstdatazone || block >= sb->sv_nzones) {
sb45fs/sysv/balloc.clock_super(sb);
sb46fs/sysv/balloc.cif (*sb->sv_sb_flc_count > sb->sv_flc_size) {
sb48fs/sysv/balloc.cunlock_super(sb);
sb54fs/sysv/balloc.cif (*sb->sv_sb_flc_count == sb->sv_flc_size) {
sb58fs/sysv/balloc.cbh = sv_getblk(sb, sb->s_dev, block);
sb61fs/sysv/balloc.cunlock_super(sb);
sb65fs/sysv/balloc.cswitch (sb->sv_type) {
sb84fs/sysv/balloc.c*flc_count = *sb->sv_sb_flc_count; /* = sb->sv_flc_size */
sb85fs/sysv/balloc.cmemcpy(flc_blocks, sb->sv_sb_flc_blocks, *flc_count * sizeof(sysv_zone_t));
sb89fs/sysv/balloc.c*sb->sv_sb_flc_count = 0;
sb94fs/sysv/balloc.cif (*sb->sv_sb_flc_count == 0) { /* Applies only to Coherent FS */
sb95fs/sysv/balloc.cbh = sv_getblk(sb, sb->s_dev, block);
sb98fs/sysv/balloc.cunlock_super(sb);
sb101fs/sysv/balloc.cmemset(bh->b_data, 0, sb->sv_block_size);
sb109fs/sysv/balloc.cbh = sv_get_hash_table(sb, sb->s_dev, block);
sb114fs/sysv/balloc.cif (sb->sv_convert)
sb116fs/sysv/balloc.csb->sv_sb_flc_blocks[(*sb->sv_sb_flc_count)++] = block;
sb117fs/sysv/balloc.cif (sb->sv_convert)
sb118fs/sysv/balloc.c*sb->sv_sb_total_free_blocks =
sb119fs/sysv/balloc.cto_coh_ulong(from_coh_ulong(*sb->sv_sb_total_free_blocks) + 1);
sb121fs/sysv/balloc.c*sb->sv_sb_total_free_blocks = *sb->sv_sb_total_free_blocks + 1;
sb122fs/sysv/balloc.cmark_buffer_dirty(sb->sv_bh1, 1); /* super-block has been modified */
sb123fs/sysv/balloc.cif (sb->sv_bh1 != sb->sv_bh2) mark_buffer_dirty(sb->sv_bh2, 1);
sb124fs/sysv/balloc.csb->s_dirt = 1; /* and needs time stamp */
sb125fs/sysv/balloc.cunlock_super(sb);
sb128fs/sysv/balloc.cint sysv_new_block(struct super_block * sb)
sb134fs/sysv/balloc.cif (!sb) {
sb138fs/sysv/balloc.clock_super(sb);
sb139fs/sysv/balloc.cif (*sb->sv_sb_flc_count == 0) { /* Applies only to Coherent FS */
sb140fs/sysv/balloc.cunlock_super(sb);
sb143fs/sysv/balloc.cblock = sb->sv_sb_flc_blocks[(*sb->sv_sb_flc_count)-1];
sb144fs/sysv/balloc.cif (sb->sv_convert)
sb147fs/sysv/balloc.cunlock_super(sb);
sb150fs/sysv/balloc.c(*sb->sv_sb_flc_count)--;
sb151fs/sysv/balloc.cif (block < sb->sv_firstdatazone || block >= sb->sv_nzones) {
sb153fs/sysv/balloc.cunlock_super(sb);
sb156fs/sysv/balloc.cif (*sb->sv_sb_flc_count == 0) { /* the last block continues the free list */
sb160fs/sysv/balloc.cif (!(bh = sv_bread(sb, sb->s_dev, block))) {
sb163fs/sysv/balloc.c(*sb->sv_sb_flc_count)++;
sb164fs/sysv/balloc.cunlock_super(sb);
sb168fs/sysv/balloc.cswitch (sb->sv_type) {
sb187fs/sysv/balloc.cif (*flc_count > sb->sv_flc_size) {
sb190fs/sysv/balloc.cunlock_super(sb);
sb193fs/sysv/balloc.c*sb->sv_sb_flc_count = *flc_count;
sb194fs/sysv/balloc.cmemcpy(sb->sv_sb_flc_blocks, flc_blocks, *flc_count * sizeof(sysv_zone_t));
sb198fs/sysv/balloc.cbh = sv_getblk(sb, sb->s_dev, block);
sb201fs/sysv/balloc.cunlock_super(sb);
sb206fs/sysv/balloc.cunlock_super(sb);
sb209fs/sysv/balloc.cmemset(bh->b_data, 0, sb->sv_block_size);
sb213fs/sysv/balloc.cif (sb->sv_convert)
sb214fs/sysv/balloc.c*sb->sv_sb_total_free_blocks =
sb215fs/sysv/balloc.cto_coh_ulong(from_coh_ulong(*sb->sv_sb_total_free_blocks) - 1);
sb217fs/sysv/balloc.c*sb->sv_sb_total_free_blocks = *sb->sv_sb_total_free_blocks - 1;
sb218fs/sysv/balloc.cmark_buffer_dirty(sb->sv_bh1, 1); /* super-block has been modified */
sb219fs/sysv/balloc.cif (sb->sv_bh1 != sb->sv_bh2) mark_buffer_dirty(sb->sv_bh2, 1);
sb220fs/sysv/balloc.csb->s_dirt = 1; /* and needs time stamp */
sb221fs/sysv/balloc.cunlock_super(sb);
sb225fs/sysv/balloc.cunsigned long sysv_count_free_blocks(struct super_block * sb)
sb236fs/sysv/balloc.clock_super(sb);
sb237fs/sysv/balloc.cif (*sb->sv_sb_flc_count > 0) {
sb238fs/sysv/balloc.cfor (i = *sb->sv_sb_flc_count ; /* i > 0 */ ; ) {
sb239fs/sysv/balloc.cblock = sb->sv_sb_flc_blocks[--i];
sb240fs/sysv/balloc.cif (sb->sv_convert)
sb253fs/sysv/balloc.cif (block < sb->sv_firstdatazone || block >= sb->sv_nzones) {
sb257fs/sysv/balloc.cif (!(bh = sv_bread(sb, sb->s_dev, block))) {
sb262fs/sysv/balloc.cswitch (sb->sv_type) {
sb281fs/sysv/balloc.cif (*flc_count > sb->sv_flc_size) {
sb292fs/sysv/balloc.cif (sb->sv_convert)
sb307fs/sysv/balloc.cold_count = *sb->sv_sb_total_free_blocks;
sb308fs/sysv/balloc.cif (sb->sv_convert)
sb312fs/sysv/balloc.cif (!(sb->s_flags & MS_RDONLY)) {
sb313fs/sysv/balloc.c*sb->sv_sb_total_free_blocks = (sb->sv_convert ? to_coh_ulong(count) : count);
sb314fs/sysv/balloc.cmark_buffer_dirty(sb->sv_bh2, 1); /* super-block has been modified */
sb315fs/sysv/balloc.csb->s_dirt = 1; /* and needs time stamp */
sb318fs/sysv/balloc.cunlock_super(sb);
sb323fs/sysv/balloc.ccount = *sb->sv_sb_total_free_blocks;
sb324fs/sysv/balloc.cif (sb->sv_convert)
sb70fs/sysv/dir.cstruct super_block * sb;
sb77fs/sysv/dir.cif (!inode || !(sb = inode->i_sb) || !S_ISDIR(inode->i_mode))
sb82fs/sysv/dir.coffset = filp->f_pos & sb->sv_block_size_1;
sb83fs/sysv/dir.cbh = sysv_file_bread(inode, filp->f_pos >> sb->sv_block_size_bits, 0);
sb85fs/sysv/dir.cfilp->f_pos += sb->sv_block_size - offset;
sb89fs/sysv/dir.cwhile (offset < sb->sv_block_size && filp->f_pos < inode->i_size) {
sb74fs/sysv/file.cstruct super_block * sb = inode->i_sb;
sb103fs/sysv/file.cblock = offset >> sb->sv_block_size_bits;
sb104fs/sysv/file.coffset &= sb->sv_block_size_1;
sb105fs/sysv/file.csize = (size + sb->sv_block_size_1) >> sb->sv_block_size_bits;
sb106fs/sysv/file.cblocks = (left + offset + sb->sv_block_size_1) >> sb->sv_block_size_bits;
sb109fs/sysv/file.cblocks += read_ahead[MAJOR(inode->i_dev)] >> (sb->sv_block_size_bits - 9);
sb162fs/sysv/file.cif (left < sb->sv_block_size - offset)
sb165fs/sysv/file.cchars = sb->sv_block_size - offset;
sb199fs/sysv/file.cstruct super_block * sb = inode->i_sb;
sb226fs/sysv/file.cbh = sysv_getblk (inode, pos >> sb->sv_block_size_bits, 1);
sb232fs/sysv/file.cc = sb->sv_block_size - (pos & sb->sv_block_size_1);
sb235fs/sysv/file.cif (c != sb->sv_block_size && !bh->b_uptodate) {
sb246fs/sysv/file.cp = (pos & sb->sv_block_size_1) + bh->b_data;
sb33fs/sysv/fsync.cstruct super_block * sb;
sb40fs/sysv/fsync.csb = inode->i_sb;
sb41fs/sysv/fsync.cbh = sv_get_hash_table(sb, inode->i_dev, block);
sb109fs/sysv/fsync.cstruct super_block * sb;
sb115fs/sysv/fsync.csb = inode->i_sb;
sb116fs/sysv/fsync.cfor (i = 0; i < sb->sv_ind_per_block; i++) {
sb118fs/sysv/fsync.c((unsigned long *) ind_bh->b_data) + i, sb->sv_convert,
sb135fs/sysv/fsync.cstruct super_block * sb;
sb141fs/sysv/fsync.csb = inode->i_sb;
sb142fs/sysv/fsync.cfor (i = 0; i < sb->sv_ind_per_block; i++) {
sb144fs/sysv/fsync.c((unsigned long *) dind_bh->b_data) + i, sb->sv_convert,
sb161fs/sysv/fsync.cstruct super_block * sb;
sb167fs/sysv/fsync.csb = inode->i_sb;
sb168fs/sysv/fsync.cfor (i = 0; i < sb->sv_ind_per_block; i++) {
sb170fs/sysv/fsync.c((unsigned long *) tind_bh->b_data) + i, sb->sv_convert,
sb38fs/sysv/ialloc.cstatic inline sysv_ino_t * sv_sb_fic_inode (struct super_block * sb, unsigned int i)
sb40fs/sysv/ialloc.cif (sb->sv_bh1 == sb->sv_bh2)
sb41fs/sysv/ialloc.creturn &sb->sv_sb_fic_inodes[i];
sb46fs/sysv/ialloc.creturn (sysv_ino_t*)(sb->sv_sbd1 + offset);
sb48fs/sysv/ialloc.creturn (sysv_ino_t*)(sb->sv_sbd2 + offset);
sb54fs/sysv/ialloc.cstruct super_block * sb;
sb73fs/sysv/ialloc.cif (!(sb = inode->i_sb)) {
sb78fs/sysv/ialloc.cif (ino <= SYSV_ROOT_INO || ino > sb->sv_ninodes) {
sb82fs/sysv/ialloc.cif (!(bh = sv_bread(sb, inode->i_dev, sb->sv_firstinodezone + ((ino-1) >> sb->sv_inodes_per_block_bits)))) {
sb87fs/sysv/ialloc.craw_inode = (struct sysv_inode *) bh->b_data + ((ino-1) & sb->sv_inodes_per_block_1);
sb88fs/sysv/ialloc.clock_super(sb);
sb89fs/sysv/ialloc.cif (*sb->sv_sb_fic_count < sb->sv_fic_size)
sb90fs/sysv/ialloc.c*sv_sb_fic_inode(sb,(*sb->sv_sb_fic_count)++) = ino;
sb91fs/sysv/ialloc.c(*sb->sv_sb_total_free_inodes)++;
sb92fs/sysv/ialloc.cmark_buffer_dirty(sb->sv_bh1, 1); /* super-block has been modified */
sb93fs/sysv/ialloc.cif (sb->sv_bh1 != sb->sv_bh2) mark_buffer_dirty(sb->sv_bh2, 1);
sb94fs/sysv/ialloc.csb->s_dirt = 1; /* and needs time stamp */
sb97fs/sysv/ialloc.cunlock_super(sb);
sb105fs/sysv/ialloc.cstruct super_block * sb;
sb112fs/sysv/ialloc.csb = dir->i_sb;
sb113fs/sysv/ialloc.cinode->i_sb = sb;
sb115fs/sysv/ialloc.clock_super(sb);    /* protect against task switches */
sb116fs/sysv/ialloc.cif ((*sb->sv_sb_fic_count == 0)
sb117fs/sysv/ialloc.c|| (*sv_sb_fic_inode(sb,(*sb->sv_sb_fic_count)-1) == 0) /* Applies only to SystemV2 FS */
sb126fs/sysv/ialloc.cfor (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) {
sb127fs/sysv/ialloc.cif (!(bh = sv_bread(sb, sb->s_dev, block))) {
sb133fs/sysv/ialloc.cfor (; j < sb->sv_inodes_per_block && i < sb->sv_fic_size; ino++, j++, raw_inode++) {
sb135fs/sysv/ialloc.c*sv_sb_fic_inode(sb,i++) = ino;
sb141fs/sysv/ialloc.cunlock_super(sb);
sb144fs/sysv/ialloc.c*sb->sv_sb_fic_count = i;
sb147fs/sysv/ialloc.cino = *sv_sb_fic_inode(sb,--(*sb->sv_sb_fic_count));
sb148fs/sysv/ialloc.cmark_buffer_dirty(sb->sv_bh1, 1); /* super-block has been modified */
sb149fs/sysv/ialloc.cif (sb->sv_bh1 != sb->sv_bh2) mark_buffer_dirty(sb->sv_bh2, 1);
sb150fs/sysv/ialloc.csb->s_dirt = 1; /* and needs time stamp */
sb153fs/sysv/ialloc.cinode->i_dev = sb->s_dev;
sb169fs/sysv/ialloc.c(*sb->sv_sb_total_free_inodes)--;
sb170fs/sysv/ialloc.cmark_buffer_dirty(sb->sv_bh2, 1); /* super-block has been modified again */
sb171fs/sysv/ialloc.csb->s_dirt = 1; /* and needs time stamp again */
sb172fs/sysv/ialloc.cunlock_super(sb);
sb176fs/sysv/ialloc.cunsigned long sysv_count_free_inodes(struct super_block * sb)
sb185fs/sysv/ialloc.clock_super(sb);
sb192fs/sysv/ialloc.cfor (block = sb->sv_firstinodezone, j = SYSV_ROOT_INO ; block < sb->sv_firstdatazone ; block++, j = 0) {
sb193fs/sysv/ialloc.cif (!(bh = sv_bread(sb, sb->s_dev, block))) {
sb199fs/sysv/ialloc.cfor (; j < sb->sv_inodes_per_block ; j++, raw_inode++)
sb204fs/sysv/ialloc.cif (count != *sb->sv_sb_total_free_inodes) {
sb205fs/sysv/ialloc.cprintk("sysv_count_free_inodes: free inode count was %d, correcting to %d\n",(short)(*sb->sv_sb_total_free_inodes),count);
sb206fs/sysv/ialloc.cif (!(sb->s_flags & MS_RDONLY)) {
sb207fs/sysv/ialloc.c*sb->sv_sb_total_free_inodes = count;
sb208fs/sysv/ialloc.cmark_buffer_dirty(sb->sv_bh2, 1); /* super-block has been modified */
sb209fs/sysv/ialloc.csb->s_dirt = 1; /* and needs time stamp */
sb212fs/sysv/ialloc.cunlock_super(sb);
sb215fs/sysv/ialloc.creturn *sb->sv_sb_total_free_inodes;
sb63fs/sysv/inode.cstatic void detected_bs512 (struct super_block *sb)
sb65fs/sysv/inode.csb->sv_block_size = 512;
sb66fs/sysv/inode.csb->sv_block_size_1 = 512-1;
sb67fs/sysv/inode.csb->sv_block_size_bits = 9;
sb68fs/sysv/inode.csb->sv_block_size_ratio = 2;
sb69fs/sysv/inode.csb->sv_block_size_ratio_bits = 1;
sb70fs/sysv/inode.csb->sv_inodes_per_block = 512/64;
sb71fs/sysv/inode.csb->sv_inodes_per_block_1 = 512/64-1;
sb72fs/sysv/inode.csb->sv_inodes_per_block_bits = 9-6;
sb73fs/sysv/inode.csb->sv_toobig_block = 10 + 
sb74fs/sysv/inode.c(sb->sv_ind_per_block = 512/4) +
sb75fs/sysv/inode.c(sb->sv_ind_per_block_2 = (512/4)*(512/4)) +
sb76fs/sysv/inode.c(sb->sv_ind_per_block_3 = (512/4)*(512/4)*(512/4));
sb77fs/sysv/inode.csb->sv_ind_per_block_1 = 512/4-1;
sb78fs/sysv/inode.csb->sv_ind_per_block_2_1 = (512/4)*(512/4)-1;
sb79fs/sysv/inode.csb->sv_ind_per_block_2_bits = 2 *
sb80fs/sysv/inode.c(sb->sv_ind_per_block_bits = 9-2);
sb81fs/sysv/inode.csb->sv_ind_per_block_block_size_1 = (512/4)*512-1;
sb82fs/sysv/inode.csb->sv_ind_per_block_block_size_bits = (9-2)+9;
sb83fs/sysv/inode.csb->sv_ind_per_block_2_block_size_1 = (512/4)*(512/4)*512-1;
sb84fs/sysv/inode.csb->sv_ind_per_block_2_block_size_bits = (9-2)+(9-2)+9;
sb85fs/sysv/inode.csb->sv_ind0_size = 10 * 512;
sb86fs/sysv/inode.csb->sv_ind1_size = (10 + (512/4))* 512;
sb87fs/sysv/inode.csb->sv_ind2_size = (10 + (512/4) + (512/4)*(512/4)) * 512;
sb90fs/sysv/inode.cstatic void detected_bs1024 (struct super_block *sb)
sb92fs/sysv/inode.csb->sv_block_size = 1024;
sb93fs/sysv/inode.csb->sv_block_size_1 = 1024-1;
sb94fs/sysv/inode.csb->sv_block_size_bits = 10;
sb95fs/sysv/inode.csb->sv_block_size_ratio = 1;
sb96fs/sysv/inode.csb->sv_block_size_ratio_bits = 0;
sb97fs/sysv/inode.csb->sv_inodes_per_block = 1024/64;
sb98fs/sysv/inode.csb->sv_inodes_per_block_1 = 1024/64-1;
sb99fs/sysv/inode.csb->sv_inodes_per_block_bits = 10-6;
sb100fs/sysv/inode.csb->sv_toobig_block = 10 + 
sb101fs/sysv/inode.c(sb->sv_ind_per_block = 1024/4) +
sb102fs/sysv/inode.c(sb->sv_ind_per_block_2 = (1024/4)*(1024/4)) +
sb103fs/sysv/inode.c(sb->sv_ind_per_block_3 = (1024/4)*(1024/4)*(1024/4));
sb104fs/sysv/inode.csb->sv_ind_per_block_1 = 1024/4-1;
sb105fs/sysv/inode.csb->sv_ind_per_block_2_1 = (1024/4)*(1024/4)-1;
sb106fs/sysv/inode.csb->sv_ind_per_block_2_bits = 2 *
sb107fs/sysv/inode.c(sb->sv_ind_per_block_bits = 10-2);
sb108fs/sysv/inode.csb->sv_ind_per_block_block_size_1 = (1024/4)*1024-1;
sb109fs/sysv/inode.csb->sv_ind_per_block_block_size_bits = (10-2)+10;
sb110fs/sysv/inode.csb->sv_ind_per_block_2_block_size_1 = (1024/4)*(1024/4)*1024-1;
sb111fs/sysv/inode.csb->sv_ind_per_block_2_block_size_bits = (10-2)+(10-2)+10;
sb112fs/sysv/inode.csb->sv_ind0_size = 10 * 1024;
sb113fs/sysv/inode.csb->sv_ind1_size = (10 + (1024/4))* 1024;
sb114fs/sysv/inode.csb->sv_ind2_size = (10 + (1024/4) + (1024/4)*(1024/4)) * 1024;
sb117fs/sysv/inode.cstatic const char* detect_xenix (struct super_block *sb, struct buffer_head *bh)
sb125fs/sysv/inode.ccase 1: detected_bs512(sb); break;
sb126fs/sysv/inode.ccase 2: detected_bs1024(sb); break;
sb129fs/sysv/inode.csb->sv_type = FSTYPE_XENIX;
sb132fs/sysv/inode.cstatic struct super_block * detected_xenix (struct super_block *sb, struct buffer_head *bh1, struct buffer_head *bh2)
sb137fs/sysv/inode.cif (sb->sv_block_size == BLOCK_SIZE)
sb149fs/sysv/inode.csb->sv_convert = 0;
sb150fs/sysv/inode.csb->sv_kludge_symlinks = 1;
sb151fs/sysv/inode.csb->sv_truncate = 1;
sb152fs/sysv/inode.csb->sv_link_max = XENIX_LINK_MAX;
sb153fs/sysv/inode.csb->sv_fic_size = XENIX_NICINOD;
sb154fs/sysv/inode.csb->sv_flc_size = XENIX_NICFREE;
sb155fs/sysv/inode.csb->sv_bh1 = bh1;
sb156fs/sysv/inode.csb->sv_bh2 = bh2;
sb157fs/sysv/inode.csb->sv_sbd1 = (char *) sbd1;
sb158fs/sysv/inode.csb->sv_sbd2 = (char *) sbd2;
sb159fs/sysv/inode.csb->sv_sb_fic_count = &sbd1->s_ninode;
sb160fs/sysv/inode.csb->sv_sb_fic_inodes = &sbd1->s_inode[0];
sb161fs/sysv/inode.csb->sv_sb_total_free_inodes = &sbd2->s_tinode;
sb162fs/sysv/inode.csb->sv_sb_flc_count = &sbd1->s_nfree;
sb163fs/sysv/inode.csb->sv_sb_flc_blocks = &sbd1->s_free[0];
sb164fs/sysv/inode.csb->sv_sb_total_free_blocks = &sbd2->s_tfree;
sb165fs/sysv/inode.csb->sv_sb_time = &sbd2->s_time;
sb166fs/sysv/inode.csb->sv_block_base = 0;
sb167fs/sysv/inode.csb->sv_firstinodezone = 2;
sb168fs/sysv/inode.csb->sv_firstdatazone = sbd1->s_isize;
sb169fs/sysv/inode.csb->sv_nzones = sbd1->s_fsize;
sb170fs/sysv/inode.csb->sv_ndatazones = sb->sv_nzones - sb->sv_firstdatazone;
sb171fs/sysv/inode.creturn sb;
sb174fs/sysv/inode.cstatic const char* detect_sysv4 (struct super_block *sb, struct buffer_head *bh)
sb184fs/sysv/inode.ccase 1: detected_bs512(sb); break;
sb185fs/sysv/inode.ccase 2: detected_bs1024(sb); break;
sb188fs/sysv/inode.csb->sv_type = FSTYPE_SYSV4;
sb191fs/sysv/inode.cstatic struct super_block * detected_sysv4 (struct super_block *sb, struct buffer_head *bh)
sb195fs/sysv/inode.cif (sb->sv_block_size == BLOCK_SIZE)
sb206fs/sysv/inode.csb->sv_convert = 0;
sb207fs/sysv/inode.csb->sv_kludge_symlinks = 0; /* ?? */
sb208fs/sysv/inode.csb->sv_truncate = 1;
sb209fs/sysv/inode.csb->sv_link_max = SYSV_LINK_MAX;
sb210fs/sysv/inode.csb->sv_fic_size = SYSV_NICINOD;
sb211fs/sysv/inode.csb->sv_flc_size = SYSV_NICFREE;
sb212fs/sysv/inode.csb->sv_bh1 = bh;
sb213fs/sysv/inode.csb->sv_bh2 = bh;
sb214fs/sysv/inode.csb->sv_sbd1 = (char *) sbd;
sb215fs/sysv/inode.csb->sv_sbd2 = (char *) sbd;
sb216fs/sysv/inode.csb->sv_sb_fic_count = &sbd->s_ninode;
sb217fs/sysv/inode.csb->sv_sb_fic_inodes = &sbd->s_inode[0];
sb218fs/sysv/inode.csb->sv_sb_total_free_inodes = &sbd->s_tinode;
sb219fs/sysv/inode.csb->sv_sb_flc_count = &sbd->s_nfree;
sb220fs/sysv/inode.csb->sv_sb_flc_blocks = &sbd->s_free[0];
sb221fs/sysv/inode.csb->sv_sb_total_free_blocks = &sbd->s_tfree;
sb222fs/sysv/inode.csb->sv_sb_time = &sbd->s_time;
sb223fs/sysv/inode.csb->sv_block_base = 0;
sb224fs/sysv/inode.csb->sv_firstinodezone = 2;
sb225fs/sysv/inode.csb->sv_firstdatazone = sbd->s_isize;
sb226fs/sysv/inode.csb->sv_nzones = sbd->s_fsize;
sb227fs/sysv/inode.csb->sv_ndatazones = sb->sv_nzones - sb->sv_firstdatazone;
sb228fs/sysv/inode.creturn sb;
sb231fs/sysv/inode.cstatic const char* detect_sysv2 (struct super_block *sb, struct buffer_head *bh)
sb241fs/sysv/inode.ccase 1: detected_bs512(sb); break;
sb242fs/sysv/inode.ccase 2: detected_bs1024(sb); break;
sb245fs/sysv/inode.csb->sv_type = FSTYPE_SYSV2;
sb248fs/sysv/inode.cstatic struct super_block * detected_sysv2 (struct super_block *sb, struct buffer_head *bh)
sb252fs/sysv/inode.cif (sb->sv_block_size == BLOCK_SIZE)
sb263fs/sysv/inode.csb->sv_convert = 0;
sb264fs/sysv/inode.csb->sv_kludge_symlinks = 0; /* ?? */
sb265fs/sysv/inode.csb->sv_truncate = 1;
sb266fs/sysv/inode.csb->sv_link_max = SYSV_LINK_MAX;
sb267fs/sysv/inode.csb->sv_fic_size = SYSV_NICINOD;
sb268fs/sysv/inode.csb->sv_flc_size = SYSV_NICFREE;
sb269fs/sysv/inode.csb->sv_bh1 = bh;
sb270fs/sysv/inode.csb->sv_bh2 = bh;
sb271fs/sysv/inode.csb->sv_sbd1 = (char *) sbd;
sb272fs/sysv/inode.csb->sv_sbd2 = (char *) sbd;
sb273fs/sysv/inode.csb->sv_sb_fic_count = &sbd->s_ninode;
sb274fs/sysv/inode.csb->sv_sb_fic_inodes = &sbd->s_inode[0];
sb275fs/sysv/inode.csb->sv_sb_total_free_inodes = &sbd->s_tinode;
sb276fs/sysv/inode.csb->sv_sb_flc_count = &sbd->s_nfree;
sb277fs/sysv/inode.csb->sv_sb_flc_blocks = &sbd->s_free[0];
sb278fs/sysv/inode.csb->sv_sb_total_free_blocks = &sbd->s_tfree;
sb279fs/sysv/inode.csb->sv_sb_time = &sbd->s_time;
sb280fs/sysv/inode.csb->sv_block_base = 0;
sb281fs/sysv/inode.csb->sv_firstinodezone = 2;
sb282fs/sysv/inode.csb->sv_firstdatazone = sbd->s_isize;
sb283fs/sysv/inode.csb->sv_nzones = sbd->s_fsize;
sb284fs/sysv/inode.csb->sv_ndatazones = sb->sv_nzones - sb->sv_firstdatazone;
sb285fs/sysv/inode.creturn sb;
sb288fs/sysv/inode.cstatic const char* detect_coherent (struct super_block *sb, struct buffer_head *bh)
sb296fs/sysv/inode.cdetected_bs512(sb);
sb297fs/sysv/inode.csb->sv_type = FSTYPE_COH;
sb300fs/sysv/inode.cstatic struct super_block * detected_coherent (struct super_block *sb, struct buffer_head *bh)
sb310fs/sysv/inode.csb->sv_convert = 1;
sb311fs/sysv/inode.csb->sv_kludge_symlinks = 1;
sb312fs/sysv/inode.csb->sv_truncate = 1;
sb313fs/sysv/inode.csb->sv_link_max = COH_LINK_MAX;
sb314fs/sysv/inode.csb->sv_fic_size = COH_NICINOD;
sb315fs/sysv/inode.csb->sv_flc_size = COH_NICFREE;
sb316fs/sysv/inode.csb->sv_bh1 = bh;
sb317fs/sysv/inode.csb->sv_bh2 = bh;
sb318fs/sysv/inode.csb->sv_sbd1 = (char *) sbd;
sb319fs/sysv/inode.csb->sv_sbd2 = (char *) sbd;
sb320fs/sysv/inode.csb->sv_sb_fic_count = &sbd->s_ninode;
sb321fs/sysv/inode.csb->sv_sb_fic_inodes = &sbd->s_inode[0];
sb322fs/sysv/inode.csb->sv_sb_total_free_inodes = &sbd->s_tinode;
sb323fs/sysv/inode.csb->sv_sb_flc_count = &sbd->s_nfree;
sb324fs/sysv/inode.csb->sv_sb_flc_blocks = &sbd->s_free[0];
sb325fs/sysv/inode.csb->sv_sb_total_free_blocks = &sbd->s_tfree;
sb326fs/sysv/inode.csb->sv_sb_time = &sbd->s_time;
sb327fs/sysv/inode.csb->sv_block_base = 0;
sb328fs/sysv/inode.csb->sv_firstinodezone = 2;
sb329fs/sysv/inode.csb->sv_firstdatazone = sbd->s_isize;
sb330fs/sysv/inode.csb->sv_nzones = from_coh_ulong(sbd->s_fsize);
sb331fs/sysv/inode.csb->sv_ndatazones = sb->sv_nzones - sb->sv_firstdatazone;
sb332fs/sysv/inode.creturn sb;
sb335fs/sysv/inode.cstruct super_block *sysv_read_super(struct super_block *sb,void *data, 
sb340fs/sysv/inode.cint dev = sb->s_dev;
sb351fs/sysv/inode.clock_super(sb);
sb356fs/sysv/inode.cif ((found = detect_xenix(sb,bh)) != NULL)
sb362fs/sysv/inode.cif ((found = detect_sysv4(sb,bh)) != NULL)
sb364fs/sysv/inode.cif ((found = detect_sysv2(sb,bh)) != NULL)
sb367fs/sysv/inode.cif ((found = detect_coherent(sb,bh)) != NULL)
sb378fs/sysv/inode.cif ((found = detect_sysv4(sb,bh)) != NULL) {
sb379fs/sysv/inode.csb->sv_block_base = offsets[i] << sb->sv_block_size_ratio_bits;
sb382fs/sysv/inode.cif ((found = detect_sysv2(sb,bh)) != NULL) {
sb383fs/sysv/inode.csb->sv_block_base = offsets[i] << sb->sv_block_size_ratio_bits;
sb389fs/sysv/inode.csb->s_dev=0;
sb390fs/sysv/inode.cunlock_super(sb);
sb396fs/sysv/inode.cif (sb->sv_block_size == BLOCK_SIZE) {
sb397fs/sysv/inode.cswitch (sb->sv_type) {
sb399fs/sysv/inode.cif (!detected_xenix(sb,bh,bh))
sb403fs/sysv/inode.cif (!detected_sysv4(sb,bh))
sb407fs/sysv/inode.cif (!detected_sysv2(sb,bh))
sb413fs/sysv/inode.csb->s_dev = 0;
sb414fs/sysv/inode.cunlock_super(sb);
sb422fs/sysv/inode.cunsigned long blocknr = bh->b_blocknr << sb->sv_block_size_ratio_bits;
sb425fs/sysv/inode.cset_blocksize(dev,sb->sv_block_size);
sb427fs/sysv/inode.cswitch (sb->sv_type) {
sb429fs/sysv/inode.cif ((bh1 = bread(dev, blocknr, sb->sv_block_size)) == NULL)
sb431fs/sysv/inode.cif ((bh2 = bread(dev, blocknr+1, sb->sv_block_size)) == NULL)
sb433fs/sysv/inode.cif (!detected_xenix(sb,bh1,bh2))
sb437fs/sysv/inode.cif ((bh2 = bread(dev, blocknr+1, sb->sv_block_size)) == NULL)
sb439fs/sysv/inode.cif (!detected_sysv4(sb,bh2))
sb443fs/sysv/inode.cif ((bh2 = bread(dev, blocknr+1, sb->sv_block_size)) == NULL)
sb445fs/sysv/inode.cif (!detected_sysv2(sb,bh2))
sb449fs/sysv/inode.cif ((bh2 = bread(dev, blocknr+1, sb->sv_block_size)) == NULL)
sb451fs/sysv/inode.cif (!detected_coherent(sb,bh2))
sb458fs/sysv/inode.cset_blocksize(sb->s_dev,BLOCK_SIZE);
sb459fs/sysv/inode.csb->s_dev = 0;
sb460fs/sysv/inode.cunlock_super(sb);
sb465fs/sysv/inode.csb->sv_ninodes = (sb->sv_firstdatazone - sb->sv_firstinodezone) << sb->sv_inodes_per_block_bits;
sb467fs/sysv/inode.cprintk("VFS: Found a %s FS (block size = %d) on device %d/%d\n",found,sb->sv_block_size,MAJOR(dev),MINOR(dev));
sb468fs/sysv/inode.csb->s_magic = SYSV_MAGIC_BASE + sb->sv_type;
sb470fs/sysv/inode.csb->s_blocksize = sb->sv_block_size;
sb471fs/sysv/inode.csb->s_blocksize_bits = sb->sv_block_size_bits;
sb473fs/sysv/inode.csb->s_dev = dev;
sb474fs/sysv/inode.csb->s_op = &sysv_sops;
sb475fs/sysv/inode.csb->s_mounted = iget(sb,SYSV_ROOT_INO);
sb476fs/sysv/inode.cunlock_super(sb);
sb477fs/sysv/inode.cif (!sb->s_mounted) {
sb478fs/sysv/inode.csysv_put_super(sb);
sb482fs/sysv/inode.csb->s_dirt = 1;
sb485fs/sysv/inode.creturn sb;
sb489fs/sysv/inode.cvoid sysv_write_super (struct super_block *sb)
sb491fs/sysv/inode.clock_super(sb);
sb492fs/sysv/inode.cif (sb->sv_bh1->b_dirt || sb->sv_bh2->b_dirt) {
sb496fs/sysv/inode.cif (sb->sv_convert)
sb498fs/sysv/inode.c*sb->sv_sb_time = time;
sb499fs/sysv/inode.cmark_buffer_dirty(sb->sv_bh2, 1);
sb501fs/sysv/inode.csb->s_dirt = 0;
sb502fs/sysv/inode.cunlock_super(sb);
sb505fs/sysv/inode.cvoid sysv_put_super(struct super_block *sb)
sb508fs/sysv/inode.clock_super(sb);
sb509fs/sysv/inode.cbrelse(sb->sv_bh1);
sb510fs/sysv/inode.cif (sb->sv_bh1 != sb->sv_bh2) brelse(sb->sv_bh2);
sb512fs/sysv/inode.cif (sb->s_blocksize != BLOCK_SIZE)
sb513fs/sysv/inode.cset_blocksize(sb->s_dev,BLOCK_SIZE);
sb514fs/sysv/inode.csb->s_dev = 0;
sb515fs/sysv/inode.cunlock_super(sb);
sb518fs/sysv/inode.cvoid sysv_statfs(struct super_block *sb, struct statfs *buf)
sb522fs/sysv/inode.cput_fs_long(sb->s_magic, &buf->f_type);    /* type of filesystem */
sb523fs/sysv/inode.cput_fs_long(sb->sv_block_size, &buf->f_bsize);  /* block size */
sb524fs/sysv/inode.cput_fs_long(sb->sv_ndatazones, &buf->f_blocks);  /* total data blocks in file system */
sb525fs/sysv/inode.ctmp = sysv_count_free_blocks(sb);
sb528fs/sysv/inode.cput_fs_long(sb->sv_ninodes, &buf->f_files);  /* total file nodes in file system */
sb529fs/sysv/inode.cput_fs_long(sysv_count_free_inodes(sb), &buf->f_ffree);  /* free file nodes in fs */
sb537fs/sysv/inode.cstatic inline int inode_bmap(struct super_block * sb, struct inode * inode, int nr)
sb542fs/sysv/inode.creturn tmp + sb->sv_block_base;
sb545fs/sysv/inode.cstatic int block_bmap(struct super_block * sb, struct buffer_head * bh, int nr, int convert)
sb557fs/sysv/inode.creturn tmp + sb->sv_block_base;
sb563fs/sysv/inode.cstruct super_block * sb = inode->i_sb;
sb569fs/sysv/inode.creturn inode_bmap(sb,inode,block);
sb571fs/sysv/inode.cconvert = sb->sv_convert;
sb572fs/sysv/inode.cif (block < sb->sv_ind_per_block) {
sb573fs/sysv/inode.ci = inode_bmap(sb,inode,10);
sb576fs/sysv/inode.cbh = bread(inode->i_dev,i,sb->sv_block_size);
sb577fs/sysv/inode.creturn block_bmap(sb, bh, block, convert);
sb579fs/sysv/inode.cblock -= sb->sv_ind_per_block;
sb580fs/sysv/inode.cif (block < sb->sv_ind_per_block_2) {
sb581fs/sysv/inode.ci = inode_bmap(sb,inode,11);
sb584fs/sysv/inode.cbh = bread(inode->i_dev,i,sb->sv_block_size);
sb585fs/sysv/inode.ci = block_bmap(sb, bh, block >> sb->sv_ind_per_block_bits, convert);
sb588fs/sysv/inode.cbh = bread(inode->i_dev,i,sb->sv_block_size);
sb589fs/sysv/inode.creturn block_bmap(sb, bh, block & sb->sv_ind_per_block_1, convert);
sb591fs/sysv/inode.cblock -= sb->sv_ind_per_block_2;
sb592fs/sysv/inode.cif (block < sb->sv_ind_per_block_3) {
sb593fs/sysv/inode.ci = inode_bmap(sb,inode,12);
sb596fs/sysv/inode.cbh = bread(inode->i_dev,i,sb->sv_block_size);
sb597fs/sysv/inode.ci = block_bmap(sb, bh, block >> sb->sv_ind_per_block_2_bits, convert);
sb600fs/sysv/inode.cbh = bread(inode->i_dev,i,sb->sv_block_size);
sb601fs/sysv/inode.ci = block_bmap(sb, bh, (block >> sb->sv_ind_per_block_bits) & sb->sv_ind_per_block_1,convert);
sb604fs/sysv/inode.cbh = bread(inode->i_dev,i,sb->sv_block_size);
sb605fs/sysv/inode.creturn block_bmap(sb, bh, block & sb->sv_ind_per_block_1, convert);
sb622fs/sysv/inode.cstruct super_block *sb;
sb627fs/sysv/inode.csb = inode->i_sb;
sb632fs/sysv/inode.cresult = sv_getblk(sb, inode->i_dev, tmp);
sb640fs/sysv/inode.ctmp = sysv_new_block(sb);
sb643fs/sysv/inode.cresult = sv_getblk(sb, inode->i_dev, tmp);
sb645fs/sysv/inode.csysv_free_block(sb,tmp);
sb658fs/sysv/inode.cstruct super_block *sb;
sb673fs/sysv/inode.csb = inode->i_sb;
sb677fs/sysv/inode.cif (sb->sv_convert)
sb680fs/sysv/inode.cresult = sv_getblk(sb, bh->b_dev, block);
sb692fs/sysv/inode.cblock = sysv_new_block(sb);
sb697fs/sysv/inode.cresult = sv_getblk(sb, bh->b_dev, block);
sb699fs/sysv/inode.csysv_free_block(sb,block);
sb703fs/sysv/inode.c*p = (sb->sv_convert ? to_coh_ulong(block) : block);
sb711fs/sysv/inode.cstruct super_block * sb = inode->i_sb;
sb717fs/sysv/inode.cif (block < sb->sv_ind_per_block) {
sb721fs/sysv/inode.cblock -= sb->sv_ind_per_block;
sb722fs/sysv/inode.cif (block < sb->sv_ind_per_block_2) {
sb724fs/sysv/inode.cbh = block_getblk(inode, bh, block >> sb->sv_ind_per_block_bits, create);
sb725fs/sysv/inode.creturn block_getblk(inode, bh, block & sb->sv_ind_per_block_1, create);
sb727fs/sysv/inode.cblock -= sb->sv_ind_per_block_2;
sb728fs/sysv/inode.cif (block < sb->sv_ind_per_block_3) {
sb730fs/sysv/inode.cbh = block_getblk(inode, bh, block >> sb->sv_ind_per_block_2_bits, create);
sb731fs/sysv/inode.cbh = block_getblk(inode, bh, (block >> sb->sv_ind_per_block_bits) & sb->sv_ind_per_block_1, create);
sb732fs/sysv/inode.creturn block_getblk(inode, bh, block & sb->sv_ind_per_block_1, create);
sb784fs/sysv/inode.cstruct super_block * sb = inode->i_sb;
sb793fs/sysv/inode.cif (!ino || ino > sb->sv_ninodes) {
sb798fs/sysv/inode.cblock = sb->sv_firstinodezone + ((ino-1) >> sb->sv_inodes_per_block_bits);
sb799fs/sysv/inode.cif (!(bh = sv_bread(sb,inode->i_dev,block))) {
sb804fs/sysv/inode.craw_inode = (struct sysv_inode *) bh->b_data + ((ino-1) & sb->sv_inodes_per_block_1);
sb806fs/sysv/inode.cif (sb->sv_kludge_symlinks)
sb813fs/sysv/inode.cif (sb->sv_convert) {
sb828fs/sysv/inode.cif (sb->sv_convert)
sb871fs/sysv/inode.cstruct super_block * sb = inode->i_sb;
sb878fs/sysv/inode.cif (!ino || ino > sb->sv_ninodes) {
sb884fs/sysv/inode.cblock = sb->sv_firstinodezone + ((ino-1) >> sb->sv_inodes_per_block_bits);
sb885fs/sysv/inode.cif (!(bh = sv_bread(sb,inode->i_dev,block))) {
sb890fs/sysv/inode.craw_inode = (struct sysv_inode *) bh->b_data + ((ino-1) & sb->sv_inodes_per_block_1);
sb892fs/sysv/inode.cif (sb->sv_kludge_symlinks)
sb898fs/sysv/inode.cif (sb->sv_convert) {
sb912fs/sysv/inode.cif (sb->sv_convert)
sb63fs/sysv/namei.cstruct super_block * sb;
sb70fs/sysv/namei.csb = dir->i_sb;
sb72fs/sysv/namei.cif (sb->sv_truncate)
sb83fs/sysv/namei.cpos += sb->sv_block_size;
sb92fs/sysv/namei.cif (offset < sb->sv_block_size)
sb146fs/sysv/namei.cstruct super_block * sb;
sb156fs/sysv/namei.csb = dir->i_sb;
sb158fs/sysv/namei.cif (sb->sv_truncate)
sb193fs/sysv/namei.cif (offset < sb->sv_block_size)
sb366fs/sysv/namei.cstruct super_block * sb;
sb389fs/sysv/namei.csb = inode->i_sb;
sb395fs/sysv/namei.cpos += sb->sv_block_size;
sb406fs/sysv/namei.cif (offset < sb->sv_block_size)
sb535fs/sysv/namei.cstruct super_block * sb;
sb554fs/sysv/namei.csb = inode->i_sb;
sb557fs/sysv/namei.cwhile (i < sb->sv_block_size_1 && (c = *(symname++)))
sb42fs/sysv/truncate.cstruct super_block * sb;
sb49fs/sysv/truncate.csb = inode->i_sb;
sb51fs/sysv/truncate.cfor (i = ((unsigned long) inode->i_size + sb->sv_block_size_1) >> sb->sv_block_size_bits; i < 10; i++) {
sb56fs/sysv/truncate.cbh = sv_get_hash_table(sb, inode->i_dev, block);
sb57fs/sysv/truncate.cif ((i << sb->sv_block_size_bits) < inode->i_size) {
sb69fs/sysv/truncate.csysv_free_block(sb,block);
sb77fs/sysv/truncate.cstruct super_block * sb;
sb90fs/sysv/truncate.csb = inode->i_sb;
sb91fs/sysv/truncate.cindbh = sv_bread(sb, inode->i_dev, indblock);
sb105fs/sysv/truncate.ci = (inode->i_size - offset + sb->sv_block_size_1) >> sb->sv_block_size_bits;
sb106fs/sysv/truncate.cfor (; i < sb->sv_ind_per_block; i++) {
sb109fs/sysv/truncate.cif (sb->sv_convert)
sb113fs/sysv/truncate.cbh = sv_get_hash_table(sb, inode->i_dev, block);
sb114fs/sysv/truncate.cif ((i << sb->sv_block_size_bits) + offset < inode->i_size) {
sb126fs/sysv/truncate.csysv_free_block(sb,block);
sb128fs/sysv/truncate.cfor (i = 0; i < sb->sv_ind_per_block; i++)
sb137fs/sysv/truncate.csysv_free_block(sb,indblock);
sb146fs/sysv/truncate.cstruct super_block * sb;
sb158fs/sysv/truncate.csb = inode->i_sb;
sb159fs/sysv/truncate.cindbh = sv_bread(sb, inode->i_dev, indblock);
sb172fs/sysv/truncate.ci = (inode->i_size - offset + sb->sv_ind_per_block_block_size_1) >> sb->sv_ind_per_block_block_size_bits;
sb173fs/sysv/truncate.cfor (; i < sb->sv_ind_per_block; i++) {
sb176fs/sysv/truncate.cif (sb->sv_convert)
sb180fs/sysv/truncate.cretry |= trunc_indirect(inode,offset+(i<<sb->sv_ind_per_block_bits),ind,sb->sv_convert,&indbh->b_dirt);
sb182fs/sysv/truncate.cfor (i = 0; i < sb->sv_ind_per_block; i++)
sb191fs/sysv/truncate.csysv_free_block(sb,indblock);
sb200fs/sysv/truncate.cstruct super_block * sb;
sb212fs/sysv/truncate.csb = inode->i_sb;
sb213fs/sysv/truncate.cindbh = sv_bread(sb, inode->i_dev, indblock);
sb226fs/sysv/truncate.ci = (inode->i_size - offset + sb->sv_ind_per_block_2_block_size_1) >> sb->sv_ind_per_block_2_block_size_bits;
sb227fs/sysv/truncate.cfor (; i < sb->sv_ind_per_block; i++) {
sb230fs/sysv/truncate.cif (sb->sv_convert)
sb234fs/sysv/truncate.cretry |= trunc_dindirect(inode,offset+(i<<sb->sv_ind_per_block_2_bits),ind,sb->sv_convert,&indbh->b_dirt);
sb236fs/sysv/truncate.cfor (i = 0; i < sb->sv_ind_per_block; i++)
sb245fs/sysv/truncate.csysv_free_block(sb,indblock);
sb253fs/sysv/truncate.cstruct super_block * sb;
sb255fs/sysv/truncate.csb = inode->i_sb;
sb257fs/sysv/truncate.c| trunc_indirect(inode,sb->sv_ind0_size,&inode->u.sysv_i.i_data[10],0,&inode->i_dirt)
sb258fs/sysv/truncate.c| trunc_dindirect(inode,sb->sv_ind1_size,&inode->u.sysv_i.i_data[11],0,&inode->i_dirt)
sb259fs/sysv/truncate.c| trunc_tindirect(inode,sb->sv_ind2_size,&inode->u.sysv_i.i_data[12],0,&inode->i_dirt);
sb53fs/umsdos/inode.cvoid UMSDOS_put_super(struct super_block *sb)
sb55fs/umsdos/inode.cmsdos_put_super(sb);
sb62fs/umsdos/inode.cvoid UMSDOS_statfs(struct super_block *sb,struct statfs *buf)
sb64fs/umsdos/inode.cmsdos_statfs(sb,buf);
sb412fs/umsdos/inode.cstruct super_block *sb = msdos_read_super(s,data,silent);
sb415fs/umsdos/inode.cif (sb != NULL){
sb416fs/umsdos/inode.csb->s_op = &umsdos_sops;
sb417fs/umsdos/inode.cPRINTK (("umsdos_read_super %p\n",sb->s_mounted));
sb418fs/umsdos/inode.cumsdos_setup_dir_inode (sb->s_mounted);
sb454fs/umsdos/inode.cif (umsdos_real_lookup (sb->s_mounted,UMSDOS_PSDROOT_NAME
sb485fs/umsdos/inode.creturn sb;
sb91fs/xiafs/bitmap.c#define get_imap_zone(sb, bit_nr, not_que) \
sb92fs/xiafs/bitmap.cget__map_zone((sb), (sb)->u.xiafs_sb.s_imap_buf, \
sb93fs/xiafs/bitmap.c(sb)->u.xiafs_sb.s_imap_iznr, \
sb94fs/xiafs/bitmap.c(sb)->u.xiafs_sb.s_imap_cached, 1, \
sb95fs/xiafs/bitmap.c(sb)->u.xiafs_sb.s_imap_zones, _XIAFS_IMAP_SLOTS, \
sb98fs/xiafs/bitmap.c#define get_zmap_zone(sb, bit_nr, not_que) \
sb99fs/xiafs/bitmap.cget__map_zone((sb), (sb)->u.xiafs_sb.s_zmap_buf, \
sb100fs/xiafs/bitmap.c(sb)->u.xiafs_sb.s_zmap_zznr, \
sb101fs/xiafs/bitmap.c(sb)->u.xiafs_sb.s_zmap_cached, \
sb102fs/xiafs/bitmap.c1+(sb)->u.xiafs_sb.s_imap_zones, \
sb103fs/xiafs/bitmap.c(sb)->u.xiafs_sb.s_zmap_zones, _XIAFS_ZMAP_SLOTS, \
sb107fs/xiafs/bitmap.cget__map_zone(struct super_block *sb, struct buffer_head * bmap_buf[],
sb114fs/xiafs/bitmap.cz_nr = bit_nr >> XIAFS_BITS_PER_Z_BITS(sb);
sb121fs/xiafs/bitmap.clock_super(sb);
sb134fs/xiafs/bitmap.ctmp_bh=bread(sb->s_dev, z_nr+first_zone, XIAFS_ZSIZE(sb)); /* cache not hit */
sb137fs/xiafs/bitmap.cunlock_super(sb);
sb150fs/xiafs/bitmap.c#define xiafs_unlock_super(sb, cache)  if (cache) unlock_super(sb);
sb152fs/xiafs/bitmap.c#define get_free_ibit(sb, prev_bit) \
sb153fs/xiafs/bitmap.cget_free__bit(sb, sb->u.xiafs_sb.s_imap_buf, \
sb154fs/xiafs/bitmap.csb->u.xiafs_sb.s_imap_iznr, \
sb155fs/xiafs/bitmap.csb->u.xiafs_sb.s_imap_cached, \
sb156fs/xiafs/bitmap.c1, sb->u.xiafs_sb.s_imap_zones, \
sb159fs/xiafs/bitmap.c#define get_free_zbit(sb, prev_bit) \
sb160fs/xiafs/bitmap.cget_free__bit(sb, sb->u.xiafs_sb.s_zmap_buf, \
sb161fs/xiafs/bitmap.csb->u.xiafs_sb.s_zmap_zznr, \
sb162fs/xiafs/bitmap.csb->u.xiafs_sb.s_zmap_cached, \
sb163fs/xiafs/bitmap.c1 + sb->u.xiafs_sb.s_imap_zones, \
sb164fs/xiafs/bitmap.csb->u.xiafs_sb.s_zmap_zones, \
sb168fs/xiafs/bitmap.cget_free__bit(struct super_block *sb, struct buffer_head * bmap_buf[],
sb177fs/xiafs/bitmap.ctotal_bits=bmap_zones << XIAFS_BITS_PER_Z_BITS(sb); 
sb181fs/xiafs/bitmap.cend_bit=XIAFS_BITS_PER_Z(sb);
sb195fs/xiafs/bitmap.cbh = get__map_zone(sb, bmap_buf, bznr, cache, first_zone, 
sb202fs/xiafs/bitmap.cxiafs_unlock_super(sb, sb->u.xiafs_sb.s_zmap_cached);
sb210fs/xiafs/bitmap.cxiafs_unlock_super(sb, cache);
sb211fs/xiafs/bitmap.creturn (pos & ~(XIAFS_BITS_PER_Z(sb)-1))+tmp;
sb214fs/xiafs/bitmap.cvoid xiafs_free_zone(struct super_block * sb, int d_addr)
sb219fs/xiafs/bitmap.cif (!sb) {
sb223fs/xiafs/bitmap.cif (d_addr < sb->u.xiafs_sb.s_firstdatazone ||
sb224fs/xiafs/bitmap.cd_addr >= sb->u.xiafs_sb.s_nzones) {
sb228fs/xiafs/bitmap.cbh = get_hash_table(sb->s_dev, d_addr, XIAFS_ZSIZE(sb));
sb232fs/xiafs/bitmap.cbit=d_addr - sb->u.xiafs_sb.s_firstdatazone + 1;
sb233fs/xiafs/bitmap.cbh = get_zmap_zone(sb, bit, NULL);
sb236fs/xiafs/bitmap.coffset = bit & (XIAFS_BITS_PER_Z(sb) -1);
sb240fs/xiafs/bitmap.csb->s_dev, bit, bit, WHERE_ERR);
sb242fs/xiafs/bitmap.cxiafs_unlock_super(sb, sb->u.xiafs_sb.s_zmap_cached);
sb245fs/xiafs/bitmap.cint xiafs_new_zone(struct super_block * sb, u_long prev_addr)
sb250fs/xiafs/bitmap.cif (!sb) {
sb254fs/xiafs/bitmap.cif (prev_addr < sb->u.xiafs_sb.s_firstdatazone || 
sb255fs/xiafs/bitmap.cprev_addr >= sb->u.xiafs_sb.s_nzones) {
sb256fs/xiafs/bitmap.cprev_addr=sb->u.xiafs_sb.s_firstdatazone;
sb258fs/xiafs/bitmap.cprev_znr=prev_addr-sb->u.xiafs_sb.s_firstdatazone+1;
sb259fs/xiafs/bitmap.ctmp=get_free_zbit(sb, prev_znr);
sb262fs/xiafs/bitmap.ctmp += sb->u.xiafs_sb.s_firstdatazone -1;
sb263fs/xiafs/bitmap.cif (!(bh = getblk(sb->s_dev, tmp, XIAFS_ZSIZE(sb)))) {
sb281fs/xiafs/bitmap.cstruct super_block * sb;
sb291fs/xiafs/bitmap.csb = inode->i_sb;
sb293fs/xiafs/bitmap.cbh = get_imap_zone(sb, ino, NULL);
sb297fs/xiafs/bitmap.cif (!clear_bit(ino & (XIAFS_BITS_PER_Z(sb)-1), bh->b_data))
sb302fs/xiafs/bitmap.cxiafs_unlock_super(sb, sb->u.xiafs_sb.s_imap_cached);
sb307fs/xiafs/bitmap.cstruct super_block * sb;
sb311fs/xiafs/bitmap.csb = dir->i_sb;
sb314fs/xiafs/bitmap.cinode->i_sb = sb;
sb317fs/xiafs/bitmap.ctmp=get_free_ibit(sb, dir->i_ino); 
sb324fs/xiafs/bitmap.cinode->i_dev = sb->s_dev;
sb352fs/xiafs/bitmap.cunsigned long xiafs_count_free_inodes(struct super_block *sb)
sb359fs/xiafs/bitmap.cizones=sb->u.xiafs_sb.s_imap_zones;
sb361fs/xiafs/bitmap.cbh=get_imap_zone(sb, i << XIAFS_BITS_PER_Z_BITS(sb), &not_que);
sb364fs/xiafs/bitmap.cxiafs_unlock_super(sb, sb->u.xiafs_sb.s_imap_cached);
sb367fs/xiafs/bitmap.ci=izones << XIAFS_BITS_PER_Z_BITS(sb);
sb371fs/xiafs/bitmap.cunsigned long xiafs_count_free_zones(struct super_block *sb)
sb378fs/xiafs/bitmap.czzones=sb->u.xiafs_sb.s_zmap_zones;
sb380fs/xiafs/bitmap.cbh=get_zmap_zone(sb, i << XIAFS_BITS_PER_Z_BITS(sb), &not_que);
sb383fs/xiafs/bitmap.cxiafs_unlock_super(sb, sb->u.xiafs_sb.s_zmap_cached);
sb386fs/xiafs/bitmap.ci=zzones << XIAFS_BITS_PER_Z_BITS(sb);
sb35fs/xiafs/inode.cvoid xiafs_put_super(struct super_block *sb)
sb39fs/xiafs/inode.clock_super(sb);
sb40fs/xiafs/inode.csb->s_dev = 0;
sb42fs/xiafs/inode.cbrelse(sb->u.xiafs_sb.s_imap_buf[i]);
sb44fs/xiafs/inode.cbrelse(sb->u.xiafs_sb.s_zmap_buf[i]);
sb45fs/xiafs/inode.cunlock_super(sb);
sb158fs/xiafs/inode.cvoid xiafs_statfs(struct super_block *sb, struct statfs *buf)
sb163fs/xiafs/inode.cput_fs_long(XIAFS_ZSIZE(sb), &buf->f_bsize);
sb164fs/xiafs/inode.cput_fs_long(sb->u.xiafs_sb.s_ndatazones, &buf->f_blocks);
sb165fs/xiafs/inode.ctmp = xiafs_count_free_zones(sb);
sb168fs/xiafs/inode.cput_fs_long(sb->u.xiafs_sb.s_ninodes, &buf->f_files);
sb169fs/xiafs/inode.cput_fs_long(xiafs_count_free_inodes(sb), &buf->f_ffree);
sb309include/linux/ext2_fs.h#define test_opt(sb, opt)    ((sb)->u.ext2_sb.s_mount_opt & \
sb80include/linux/ext_fs.hextern unsigned long ext_count_free_inodes(struct super_block *sb);
sb81include/linux/ext_fs.hextern int ext_new_block(struct super_block * sb);
sb82include/linux/ext_fs.hextern void ext_free_block(struct super_block * sb, int block);
sb83include/linux/ext_fs.hextern unsigned long ext_count_free_blocks(struct super_block *sb);
sb476include/linux/fs.hextern struct inode * __iget(struct super_block * sb,int nr,int crsmnt);
sb519include/linux/fs.hextern inline struct inode * iget(struct super_block * sb,int nr)
sb521include/linux/fs.hreturn __iget(sb,nr,1);
sb171include/linux/iso_fs.hextern unsigned long isofs_count_free_inodes(struct super_block *sb);
sb36include/linux/locks.hextern inline void wait_on_super(struct super_block * sb)
sb38include/linux/locks.hif (sb->s_lock)
sb39include/linux/locks.h__wait_on_super(sb);
sb42include/linux/locks.hextern inline void lock_super(struct super_block * sb)
sb44include/linux/locks.hif (sb->s_lock)
sb45include/linux/locks.h__wait_on_super(sb);
sb46include/linux/locks.hsb->s_lock = 1;
sb49include/linux/locks.hextern inline void unlock_super(struct super_block * sb)
sb51include/linux/locks.hsb->s_lock = 0;
sb52include/linux/locks.hwake_up(&sb->s_wait);
sb95include/linux/minix_fs.hextern unsigned long minix_count_free_inodes(struct super_block *sb);
sb96include/linux/minix_fs.hextern int minix_new_block(struct super_block * sb);
sb97include/linux/minix_fs.hextern void minix_free_block(struct super_block * sb, int block);
sb98include/linux/minix_fs.hextern unsigned long minix_count_free_blocks(struct super_block *sb);
sb109include/linux/minix_fs.hextern int minix_remount (struct super_block * sb, int * flags, char * data);
sb125include/linux/msdos_fs.hextern void lock_fat(struct super_block *sb);
sb126include/linux/msdos_fs.hextern void unlock_fat(struct super_block *sb);
sb140include/linux/msdos_fs.hextern int fat_access(struct super_block *sb,int nr,int new_value);
sb166include/linux/msdos_fs.hextern void msdos_put_super(struct super_block *sb);
sb169include/linux/msdos_fs.hextern void msdos_statfs(struct super_block *sb,struct statfs *buf);
sb96include/linux/nfs_fs.hextern struct super_block *nfs_read_super(struct super_block *sb, 
sb98include/linux/nfs_fs.hextern struct inode *nfs_fhget(struct super_block *sb, struct nfs_fh *fhandle,
sb340include/linux/sysv_fs.hsv_get_hash_table (struct super_block *sb, int dev, unsigned int block)
sb342include/linux/sysv_fs.hreturn get_hash_table (dev, block + sb->sv_block_base, sb->sv_block_size);
sb347include/linux/sysv_fs.hsv_getblk (struct super_block *sb, int dev, unsigned int block)
sb349include/linux/sysv_fs.hreturn getblk (dev, block + sb->sv_block_base, sb->sv_block_size);
sb354include/linux/sysv_fs.hsv_bread (struct super_block *sb, int dev, unsigned int block)
sb356include/linux/sysv_fs.hreturn bread (dev, block + sb->sv_block_base, sb->sv_block_size);
sb379include/linux/sysv_fs.hextern unsigned long sysv_count_free_inodes(struct super_block *sb);
sb380include/linux/sysv_fs.hextern int sysv_new_block(struct super_block * sb);
sb381include/linux/sysv_fs.hextern void sysv_free_block(struct super_block * sb, unsigned int block);
sb382include/linux/sysv_fs.hextern unsigned long sysv_count_free_blocks(struct super_block *sb);
sb83include/linux/xia_fs.hextern unsigned long xiafs_count_free_inodes(struct super_block *sb);
sb84include/linux/xia_fs.hextern int xiafs_new_zone(struct super_block * sb, u_long prev_addr);
sb85include/linux/xia_fs.hextern void xiafs_free_zone(struct super_block * sb, int block);
sb86include/linux/xia_fs.hextern unsigned long xiafs_count_free_zones(struct super_block *sb);
sb94tools/build.cstruct stat sb;
sb101tools/build.cif (stat("/", &sb)) {
sb105tools/build.cmajor_root = major(sb.st_dev);
sb106tools/build.cminor_root = minor(sb.st_dev);
sb108tools/build.cif (stat(argv[4], &sb)) {
sb112tools/build.cmajor_root = major(sb.st_rdev);
sb113tools/build.cminor_root = minor(sb.st_rdev);
sb43zBoot/xtract.cstruct stat sb;