tag | line | file | source code |
sb | 42 | arch/i386/boot/compressed/xtract.c | struct stat sb; |
sb | 104 | arch/i386/boot/tools/build.c | struct stat sb; |
sb | 111 | arch/i386/boot/tools/build.c | if (stat("/", &sb)) { |
sb | 115 | arch/i386/boot/tools/build.c | major_root = major(sb.st_dev); |
sb | 116 | arch/i386/boot/tools/build.c | minor_root = minor(sb.st_dev); |
sb | 118 | arch/i386/boot/tools/build.c | if (stat(argv[4], &sb)) { |
sb | 122 | arch/i386/boot/tools/build.c | major_root = major(sb.st_rdev); |
sb | 123 | arch/i386/boot/tools/build.c | minor_root = minor(sb.st_rdev); |
sb | 232 | arch/i386/boot/tools/build.c | if (fstat (id, &sb)) { |
sb | 236 | arch/i386/boot/tools/build.c | sz = sb.st_size; |
sb | 780 | drivers/char/tpqic02.c | static int send_qic02_data(char sb[], unsigned size, int ignore_ex) |
sb | 790 | drivers/char/tpqic02.c | stat = notify_cmd(sb[i], ignore_ex); |
sb | 82 | drivers/scsi/eata_dma_proc.c | scbu *sb; |
sb | 112 | drivers/scsi/eata_dma_proc.c | sb = (scbu *) (buff + 0x178); |
sb | 220 | drivers/scsi/eata_dma_proc.c | (sb->wide == TRUE)?" WIDE":"", |
sb | 221 | drivers/scsi/eata_dma_proc.c | (sb->dif == TRUE)?" DIFFERENTIAL":"", |
sb | 222 | drivers/scsi/eata_dma_proc.c | (sb->speed == 0)?"5":(sb->speed == 1)?"10":"20", |
sb | 223 | drivers/scsi/eata_dma_proc.c | (sb->ext == TRUE)?"With external cable detection":""); |
sb | 40 | fs/ext/freelists.c | void ext_free_block(struct super_block * sb, int block) |
sb | 45 | fs/ext/freelists.c | if (!sb) { |
sb | 49 | fs/ext/freelists.c | lock_super (sb); |
sb | 50 | fs/ext/freelists.c | if (block < sb->u.ext_sb.s_firstdatazone || |
sb | 51 | fs/ext/freelists.c | block >= sb->u.ext_sb.s_nzones) { |
sb | 55 | fs/ext/freelists.c | bh = get_hash_table(sb->s_dev, block, sb->s_blocksize); |
sb | 59 | fs/ext/freelists.c | if (sb->u.ext_sb.s_firstfreeblock) |
sb | 60 | fs/ext/freelists.c | efb = (struct ext_free_block *) sb->u.ext_sb.s_firstfreeblock->b_data; |
sb | 61 | fs/ext/freelists.c | if (!sb->u.ext_sb.s_firstfreeblock || efb->count == 254) { |
sb | 65 | fs/ext/freelists.c | if (sb->u.ext_sb.s_firstfreeblock) |
sb | 66 | fs/ext/freelists.c | brelse (sb->u.ext_sb.s_firstfreeblock); |
sb | 67 | fs/ext/freelists.c | if (!(sb->u.ext_sb.s_firstfreeblock = bread (sb->s_dev, |
sb | 68 | fs/ext/freelists.c | block, sb->s_blocksize))) |
sb | 70 | fs/ext/freelists.c | efb = (struct ext_free_block *) sb->u.ext_sb.s_firstfreeblock->b_data; |
sb | 71 | fs/ext/freelists.c | efb->next = sb->u.ext_sb.s_firstfreeblocknumber; |
sb | 73 | fs/ext/freelists.c | sb->u.ext_sb.s_firstfreeblocknumber = block; |
sb | 77 | fs/ext/freelists.c | sb->u.ext_sb.s_freeblockscount ++; |
sb | 78 | fs/ext/freelists.c | sb->s_dirt = 1; |
sb | 79 | fs/ext/freelists.c | mark_buffer_dirty(sb->u.ext_sb.s_firstfreeblock, 1); |
sb | 80 | fs/ext/freelists.c | unlock_super (sb); |
sb | 84 | fs/ext/freelists.c | int ext_new_block(struct super_block * sb) |
sb | 90 | fs/ext/freelists.c | if (!sb) { |
sb | 94 | fs/ext/freelists.c | if (!sb->u.ext_sb.s_firstfreeblock) |
sb | 96 | fs/ext/freelists.c | lock_super (sb); |
sb | 97 | fs/ext/freelists.c | efb = (struct ext_free_block *) sb->u.ext_sb.s_firstfreeblock->b_data; |
sb | 100 | fs/ext/freelists.c | mark_buffer_dirty(sb->u.ext_sb.s_firstfreeblock, 1); |
sb | 105 | fs/ext/freelists.c | j = sb->u.ext_sb.s_firstfreeblocknumber; |
sb | 106 | fs/ext/freelists.c | sb->u.ext_sb.s_firstfreeblocknumber = efb->next; |
sb | 107 | fs/ext/freelists.c | brelse (sb->u.ext_sb.s_firstfreeblock); |
sb | 108 | fs/ext/freelists.c | if (!sb->u.ext_sb.s_firstfreeblocknumber) { |
sb | 109 | fs/ext/freelists.c | sb->u.ext_sb.s_firstfreeblock = NULL; |
sb | 111 | fs/ext/freelists.c | if (!(sb->u.ext_sb.s_firstfreeblock = bread (sb->s_dev, |
sb | 112 | fs/ext/freelists.c | sb->u.ext_sb.s_firstfreeblocknumber, |
sb | 113 | fs/ext/freelists.c | sb->s_blocksize))) |
sb | 117 | fs/ext/freelists.c | if (j < sb->u.ext_sb.s_firstdatazone || j > sb->u.ext_sb.s_nzones) { |
sb | 122 | fs/ext/freelists.c | sb->u.ext_sb.s_freeblockscount --; |
sb | 123 | fs/ext/freelists.c | sb->s_dirt = 1; |
sb | 125 | fs/ext/freelists.c | if (!(bh=getblk(sb->s_dev, j, sb->s_blocksize))) { |
sb | 136 | fs/ext/freelists.c | unlock_super (sb); |
sb | 140 | fs/ext/freelists.c | unsigned long ext_count_free_blocks(struct super_block *sb) |
sb | 147 | fs/ext/freelists.c | lock_super (sb); |
sb | 148 | fs/ext/freelists.c | if (!sb->u.ext_sb.s_firstfreeblock) |
sb | 151 | fs/ext/freelists.c | efb = (struct ext_free_block *) sb->u.ext_sb.s_firstfreeblock->b_data; |
sb | 155 | fs/ext/freelists.c | if (!(bh = bread (sb->s_dev, block, sb->s_blocksize))) { |
sb | 167 | fs/ext/freelists.c | sb->u.ext_sb.s_freeblockscount, count); |
sb | 168 | fs/ext/freelists.c | unlock_super (sb); |
sb | 171 | fs/ext/freelists.c | return sb->u.ext_sb.s_freeblockscount; |
sb | 179 | fs/ext/freelists.c | struct super_block * sb; |
sb | 202 | fs/ext/freelists.c | sb = inode->i_sb; |
sb | 206 | fs/ext/freelists.c | lock_super (sb); |
sb | 207 | fs/ext/freelists.c | if (ino < 1 || ino > sb->u.ext_sb.s_ninodes) { |
sb | 209 | fs/ext/freelists.c | unlock_super (sb); |
sb | 212 | fs/ext/freelists.c | if (sb->u.ext_sb.s_firstfreeinodeblock) |
sb | 213 | fs/ext/freelists.c | efi = ((struct ext_free_inode *) sb->u.ext_sb.s_firstfreeinodeblock->b_data) + |
sb | 214 | fs/ext/freelists.c | (sb->u.ext_sb.s_firstfreeinodenumber-1)%EXT_INODES_PER_BLOCK; |
sb | 215 | fs/ext/freelists.c | if (!sb->u.ext_sb.s_firstfreeinodeblock || efi->count == 14) { |
sb | 219 | fs/ext/freelists.c | if (sb->u.ext_sb.s_firstfreeinodeblock) |
sb | 220 | fs/ext/freelists.c | brelse (sb->u.ext_sb.s_firstfreeinodeblock); |
sb | 222 | fs/ext/freelists.c | if (!(bh = bread(dev, block, sb->s_blocksize))) |
sb | 226 | fs/ext/freelists.c | efi->next = sb->u.ext_sb.s_firstfreeinodenumber; |
sb | 228 | fs/ext/freelists.c | sb->u.ext_sb.s_firstfreeinodenumber = ino; |
sb | 229 | fs/ext/freelists.c | sb->u.ext_sb.s_firstfreeinodeblock = bh; |
sb | 233 | fs/ext/freelists.c | sb->u.ext_sb.s_freeinodescount ++; |
sb | 234 | fs/ext/freelists.c | sb->s_dirt = 1; |
sb | 235 | fs/ext/freelists.c | mark_buffer_dirty(sb->u.ext_sb.s_firstfreeinodeblock, 1); |
sb | 236 | fs/ext/freelists.c | unlock_super (sb); |
sb | 241 | fs/ext/freelists.c | struct super_block * sb; |
sb | 249 | fs/ext/freelists.c | sb = dir->i_sb; |
sb | 250 | fs/ext/freelists.c | inode->i_sb = sb; |
sb | 251 | fs/ext/freelists.c | inode->i_flags = sb->s_flags; |
sb | 252 | fs/ext/freelists.c | if (!sb->u.ext_sb.s_firstfreeinodeblock) |
sb | 254 | fs/ext/freelists.c | lock_super (sb); |
sb | 255 | fs/ext/freelists.c | efi = ((struct ext_free_inode *) sb->u.ext_sb.s_firstfreeinodeblock->b_data) + |
sb | 256 | fs/ext/freelists.c | (sb->u.ext_sb.s_firstfreeinodenumber-1)%EXT_INODES_PER_BLOCK; |
sb | 259 | fs/ext/freelists.c | mark_buffer_dirty(sb->u.ext_sb.s_firstfreeinodeblock, 1); |
sb | 264 | fs/ext/freelists.c | j = sb->u.ext_sb.s_firstfreeinodenumber; |
sb | 265 | fs/ext/freelists.c | if (efi->next > sb->u.ext_sb.s_ninodes) { |
sb | 269 | fs/ext/freelists.c | sb->u.ext_sb.s_firstfreeinodenumber = efi->next; |
sb | 271 | fs/ext/freelists.c | brelse (sb->u.ext_sb.s_firstfreeinodeblock); |
sb | 272 | fs/ext/freelists.c | if (!sb->u.ext_sb.s_firstfreeinodenumber) { |
sb | 273 | fs/ext/freelists.c | sb->u.ext_sb.s_firstfreeinodeblock = NULL; |
sb | 275 | fs/ext/freelists.c | if (!(sb->u.ext_sb.s_firstfreeinodeblock = |
sb | 276 | fs/ext/freelists.c | bread(sb->s_dev, block, sb->s_blocksize))) |
sb | 280 | fs/ext/freelists.c | sb->u.ext_sb.s_freeinodescount --; |
sb | 281 | fs/ext/freelists.c | sb->s_dirt = 1; |
sb | 284 | fs/ext/freelists.c | inode->i_dev = sb->s_dev; |
sb | 296 | fs/ext/freelists.c | unlock_super (sb); |
sb | 300 | fs/ext/freelists.c | unsigned long ext_count_free_inodes(struct super_block *sb) |
sb | 307 | fs/ext/freelists.c | lock_super (sb); |
sb | 308 | fs/ext/freelists.c | if (!sb->u.ext_sb.s_firstfreeinodeblock) |
sb | 311 | fs/ext/freelists.c | efi = ((struct ext_free_inode *) sb->u.ext_sb.s_firstfreeinodeblock->b_data) + |
sb | 312 | fs/ext/freelists.c | ((sb->u.ext_sb.s_firstfreeinodenumber-1)%EXT_INODES_PER_BLOCK); |
sb | 316 | fs/ext/freelists.c | if (ino < 1 || ino > sb->u.ext_sb.s_ninodes) { |
sb | 318 | fs/ext/freelists.c | (int) sb->u.ext_sb.s_firstfreeinodenumber,ino); |
sb | 322 | fs/ext/freelists.c | if (!(bh = bread (sb->s_dev, block, sb->s_blocksize))) { |
sb | 335 | fs/ext/freelists.c | sb->u.ext_sb.s_freeinodescount, count); |
sb | 336 | fs/ext/freelists.c | unlock_super (sb); |
sb | 339 | fs/ext/freelists.c | return sb->u.ext_sb.s_freeinodescount; |
sb | 35 | fs/ext/inode.c | void ext_put_super(struct super_block *sb) |
sb | 38 | fs/ext/inode.c | lock_super(sb); |
sb | 39 | fs/ext/inode.c | sb->s_dev = 0; |
sb | 40 | fs/ext/inode.c | if (sb->u.ext_sb.s_firstfreeinodeblock) |
sb | 41 | fs/ext/inode.c | brelse (sb->u.ext_sb.s_firstfreeinodeblock); |
sb | 42 | fs/ext/inode.c | if (sb->u.ext_sb.s_firstfreeblock) |
sb | 43 | fs/ext/inode.c | brelse (sb->u.ext_sb.s_firstfreeblock); |
sb | 44 | fs/ext/inode.c | unlock_super(sb); |
sb | 138 | fs/ext/inode.c | void ext_write_super (struct super_block *sb) |
sb | 143 | fs/ext/inode.c | if (!(bh = bread(sb->s_dev, 1, BLOCK_SIZE))) { |
sb | 148 | fs/ext/inode.c | es->s_firstfreeblock = sb->u.ext_sb.s_firstfreeblocknumber; |
sb | 149 | fs/ext/inode.c | es->s_freeblockscount = sb->u.ext_sb.s_freeblockscount; |
sb | 150 | fs/ext/inode.c | es->s_firstfreeinode = sb->u.ext_sb.s_firstfreeinodenumber; |
sb | 151 | fs/ext/inode.c | es->s_freeinodescount = sb->u.ext_sb.s_freeinodescount; |
sb | 154 | fs/ext/inode.c | sb->s_dirt = 0; |
sb | 157 | fs/ext/inode.c | void ext_statfs (struct super_block *sb, struct statfs *buf, int bufsiz) |
sb | 163 | fs/ext/inode.c | tmp.f_blocks = sb->u.ext_sb.s_nzones << sb->u.ext_sb.s_log_zone_size; |
sb | 164 | fs/ext/inode.c | tmp.f_bfree = ext_count_free_blocks(sb); |
sb | 166 | fs/ext/inode.c | tmp.f_files = sb->u.ext_sb.s_ninodes; |
sb | 167 | fs/ext/inode.c | tmp.f_ffree = ext_count_free_inodes(sb); |
sb | 38 | fs/ext2/balloc.c | static struct ext2_group_desc * get_group_desc (struct super_block * sb, |
sb | 46 | fs/ext2/balloc.c | if (block_group >= sb->u.ext2_sb.s_groups_count) |
sb | 47 | fs/ext2/balloc.c | ext2_panic (sb, "get_group_desc", |
sb | 50 | fs/ext2/balloc.c | block_group, sb->u.ext2_sb.s_groups_count); |
sb | 52 | fs/ext2/balloc.c | group_desc = block_group / EXT2_DESC_PER_BLOCK(sb); |
sb | 53 | fs/ext2/balloc.c | desc = block_group % EXT2_DESC_PER_BLOCK(sb); |
sb | 54 | fs/ext2/balloc.c | if (!sb->u.ext2_sb.s_group_desc[group_desc]) |
sb | 55 | fs/ext2/balloc.c | ext2_panic (sb, "get_group_desc", |
sb | 60 | fs/ext2/balloc.c | sb->u.ext2_sb.s_group_desc[group_desc]->b_data; |
sb | 62 | fs/ext2/balloc.c | *bh = sb->u.ext2_sb.s_group_desc[group_desc]; |
sb | 66 | fs/ext2/balloc.c | static void read_block_bitmap (struct super_block * sb, |
sb | 73 | fs/ext2/balloc.c | gdp = get_group_desc (sb, block_group, NULL); |
sb | 74 | fs/ext2/balloc.c | bh = bread (sb->s_dev, gdp->bg_block_bitmap, sb->s_blocksize); |
sb | 76 | fs/ext2/balloc.c | ext2_panic (sb, "read_block_bitmap", |
sb | 80 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap_number[bitmap_nr] = block_group; |
sb | 81 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap[bitmap_nr] = bh; |
sb | 95 | fs/ext2/balloc.c | static int load__block_bitmap (struct super_block * sb, |
sb | 102 | fs/ext2/balloc.c | if (block_group >= sb->u.ext2_sb.s_groups_count) |
sb | 103 | fs/ext2/balloc.c | ext2_panic (sb, "load_block_bitmap", |
sb | 106 | fs/ext2/balloc.c | block_group, sb->u.ext2_sb.s_groups_count); |
sb | 108 | fs/ext2/balloc.c | if (sb->u.ext2_sb.s_groups_count <= EXT2_MAX_GROUP_LOADED) { |
sb | 109 | fs/ext2/balloc.c | if (sb->u.ext2_sb.s_block_bitmap[block_group]) { |
sb | 110 | fs/ext2/balloc.c | if (sb->u.ext2_sb.s_block_bitmap_number[block_group] != |
sb | 112 | fs/ext2/balloc.c | ext2_panic (sb, "load_block_bitmap", |
sb | 117 | fs/ext2/balloc.c | read_block_bitmap (sb, block_group, block_group); |
sb | 122 | fs/ext2/balloc.c | for (i = 0; i < sb->u.ext2_sb.s_loaded_block_bitmaps && |
sb | 123 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap_number[i] != block_group; i++) |
sb | 125 | fs/ext2/balloc.c | if (i < sb->u.ext2_sb.s_loaded_block_bitmaps && |
sb | 126 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap_number[i] == block_group) { |
sb | 127 | fs/ext2/balloc.c | block_bitmap_number = sb->u.ext2_sb.s_block_bitmap_number[i]; |
sb | 128 | fs/ext2/balloc.c | block_bitmap = sb->u.ext2_sb.s_block_bitmap[i]; |
sb | 130 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap_number[j] = |
sb | 131 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap_number[j - 1]; |
sb | 132 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap[j] = |
sb | 133 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap[j - 1]; |
sb | 135 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap_number[0] = block_bitmap_number; |
sb | 136 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap[0] = block_bitmap; |
sb | 138 | fs/ext2/balloc.c | if (sb->u.ext2_sb.s_loaded_block_bitmaps < EXT2_MAX_GROUP_LOADED) |
sb | 139 | fs/ext2/balloc.c | sb->u.ext2_sb.s_loaded_block_bitmaps++; |
sb | 141 | fs/ext2/balloc.c | brelse (sb->u.ext2_sb.s_block_bitmap[EXT2_MAX_GROUP_LOADED - 1]); |
sb | 142 | fs/ext2/balloc.c | for (j = sb->u.ext2_sb.s_loaded_block_bitmaps - 1; j > 0; j--) { |
sb | 143 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap_number[j] = |
sb | 144 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap_number[j - 1]; |
sb | 145 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap[j] = |
sb | 146 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap[j - 1]; |
sb | 148 | fs/ext2/balloc.c | read_block_bitmap (sb, block_group, 0); |
sb | 153 | fs/ext2/balloc.c | static inline int load_block_bitmap (struct super_block * sb, |
sb | 156 | fs/ext2/balloc.c | if (sb->u.ext2_sb.s_loaded_block_bitmaps > 0 && |
sb | 157 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap_number[0] == block_group) |
sb | 160 | fs/ext2/balloc.c | if (sb->u.ext2_sb.s_groups_count <= EXT2_MAX_GROUP_LOADED && |
sb | 161 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap_number[block_group] == block_group && |
sb | 162 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap[block_group]) |
sb | 165 | fs/ext2/balloc.c | return load__block_bitmap (sb, block_group); |
sb | 177 | fs/ext2/balloc.c | struct super_block * sb; |
sb | 181 | fs/ext2/balloc.c | sb = inode->i_sb; |
sb | 182 | fs/ext2/balloc.c | if (!sb) { |
sb | 186 | fs/ext2/balloc.c | lock_super (sb); |
sb | 187 | fs/ext2/balloc.c | es = sb->u.ext2_sb.s_es; |
sb | 190 | fs/ext2/balloc.c | ext2_error (sb, "ext2_free_blocks", |
sb | 193 | fs/ext2/balloc.c | unlock_super (sb); |
sb | 200 | fs/ext2/balloc.c | EXT2_BLOCKS_PER_GROUP(sb); |
sb | 201 | fs/ext2/balloc.c | bit = (block - es->s_first_data_block) % EXT2_BLOCKS_PER_GROUP(sb); |
sb | 202 | fs/ext2/balloc.c | if (bit + count > EXT2_BLOCKS_PER_GROUP(sb)) |
sb | 203 | fs/ext2/balloc.c | ext2_panic (sb, "ext2_free_blocks", |
sb | 207 | fs/ext2/balloc.c | bitmap_nr = load_block_bitmap (sb, block_group); |
sb | 208 | fs/ext2/balloc.c | bh = sb->u.ext2_sb.s_block_bitmap[bitmap_nr]; |
sb | 209 | fs/ext2/balloc.c | gdp = get_group_desc (sb, block_group, &bh2); |
sb | 211 | fs/ext2/balloc.c | if (test_opt (sb, CHECK_STRICT) && |
sb | 215 | fs/ext2/balloc.c | sb->u.ext2_sb.s_itb_per_group) || |
sb | 217 | fs/ext2/balloc.c | sb->u.ext2_sb.s_itb_per_group))) |
sb | 218 | fs/ext2/balloc.c | ext2_panic (sb, "ext2_free_blocks", |
sb | 225 | fs/ext2/balloc.c | ext2_warning (sb, "ext2_free_blocks", |
sb | 229 | fs/ext2/balloc.c | if (sb->dq_op) |
sb | 230 | fs/ext2/balloc.c | sb->dq_op->free_block(inode, fs_to_dq_blocks(1, sb->s_blocksize)); |
sb | 237 | fs/ext2/balloc.c | mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1); |
sb | 240 | fs/ext2/balloc.c | if (sb->s_flags & MS_SYNCHRONOUS) { |
sb | 244 | fs/ext2/balloc.c | sb->s_dirt = 1; |
sb | 245 | fs/ext2/balloc.c | unlock_super (sb); |
sb | 264 | fs/ext2/balloc.c | struct super_block * sb; |
sb | 272 | fs/ext2/balloc.c | sb = inode->i_sb; |
sb | 273 | fs/ext2/balloc.c | if (!sb) { |
sb | 277 | fs/ext2/balloc.c | lock_super (sb); |
sb | 278 | fs/ext2/balloc.c | es = sb->u.ext2_sb.s_es; |
sb | 280 | fs/ext2/balloc.c | (!fsuser() && (sb->u.ext2_sb.s_resuid != current->fsuid) && |
sb | 281 | fs/ext2/balloc.c | (sb->u.ext2_sb.s_resgid == 0 || |
sb | 282 | fs/ext2/balloc.c | !in_group_p (sb->u.ext2_sb.s_resgid)))) { |
sb | 283 | fs/ext2/balloc.c | unlock_super (sb); |
sb | 295 | fs/ext2/balloc.c | i = (goal - es->s_first_data_block) / EXT2_BLOCKS_PER_GROUP(sb); |
sb | 296 | fs/ext2/balloc.c | gdp = get_group_desc (sb, i, &bh2); |
sb | 298 | fs/ext2/balloc.c | j = ((goal - es->s_first_data_block) % EXT2_BLOCKS_PER_GROUP(sb)); |
sb | 303 | fs/ext2/balloc.c | bitmap_nr = load_block_bitmap (sb, i); |
sb | 304 | fs/ext2/balloc.c | bh = sb->u.ext2_sb.s_block_bitmap[bitmap_nr]; |
sb | 342 | fs/ext2/balloc.c | r = memscan(p, 0, (EXT2_BLOCKS_PER_GROUP(sb) - j + 7) >> 3); |
sb | 344 | fs/ext2/balloc.c | if (k < EXT2_BLOCKS_PER_GROUP(sb)) { |
sb | 349 | fs/ext2/balloc.c | EXT2_BLOCKS_PER_GROUP(sb), |
sb | 351 | fs/ext2/balloc.c | if (k < EXT2_BLOCKS_PER_GROUP(sb)) { |
sb | 363 | fs/ext2/balloc.c | for (k = 0; k < sb->u.ext2_sb.s_groups_count; k++) { |
sb | 365 | fs/ext2/balloc.c | if (i >= sb->u.ext2_sb.s_groups_count) |
sb | 367 | fs/ext2/balloc.c | gdp = get_group_desc (sb, i, &bh2); |
sb | 371 | fs/ext2/balloc.c | if (k >= sb->u.ext2_sb.s_groups_count) { |
sb | 372 | fs/ext2/balloc.c | unlock_super (sb); |
sb | 375 | fs/ext2/balloc.c | bitmap_nr = load_block_bitmap (sb, i); |
sb | 376 | fs/ext2/balloc.c | bh = sb->u.ext2_sb.s_block_bitmap[bitmap_nr]; |
sb | 377 | fs/ext2/balloc.c | r = memscan(bh->b_data, 0, EXT2_BLOCKS_PER_GROUP(sb) >> 3); |
sb | 379 | fs/ext2/balloc.c | if (j < EXT2_BLOCKS_PER_GROUP(sb)) |
sb | 383 | fs/ext2/balloc.c | EXT2_BLOCKS_PER_GROUP(sb)); |
sb | 384 | fs/ext2/balloc.c | if (j >= EXT2_BLOCKS_PER_GROUP(sb)) { |
sb | 385 | fs/ext2/balloc.c | ext2_error (sb, "ext2_new_block", |
sb | 387 | fs/ext2/balloc.c | unlock_super (sb); |
sb | 406 | fs/ext2/balloc.c | if (sb->dq_op) |
sb | 407 | fs/ext2/balloc.c | if (sb->dq_op->alloc_block (inode, fs_to_dq_blocks(1, sb->s_blocksize))) { |
sb | 408 | fs/ext2/balloc.c | unlock_super (sb); |
sb | 413 | fs/ext2/balloc.c | tmp = j + i * EXT2_BLOCKS_PER_GROUP(sb) + es->s_first_data_block; |
sb | 415 | fs/ext2/balloc.c | if (test_opt (sb, CHECK_STRICT) && |
sb | 418 | fs/ext2/balloc.c | in_range (tmp, gdp->bg_inode_table, sb->u.ext2_sb.s_itb_per_group))) |
sb | 419 | fs/ext2/balloc.c | ext2_panic (sb, "ext2_new_block", |
sb | 424 | fs/ext2/balloc.c | ext2_warning (sb, "ext2_new_block", |
sb | 426 | fs/ext2/balloc.c | if (sb->dq_op) |
sb | 427 | fs/ext2/balloc.c | sb->dq_op->free_block(inode, fs_to_dq_blocks(1, sb->s_blocksize)); |
sb | 441 | fs/ext2/balloc.c | k < 8 && (j + k) < EXT2_BLOCKS_PER_GROUP(sb); k++) { |
sb | 442 | fs/ext2/balloc.c | if (sb->dq_op) |
sb | 443 | fs/ext2/balloc.c | if (sb->dq_op->alloc_block(inode, fs_to_dq_blocks(1, sb->s_blocksize))) |
sb | 446 | fs/ext2/balloc.c | if (sb->dq_op) |
sb | 447 | fs/ext2/balloc.c | sb->dq_op->free_block(inode, fs_to_dq_blocks(1, sb->s_blocksize)); |
sb | 462 | fs/ext2/balloc.c | if (sb->s_flags & MS_SYNCHRONOUS) { |
sb | 468 | fs/ext2/balloc.c | ext2_error (sb, "ext2_new_block", |
sb | 471 | fs/ext2/balloc.c | unlock_super (sb); |
sb | 474 | fs/ext2/balloc.c | if (!(bh = getblk (sb->s_dev, j, sb->s_blocksize))) { |
sb | 475 | fs/ext2/balloc.c | ext2_error (sb, "ext2_new_block", "cannot get block %d", j); |
sb | 476 | fs/ext2/balloc.c | unlock_super (sb); |
sb | 479 | fs/ext2/balloc.c | memset(bh->b_data, 0, sb->s_blocksize); |
sb | 490 | fs/ext2/balloc.c | mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1); |
sb | 491 | fs/ext2/balloc.c | sb->s_dirt = 1; |
sb | 492 | fs/ext2/balloc.c | unlock_super (sb); |
sb | 497 | fs/ext2/balloc.c | unsigned long ext2_count_free_blocks (struct super_block * sb) |
sb | 506 | fs/ext2/balloc.c | lock_super (sb); |
sb | 507 | fs/ext2/balloc.c | es = sb->u.ext2_sb.s_es; |
sb | 511 | fs/ext2/balloc.c | for (i = 0; i < sb->u.ext2_sb.s_groups_count; i++) { |
sb | 512 | fs/ext2/balloc.c | gdp = get_group_desc (sb, i, NULL); |
sb | 514 | fs/ext2/balloc.c | bitmap_nr = load_block_bitmap (sb, i); |
sb | 515 | fs/ext2/balloc.c | x = ext2_count_free (sb->u.ext2_sb.s_block_bitmap[bitmap_nr], |
sb | 516 | fs/ext2/balloc.c | sb->s_blocksize); |
sb | 523 | fs/ext2/balloc.c | unlock_super (sb); |
sb | 526 | fs/ext2/balloc.c | return sb->u.ext2_sb.s_es->s_free_blocks_count; |
sb | 531 | fs/ext2/balloc.c | struct super_block * sb, |
sb | 534 | fs/ext2/balloc.c | return test_bit ((block - sb->u.ext2_sb.s_es->s_first_data_block) % |
sb | 535 | fs/ext2/balloc.c | EXT2_BLOCKS_PER_GROUP(sb), map); |
sb | 538 | fs/ext2/balloc.c | void ext2_check_blocks_bitmap (struct super_block * sb) |
sb | 548 | fs/ext2/balloc.c | lock_super (sb); |
sb | 549 | fs/ext2/balloc.c | es = sb->u.ext2_sb.s_es; |
sb | 553 | fs/ext2/balloc.c | desc_blocks = (sb->u.ext2_sb.s_groups_count + EXT2_DESC_PER_BLOCK(sb) - 1) / |
sb | 554 | fs/ext2/balloc.c | EXT2_DESC_PER_BLOCK(sb); |
sb | 555 | fs/ext2/balloc.c | for (i = 0; i < sb->u.ext2_sb.s_groups_count; i++) { |
sb | 556 | fs/ext2/balloc.c | gdp = get_group_desc (sb, i, NULL); |
sb | 558 | fs/ext2/balloc.c | bitmap_nr = load_block_bitmap (sb, i); |
sb | 559 | fs/ext2/balloc.c | bh = sb->u.ext2_sb.s_block_bitmap[bitmap_nr]; |
sb | 562 | fs/ext2/balloc.c | ext2_error (sb, "ext2_check_blocks_bitmap", |
sb | 567 | fs/ext2/balloc.c | ext2_error (sb, "ext2_check_blocks_bitmap", |
sb | 571 | fs/ext2/balloc.c | if (!block_in_use (gdp->bg_block_bitmap, sb, bh->b_data)) |
sb | 572 | fs/ext2/balloc.c | ext2_error (sb, "ext2_check_blocks_bitmap", |
sb | 576 | fs/ext2/balloc.c | if (!block_in_use (gdp->bg_inode_bitmap, sb, bh->b_data)) |
sb | 577 | fs/ext2/balloc.c | ext2_error (sb, "ext2_check_blocks_bitmap", |
sb | 581 | fs/ext2/balloc.c | for (j = 0; j < sb->u.ext2_sb.s_itb_per_group; j++) |
sb | 582 | fs/ext2/balloc.c | if (!block_in_use (gdp->bg_inode_table + j, sb, bh->b_data)) |
sb | 583 | fs/ext2/balloc.c | ext2_error (sb, "ext2_check_blocks_bitmap", |
sb | 587 | fs/ext2/balloc.c | x = ext2_count_free (bh, sb->s_blocksize); |
sb | 589 | fs/ext2/balloc.c | ext2_error (sb, "ext2_check_blocks_bitmap", |
sb | 596 | fs/ext2/balloc.c | ext2_error (sb, "ext2_check_blocks_bitmap", |
sb | 600 | fs/ext2/balloc.c | unlock_super (sb); |
sb | 108 | fs/ext2/dir.c | struct super_block * sb; |
sb | 113 | fs/ext2/dir.c | sb = inode->i_sb; |
sb | 117 | fs/ext2/dir.c | offset = filp->f_pos & (sb->s_blocksize - 1); |
sb | 120 | fs/ext2/dir.c | blk = (filp->f_pos) >> EXT2_BLOCK_SIZE_BITS(sb); |
sb | 123 | fs/ext2/dir.c | ext2_error (sb, "ext2_readdir", |
sb | 126 | fs/ext2/dir.c | filp->f_pos += sb->s_blocksize - offset; |
sb | 134 | fs/ext2/dir.c | for (i = 16 >> (EXT2_BLOCK_SIZE_BITS(sb) - 9), num = 0; |
sb | 155 | fs/ext2/dir.c | for (i = 0; i < sb->s_blocksize && i < offset; ) { |
sb | 169 | fs/ext2/dir.c | filp->f_pos = (filp->f_pos & ~(sb->s_blocksize - 1)) |
sb | 175 | fs/ext2/dir.c | && offset < sb->s_blocksize) { |
sb | 181 | fs/ext2/dir.c | filp->f_pos = (filp->f_pos & (sb->s_blocksize - 1)) |
sb | 182 | fs/ext2/dir.c | + sb->s_blocksize; |
sb | 93 | fs/ext2/file.c | struct super_block * sb; |
sb | 102 | fs/ext2/file.c | sb = inode->i_sb; |
sb | 103 | fs/ext2/file.c | if (sb->s_flags & MS_RDONLY) |
sb | 110 | fs/ext2/file.c | ext2_warning (sb, "ext2_file_write", "mode = %07o", |
sb | 127 | fs/ext2/file.c | block = pos2 >> EXT2_BLOCK_SIZE_BITS(sb); |
sb | 128 | fs/ext2/file.c | offset = pos2 & (sb->s_blocksize - 1); |
sb | 129 | fs/ext2/file.c | c = sb->s_blocksize - offset; |
sb | 146 | fs/ext2/file.c | if (c != sb->s_blocksize && !buffer_uptodate(bh)) { |
sb | 182 | fs/ext2/file.c | c = sb->s_blocksize; |
sb | 37 | fs/ext2/ialloc.c | static struct ext2_group_desc * get_group_desc (struct super_block * sb, |
sb | 45 | fs/ext2/ialloc.c | if (block_group >= sb->u.ext2_sb.s_groups_count) |
sb | 46 | fs/ext2/ialloc.c | ext2_panic (sb, "get_group_desc", |
sb | 49 | fs/ext2/ialloc.c | block_group, sb->u.ext2_sb.s_groups_count); |
sb | 51 | fs/ext2/ialloc.c | group_desc = block_group / EXT2_DESC_PER_BLOCK(sb); |
sb | 52 | fs/ext2/ialloc.c | desc = block_group % EXT2_DESC_PER_BLOCK(sb); |
sb | 53 | fs/ext2/ialloc.c | if (!sb->u.ext2_sb.s_group_desc[group_desc]) |
sb | 54 | fs/ext2/ialloc.c | ext2_panic (sb, "get_group_desc", |
sb | 59 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_group_desc[group_desc]->b_data; |
sb | 61 | fs/ext2/ialloc.c | *bh = sb->u.ext2_sb.s_group_desc[group_desc]; |
sb | 65 | fs/ext2/ialloc.c | static void read_inode_bitmap (struct super_block * sb, |
sb | 72 | fs/ext2/ialloc.c | gdp = get_group_desc (sb, block_group, NULL); |
sb | 73 | fs/ext2/ialloc.c | bh = bread (sb->s_dev, gdp->bg_inode_bitmap, sb->s_blocksize); |
sb | 75 | fs/ext2/ialloc.c | ext2_panic (sb, "read_inode_bitmap", |
sb | 79 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap_number[bitmap_nr] = block_group; |
sb | 80 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap[bitmap_nr] = bh; |
sb | 94 | fs/ext2/ialloc.c | static int load_inode_bitmap (struct super_block * sb, |
sb | 101 | fs/ext2/ialloc.c | if (block_group >= sb->u.ext2_sb.s_groups_count) |
sb | 102 | fs/ext2/ialloc.c | ext2_panic (sb, "load_inode_bitmap", |
sb | 105 | fs/ext2/ialloc.c | block_group, sb->u.ext2_sb.s_groups_count); |
sb | 106 | fs/ext2/ialloc.c | if (sb->u.ext2_sb.s_loaded_inode_bitmaps > 0 && |
sb | 107 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap_number[0] == block_group) |
sb | 109 | fs/ext2/ialloc.c | if (sb->u.ext2_sb.s_groups_count <= EXT2_MAX_GROUP_LOADED) { |
sb | 110 | fs/ext2/ialloc.c | if (sb->u.ext2_sb.s_inode_bitmap[block_group]) { |
sb | 111 | fs/ext2/ialloc.c | if (sb->u.ext2_sb.s_inode_bitmap_number[block_group] != block_group) |
sb | 112 | fs/ext2/ialloc.c | ext2_panic (sb, "load_inode_bitmap", |
sb | 117 | fs/ext2/ialloc.c | read_inode_bitmap (sb, block_group, block_group); |
sb | 122 | fs/ext2/ialloc.c | for (i = 0; i < sb->u.ext2_sb.s_loaded_inode_bitmaps && |
sb | 123 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap_number[i] != block_group; |
sb | 126 | fs/ext2/ialloc.c | if (i < sb->u.ext2_sb.s_loaded_inode_bitmaps && |
sb | 127 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap_number[i] == block_group) { |
sb | 128 | fs/ext2/ialloc.c | inode_bitmap_number = sb->u.ext2_sb.s_inode_bitmap_number[i]; |
sb | 129 | fs/ext2/ialloc.c | inode_bitmap = sb->u.ext2_sb.s_inode_bitmap[i]; |
sb | 131 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap_number[j] = |
sb | 132 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap_number[j - 1]; |
sb | 133 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap[j] = |
sb | 134 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap[j - 1]; |
sb | 136 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap_number[0] = inode_bitmap_number; |
sb | 137 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap[0] = inode_bitmap; |
sb | 139 | fs/ext2/ialloc.c | if (sb->u.ext2_sb.s_loaded_inode_bitmaps < EXT2_MAX_GROUP_LOADED) |
sb | 140 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_loaded_inode_bitmaps++; |
sb | 142 | fs/ext2/ialloc.c | brelse (sb->u.ext2_sb.s_inode_bitmap[EXT2_MAX_GROUP_LOADED - 1]); |
sb | 143 | fs/ext2/ialloc.c | for (j = sb->u.ext2_sb.s_loaded_inode_bitmaps - 1; j > 0; j--) { |
sb | 144 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap_number[j] = |
sb | 145 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap_number[j - 1]; |
sb | 146 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap[j] = |
sb | 147 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap[j - 1]; |
sb | 149 | fs/ext2/ialloc.c | read_inode_bitmap (sb, block_group, 0); |
sb | 191 | fs/ext2/ialloc.c | struct super_block * sb; |
sb | 223 | fs/ext2/ialloc.c | sb = inode->i_sb; |
sb | 224 | fs/ext2/ialloc.c | lock_super (sb); |
sb | 226 | fs/ext2/ialloc.c | inode->i_ino > sb->u.ext2_sb.s_es->s_inodes_count) { |
sb | 227 | fs/ext2/ialloc.c | ext2_error (sb, "free_inode", |
sb | 229 | fs/ext2/ialloc.c | unlock_super (sb); |
sb | 232 | fs/ext2/ialloc.c | es = sb->u.ext2_sb.s_es; |
sb | 233 | fs/ext2/ialloc.c | block_group = (inode->i_ino - 1) / EXT2_INODES_PER_GROUP(sb); |
sb | 234 | fs/ext2/ialloc.c | bit = (inode->i_ino - 1) % EXT2_INODES_PER_GROUP(sb); |
sb | 235 | fs/ext2/ialloc.c | bitmap_nr = load_inode_bitmap (sb, block_group); |
sb | 236 | fs/ext2/ialloc.c | bh = sb->u.ext2_sb.s_inode_bitmap[bitmap_nr]; |
sb | 238 | fs/ext2/ialloc.c | ext2_warning (sb, "ext2_free_inode", |
sb | 241 | fs/ext2/ialloc.c | gdp = get_group_desc (sb, block_group, &bh2); |
sb | 247 | fs/ext2/ialloc.c | mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1); |
sb | 252 | fs/ext2/ialloc.c | if (sb->s_flags & MS_SYNCHRONOUS) { |
sb | 256 | fs/ext2/ialloc.c | if (sb->dq_op) |
sb | 257 | fs/ext2/ialloc.c | sb->dq_op->free_inode (inode, 1); |
sb | 258 | fs/ext2/ialloc.c | sb->s_dirt = 1; |
sb | 260 | fs/ext2/ialloc.c | unlock_super (sb); |
sb | 310 | fs/ext2/ialloc.c | struct super_block * sb; |
sb | 322 | fs/ext2/ialloc.c | sb = dir->i_sb; |
sb | 323 | fs/ext2/ialloc.c | inode->i_sb = sb; |
sb | 324 | fs/ext2/ialloc.c | inode->i_flags = sb->s_flags; |
sb | 325 | fs/ext2/ialloc.c | lock_super (sb); |
sb | 326 | fs/ext2/ialloc.c | es = sb->u.ext2_sb.s_es; |
sb | 333 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_groups_count; |
sb | 348 | fs/ext2/ialloc.c | for (j = 0; j < sb->u.ext2_sb.s_groups_count; j++) { |
sb | 349 | fs/ext2/ialloc.c | tmp = get_group_desc (sb, j, &bh2); |
sb | 368 | fs/ext2/ialloc.c | tmp = get_group_desc (sb, i, &bh2); |
sb | 377 | fs/ext2/ialloc.c | for (j = 1; j < sb->u.ext2_sb.s_groups_count; j <<= 1) { |
sb | 379 | fs/ext2/ialloc.c | if (i >= sb->u.ext2_sb.s_groups_count) |
sb | 380 | fs/ext2/ialloc.c | i -= sb->u.ext2_sb.s_groups_count; |
sb | 381 | fs/ext2/ialloc.c | tmp = get_group_desc (sb, i, &bh2); |
sb | 393 | fs/ext2/ialloc.c | for (j = 2; j < sb->u.ext2_sb.s_groups_count; j++) { |
sb | 394 | fs/ext2/ialloc.c | if (++i >= sb->u.ext2_sb.s_groups_count) |
sb | 396 | fs/ext2/ialloc.c | tmp = get_group_desc (sb, i, &bh2); |
sb | 406 | fs/ext2/ialloc.c | unlock_super (sb); |
sb | 410 | fs/ext2/ialloc.c | bitmap_nr = load_inode_bitmap (sb, i); |
sb | 411 | fs/ext2/ialloc.c | bh = sb->u.ext2_sb.s_inode_bitmap[bitmap_nr]; |
sb | 413 | fs/ext2/ialloc.c | EXT2_INODES_PER_GROUP(sb))) < |
sb | 414 | fs/ext2/ialloc.c | EXT2_INODES_PER_GROUP(sb)) { |
sb | 416 | fs/ext2/ialloc.c | ext2_warning (sb, "ext2_new_inode", |
sb | 421 | fs/ext2/ialloc.c | if (sb->s_flags & MS_SYNCHRONOUS) { |
sb | 427 | fs/ext2/ialloc.c | ext2_error (sb, "ext2_new_inode", |
sb | 430 | fs/ext2/ialloc.c | unlock_super (sb); |
sb | 436 | fs/ext2/ialloc.c | j += i * EXT2_INODES_PER_GROUP(sb) + 1; |
sb | 438 | fs/ext2/ialloc.c | ext2_error (sb, "ext2_new_inode", |
sb | 441 | fs/ext2/ialloc.c | unlock_super (sb); |
sb | 450 | fs/ext2/ialloc.c | mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1); |
sb | 451 | fs/ext2/ialloc.c | sb->s_dirt = 1; |
sb | 453 | fs/ext2/ialloc.c | inode->i_sb = sb; |
sb | 456 | fs/ext2/ialloc.c | inode->i_dev = sb->s_dev; |
sb | 458 | fs/ext2/ialloc.c | if (test_opt (sb, GRPID)) |
sb | 487 | fs/ext2/ialloc.c | unlock_super (sb); |
sb | 488 | fs/ext2/ialloc.c | if (sb->dq_op) { |
sb | 489 | fs/ext2/ialloc.c | sb->dq_op->initialize (inode, -1); |
sb | 490 | fs/ext2/ialloc.c | if (sb->dq_op->alloc_inode (inode, 1)) { |
sb | 491 | fs/ext2/ialloc.c | sb->dq_op->drop (inode); |
sb | 505 | fs/ext2/ialloc.c | unsigned long ext2_count_free_inodes (struct super_block * sb) |
sb | 514 | fs/ext2/ialloc.c | lock_super (sb); |
sb | 515 | fs/ext2/ialloc.c | es = sb->u.ext2_sb.s_es; |
sb | 519 | fs/ext2/ialloc.c | for (i = 0; i < sb->u.ext2_sb.s_groups_count; i++) { |
sb | 520 | fs/ext2/ialloc.c | gdp = get_group_desc (sb, i, NULL); |
sb | 522 | fs/ext2/ialloc.c | bitmap_nr = load_inode_bitmap (sb, i); |
sb | 523 | fs/ext2/ialloc.c | x = ext2_count_free (sb->u.ext2_sb.s_inode_bitmap[bitmap_nr], |
sb | 524 | fs/ext2/ialloc.c | EXT2_INODES_PER_GROUP(sb) / 8); |
sb | 531 | fs/ext2/ialloc.c | unlock_super (sb); |
sb | 534 | fs/ext2/ialloc.c | return sb->u.ext2_sb.s_es->s_free_inodes_count; |
sb | 538 | fs/ext2/ialloc.c | void ext2_check_inodes_bitmap (struct super_block * sb) |
sb | 546 | fs/ext2/ialloc.c | lock_super (sb); |
sb | 547 | fs/ext2/ialloc.c | es = sb->u.ext2_sb.s_es; |
sb | 551 | fs/ext2/ialloc.c | for (i = 0; i < sb->u.ext2_sb.s_groups_count; i++) { |
sb | 552 | fs/ext2/ialloc.c | gdp = get_group_desc (sb, i, NULL); |
sb | 554 | fs/ext2/ialloc.c | bitmap_nr = load_inode_bitmap (sb, i); |
sb | 555 | fs/ext2/ialloc.c | x = ext2_count_free (sb->u.ext2_sb.s_inode_bitmap[bitmap_nr], |
sb | 556 | fs/ext2/ialloc.c | EXT2_INODES_PER_GROUP(sb) / 8); |
sb | 558 | fs/ext2/ialloc.c | ext2_error (sb, "ext2_check_inodes_bitmap", |
sb | 565 | fs/ext2/ialloc.c | ext2_error (sb, "ext2_check_inodes_bitmap", |
sb | 569 | fs/ext2/ialloc.c | unlock_super (sb); |
sb | 72 | fs/ext2/namei.c | struct super_block * sb; |
sb | 81 | fs/ext2/namei.c | sb = dir->i_sb; |
sb | 96 | fs/ext2/namei.c | if ((block << EXT2_BLOCK_SIZE_BITS (sb)) >= dir->i_size) |
sb | 115 | fs/ext2/namei.c | ext2_error (sb, "ext2_find_entry", |
sb | 118 | fs/ext2/namei.c | offset += sb->s_blocksize; |
sb | 130 | fs/ext2/namei.c | dlimit = bh->b_data + sb->s_blocksize; |
sb | 149 | fs/ext2/namei.c | if (((block + NAMEI_RA_SIZE) << EXT2_BLOCK_SIZE_BITS (sb)) >= |
sb | 228 | fs/ext2/namei.c | struct super_block * sb; |
sb | 234 | fs/ext2/namei.c | sb = dir->i_sb; |
sb | 260 | fs/ext2/namei.c | if ((char *)de >= sb->s_blocksize + bh->b_data) { |
sb | 263 | fs/ext2/namei.c | bh = ext2_bread (dir, offset >> EXT2_BLOCK_SIZE_BITS(sb), 1, err); |
sb | 276 | fs/ext2/namei.c | de->rec_len = sb->s_blocksize; |
sb | 277 | fs/ext2/namei.c | dir->i_size = offset + sb->s_blocksize; |
sb | 556 | fs/ext2/namei.c | struct super_block * sb; |
sb | 559 | fs/ext2/namei.c | sb = inode->i_sb; |
sb | 579 | fs/ext2/namei.c | if ((void *) de >= (void *) (bh->b_data + sb->s_blocksize)) { |
sb | 581 | fs/ext2/namei.c | bh = ext2_bread (inode, offset >> EXT2_BLOCK_SIZE_BITS(sb), 1, &err); |
sb | 583 | fs/ext2/namei.c | ext2_error (sb, "empty_dir", |
sb | 586 | fs/ext2/namei.c | offset += sb->s_blocksize; |
sb | 35 | fs/ext2/super.c | void ext2_error (struct super_block * sb, const char * function, |
sb | 40 | fs/ext2/super.c | if (!(sb->s_flags & MS_RDONLY)) { |
sb | 41 | fs/ext2/super.c | sb->u.ext2_sb.s_mount_state |= EXT2_ERROR_FS; |
sb | 42 | fs/ext2/super.c | sb->u.ext2_sb.s_es->s_state |= EXT2_ERROR_FS; |
sb | 43 | fs/ext2/super.c | mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1); |
sb | 44 | fs/ext2/super.c | sb->s_dirt = 1; |
sb | 49 | fs/ext2/super.c | if (test_opt (sb, ERRORS_PANIC) || |
sb | 50 | fs/ext2/super.c | (sb->u.ext2_sb.s_es->s_errors == EXT2_ERRORS_PANIC && |
sb | 51 | fs/ext2/super.c | !test_opt (sb, ERRORS_CONT) && !test_opt (sb, ERRORS_RO))) |
sb | 53 | fs/ext2/super.c | kdevname(sb->s_dev), function, error_buf); |
sb | 55 | fs/ext2/super.c | kdevname(sb->s_dev), function, error_buf); |
sb | 56 | fs/ext2/super.c | if (test_opt (sb, ERRORS_RO) || |
sb | 57 | fs/ext2/super.c | (sb->u.ext2_sb.s_es->s_errors == EXT2_ERRORS_RO && |
sb | 58 | fs/ext2/super.c | !test_opt (sb, ERRORS_CONT) && !test_opt (sb, ERRORS_PANIC))) { |
sb | 60 | fs/ext2/super.c | sb->s_flags |= MS_RDONLY; |
sb | 64 | fs/ext2/super.c | NORET_TYPE void ext2_panic (struct super_block * sb, const char * function, |
sb | 69 | fs/ext2/super.c | if (!(sb->s_flags & MS_RDONLY)) { |
sb | 70 | fs/ext2/super.c | sb->u.ext2_sb.s_mount_state |= EXT2_ERROR_FS; |
sb | 71 | fs/ext2/super.c | sb->u.ext2_sb.s_es->s_state |= EXT2_ERROR_FS; |
sb | 72 | fs/ext2/super.c | mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1); |
sb | 73 | fs/ext2/super.c | sb->s_dirt = 1; |
sb | 79 | fs/ext2/super.c | if (sb->s_lock) |
sb | 80 | fs/ext2/super.c | sb->s_lock=0; |
sb | 81 | fs/ext2/super.c | sb->s_flags |= MS_RDONLY; |
sb | 83 | fs/ext2/super.c | kdevname(sb->s_dev), function, error_buf); |
sb | 86 | fs/ext2/super.c | void ext2_warning (struct super_block * sb, const char * function, |
sb | 95 | fs/ext2/super.c | kdevname(sb->s_dev), function, error_buf); |
sb | 98 | fs/ext2/super.c | void ext2_put_super (struct super_block * sb) |
sb | 103 | fs/ext2/super.c | lock_super (sb); |
sb | 104 | fs/ext2/super.c | if (!(sb->s_flags & MS_RDONLY)) { |
sb | 105 | fs/ext2/super.c | sb->u.ext2_sb.s_es->s_state = sb->u.ext2_sb.s_mount_state; |
sb | 106 | fs/ext2/super.c | mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1); |
sb | 108 | fs/ext2/super.c | sb->s_dev = 0; |
sb | 109 | fs/ext2/super.c | db_count = sb->u.ext2_sb.s_db_per_group; |
sb | 111 | fs/ext2/super.c | if (sb->u.ext2_sb.s_group_desc[i]) |
sb | 112 | fs/ext2/super.c | brelse (sb->u.ext2_sb.s_group_desc[i]); |
sb | 113 | fs/ext2/super.c | kfree_s (sb->u.ext2_sb.s_group_desc, |
sb | 116 | fs/ext2/super.c | if (sb->u.ext2_sb.s_inode_bitmap[i]) |
sb | 117 | fs/ext2/super.c | brelse (sb->u.ext2_sb.s_inode_bitmap[i]); |
sb | 119 | fs/ext2/super.c | if (sb->u.ext2_sb.s_block_bitmap[i]) |
sb | 120 | fs/ext2/super.c | brelse (sb->u.ext2_sb.s_block_bitmap[i]); |
sb | 121 | fs/ext2/super.c | brelse (sb->u.ext2_sb.s_sbh); |
sb | 122 | fs/ext2/super.c | unlock_super (sb); |
sb | 270 | fs/ext2/super.c | static void ext2_setup_super (struct super_block * sb, |
sb | 276 | fs/ext2/super.c | sb->s_flags |= MS_RDONLY; |
sb | 278 | fs/ext2/super.c | if (!(sb->s_flags & MS_RDONLY)) { |
sb | 279 | fs/ext2/super.c | if (!(sb->u.ext2_sb.s_mount_state & EXT2_VALID_FS)) |
sb | 282 | fs/ext2/super.c | else if ((sb->u.ext2_sb.s_mount_state & EXT2_ERROR_FS)) |
sb | 298 | fs/ext2/super.c | mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1); |
sb | 299 | fs/ext2/super.c | sb->s_dirt = 1; |
sb | 300 | fs/ext2/super.c | if (test_opt (sb, DEBUG)) |
sb | 303 | fs/ext2/super.c | EXT2FS_VERSION, EXT2FS_DATE, sb->s_blocksize, |
sb | 304 | fs/ext2/super.c | sb->u.ext2_sb.s_frag_size, |
sb | 305 | fs/ext2/super.c | sb->u.ext2_sb.s_groups_count, |
sb | 306 | fs/ext2/super.c | EXT2_BLOCKS_PER_GROUP(sb), |
sb | 307 | fs/ext2/super.c | EXT2_INODES_PER_GROUP(sb), |
sb | 308 | fs/ext2/super.c | sb->u.ext2_sb.s_mount_opt); |
sb | 309 | fs/ext2/super.c | if (test_opt (sb, CHECK)) { |
sb | 310 | fs/ext2/super.c | ext2_check_blocks_bitmap (sb); |
sb | 311 | fs/ext2/super.c | ext2_check_inodes_bitmap (sb); |
sb | 316 | fs/ext2/super.c | static int ext2_check_descriptors (struct super_block * sb) |
sb | 320 | fs/ext2/super.c | unsigned long block = sb->u.ext2_sb.s_es->s_first_data_block; |
sb | 325 | fs/ext2/super.c | for (i = 0; i < sb->u.ext2_sb.s_groups_count; i++) |
sb | 327 | fs/ext2/super.c | if ((i % EXT2_DESC_PER_BLOCK(sb)) == 0) |
sb | 328 | fs/ext2/super.c | gdp = (struct ext2_group_desc *) sb->u.ext2_sb.s_group_desc[desc_block++]->b_data; |
sb | 330 | fs/ext2/super.c | gdp->bg_block_bitmap >= block + EXT2_BLOCKS_PER_GROUP(sb)) |
sb | 332 | fs/ext2/super.c | ext2_error (sb, "ext2_check_descriptors", |
sb | 339 | fs/ext2/super.c | gdp->bg_inode_bitmap >= block + EXT2_BLOCKS_PER_GROUP(sb)) |
sb | 341 | fs/ext2/super.c | ext2_error (sb, "ext2_check_descriptors", |
sb | 348 | fs/ext2/super.c | gdp->bg_inode_table + sb->u.ext2_sb.s_itb_per_group >= |
sb | 349 | fs/ext2/super.c | block + EXT2_BLOCKS_PER_GROUP(sb)) |
sb | 351 | fs/ext2/super.c | ext2_error (sb, "ext2_check_descriptors", |
sb | 357 | fs/ext2/super.c | block += EXT2_BLOCKS_PER_GROUP(sb); |
sb | 365 | fs/ext2/super.c | struct super_block * ext2_read_super (struct super_block * sb, void * data, |
sb | 374 | fs/ext2/super.c | kdev_t dev = sb->s_dev; |
sb | 378 | fs/ext2/super.c | set_opt (sb->u.ext2_sb.s_mount_opt, CHECK_NORMAL); |
sb | 380 | fs/ext2/super.c | &sb->u.ext2_sb.s_mount_opt)) { |
sb | 381 | fs/ext2/super.c | sb->s_dev = 0; |
sb | 386 | fs/ext2/super.c | lock_super (sb); |
sb | 389 | fs/ext2/super.c | sb->s_dev = 0; |
sb | 390 | fs/ext2/super.c | unlock_super (sb); |
sb | 400 | fs/ext2/super.c | sb->u.ext2_sb.s_es = es; |
sb | 401 | fs/ext2/super.c | sb->s_magic = es->s_magic; |
sb | 402 | fs/ext2/super.c | if (sb->s_magic != EXT2_SUPER_MAGIC) { |
sb | 403 | fs/ext2/super.c | sb->s_dev = 0; |
sb | 404 | fs/ext2/super.c | unlock_super (sb); |
sb | 411 | fs/ext2/super.c | sb->s_blocksize_bits = sb->u.ext2_sb.s_es->s_log_block_size + 10; |
sb | 412 | fs/ext2/super.c | sb->s_blocksize = 1 << sb->s_blocksize_bits; |
sb | 413 | fs/ext2/super.c | if (sb->s_blocksize != BLOCK_SIZE && |
sb | 414 | fs/ext2/super.c | (sb->s_blocksize == 1024 || sb->s_blocksize == 2048 || |
sb | 415 | fs/ext2/super.c | sb->s_blocksize == 4096)) { |
sb | 419 | fs/ext2/super.c | set_blocksize (dev, sb->s_blocksize); |
sb | 420 | fs/ext2/super.c | logic_sb_block = (sb_block*BLOCK_SIZE) / sb->s_blocksize; |
sb | 421 | fs/ext2/super.c | offset = (sb_block*BLOCK_SIZE) % sb->s_blocksize; |
sb | 422 | fs/ext2/super.c | bh = bread (dev, logic_sb_block, sb->s_blocksize); |
sb | 428 | fs/ext2/super.c | sb->u.ext2_sb.s_es = es; |
sb | 430 | fs/ext2/super.c | sb->s_dev = 0; |
sb | 431 | fs/ext2/super.c | unlock_super (sb); |
sb | 438 | fs/ext2/super.c | sb->u.ext2_sb.s_frag_size = EXT2_MIN_FRAG_SIZE << |
sb | 440 | fs/ext2/super.c | if (sb->u.ext2_sb.s_frag_size) |
sb | 441 | fs/ext2/super.c | sb->u.ext2_sb.s_frags_per_block = sb->s_blocksize / |
sb | 442 | fs/ext2/super.c | sb->u.ext2_sb.s_frag_size; |
sb | 444 | fs/ext2/super.c | sb->s_magic = 0; |
sb | 445 | fs/ext2/super.c | sb->u.ext2_sb.s_blocks_per_group = es->s_blocks_per_group; |
sb | 446 | fs/ext2/super.c | sb->u.ext2_sb.s_frags_per_group = es->s_frags_per_group; |
sb | 447 | fs/ext2/super.c | sb->u.ext2_sb.s_inodes_per_group = es->s_inodes_per_group; |
sb | 448 | fs/ext2/super.c | sb->u.ext2_sb.s_inodes_per_block = sb->s_blocksize / |
sb | 450 | fs/ext2/super.c | sb->u.ext2_sb.s_itb_per_group = sb->u.ext2_sb.s_inodes_per_group / |
sb | 451 | fs/ext2/super.c | sb->u.ext2_sb.s_inodes_per_block; |
sb | 452 | fs/ext2/super.c | sb->u.ext2_sb.s_desc_per_block = sb->s_blocksize / |
sb | 454 | fs/ext2/super.c | sb->u.ext2_sb.s_sbh = bh; |
sb | 456 | fs/ext2/super.c | sb->u.ext2_sb.s_resuid = resuid; |
sb | 458 | fs/ext2/super.c | sb->u.ext2_sb.s_resuid = es->s_def_resuid; |
sb | 460 | fs/ext2/super.c | sb->u.ext2_sb.s_resgid = resgid; |
sb | 462 | fs/ext2/super.c | sb->u.ext2_sb.s_resgid = es->s_def_resgid; |
sb | 463 | fs/ext2/super.c | sb->u.ext2_sb.s_mount_state = es->s_state; |
sb | 464 | fs/ext2/super.c | sb->u.ext2_sb.s_rename_lock = 0; |
sb | 465 | fs/ext2/super.c | sb->u.ext2_sb.s_rename_wait = NULL; |
sb | 466 | fs/ext2/super.c | sb->u.ext2_sb.s_addr_per_block_bits = |
sb | 467 | fs/ext2/super.c | log2 (EXT2_ADDR_PER_BLOCK(sb)); |
sb | 468 | fs/ext2/super.c | sb->u.ext2_sb.s_inodes_per_block_bits = |
sb | 469 | fs/ext2/super.c | log2 (EXT2_INODES_PER_BLOCK(sb)); |
sb | 470 | fs/ext2/super.c | sb->u.ext2_sb.s_desc_per_block_bits = |
sb | 471 | fs/ext2/super.c | log2 (EXT2_DESC_PER_BLOCK(sb)); |
sb | 472 | fs/ext2/super.c | if (sb->s_magic != EXT2_SUPER_MAGIC) { |
sb | 473 | fs/ext2/super.c | sb->s_dev = 0; |
sb | 474 | fs/ext2/super.c | unlock_super (sb); |
sb | 483 | fs/ext2/super.c | if (sb->s_blocksize != bh->b_size) { |
sb | 484 | fs/ext2/super.c | sb->s_dev = 0; |
sb | 485 | fs/ext2/super.c | unlock_super (sb); |
sb | 494 | fs/ext2/super.c | if (sb->s_blocksize != sb->u.ext2_sb.s_frag_size) { |
sb | 495 | fs/ext2/super.c | sb->s_dev = 0; |
sb | 496 | fs/ext2/super.c | unlock_super (sb); |
sb | 499 | fs/ext2/super.c | sb->u.ext2_sb.s_frag_size, sb->s_blocksize); |
sb | 504 | fs/ext2/super.c | if (sb->u.ext2_sb.s_blocks_per_group > sb->s_blocksize * 8) { |
sb | 505 | fs/ext2/super.c | sb->s_dev = 0; |
sb | 506 | fs/ext2/super.c | unlock_super (sb); |
sb | 509 | fs/ext2/super.c | sb->u.ext2_sb.s_blocks_per_group); |
sb | 513 | fs/ext2/super.c | if (sb->u.ext2_sb.s_frags_per_group > sb->s_blocksize * 8) { |
sb | 514 | fs/ext2/super.c | sb->s_dev = 0; |
sb | 515 | fs/ext2/super.c | unlock_super (sb); |
sb | 518 | fs/ext2/super.c | sb->u.ext2_sb.s_frags_per_group); |
sb | 522 | fs/ext2/super.c | if (sb->u.ext2_sb.s_inodes_per_group > sb->s_blocksize * 8) { |
sb | 523 | fs/ext2/super.c | sb->s_dev = 0; |
sb | 524 | fs/ext2/super.c | unlock_super (sb); |
sb | 527 | fs/ext2/super.c | sb->u.ext2_sb.s_inodes_per_group); |
sb | 532 | fs/ext2/super.c | sb->u.ext2_sb.s_groups_count = (es->s_blocks_count - |
sb | 534 | fs/ext2/super.c | EXT2_BLOCKS_PER_GROUP(sb) - 1) / |
sb | 535 | fs/ext2/super.c | EXT2_BLOCKS_PER_GROUP(sb); |
sb | 536 | fs/ext2/super.c | db_count = (sb->u.ext2_sb.s_groups_count + EXT2_DESC_PER_BLOCK(sb) - 1) / |
sb | 537 | fs/ext2/super.c | EXT2_DESC_PER_BLOCK(sb); |
sb | 538 | fs/ext2/super.c | sb->u.ext2_sb.s_group_desc = kmalloc (db_count * sizeof (struct buffer_head *), GFP_KERNEL); |
sb | 539 | fs/ext2/super.c | if (sb->u.ext2_sb.s_group_desc == NULL) { |
sb | 540 | fs/ext2/super.c | sb->s_dev = 0; |
sb | 541 | fs/ext2/super.c | unlock_super (sb); |
sb | 548 | fs/ext2/super.c | sb->u.ext2_sb.s_group_desc[i] = bread (dev, logic_sb_block + i + 1, |
sb | 549 | fs/ext2/super.c | sb->s_blocksize); |
sb | 550 | fs/ext2/super.c | if (!sb->u.ext2_sb.s_group_desc[i]) { |
sb | 551 | fs/ext2/super.c | sb->s_dev = 0; |
sb | 552 | fs/ext2/super.c | unlock_super (sb); |
sb | 554 | fs/ext2/super.c | brelse (sb->u.ext2_sb.s_group_desc[j]); |
sb | 555 | fs/ext2/super.c | kfree_s (sb->u.ext2_sb.s_group_desc, |
sb | 563 | fs/ext2/super.c | if (!ext2_check_descriptors (sb)) { |
sb | 564 | fs/ext2/super.c | sb->s_dev = 0; |
sb | 565 | fs/ext2/super.c | unlock_super (sb); |
sb | 567 | fs/ext2/super.c | brelse (sb->u.ext2_sb.s_group_desc[j]); |
sb | 568 | fs/ext2/super.c | kfree_s (sb->u.ext2_sb.s_group_desc, |
sb | 576 | fs/ext2/super.c | sb->u.ext2_sb.s_inode_bitmap_number[i] = 0; |
sb | 577 | fs/ext2/super.c | sb->u.ext2_sb.s_inode_bitmap[i] = NULL; |
sb | 578 | fs/ext2/super.c | sb->u.ext2_sb.s_block_bitmap_number[i] = 0; |
sb | 579 | fs/ext2/super.c | sb->u.ext2_sb.s_block_bitmap[i] = NULL; |
sb | 581 | fs/ext2/super.c | sb->u.ext2_sb.s_loaded_inode_bitmaps = 0; |
sb | 582 | fs/ext2/super.c | sb->u.ext2_sb.s_loaded_block_bitmaps = 0; |
sb | 583 | fs/ext2/super.c | sb->u.ext2_sb.s_db_per_group = db_count; |
sb | 584 | fs/ext2/super.c | unlock_super (sb); |
sb | 588 | fs/ext2/super.c | sb->s_dev = dev; |
sb | 589 | fs/ext2/super.c | sb->s_op = &ext2_sops; |
sb | 590 | fs/ext2/super.c | if (!(sb->s_mounted = iget (sb, EXT2_ROOT_INO))) { |
sb | 591 | fs/ext2/super.c | sb->s_dev = 0; |
sb | 593 | fs/ext2/super.c | if (sb->u.ext2_sb.s_group_desc[i]) |
sb | 594 | fs/ext2/super.c | brelse (sb->u.ext2_sb.s_group_desc[i]); |
sb | 595 | fs/ext2/super.c | kfree_s (sb->u.ext2_sb.s_group_desc, |
sb | 602 | fs/ext2/super.c | ext2_setup_super (sb, es); |
sb | 603 | fs/ext2/super.c | return sb; |
sb | 606 | fs/ext2/super.c | static void ext2_commit_super (struct super_block * sb, |
sb | 610 | fs/ext2/super.c | mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1); |
sb | 611 | fs/ext2/super.c | sb->s_dirt = 0; |
sb | 625 | fs/ext2/super.c | void ext2_write_super (struct super_block * sb) |
sb | 629 | fs/ext2/super.c | if (!(sb->s_flags & MS_RDONLY)) { |
sb | 630 | fs/ext2/super.c | es = sb->u.ext2_sb.s_es; |
sb | 638 | fs/ext2/super.c | ext2_commit_super (sb, es); |
sb | 640 | fs/ext2/super.c | sb->s_dirt = 0; |
sb | 643 | fs/ext2/super.c | int ext2_remount (struct super_block * sb, int * flags, char * data) |
sb | 646 | fs/ext2/super.c | unsigned short resuid = sb->u.ext2_sb.s_resuid; |
sb | 647 | fs/ext2/super.c | unsigned short resgid = sb->u.ext2_sb.s_resgid; |
sb | 659 | fs/ext2/super.c | sb->u.ext2_sb.s_mount_opt = new_mount_opt; |
sb | 660 | fs/ext2/super.c | sb->u.ext2_sb.s_resuid = resuid; |
sb | 661 | fs/ext2/super.c | sb->u.ext2_sb.s_resgid = resgid; |
sb | 662 | fs/ext2/super.c | es = sb->u.ext2_sb.s_es; |
sb | 663 | fs/ext2/super.c | if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) |
sb | 667 | fs/ext2/super.c | !(sb->u.ext2_sb.s_mount_state & EXT2_VALID_FS)) |
sb | 673 | fs/ext2/super.c | es->s_state = sb->u.ext2_sb.s_mount_state; |
sb | 675 | fs/ext2/super.c | mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1); |
sb | 676 | fs/ext2/super.c | sb->s_dirt = 1; |
sb | 677 | fs/ext2/super.c | ext2_commit_super (sb, es); |
sb | 685 | fs/ext2/super.c | sb->u.ext2_sb.s_mount_state = es->s_state; |
sb | 686 | fs/ext2/super.c | sb->s_flags &= ~MS_RDONLY; |
sb | 687 | fs/ext2/super.c | ext2_setup_super (sb, es); |
sb | 718 | fs/ext2/super.c | void ext2_statfs (struct super_block * sb, struct statfs * buf, int bufsiz) |
sb | 724 | fs/ext2/super.c | if (test_opt (sb, MINIX_DF)) |
sb | 731 | fs/ext2/super.c | sb->u.ext2_sb.s_db_per_group /* descriptors */ + |
sb | 734 | fs/ext2/super.c | sb->u.ext2_sb.s_itb_per_group /* inode table */; |
sb | 735 | fs/ext2/super.c | overhead = sb->u.ext2_sb.s_es->s_first_data_block + |
sb | 736 | fs/ext2/super.c | sb->u.ext2_sb.s_groups_count * overhead_per_group; |
sb | 740 | fs/ext2/super.c | tmp.f_bsize = sb->s_blocksize; |
sb | 741 | fs/ext2/super.c | tmp.f_blocks = sb->u.ext2_sb.s_es->s_blocks_count - overhead; |
sb | 742 | fs/ext2/super.c | tmp.f_bfree = ext2_count_free_blocks (sb); |
sb | 743 | fs/ext2/super.c | tmp.f_bavail = tmp.f_bfree - sb->u.ext2_sb.s_es->s_r_blocks_count; |
sb | 744 | fs/ext2/super.c | if (tmp.f_bfree < sb->u.ext2_sb.s_es->s_r_blocks_count) |
sb | 746 | fs/ext2/super.c | tmp.f_files = sb->u.ext2_sb.s_es->s_inodes_count; |
sb | 747 | fs/ext2/super.c | tmp.f_ffree = ext2_count_free_inodes (sb); |
sb | 14 | fs/fat/buffer.c | struct super_block *sb, |
sb | 18 | fs/fat/buffer.c | if (sb->s_blocksize == 512){ |
sb | 19 | fs/fat/buffer.c | ret = bread (sb->s_dev,block,512); |
sb | 21 | fs/fat/buffer.c | struct buffer_head *real = bread (sb->s_dev,block>>1,1024); |
sb | 67 | fs/fat/buffer.c | struct super_block *sb, |
sb | 71 | fs/fat/buffer.c | if (sb->s_blocksize == 512){ |
sb | 72 | fs/fat/buffer.c | ret = getblk (sb->s_dev,block,512); |
sb | 80 | fs/fat/buffer.c | ret = fat_bread (sb,block); |
sb | 86 | fs/fat/buffer.c | struct super_block *sb, |
sb | 90 | fs/fat/buffer.c | if (sb->s_blocksize == 512){ |
sb | 103 | fs/fat/buffer.c | struct super_block *sb, |
sb | 107 | fs/fat/buffer.c | if (sb->s_blocksize != 512){ |
sb | 114 | fs/fat/buffer.c | struct super_block *sb, |
sb | 118 | fs/fat/buffer.c | if (sb->s_blocksize != 512){ |
sb | 124 | fs/fat/buffer.c | struct super_block *sb, |
sb | 127 | fs/fat/buffer.c | if (sb->s_blocksize != 512){ |
sb | 134 | fs/fat/buffer.c | struct super_block *sb, |
sb | 139 | fs/fat/buffer.c | if (sb->s_blocksize == 512){ |
sb | 20 | fs/fat/cache.c | int fat_access(struct super_block *sb,int nr,int new_value) |
sb | 26 | fs/fat/cache.c | if ((unsigned) (nr-2) >= MSDOS_SB(sb)->clusters) return 0; |
sb | 27 | fs/fat/cache.c | if (MSDOS_SB(sb)->fat_bits == 16) first = last = nr*2; |
sb | 32 | fs/fat/cache.c | if (!(bh = bread(sb->s_dev,MSDOS_SB(sb)->fat_start+(first >> |
sb | 40 | fs/fat/cache.c | if (!(bh2 = bread(sb->s_dev,MSDOS_SB(sb)->fat_start+(last |
sb | 47 | fs/fat/cache.c | if (MSDOS_SB(sb)->fat_bits == 16) { |
sb | 62 | fs/fat/cache.c | if (MSDOS_SB(sb)->fat_bits == 16) |
sb | 77 | fs/fat/cache.c | for (copy = 1; copy < MSDOS_SB(sb)->fats; copy++) { |
sb | 78 | fs/fat/cache.c | if (!(c_bh = bread(sb->s_dev,MSDOS_SB(sb)-> |
sb | 79 | fs/fat/cache.c | fat_start+(first >> SECTOR_BITS)+MSDOS_SB(sb)-> |
sb | 84 | fs/fat/cache.c | if (!(c_bh2 = bread(sb->s_dev, |
sb | 85 | fs/fat/cache.c | MSDOS_SB(sb)->fat_start+(first >> |
sb | 86 | fs/fat/cache.c | SECTOR_BITS)+MSDOS_SB(sb)->fat_length*copy |
sb | 244 | fs/fat/cache.c | struct msdos_sb_info *sb; |
sb | 247 | fs/fat/cache.c | sb = MSDOS_SB(inode->i_sb); |
sb | 250 | fs/fat/cache.c | if (sector >= sb->dir_entries >> MSDOS_DPS_BITS) return 0; |
sb | 251 | fs/fat/cache.c | return sector+sb->dir_start; |
sb | 253 | fs/fat/cache.c | cluster = sector/sb->cluster_size; |
sb | 254 | fs/fat/cache.c | offset = sector % sb->cluster_size; |
sb | 256 | fs/fat/cache.c | return (cluster-2)*sb->cluster_size+sb->data_start+offset; |
sb | 104 | fs/fat/dir.c | struct super_block *sb = inode->i_sb; |
sb | 116 | fs/fat/dir.c | int uni_xlate = MSDOS_SB(sb)->options.unicode_xlate; |
sb | 141 | fs/fat/dir.c | if (MSDOS_SB(sb)->options.isvfat && (de->name[0] == (__s8) DELETED_FLAG)) { |
sb | 144 | fs/fat/dir.c | } else if (MSDOS_SB(sb)->options.isvfat && de->attr == ATTR_EXT) { |
sb | 230 | fs/fat/dir.c | if ((de->attr & ATTR_HIDDEN) && MSDOS_SB(sb)->options.dotsOK) { |
sb | 128 | fs/fat/file.c | struct super_block *sb = inode->i_sb; |
sb | 142 | fs/fat/file.c | if (!fat_is_uptodate(sb,bh)) bhreq[nbreq++] = bh; |
sb | 147 | fs/fat/file.c | if (nbreq > 0) fat_ll_rw_block (sb,READ,nbreq,bhreq); |
sb | 160 | fs/fat/file.c | struct super_block *sb = inode->i_sb; |
sb | 230 | fs/fat/file.c | if (!fat_is_uptodate(sb,bh)){ |
sb | 274 | fs/fat/file.c | struct super_block *sb = inode->i_sb; |
sb | 355 | fs/fat/file.c | fat_set_uptodate(sb,bh,1); |
sb | 32 | fs/fat/inode.c | struct super_block *sb; |
sb | 41 | fs/fat/inode.c | sb = inode->i_sb; |
sb | 47 | fs/fat/inode.c | fat_fs_panic(sb,"..."); |
sb | 56 | fs/fat/inode.c | void fat_put_super(struct super_block *sb) |
sb | 58 | fs/fat/inode.c | fat_cache_inval_dev(sb->s_dev); |
sb | 59 | fs/fat/inode.c | set_blocksize (sb->s_dev,BLOCK_SIZE); |
sb | 60 | fs/fat/inode.c | lock_super(sb); |
sb | 61 | fs/fat/inode.c | sb->s_dev = 0; |
sb | 62 | fs/fat/inode.c | unlock_super(sb); |
sb | 171 | fs/fat/inode.c | struct super_block *fat_read_super(struct super_block *sb,void *data, int silent) |
sb | 181 | fs/fat/inode.c | if (hardsect_size[MAJOR(sb->s_dev)] != NULL){ |
sb | 182 | fs/fat/inode.c | blksize = hardsect_size[MAJOR(sb->s_dev)][MINOR(sb->s_dev)]; |
sb | 189 | fs/fat/inode.c | sb->s_dev = 0; |
sb | 194 | fs/fat/inode.c | lock_super(sb); |
sb | 196 | fs/fat/inode.c | sb->s_blocksize = 1024; |
sb | 197 | fs/fat/inode.c | set_blocksize(sb->s_dev, 1024); |
sb | 198 | fs/fat/inode.c | bh = bread(sb->s_dev, 0, 1024); |
sb | 199 | fs/fat/inode.c | unlock_super(sb); |
sb | 200 | fs/fat/inode.c | if (bh == NULL || !fat_is_uptodate(sb,bh)) { |
sb | 202 | fs/fat/inode.c | sb->s_dev = 0; |
sb | 208 | fs/fat/inode.c | set_blocksize(sb->s_dev, blksize); |
sb | 229 | fs/fat/inode.c | MSDOS_SB(sb)->cluster_size = b->cluster_size*sector_mult; |
sb | 230 | fs/fat/inode.c | MSDOS_SB(sb)->fats = b->fats; |
sb | 231 | fs/fat/inode.c | MSDOS_SB(sb)->fat_start = CF_LE_W(b->reserved)*sector_mult; |
sb | 232 | fs/fat/inode.c | MSDOS_SB(sb)->fat_length = CF_LE_W(b->fat_length)*sector_mult; |
sb | 233 | fs/fat/inode.c | MSDOS_SB(sb)->dir_start = (CF_LE_W(b->reserved)+b->fats*CF_LE_W( |
sb | 235 | fs/fat/inode.c | MSDOS_SB(sb)->dir_entries = CF_LE_W(*((unsigned short *) &b->dir_entries |
sb | 237 | fs/fat/inode.c | MSDOS_SB(sb)->data_start = MSDOS_SB(sb)->dir_start+ROUND_TO_MULTIPLE(( |
sb | 238 | fs/fat/inode.c | MSDOS_SB(sb)->dir_entries << MSDOS_DIR_BITS) >> SECTOR_BITS, |
sb | 242 | fs/fat/inode.c | CF_LE_L(b->total_sect))*sector_mult-MSDOS_SB(sb)->data_start; |
sb | 245 | fs/fat/inode.c | MSDOS_SB(sb)->clusters = b->cluster_size ? data_sectors/ |
sb | 247 | fs/fat/inode.c | MSDOS_SB(sb)->fat_bits = fat ? fat : MSDOS_SB(sb)->clusters > |
sb | 249 | fs/fat/inode.c | fat_clusters = MSDOS_SB(sb)->fat_length*SECTOR_SIZE*8/ |
sb | 250 | fs/fat/inode.c | MSDOS_SB(sb)->fat_bits; |
sb | 251 | fs/fat/inode.c | error = !MSDOS_SB(sb)->fats || (MSDOS_SB(sb)->dir_entries & |
sb | 252 | fs/fat/inode.c | (MSDOS_DPS-1)) || MSDOS_SB(sb)->clusters+2 > fat_clusters+ |
sb | 261 | fs/fat/inode.c | sb->s_blocksize = blksize; /* Using this small block size solve the */ |
sb | 265 | fs/fat/inode.c | sb->s_blocksize_bits = blksize == 512 ? 9 : 10; |
sb | 270 | fs/fat/inode.c | MSDOS_SB(sb)->fat_bits,opts.name_check, |
sb | 272 | fs/fat/inode.c | MSDOS_CAN_BMAP(MSDOS_SB(sb)) ? ",bmap" : ""); |
sb | 274 | fs/fat/inode.c | "se=%d,ts=%ld,ls=%d]\n",b->media,MSDOS_SB(sb)->cluster_size, |
sb | 275 | fs/fat/inode.c | MSDOS_SB(sb)->fats,MSDOS_SB(sb)->fat_start,MSDOS_SB(sb)->fat_length, |
sb | 276 | fs/fat/inode.c | MSDOS_SB(sb)->dir_start,MSDOS_SB(sb)->dir_entries, |
sb | 277 | fs/fat/inode.c | MSDOS_SB(sb)->data_start, |
sb | 282 | fs/fat/inode.c | if (MSDOS_SB(sb)->clusters+2 > fat_clusters) |
sb | 283 | fs/fat/inode.c | MSDOS_SB(sb)->clusters = fat_clusters-2; |
sb | 287 | fs/fat/inode.c | "%s.\n", kdevname(sb->s_dev)); |
sb | 288 | fs/fat/inode.c | sb->s_dev = 0; |
sb | 292 | fs/fat/inode.c | sb->s_magic = MSDOS_SUPER_MAGIC; |
sb | 294 | fs/fat/inode.c | MSDOS_SB(sb)->free_clusters = -1; /* don't know yet */ |
sb | 295 | fs/fat/inode.c | MSDOS_SB(sb)->fat_wait = NULL; |
sb | 296 | fs/fat/inode.c | MSDOS_SB(sb)->fat_lock = 0; |
sb | 297 | fs/fat/inode.c | MSDOS_SB(sb)->prev_free = 0; |
sb | 298 | fs/fat/inode.c | memcpy(&(MSDOS_SB(sb)->options), &opts, sizeof(struct fat_mount_options)); |
sb | 299 | fs/fat/inode.c | if (!(sb->s_mounted = iget(sb,MSDOS_ROOT_INO))) { |
sb | 300 | fs/fat/inode.c | sb->s_dev = 0; |
sb | 305 | fs/fat/inode.c | return sb; |
sb | 309 | fs/fat/inode.c | void fat_statfs(struct super_block *sb,struct statfs *buf, int bufsiz) |
sb | 314 | fs/fat/inode.c | lock_fat(sb); |
sb | 315 | fs/fat/inode.c | if (MSDOS_SB(sb)->free_clusters != -1) |
sb | 316 | fs/fat/inode.c | free = MSDOS_SB(sb)->free_clusters; |
sb | 319 | fs/fat/inode.c | for (nr = 2; nr < MSDOS_SB(sb)->clusters+2; nr++) |
sb | 320 | fs/fat/inode.c | if (!fat_access(sb,nr,-1)) free++; |
sb | 321 | fs/fat/inode.c | MSDOS_SB(sb)->free_clusters = free; |
sb | 323 | fs/fat/inode.c | unlock_fat(sb); |
sb | 324 | fs/fat/inode.c | tmp.f_type = sb->s_magic; |
sb | 325 | fs/fat/inode.c | tmp.f_bsize = MSDOS_SB(sb)->cluster_size*SECTOR_SIZE; |
sb | 326 | fs/fat/inode.c | tmp.f_blocks = MSDOS_SB(sb)->clusters; |
sb | 338 | fs/fat/inode.c | struct msdos_sb_info *sb; |
sb | 341 | fs/fat/inode.c | sb = MSDOS_SB(inode->i_sb); |
sb | 343 | fs/fat/inode.c | return sb->dir_start + block; |
sb | 345 | fs/fat/inode.c | cluster = block/sb->cluster_size; |
sb | 346 | fs/fat/inode.c | offset = block % sb->cluster_size; |
sb | 348 | fs/fat/inode.c | return (cluster-2)*sb->cluster_size+sb->data_start+offset; |
sb | 363 | fs/fat/inode.c | struct super_block *sb = inode->i_sb; |
sb | 432 | fs/fat/inode.c | inode->i_op = (sb->s_blocksize == 1024) |
sb | 461 | fs/fat/inode.c | struct super_block *sb = inode->i_sb; |
sb | 489 | fs/fat/inode.c | if (MSDOS_SB(sb)->options.isvfat) { |
sb | 97 | fs/fat/misc.c | void lock_fat(struct super_block *sb) |
sb | 99 | fs/fat/misc.c | while (MSDOS_SB(sb)->fat_lock) sleep_on(&MSDOS_SB(sb)->fat_wait); |
sb | 100 | fs/fat/misc.c | MSDOS_SB(sb)->fat_lock = 1; |
sb | 104 | fs/fat/misc.c | void unlock_fat(struct super_block *sb) |
sb | 106 | fs/fat/misc.c | MSDOS_SB(sb)->fat_lock = 0; |
sb | 107 | fs/fat/misc.c | wake_up(&MSDOS_SB(sb)->fat_wait); |
sb | 118 | fs/fat/misc.c | struct super_block *sb = inode->i_sb; |
sb | 198 | fs/fat/misc.c | fat_set_uptodate(sb,bh,1); |
sb | 286 | fs/fat/misc.c | struct super_block *sb = dir->i_sb; |
sb | 350 | fs/fat/misc.c | inode = iget(sb,sector*MSDOS_DPS+entry); \ |
sb | 366 | fs/fat/misc.c | static int raw_scan_sector(struct super_block *sb,int sector,const char *name, |
sb | 375 | fs/fat/misc.c | if (!(bh = bread(sb->s_dev,sector,SECTOR_SIZE))) return -EIO; |
sb | 414 | fs/fat/misc.c | static int raw_scan_root(struct super_block *sb,const char *name,int *number,int *ino, |
sb | 419 | fs/fat/misc.c | for (count = 0; count < MSDOS_SB(sb)->dir_entries/MSDOS_DPS; count++) { |
sb | 420 | fs/fat/misc.c | if ((cluster = raw_scan_sector(sb,MSDOS_SB(sb)->dir_start+count, |
sb | 432 | fs/fat/misc.c | static int raw_scan_nonroot(struct super_block *sb,int start,const char *name, |
sb | 442 | fs/fat/misc.c | for (count = 0; count < MSDOS_SB(sb)->cluster_size; count++) { |
sb | 443 | fs/fat/misc.c | if ((cluster = raw_scan_sector(sb,(start-2)* |
sb | 444 | fs/fat/misc.c | MSDOS_SB(sb)->cluster_size+MSDOS_SB(sb)->data_start+ |
sb | 448 | fs/fat/misc.c | if (!(start = fat_access(sb,start,-1))) { |
sb | 449 | fs/fat/misc.c | fat_fs_panic(sb,"FAT error"); |
sb | 468 | fs/fat/misc.c | static int raw_scan(struct super_block *sb, int start, const char *name, |
sb | 473 | fs/fat/misc.c | (sb,start,name,number,ino,res_bh,res_de,scantype); |
sb | 475 | fs/fat/misc.c | (sb,name,number,ino,res_bh,res_de,scantype); |
sb | 2 | fs/fat/msbuffer.h | struct buffer_head *fat_bread (struct super_block *sb, int block); |
sb | 3 | fs/fat/msbuffer.h | struct buffer_head *fat_getblk (struct super_block *sb, int block); |
sb | 4 | fs/fat/msbuffer.h | void fat_brelse (struct super_block *sb, struct buffer_head *bh); |
sb | 5 | fs/fat/msbuffer.h | void fat_mark_buffer_dirty (struct super_block *sb, |
sb | 8 | fs/fat/msbuffer.h | void fat_set_uptodate (struct super_block *sb, |
sb | 11 | fs/fat/msbuffer.h | int fat_is_uptodate (struct super_block *sb, struct buffer_head *bh); |
sb | 12 | fs/fat/msbuffer.h | void fat_ll_rw_block (struct super_block *sb, int opr, |
sb | 30 | fs/fat/msbuffer.h | #define brelse(b) fat_brelse(sb,b) |
sb | 31 | fs/fat/msbuffer.h | #define bread(d,b,s) fat_bread(sb,b) |
sb | 32 | fs/fat/msbuffer.h | #define getblk(d,b,s) fat_getblk(sb,b) |
sb | 33 | fs/fat/msbuffer.h | #define mark_buffer_dirty(b,v) fat_mark_buffer_dirty(sb,b,v) |
sb | 551 | fs/inode.c | struct inode *__iget(struct super_block * sb, int nr, int crossmntp) |
sb | 558 | fs/inode.c | if (!sb) |
sb | 560 | fs/inode.c | h = hash(sb->s_dev, nr); |
sb | 563 | fs/inode.c | if (inode->i_dev == sb->s_dev && inode->i_ino == nr) |
sb | 575 | fs/inode.c | inode->i_sb = sb; |
sb | 576 | fs/inode.c | inode->i_dev = sb->s_dev; |
sb | 578 | fs/inode.c | inode->i_flags = sb->s_flags; |
sb | 589 | fs/inode.c | if (inode->i_dev != sb->s_dev || inode->i_ino != nr) { |
sb | 33 | fs/isofs/inode.c | void isofs_put_super(struct super_block *sb) |
sb | 35 | fs/isofs/inode.c | lock_super(sb); |
sb | 41 | fs/isofs/inode.c | sb->s_dev = 0; |
sb | 42 | fs/isofs/inode.c | unlock_super(sb); |
sb | 400 | fs/isofs/inode.c | void isofs_statfs (struct super_block *sb, struct statfs *buf, int bufsiz) |
sb | 406 | fs/isofs/inode.c | tmp.f_blocks = sb->u.isofs_sb.s_nzones; |
sb | 409 | fs/isofs/inode.c | tmp.f_files = sb->u.isofs_sb.s_ninodes; |
sb | 34 | fs/minix/bitmap.c | void minix_free_block(struct super_block * sb, int block) |
sb | 39 | fs/minix/bitmap.c | if (!sb) { |
sb | 43 | fs/minix/bitmap.c | if (block < sb->u.minix_sb.s_firstdatazone || |
sb | 44 | fs/minix/bitmap.c | block >= sb->u.minix_sb.s_nzones) { |
sb | 48 | fs/minix/bitmap.c | bh = get_hash_table(sb->s_dev,block,BLOCK_SIZE); |
sb | 52 | fs/minix/bitmap.c | zone = block - sb->u.minix_sb.s_firstdatazone + 1; |
sb | 55 | fs/minix/bitmap.c | bh = sb->u.minix_sb.s_zmap[zone]; |
sb | 62 | fs/minix/bitmap.c | kdevname(sb->s_dev), block); |
sb | 67 | fs/minix/bitmap.c | int minix_new_block(struct super_block * sb) |
sb | 72 | fs/minix/bitmap.c | if (!sb) { |
sb | 79 | fs/minix/bitmap.c | if ((bh=sb->u.minix_sb.s_zmap[i]) != NULL) |
sb | 89 | fs/minix/bitmap.c | j += i*8192 + sb->u.minix_sb.s_firstdatazone-1; |
sb | 90 | fs/minix/bitmap.c | if (j < sb->u.minix_sb.s_firstdatazone || |
sb | 91 | fs/minix/bitmap.c | j >= sb->u.minix_sb.s_nzones) |
sb | 93 | fs/minix/bitmap.c | if (!(bh = getblk(sb->s_dev,j,BLOCK_SIZE))) { |
sb | 104 | fs/minix/bitmap.c | unsigned long minix_count_free_blocks(struct super_block *sb) |
sb | 106 | fs/minix/bitmap.c | return (count_free(sb->u.minix_sb.s_zmap,sb->u.minix_sb.s_zmap_blocks) |
sb | 107 | fs/minix/bitmap.c | << sb->u.minix_sb.s_log_zone_size); |
sb | 219 | fs/minix/bitmap.c | struct super_block * sb; |
sb | 226 | fs/minix/bitmap.c | sb = dir->i_sb; |
sb | 227 | fs/minix/bitmap.c | inode->i_sb = sb; |
sb | 251 | fs/minix/bitmap.c | inode->i_dev = sb->s_dev; |
sb | 263 | fs/minix/bitmap.c | unsigned long minix_count_free_inodes(struct super_block *sb) |
sb | 265 | fs/minix/bitmap.c | return count_free(sb->u.minix_sb.s_imap,sb->u.minix_sb.s_imap_blocks); |
sb | 33 | fs/minix/inode.c | static void minix_commit_super (struct super_block * sb, |
sb | 36 | fs/minix/inode.c | mark_buffer_dirty(sb->u.minix_sb.s_sbh, 1); |
sb | 37 | fs/minix/inode.c | sb->s_dirt = 0; |
sb | 40 | fs/minix/inode.c | void minix_write_super (struct super_block * sb) |
sb | 44 | fs/minix/inode.c | if (!(sb->s_flags & MS_RDONLY)) { |
sb | 45 | fs/minix/inode.c | ms = sb->u.minix_sb.s_ms; |
sb | 49 | fs/minix/inode.c | minix_commit_super (sb, ms); |
sb | 51 | fs/minix/inode.c | sb->s_dirt = 0; |
sb | 55 | fs/minix/inode.c | void minix_put_super(struct super_block *sb) |
sb | 59 | fs/minix/inode.c | lock_super(sb); |
sb | 60 | fs/minix/inode.c | if (!(sb->s_flags & MS_RDONLY)) { |
sb | 61 | fs/minix/inode.c | sb->u.minix_sb.s_ms->s_state = sb->u.minix_sb.s_mount_state; |
sb | 62 | fs/minix/inode.c | mark_buffer_dirty(sb->u.minix_sb.s_sbh, 1); |
sb | 64 | fs/minix/inode.c | sb->s_dev = 0; |
sb | 66 | fs/minix/inode.c | brelse(sb->u.minix_sb.s_imap[i]); |
sb | 68 | fs/minix/inode.c | brelse(sb->u.minix_sb.s_zmap[i]); |
sb | 69 | fs/minix/inode.c | brelse (sb->u.minix_sb.s_sbh); |
sb | 70 | fs/minix/inode.c | unlock_super(sb); |
sb | 86 | fs/minix/inode.c | int minix_remount (struct super_block * sb, int * flags, char * data) |
sb | 90 | fs/minix/inode.c | ms = sb->u.minix_sb.s_ms; |
sb | 91 | fs/minix/inode.c | if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) |
sb | 95 | fs/minix/inode.c | !(sb->u.minix_sb.s_mount_state & MINIX_VALID_FS)) |
sb | 98 | fs/minix/inode.c | ms->s_state = sb->u.minix_sb.s_mount_state; |
sb | 99 | fs/minix/inode.c | mark_buffer_dirty(sb->u.minix_sb.s_sbh, 1); |
sb | 100 | fs/minix/inode.c | sb->s_dirt = 1; |
sb | 101 | fs/minix/inode.c | minix_commit_super (sb, ms); |
sb | 105 | fs/minix/inode.c | sb->u.minix_sb.s_mount_state = ms->s_state; |
sb | 107 | fs/minix/inode.c | mark_buffer_dirty(sb->u.minix_sb.s_sbh, 1); |
sb | 108 | fs/minix/inode.c | sb->s_dirt = 1; |
sb | 110 | fs/minix/inode.c | if (!(sb->u.minix_sb.s_mount_state & MINIX_VALID_FS)) |
sb | 113 | fs/minix/inode.c | else if ((sb->u.minix_sb.s_mount_state & MINIX_ERROR_FS)) |
sb | 240 | fs/minix/inode.c | void minix_statfs(struct super_block *sb, struct statfs *buf, int bufsiz) |
sb | 244 | fs/minix/inode.c | tmp.f_type = sb->s_magic; |
sb | 245 | fs/minix/inode.c | tmp.f_bsize = sb->s_blocksize; |
sb | 246 | fs/minix/inode.c | tmp.f_blocks = (sb->u.minix_sb.s_nzones - sb->u.minix_sb.s_firstdatazone) << sb->u.minix_sb.s_log_zone_size; |
sb | 247 | fs/minix/inode.c | tmp.f_bfree = minix_count_free_blocks(sb); |
sb | 249 | fs/minix/inode.c | tmp.f_files = sb->u.minix_sb.s_ninodes; |
sb | 250 | fs/minix/inode.c | tmp.f_ffree = minix_count_free_inodes(sb); |
sb | 251 | fs/minix/inode.c | tmp.f_namelen = sb->u.minix_sb.s_namelen; |
sb | 40 | fs/msdos/namei.c | void msdos_put_super(struct super_block *sb) |
sb | 42 | fs/msdos/namei.c | fat_put_super(sb); |
sb | 57 | fs/msdos/namei.c | struct super_block *msdos_read_super(struct super_block *sb,void *data, int silent) |
sb | 63 | fs/msdos/namei.c | sb->s_op = &msdos_sops; |
sb | 64 | fs/msdos/namei.c | res = fat_read_super(sb, data, silent); |
sb | 179 | fs/msdos/namei.c | struct super_block *sb = dir->i_sb; |
sb | 259 | fs/msdos/namei.c | struct super_block *sb = dir->i_sb; |
sb | 298 | fs/msdos/namei.c | struct super_block *sb = dir->i_sb; |
sb | 339 | fs/msdos/namei.c | static void dump_fat(struct super_block *sb,int start) |
sb | 344 | fs/msdos/namei.c | start = fat_access(sb,start,-1); |
sb | 359 | fs/msdos/namei.c | struct super_block *sb = dir->i_sb; |
sb | 385 | fs/msdos/namei.c | struct super_block *sb = dir->i_sb; |
sb | 424 | fs/msdos/namei.c | struct super_block *sb = dir->i_sb; |
sb | 489 | fs/msdos/namei.c | struct super_block *sb = dir->i_sb; |
sb | 542 | fs/msdos/namei.c | struct super_block *sb = old_dir->i_sb; |
sb | 608 | fs/msdos/namei.c | struct super_block *sb = old_dir->i_sb; |
sb | 738 | fs/msdos/namei.c | struct super_block *sb = old_dir->i_sb; |
sb | 156 | fs/namei.c | struct super_block * sb; |
sb | 168 | fs/namei.c | } else if ((sb = dir->i_sb) && (dir == sb->s_mounted)) { |
sb | 170 | fs/namei.c | dir = sb->s_covered; |
sb | 34 | fs/ncpfs/inode.c | static void ncp_statfs(struct super_block *sb, struct statfs *buf, int bufsiz); |
sb | 158 | fs/ncpfs/inode.c | ncp_read_super(struct super_block *sb, void *raw_data, int silent) |
sb | 165 | fs/ncpfs/inode.c | kdev_t dev = sb->s_dev; |
sb | 171 | fs/ncpfs/inode.c | sb->s_dev = 0; |
sb | 180 | fs/ncpfs/inode.c | sb->s_dev = 0; |
sb | 189 | fs/ncpfs/inode.c | sb->s_dev = 0; |
sb | 198 | fs/ncpfs/inode.c | sb->s_dev = 0; |
sb | 207 | fs/ncpfs/inode.c | sb->s_dev = 0; |
sb | 225 | fs/ncpfs/inode.c | lock_super(sb); |
sb | 227 | fs/ncpfs/inode.c | NCP_SBP(sb) = server; |
sb | 229 | fs/ncpfs/inode.c | sb->s_blocksize = 1024; /* Eh... Is this correct? */ |
sb | 230 | fs/ncpfs/inode.c | sb->s_blocksize_bits = 10; |
sb | 231 | fs/ncpfs/inode.c | sb->s_magic = NCP_SUPER_MAGIC; |
sb | 232 | fs/ncpfs/inode.c | sb->s_dev = dev; |
sb | 233 | fs/ncpfs/inode.c | sb->s_op = &ncp_sops; |
sb | 260 | fs/ncpfs/inode.c | unlock_super(sb); |
sb | 272 | fs/ncpfs/inode.c | unlock_super(sb); |
sb | 281 | fs/ncpfs/inode.c | unlock_super(sb); |
sb | 288 | fs/ncpfs/inode.c | unlock_super(sb); |
sb | 292 | fs/ncpfs/inode.c | sb->s_dev = 0; |
sb | 300 | fs/ncpfs/inode.c | DPRINTK("ncp_read_super: NCP_SBP(sb) = %x\n", (int)NCP_SBP(sb)); |
sb | 304 | fs/ncpfs/inode.c | if (!(sb->s_mounted = iget(sb, ncp_info_ino(server, &(server->root))))) |
sb | 306 | fs/ncpfs/inode.c | sb->s_dev = 0; |
sb | 314 | fs/ncpfs/inode.c | sb->s_dev = 0; |
sb | 322 | fs/ncpfs/inode.c | return sb; |
sb | 334 | fs/ncpfs/inode.c | ncp_kfree_s(NCP_SBP(sb), sizeof(struct ncp_server)); |
sb | 339 | fs/ncpfs/inode.c | ncp_put_super(struct super_block *sb) |
sb | 341 | fs/ncpfs/inode.c | struct ncp_server *server = NCP_SBP(sb); |
sb | 343 | fs/ncpfs/inode.c | lock_super(sb); |
sb | 359 | fs/ncpfs/inode.c | sb->s_dev = 0; |
sb | 360 | fs/ncpfs/inode.c | ncp_kfree_s(NCP_SBP(sb), sizeof(struct ncp_server)); |
sb | 361 | fs/ncpfs/inode.c | NCP_SBP(sb) = NULL; |
sb | 363 | fs/ncpfs/inode.c | unlock_super(sb); |
sb | 395 | fs/ncpfs/inode.c | ncp_statfs(struct super_block *sb, struct statfs *buf, int bufsiz) |
sb | 69 | fs/nfs/inode.c | void nfs_put_super(struct super_block *sb) |
sb | 71 | fs/nfs/inode.c | close_fp(sb->u.nfs_sb.s_server.file); |
sb | 72 | fs/nfs/inode.c | rpc_closesock(sb->u.nfs_sb.s_server.rsock); |
sb | 73 | fs/nfs/inode.c | lock_super(sb); |
sb | 74 | fs/nfs/inode.c | sb->s_dev = 0; |
sb | 75 | fs/nfs/inode.c | unlock_super(sb); |
sb | 87 | fs/nfs/inode.c | struct super_block *nfs_read_super(struct super_block *sb, void *raw_data, |
sb | 95 | fs/nfs/inode.c | kdev_t dev = sb->s_dev; |
sb | 100 | fs/nfs/inode.c | sb->s_dev = 0; |
sb | 111 | fs/nfs/inode.c | sb->s_dev = 0; |
sb | 117 | fs/nfs/inode.c | sb->s_dev = 0; |
sb | 122 | fs/nfs/inode.c | lock_super(sb); |
sb | 124 | fs/nfs/inode.c | sb->s_blocksize = 1024; /* XXX */ |
sb | 125 | fs/nfs/inode.c | sb->s_blocksize_bits = 10; |
sb | 126 | fs/nfs/inode.c | sb->s_magic = NFS_SUPER_MAGIC; |
sb | 127 | fs/nfs/inode.c | sb->s_dev = dev; |
sb | 128 | fs/nfs/inode.c | sb->s_op = &nfs_sops; |
sb | 129 | fs/nfs/inode.c | server = &sb->u.nfs_sb.s_server; |
sb | 183 | fs/nfs/inode.c | sb->u.nfs_sb.s_root = data->root; |
sb | 184 | fs/nfs/inode.c | unlock_super(sb); |
sb | 185 | fs/nfs/inode.c | if (!(sb->s_mounted = nfs_fhget(sb, &data->root, NULL))) { |
sb | 186 | fs/nfs/inode.c | sb->s_dev = 0; |
sb | 191 | fs/nfs/inode.c | return sb; |
sb | 194 | fs/nfs/inode.c | void nfs_statfs(struct super_block *sb, struct statfs *buf, int bufsiz) |
sb | 200 | fs/nfs/inode.c | error = nfs_proc_statfs(&sb->u.nfs_sb.s_server, &sb->u.nfs_sb.s_root, |
sb | 226 | fs/nfs/inode.c | struct inode *nfs_fhget(struct super_block *sb, struct nfs_fh *fhandle, |
sb | 233 | fs/nfs/inode.c | if (!sb) { |
sb | 238 | fs/nfs/inode.c | error = nfs_proc_getattr(&sb->u.nfs_sb.s_server, fhandle, |
sb | 246 | fs/nfs/inode.c | if (!(inode = iget(sb, fattr->fileid))) { |
sb | 250 | fs/nfs/inode.c | if (inode->i_dev == sb->s_dev) { |
sb | 954 | fs/nfs/nfsroot.c | static int root_nfs_do_mount(struct super_block *sb) |
sb | 968 | fs/nfs/nfsroot.c | if (nfs_read_super(sb, &nfs_data, 1) == NULL) { |
sb | 980 | fs/nfs/nfsroot.c | int nfs_root_mount(struct super_block *sb) |
sb | 990 | fs/nfs/nfsroot.c | if (root_nfs_do_mount(sb) < 0) |
sb | 60 | fs/proc/fd.c | struct super_block * sb; |
sb | 69 | fs/proc/fd.c | sb = dir->i_sb; |
sb | 80 | fs/proc/fd.c | if (!(*result = proc_get_inode(sb, (pid << 16)+PROC_PID_INO, &proc_pid))) { |
sb | 114 | fs/proc/fd.c | if (!(*result = proc_get_inode(sb, ino, NULL))) |
sb | 26 | fs/proc/inode.c | static void proc_put_super(struct super_block *sb) |
sb | 28 | fs/proc/inode.c | lock_super(sb); |
sb | 29 | fs/proc/inode.c | sb->s_dev = 0; |
sb | 30 | fs/proc/inode.c | unlock_super(sb); |
sb | 117 | fs/proc/inode.c | void proc_statfs(struct super_block *sb, struct statfs *buf, int bufsiz) |
sb | 149 | fs/smbfs/inode.c | smb_put_super(struct super_block *sb) |
sb | 151 | fs/smbfs/inode.c | struct smb_server *server = &(SMB_SBP(sb)->s_server); |
sb | 156 | fs/smbfs/inode.c | lock_super(sb); |
sb | 162 | fs/smbfs/inode.c | sb->s_dev = 0; |
sb | 163 | fs/smbfs/inode.c | smb_kfree_s(SMB_SBP(sb), sizeof(struct smb_sb_info)); |
sb | 165 | fs/smbfs/inode.c | unlock_super(sb); |
sb | 173 | fs/smbfs/inode.c | smb_read_super(struct super_block *sb, void *raw_data, int silent) |
sb | 180 | fs/smbfs/inode.c | kdev_t dev = sb->s_dev; |
sb | 185 | fs/smbfs/inode.c | sb->s_dev = 0; |
sb | 196 | fs/smbfs/inode.c | sb->s_dev = 0; |
sb | 201 | fs/smbfs/inode.c | sb->s_dev = 0; |
sb | 216 | fs/smbfs/inode.c | lock_super(sb); |
sb | 218 | fs/smbfs/inode.c | SMB_SBP(sb) = smb_sb; |
sb | 220 | fs/smbfs/inode.c | sb->s_blocksize = 1024; /* Eh... Is this correct? */ |
sb | 221 | fs/smbfs/inode.c | sb->s_blocksize_bits = 10; |
sb | 222 | fs/smbfs/inode.c | sb->s_magic = SMB_SUPER_MAGIC; |
sb | 223 | fs/smbfs/inode.c | sb->s_dev = dev; |
sb | 224 | fs/smbfs/inode.c | sb->s_op = &smb_sops; |
sb | 226 | fs/smbfs/inode.c | server = &(SMB_SBP(sb)->s_server); |
sb | 253 | fs/smbfs/inode.c | unlock_super(sb); |
sb | 256 | fs/smbfs/inode.c | sb->s_dev = 0; |
sb | 267 | fs/smbfs/inode.c | if ((error = smb_proc_dskattr(sb, &(SMB_SBP(sb)->s_attr))) < 0) { |
sb | 268 | fs/smbfs/inode.c | sb->s_dev = 0; |
sb | 276 | fs/smbfs/inode.c | sb->s_dev = 0; |
sb | 283 | fs/smbfs/inode.c | SMB_SBP(sb)->s_attr.total, |
sb | 284 | fs/smbfs/inode.c | SMB_SBP(sb)->s_attr.blocksize, |
sb | 285 | fs/smbfs/inode.c | SMB_SBP(sb)->s_attr.allocblocks, |
sb | 286 | fs/smbfs/inode.c | SMB_SBP(sb)->s_attr.free); |
sb | 288 | fs/smbfs/inode.c | DPRINTK("smb_read_super: SMB_SBP(sb) = %x\n", (int)SMB_SBP(sb)); |
sb | 290 | fs/smbfs/inode.c | if (!(sb->s_mounted = iget(sb, (int)&(server->root)))) { |
sb | 291 | fs/smbfs/inode.c | sb->s_dev = 0; |
sb | 298 | fs/smbfs/inode.c | return sb; |
sb | 302 | fs/smbfs/inode.c | smb_kfree_s(SMB_SBP(sb), sizeof(struct smb_sb_info)); |
sb | 307 | fs/smbfs/inode.c | smb_statfs(struct super_block *sb, struct statfs *buf, int bufsiz) |
sb | 313 | fs/smbfs/inode.c | error = smb_proc_dskattr(sb, &attr); |
sb | 49 | fs/super.c | static int do_remount_sb(struct super_block *sb, int flags, char * data); |
sb | 316 | fs/super.c | void __wait_on_super(struct super_block * sb) |
sb | 320 | fs/super.c | add_wait_queue(&sb->s_wait, &wait); |
sb | 323 | fs/super.c | if (sb->s_lock) { |
sb | 327 | fs/super.c | remove_wait_queue(&sb->s_wait, &wait); |
sb | 333 | fs/super.c | struct super_block * sb; |
sb | 335 | fs/super.c | for (sb = super_blocks + 0 ; sb < super_blocks + NR_SUPER ; sb++) { |
sb | 336 | fs/super.c | if (!sb->s_dev) |
sb | 338 | fs/super.c | if (dev && sb->s_dev != dev) |
sb | 340 | fs/super.c | wait_on_super(sb); |
sb | 341 | fs/super.c | if (!sb->s_dev || !sb->s_dirt) |
sb | 343 | fs/super.c | if (dev && (dev != sb->s_dev)) |
sb | 345 | fs/super.c | if (sb->s_op && sb->s_op->write_super) |
sb | 346 | fs/super.c | sb->s_op->write_super(sb); |
sb | 370 | fs/super.c | struct super_block * sb; |
sb | 377 | fs/super.c | if (!(sb = get_super(dev))) |
sb | 379 | fs/super.c | if (sb->s_covered) { |
sb | 384 | fs/super.c | if (sb->s_op && sb->s_op->put_super) |
sb | 385 | fs/super.c | sb->s_op->put_super(sb); |
sb | 488 | fs/super.c | struct super_block * sb; |
sb | 496 | fs/super.c | if (!(sb=get_super(dev))) |
sb | 498 | fs/super.c | if (!(sb->s_flags & MS_RDONLY)) { |
sb | 507 | fs/super.c | retval = do_remount_sb(sb, MS_RDONLY, 0); |
sb | 513 | fs/super.c | if (!(sb=get_super(dev)) || !(sb->s_covered)) |
sb | 515 | fs/super.c | if (!sb->s_covered->i_mount) |
sb | 524 | fs/super.c | if (!fs_may_umount(dev, sb->s_mounted)) |
sb | 526 | fs/super.c | sb->s_covered->i_mount = NULL; |
sb | 527 | fs/super.c | iput(sb->s_covered); |
sb | 528 | fs/super.c | sb->s_covered = NULL; |
sb | 529 | fs/super.c | iput(sb->s_mounted); |
sb | 530 | fs/super.c | sb->s_mounted = NULL; |
sb | 531 | fs/super.c | if (sb->s_op && sb->s_op->write_super && sb->s_dirt) |
sb | 532 | fs/super.c | sb->s_op->write_super(sb); |
sb | 611 | fs/super.c | struct super_block * sb; |
sb | 630 | fs/super.c | sb = read_super(dev,type,flags,data,0); |
sb | 631 | fs/super.c | if (!sb) { |
sb | 635 | fs/super.c | if (sb->s_covered) { |
sb | 641 | fs/super.c | vfsmnt->mnt_sb = sb; |
sb | 644 | fs/super.c | sb->s_covered = dir_i; |
sb | 645 | fs/super.c | dir_i->i_mount = sb->s_mounted; |
sb | 656 | fs/super.c | static int do_remount_sb(struct super_block *sb, int flags, char *data) |
sb | 660 | fs/super.c | if (!(flags & MS_RDONLY) && sb->s_dev && is_read_only(sb->s_dev)) |
sb | 664 | fs/super.c | if ((flags & MS_RDONLY) && !(sb->s_flags & MS_RDONLY)) |
sb | 665 | fs/super.c | if (!fs_may_remount_ro(sb->s_dev)) |
sb | 667 | fs/super.c | if (sb->s_op && sb->s_op->remount_fs) { |
sb | 668 | fs/super.c | retval = sb->s_op->remount_fs(sb, &flags, data); |
sb | 672 | fs/super.c | sb->s_flags = (sb->s_flags & ~MS_RMT_MASK) | |
sb | 825 | fs/super.c | struct super_block * sb; |
sb | 841 | fs/super.c | sb = &super_blocks[0]; |
sb | 842 | fs/super.c | while (sb->s_dev) sb++; |
sb | 843 | fs/super.c | sb->s_dev = get_unnamed_dev(); |
sb | 844 | fs/super.c | sb->s_flags = root_mountflags & ~MS_RDONLY; |
sb | 845 | fs/super.c | if (nfs_root_mount(sb) >= 0) { |
sb | 846 | fs/super.c | inode = sb->s_mounted; |
sb | 848 | fs/super.c | sb->s_covered = inode; |
sb | 849 | fs/super.c | sb->s_rd_only = 0; |
sb | 850 | fs/super.c | sb->s_dirt = 0; |
sb | 851 | fs/super.c | sb->s_type = fs_type; |
sb | 854 | fs/super.c | ROOT_DEV = sb->s_dev; |
sb | 858 | fs/super.c | sb->s_dev = 0; |
sb | 898 | fs/super.c | sb = read_super(ROOT_DEV,fs_type->name,root_mountflags,NULL,1); |
sb | 899 | fs/super.c | if (sb) { |
sb | 900 | fs/super.c | inode = sb->s_mounted; |
sb | 902 | fs/super.c | sb->s_covered = inode; |
sb | 903 | fs/super.c | sb->s_flags = root_mountflags; |
sb | 908 | fs/super.c | (sb->s_flags & MS_RDONLY) ? " readonly" : ""); |
sb | 912 | fs/super.c | vfsmnt->mnt_sb = sb; |
sb | 32 | fs/sysv/balloc.c | void sysv_free_block(struct super_block * sb, unsigned int block) |
sb | 37 | fs/sysv/balloc.c | if (!sb) { |
sb | 41 | fs/sysv/balloc.c | if (block < sb->sv_firstdatazone || block >= sb->sv_nzones) { |
sb | 45 | fs/sysv/balloc.c | lock_super(sb); |
sb | 46 | fs/sysv/balloc.c | if (*sb->sv_sb_flc_count > sb->sv_flc_size) { |
sb | 48 | fs/sysv/balloc.c | unlock_super(sb); |
sb | 54 | fs/sysv/balloc.c | if (*sb->sv_sb_flc_count == sb->sv_flc_size) { |
sb | 58 | fs/sysv/balloc.c | bh = sv_getblk(sb, sb->s_dev, block); |
sb | 61 | fs/sysv/balloc.c | unlock_super(sb); |
sb | 65 | fs/sysv/balloc.c | switch (sb->sv_type) { |
sb | 84 | fs/sysv/balloc.c | *flc_count = *sb->sv_sb_flc_count; /* = sb->sv_flc_size */ |
sb | 85 | fs/sysv/balloc.c | memcpy(flc_blocks, sb->sv_sb_flc_blocks, *flc_count * sizeof(sysv_zone_t)); |
sb | 89 | fs/sysv/balloc.c | *sb->sv_sb_flc_count = 0; |
sb | 94 | fs/sysv/balloc.c | if (*sb->sv_sb_flc_count == 0) { /* Applies only to Coherent FS */ |
sb | 95 | fs/sysv/balloc.c | bh = sv_getblk(sb, sb->s_dev, block); |
sb | 98 | fs/sysv/balloc.c | unlock_super(sb); |
sb | 101 | fs/sysv/balloc.c | memset(bh->b_data, 0, sb->sv_block_size); |
sb | 109 | fs/sysv/balloc.c | bh = sv_get_hash_table(sb, sb->s_dev, block); |
sb | 114 | fs/sysv/balloc.c | if (sb->sv_convert) |
sb | 116 | fs/sysv/balloc.c | sb->sv_sb_flc_blocks[(*sb->sv_sb_flc_count)++] = block; |
sb | 117 | fs/sysv/balloc.c | if (sb->sv_convert) |
sb | 118 | fs/sysv/balloc.c | *sb->sv_sb_total_free_blocks = |
sb | 119 | fs/sysv/balloc.c | to_coh_ulong(from_coh_ulong(*sb->sv_sb_total_free_blocks) + 1); |
sb | 121 | fs/sysv/balloc.c | *sb->sv_sb_total_free_blocks = *sb->sv_sb_total_free_blocks + 1; |
sb | 122 | fs/sysv/balloc.c | mark_buffer_dirty(sb->sv_bh1, 1); /* super-block has been modified */ |
sb | 123 | fs/sysv/balloc.c | if (sb->sv_bh1 != sb->sv_bh2) mark_buffer_dirty(sb->sv_bh2, 1); |
sb | 124 | fs/sysv/balloc.c | sb->s_dirt = 1; /* and needs time stamp */ |
sb | 125 | fs/sysv/balloc.c | unlock_super(sb); |
sb | 128 | fs/sysv/balloc.c | int sysv_new_block(struct super_block * sb) |
sb | 134 | fs/sysv/balloc.c | if (!sb) { |
sb | 138 | fs/sysv/balloc.c | lock_super(sb); |
sb | 139 | fs/sysv/balloc.c | if (*sb->sv_sb_flc_count == 0) { /* Applies only to Coherent FS */ |
sb | 140 | fs/sysv/balloc.c | unlock_super(sb); |
sb | 143 | fs/sysv/balloc.c | block = sb->sv_sb_flc_blocks[(*sb->sv_sb_flc_count)-1]; |
sb | 144 | fs/sysv/balloc.c | if (sb->sv_convert) |
sb | 147 | fs/sysv/balloc.c | unlock_super(sb); |
sb | 150 | fs/sysv/balloc.c | (*sb->sv_sb_flc_count)--; |
sb | 151 | fs/sysv/balloc.c | if (block < sb->sv_firstdatazone || block >= sb->sv_nzones) { |
sb | 153 | fs/sysv/balloc.c | unlock_super(sb); |
sb | 156 | fs/sysv/balloc.c | if (*sb->sv_sb_flc_count == 0) { /* the last block continues the free list */ |
sb | 160 | fs/sysv/balloc.c | if (!(bh = sv_bread(sb, sb->s_dev, block))) { |
sb | 163 | fs/sysv/balloc.c | (*sb->sv_sb_flc_count)++; |
sb | 164 | fs/sysv/balloc.c | unlock_super(sb); |
sb | 168 | fs/sysv/balloc.c | switch (sb->sv_type) { |
sb | 187 | fs/sysv/balloc.c | if (*flc_count > sb->sv_flc_size) { |
sb | 190 | fs/sysv/balloc.c | unlock_super(sb); |
sb | 193 | fs/sysv/balloc.c | *sb->sv_sb_flc_count = *flc_count; |
sb | 194 | fs/sysv/balloc.c | memcpy(sb->sv_sb_flc_blocks, flc_blocks, *flc_count * sizeof(sysv_zone_t)); |
sb | 198 | fs/sysv/balloc.c | bh = sv_getblk(sb, sb->s_dev, block); |
sb | 201 | fs/sysv/balloc.c | unlock_super(sb); |
sb | 206 | fs/sysv/balloc.c | unlock_super(sb); |
sb | 209 | fs/sysv/balloc.c | memset(bh->b_data, 0, sb->sv_block_size); |
sb | 213 | fs/sysv/balloc.c | if (sb->sv_convert) |
sb | 214 | fs/sysv/balloc.c | *sb->sv_sb_total_free_blocks = |
sb | 215 | fs/sysv/balloc.c | to_coh_ulong(from_coh_ulong(*sb->sv_sb_total_free_blocks) - 1); |
sb | 217 | fs/sysv/balloc.c | *sb->sv_sb_total_free_blocks = *sb->sv_sb_total_free_blocks - 1; |
sb | 218 | fs/sysv/balloc.c | mark_buffer_dirty(sb->sv_bh1, 1); /* super-block has been modified */ |
sb | 219 | fs/sysv/balloc.c | if (sb->sv_bh1 != sb->sv_bh2) mark_buffer_dirty(sb->sv_bh2, 1); |
sb | 220 | fs/sysv/balloc.c | sb->s_dirt = 1; /* and needs time stamp */ |
sb | 221 | fs/sysv/balloc.c | unlock_super(sb); |
sb | 225 | fs/sysv/balloc.c | unsigned long sysv_count_free_blocks(struct super_block * sb) |
sb | 236 | fs/sysv/balloc.c | lock_super(sb); |
sb | 237 | fs/sysv/balloc.c | if (*sb->sv_sb_flc_count > 0) { |
sb | 238 | fs/sysv/balloc.c | for (i = *sb->sv_sb_flc_count ; /* i > 0 */ ; ) { |
sb | 239 | fs/sysv/balloc.c | block = sb->sv_sb_flc_blocks[--i]; |
sb | 240 | fs/sysv/balloc.c | if (sb->sv_convert) |
sb | 253 | fs/sysv/balloc.c | if (block < sb->sv_firstdatazone || block >= sb->sv_nzones) { |
sb | 257 | fs/sysv/balloc.c | if (!(bh = sv_bread(sb, sb->s_dev, block))) { |
sb | 262 | fs/sysv/balloc.c | switch (sb->sv_type) { |
sb | 281 | fs/sysv/balloc.c | if (*flc_count > sb->sv_flc_size) { |
sb | 292 | fs/sysv/balloc.c | if (sb->sv_convert) |
sb | 307 | fs/sysv/balloc.c | old_count = *sb->sv_sb_total_free_blocks; |
sb | 308 | fs/sysv/balloc.c | if (sb->sv_convert) |
sb | 312 | fs/sysv/balloc.c | if (!(sb->s_flags & MS_RDONLY)) { |
sb | 313 | fs/sysv/balloc.c | *sb->sv_sb_total_free_blocks = (sb->sv_convert ? to_coh_ulong(count) : count); |
sb | 314 | fs/sysv/balloc.c | mark_buffer_dirty(sb->sv_bh2, 1); /* super-block has been modified */ |
sb | 315 | fs/sysv/balloc.c | sb->s_dirt = 1; /* and needs time stamp */ |
sb | 318 | fs/sysv/balloc.c | unlock_super(sb); |
sb | 323 | fs/sysv/balloc.c | count = *sb->sv_sb_total_free_blocks; |
sb | 324 | fs/sysv/balloc.c | if (sb->sv_convert) |
sb | 70 | fs/sysv/dir.c | struct super_block * sb; |
sb | 76 | fs/sysv/dir.c | if (!inode || !(sb = inode->i_sb) || !S_ISDIR(inode->i_mode)) |
sb | 81 | fs/sysv/dir.c | offset = filp->f_pos & sb->sv_block_size_1; |
sb | 82 | fs/sysv/dir.c | bh = sysv_file_bread(inode, filp->f_pos >> sb->sv_block_size_bits, 0); |
sb | 84 | fs/sysv/dir.c | filp->f_pos += sb->sv_block_size - offset; |
sb | 88 | fs/sysv/dir.c | while (offset < sb->sv_block_size && filp->f_pos < inode->i_size) { |
sb | 77 | fs/sysv/file.c | struct super_block * sb = inode->i_sb; |
sb | 106 | fs/sysv/file.c | block = offset >> sb->sv_block_size_bits; |
sb | 107 | fs/sysv/file.c | offset &= sb->sv_block_size_1; |
sb | 108 | fs/sysv/file.c | size = (size + sb->sv_block_size_1) >> sb->sv_block_size_bits; |
sb | 109 | fs/sysv/file.c | blocks = (left + offset + sb->sv_block_size_1) >> sb->sv_block_size_bits; |
sb | 112 | fs/sysv/file.c | blocks += read_ahead[MAJOR(inode->i_dev)] >> (sb->sv_block_size_bits - 9); |
sb | 165 | fs/sysv/file.c | if (left < sb->sv_block_size - offset) |
sb | 168 | fs/sysv/file.c | chars = sb->sv_block_size - offset; |
sb | 204 | fs/sysv/file.c | struct super_block * sb = inode->i_sb; |
sb | 231 | fs/sysv/file.c | bh = sysv_getblk (inode, pos >> sb->sv_block_size_bits, 1); |
sb | 237 | fs/sysv/file.c | c = sb->sv_block_size - (pos & sb->sv_block_size_1); |
sb | 240 | fs/sysv/file.c | if (c != sb->sv_block_size && !buffer_uptodate(bh)) { |
sb | 251 | fs/sysv/file.c | p = (pos & sb->sv_block_size_1) + bh->b_data; |
sb | 33 | fs/sysv/fsync.c | struct super_block * sb; |
sb | 40 | fs/sysv/fsync.c | sb = inode->i_sb; |
sb | 41 | fs/sysv/fsync.c | bh = sv_get_hash_table(sb, inode->i_dev, block); |
sb | 109 | fs/sysv/fsync.c | struct super_block * sb; |
sb | 115 | fs/sysv/fsync.c | sb = inode->i_sb; |
sb | 116 | fs/sysv/fsync.c | for (i = 0; i < sb->sv_ind_per_block; i++) { |
sb | 118 | fs/sysv/fsync.c | ((unsigned long *) ind_bh->b_data) + i, sb->sv_convert, |
sb | 135 | fs/sysv/fsync.c | struct super_block * sb; |
sb | 141 | fs/sysv/fsync.c | sb = inode->i_sb; |
sb | 142 | fs/sysv/fsync.c | for (i = 0; i < sb->sv_ind_per_block; i++) { |
sb | 144 | fs/sysv/fsync.c | ((unsigned long *) dind_bh->b_data) + i, sb->sv_convert, |
sb | 161 | fs/sysv/fsync.c | struct super_block * sb; |
sb | 167 | fs/sysv/fsync.c | sb = inode->i_sb; |
sb | 168 | fs/sysv/fsync.c | for (i = 0; i < sb->sv_ind_per_block; i++) { |
sb | 170 | fs/sysv/fsync.c | ((unsigned long *) tind_bh->b_data) + i, sb->sv_convert, |
sb | 38 | fs/sysv/ialloc.c | static inline sysv_ino_t * sv_sb_fic_inode (struct super_block * sb, unsigned int i) |
sb | 40 | fs/sysv/ialloc.c | if (sb->sv_bh1 == sb->sv_bh2) |
sb | 41 | fs/sysv/ialloc.c | return &sb->sv_sb_fic_inodes[i]; |
sb | 46 | fs/sysv/ialloc.c | return (sysv_ino_t*)(sb->sv_sbd1 + offset); |
sb | 48 | fs/sysv/ialloc.c | return (sysv_ino_t*)(sb->sv_sbd2 + offset); |
sb | 54 | fs/sysv/ialloc.c | struct super_block * sb; |
sb | 73 | fs/sysv/ialloc.c | if (!(sb = inode->i_sb)) { |
sb | 78 | fs/sysv/ialloc.c | if (ino <= SYSV_ROOT_INO || ino > sb->sv_ninodes) { |
sb | 82 | fs/sysv/ialloc.c | if (!(bh = sv_bread(sb, inode->i_dev, sb->sv_firstinodezone + ((ino-1) >> sb->sv_inodes_per_block_bits)))) { |
sb | 88 | fs/sysv/ialloc.c | raw_inode = (struct sysv_inode *) bh->b_data + ((ino-1) & sb->sv_inodes_per_block_1); |
sb | 89 | fs/sysv/ialloc.c | lock_super(sb); |
sb | 90 | fs/sysv/ialloc.c | if (*sb->sv_sb_fic_count < sb->sv_fic_size) |
sb | 91 | fs/sysv/ialloc.c | *sv_sb_fic_inode(sb,(*sb->sv_sb_fic_count)++) = ino; |
sb | 92 | fs/sysv/ialloc.c | (*sb->sv_sb_total_free_inodes)++; |
sb | 93 | fs/sysv/ialloc.c | mark_buffer_dirty(sb->sv_bh1, 1); /* super-block has been modified */ |
sb | 94 | fs/sysv/ialloc.c | if (sb->sv_bh1 != sb->sv_bh2) mark_buffer_dirty(sb->sv_bh2, 1); |
sb | 95 | fs/sysv/ialloc.c | sb->s_dirt = 1; /* and needs time stamp */ |
sb | 98 | fs/sysv/ialloc.c | unlock_super(sb); |
sb | 106 | fs/sysv/ialloc.c | struct super_block * sb; |
sb | 113 | fs/sysv/ialloc.c | sb = dir->i_sb; |
sb | 114 | fs/sysv/ialloc.c | inode->i_sb = sb; |
sb | 116 | fs/sysv/ialloc.c | lock_super(sb); /* protect against task switches */ |
sb | 117 | fs/sysv/ialloc.c | if ((*sb->sv_sb_fic_count == 0) |
sb | 118 | fs/sysv/ialloc.c | || (*sv_sb_fic_inode(sb,(*sb->sv_sb_fic_count)-1) == 0) /* Applies only to SystemV2 FS */ |
sb | 127 | fs/sysv/ialloc.c | for (i = 0, ino = SYSV_ROOT_INO+1, block = sb->sv_firstinodezone, j = SYSV_ROOT_INO ; i < sb->sv_fic_size && block < sb->sv_firstdatazone ; block++, j = 0) { |
sb | 128 | fs/sysv/ialloc.c | if (!(bh = sv_bread(sb, sb->s_dev, block))) { |
sb | 134 | fs/sysv/ialloc.c | for (; j < sb->sv_inodes_per_block && i < sb->sv_fic_size; ino++, j++, raw_inode++) { |
sb | 136 | fs/sysv/ialloc.c | *sv_sb_fic_inode(sb,i++) = ino; |
sb | 142 | fs/sysv/ialloc.c | unlock_super(sb); |
sb | 145 | fs/sysv/ialloc.c | *sb->sv_sb_fic_count = i; |
sb | 148 | fs/sysv/ialloc.c | ino = *sv_sb_fic_inode(sb,--(*sb->sv_sb_fic_count)); |
sb | 149 | fs/sysv/ialloc.c | mark_buffer_dirty(sb->sv_bh1, 1); /* super-block has been modified */ |
sb | 150 | fs/sysv/ialloc.c | if (sb->sv_bh1 != sb->sv_bh2) mark_buffer_dirty(sb->sv_bh2, 1); |
sb | 151 | fs/sysv/ialloc.c | sb->s_dirt = 1; /* and needs time stamp */ |
sb | 154 | fs/sysv/ialloc.c | inode->i_dev = sb->s_dev; |
sb | 170 | fs/sysv/ialloc.c | (*sb->sv_sb_total_free_inodes)--; |
sb | 171 | fs/sysv/ialloc.c | mark_buffer_dirty(sb->sv_bh2, 1); /* super-block has been modified again */ |
sb | 172 | fs/sysv/ialloc.c | sb->s_dirt = 1; /* and needs time stamp again */ |
sb | 173 | fs/sysv/ialloc.c | unlock_super(sb); |
sb | 177 | fs/sysv/ialloc.c | unsigned long sysv_count_free_inodes(struct super_block * sb) |
sb | 186 | fs/sysv/ialloc.c | lock_super(sb); |
sb | 193 | fs/sysv/ialloc.c | for (block = sb->sv_firstinodezone, j = SYSV_ROOT_INO ; block < sb->sv_firstdatazone ; block++, j = 0) { |
sb | 194 | fs/sysv/ialloc.c | if (!(bh = sv_bread(sb, sb->s_dev, block))) { |
sb | 200 | fs/sysv/ialloc.c | for (; j < sb->sv_inodes_per_block ; j++, raw_inode++) |
sb | 205 | fs/sysv/ialloc.c | if (count != *sb->sv_sb_total_free_inodes) { |
sb | 206 | fs/sysv/ialloc.c | printk("sysv_count_free_inodes: free inode count was %d, correcting to %d\n",(short)(*sb->sv_sb_total_free_inodes),count); |
sb | 207 | fs/sysv/ialloc.c | if (!(sb->s_flags & MS_RDONLY)) { |
sb | 208 | fs/sysv/ialloc.c | *sb->sv_sb_total_free_inodes = count; |
sb | 209 | fs/sysv/ialloc.c | mark_buffer_dirty(sb->sv_bh2, 1); /* super-block has been modified */ |
sb | 210 | fs/sysv/ialloc.c | sb->s_dirt = 1; /* and needs time stamp */ |
sb | 213 | fs/sysv/ialloc.c | unlock_super(sb); |
sb | 216 | fs/sysv/ialloc.c | return *sb->sv_sb_total_free_inodes; |
sb | 65 | fs/sysv/inode.c | static void detected_bs512 (struct super_block *sb) |
sb | 67 | fs/sysv/inode.c | sb->sv_block_size = 512; |
sb | 68 | fs/sysv/inode.c | sb->sv_block_size_1 = 512-1; |
sb | 69 | fs/sysv/inode.c | sb->sv_block_size_bits = 9; |
sb | 70 | fs/sysv/inode.c | sb->sv_block_size_ratio = 2; |
sb | 71 | fs/sysv/inode.c | sb->sv_block_size_ratio_bits = 1; |
sb | 72 | fs/sysv/inode.c | sb->sv_inodes_per_block = 512/64; |
sb | 73 | fs/sysv/inode.c | sb->sv_inodes_per_block_1 = 512/64-1; |
sb | 74 | fs/sysv/inode.c | sb->sv_inodes_per_block_bits = 9-6; |
sb | 75 | fs/sysv/inode.c | sb->sv_toobig_block = 10 + |
sb | 76 | fs/sysv/inode.c | (sb->sv_ind_per_block = 512/4) + |
sb | 77 | fs/sysv/inode.c | (sb->sv_ind_per_block_2 = (512/4)*(512/4)) + |
sb | 78 | fs/sysv/inode.c | (sb->sv_ind_per_block_3 = (512/4)*(512/4)*(512/4)); |
sb | 79 | fs/sysv/inode.c | sb->sv_ind_per_block_1 = 512/4-1; |
sb | 80 | fs/sysv/inode.c | sb->sv_ind_per_block_2_1 = (512/4)*(512/4)-1; |
sb | 81 | fs/sysv/inode.c | sb->sv_ind_per_block_2_bits = 2 * |
sb | 82 | fs/sysv/inode.c | (sb->sv_ind_per_block_bits = 9-2); |
sb | 83 | fs/sysv/inode.c | sb->sv_ind_per_block_block_size_1 = (512/4)*512-1; |
sb | 84 | fs/sysv/inode.c | sb->sv_ind_per_block_block_size_bits = (9-2)+9; |
sb | 85 | fs/sysv/inode.c | sb->sv_ind_per_block_2_block_size_1 = (512/4)*(512/4)*512-1; |
sb | 86 | fs/sysv/inode.c | sb->sv_ind_per_block_2_block_size_bits = (9-2)+(9-2)+9; |
sb | 87 | fs/sysv/inode.c | sb->sv_ind0_size = 10 * 512; |
sb | 88 | fs/sysv/inode.c | sb->sv_ind1_size = (10 + (512/4))* 512; |
sb | 89 | fs/sysv/inode.c | sb->sv_ind2_size = (10 + (512/4) + (512/4)*(512/4)) * 512; |
sb | 92 | fs/sysv/inode.c | static void detected_bs1024 (struct super_block *sb) |
sb | 94 | fs/sysv/inode.c | sb->sv_block_size = 1024; |
sb | 95 | fs/sysv/inode.c | sb->sv_block_size_1 = 1024-1; |
sb | 96 | fs/sysv/inode.c | sb->sv_block_size_bits = 10; |
sb | 97 | fs/sysv/inode.c | sb->sv_block_size_ratio = 1; |
sb | 98 | fs/sysv/inode.c | sb->sv_block_size_ratio_bits = 0; |
sb | 99 | fs/sysv/inode.c | sb->sv_inodes_per_block = 1024/64; |
sb | 100 | fs/sysv/inode.c | sb->sv_inodes_per_block_1 = 1024/64-1; |
sb | 101 | fs/sysv/inode.c | sb->sv_inodes_per_block_bits = 10-6; |
sb | 102 | fs/sysv/inode.c | sb->sv_toobig_block = 10 + |
sb | 103 | fs/sysv/inode.c | (sb->sv_ind_per_block = 1024/4) + |
sb | 104 | fs/sysv/inode.c | (sb->sv_ind_per_block_2 = (1024/4)*(1024/4)) + |
sb | 105 | fs/sysv/inode.c | (sb->sv_ind_per_block_3 = (1024/4)*(1024/4)*(1024/4)); |
sb | 106 | fs/sysv/inode.c | sb->sv_ind_per_block_1 = 1024/4-1; |
sb | 107 | fs/sysv/inode.c | sb->sv_ind_per_block_2_1 = (1024/4)*(1024/4)-1; |
sb | 108 | fs/sysv/inode.c | sb->sv_ind_per_block_2_bits = 2 * |
sb | 109 | fs/sysv/inode.c | (sb->sv_ind_per_block_bits = 10-2); |
sb | 110 | fs/sysv/inode.c | sb->sv_ind_per_block_block_size_1 = (1024/4)*1024-1; |
sb | 111 | fs/sysv/inode.c | sb->sv_ind_per_block_block_size_bits = (10-2)+10; |
sb | 112 | fs/sysv/inode.c | sb->sv_ind_per_block_2_block_size_1 = (1024/4)*(1024/4)*1024-1; |
sb | 113 | fs/sysv/inode.c | sb->sv_ind_per_block_2_block_size_bits = (10-2)+(10-2)+10; |
sb | 114 | fs/sysv/inode.c | sb->sv_ind0_size = 10 * 1024; |
sb | 115 | fs/sysv/inode.c | sb->sv_ind1_size = (10 + (1024/4))* 1024; |
sb | 116 | fs/sysv/inode.c | sb->sv_ind2_size = (10 + (1024/4) + (1024/4)*(1024/4)) * 1024; |
sb | 119 | fs/sysv/inode.c | static const char* detect_xenix (struct super_block *sb, struct buffer_head *bh) |
sb | 127 | fs/sysv/inode.c | case 1: detected_bs512(sb); break; |
sb | 128 | fs/sysv/inode.c | case 2: detected_bs1024(sb); break; |
sb | 131 | fs/sysv/inode.c | sb->sv_type = FSTYPE_XENIX; |
sb | 134 | fs/sysv/inode.c | static struct super_block * detected_xenix (struct super_block *sb, struct buffer_head *bh1, struct buffer_head *bh2) |
sb | 139 | fs/sysv/inode.c | if (sb->sv_block_size == BLOCK_SIZE) |
sb | 151 | fs/sysv/inode.c | sb->sv_convert = 0; |
sb | 152 | fs/sysv/inode.c | sb->sv_kludge_symlinks = 1; |
sb | 153 | fs/sysv/inode.c | sb->sv_truncate = 1; |
sb | 154 | fs/sysv/inode.c | sb->sv_link_max = XENIX_LINK_MAX; |
sb | 155 | fs/sysv/inode.c | sb->sv_fic_size = XENIX_NICINOD; |
sb | 156 | fs/sysv/inode.c | sb->sv_flc_size = XENIX_NICFREE; |
sb | 157 | fs/sysv/inode.c | sb->sv_bh1 = bh1; |
sb | 158 | fs/sysv/inode.c | sb->sv_bh2 = bh2; |
sb | 159 | fs/sysv/inode.c | sb->sv_sbd1 = (char *) sbd1; |
sb | 160 | fs/sysv/inode.c | sb->sv_sbd2 = (char *) sbd2; |
sb | 161 | fs/sysv/inode.c | sb->sv_sb_fic_count = &sbd1->s_ninode; |
sb | 162 | fs/sysv/inode.c | sb->sv_sb_fic_inodes = &sbd1->s_inode[0]; |
sb | 163 | fs/sysv/inode.c | sb->sv_sb_total_free_inodes = &sbd2->s_tinode; |
sb | 164 | fs/sysv/inode.c | sb->sv_sb_flc_count = &sbd1->s_nfree; |
sb | 165 | fs/sysv/inode.c | sb->sv_sb_flc_blocks = &sbd1->s_free[0]; |
sb | 166 | fs/sysv/inode.c | sb->sv_sb_total_free_blocks = &sbd2->s_tfree; |
sb | 167 | fs/sysv/inode.c | sb->sv_sb_time = &sbd2->s_time; |
sb | 168 | fs/sysv/inode.c | sb->sv_block_base = 0; |
sb | 169 | fs/sysv/inode.c | sb->sv_firstinodezone = 2; |
sb | 170 | fs/sysv/inode.c | sb->sv_firstdatazone = sbd1->s_isize; |
sb | 171 | fs/sysv/inode.c | sb->sv_nzones = sbd1->s_fsize; |
sb | 172 | fs/sysv/inode.c | sb->sv_ndatazones = sb->sv_nzones - sb->sv_firstdatazone; |
sb | 173 | fs/sysv/inode.c | return sb; |
sb | 176 | fs/sysv/inode.c | static const char* detect_sysv4 (struct super_block *sb, struct buffer_head *bh) |
sb | 186 | fs/sysv/inode.c | case 1: detected_bs512(sb); break; |
sb | 187 | fs/sysv/inode.c | case 2: detected_bs1024(sb); break; |
sb | 190 | fs/sysv/inode.c | sb->sv_type = FSTYPE_SYSV4; |
sb | 193 | fs/sysv/inode.c | static struct super_block * detected_sysv4 (struct super_block *sb, struct buffer_head *bh) |
sb | 197 | fs/sysv/inode.c | if (sb->sv_block_size == BLOCK_SIZE) |
sb | 208 | fs/sysv/inode.c | sb->sv_convert = 0; |
sb | 209 | fs/sysv/inode.c | sb->sv_kludge_symlinks = 0; /* ?? */ |
sb | 210 | fs/sysv/inode.c | sb->sv_truncate = 1; |
sb | 211 | fs/sysv/inode.c | sb->sv_link_max = SYSV_LINK_MAX; |
sb | 212 | fs/sysv/inode.c | sb->sv_fic_size = SYSV_NICINOD; |
sb | 213 | fs/sysv/inode.c | sb->sv_flc_size = SYSV_NICFREE; |
sb | 214 | fs/sysv/inode.c | sb->sv_bh1 = bh; |
sb | 215 | fs/sysv/inode.c | sb->sv_bh2 = bh; |
sb | 216 | fs/sysv/inode.c | sb->sv_sbd1 = (char *) sbd; |
sb | 217 | fs/sysv/inode.c | sb->sv_sbd2 = (char *) sbd; |
sb | 218 | fs/sysv/inode.c | sb->sv_sb_fic_count = &sbd->s_ninode; |
sb | 219 | fs/sysv/inode.c | sb->sv_sb_fic_inodes = &sbd->s_inode[0]; |
sb | 220 | fs/sysv/inode.c | sb->sv_sb_total_free_inodes = &sbd->s_tinode; |
sb | 221 | fs/sysv/inode.c | sb->sv_sb_flc_count = &sbd->s_nfree; |
sb | 222 | fs/sysv/inode.c | sb->sv_sb_flc_blocks = &sbd->s_free[0]; |
sb | 223 | fs/sysv/inode.c | sb->sv_sb_total_free_blocks = &sbd->s_tfree; |
sb | 224 | fs/sysv/inode.c | sb->sv_sb_time = &sbd->s_time; |
sb | 225 | fs/sysv/inode.c | sb->sv_sb_state = &sbd->s_state; |
sb | 226 | fs/sysv/inode.c | sb->sv_block_base = 0; |
sb | 227 | fs/sysv/inode.c | sb->sv_firstinodezone = 2; |
sb | 228 | fs/sysv/inode.c | sb->sv_firstdatazone = sbd->s_isize; |
sb | 229 | fs/sysv/inode.c | sb->sv_nzones = sbd->s_fsize; |
sb | 230 | fs/sysv/inode.c | sb->sv_ndatazones = sb->sv_nzones - sb->sv_firstdatazone; |
sb | 231 | fs/sysv/inode.c | return sb; |
sb | 234 | fs/sysv/inode.c | static const char* detect_sysv2 (struct super_block *sb, struct buffer_head *bh) |
sb | 244 | fs/sysv/inode.c | case 1: detected_bs512(sb); break; |
sb | 245 | fs/sysv/inode.c | case 2: detected_bs1024(sb); break; |
sb | 248 | fs/sysv/inode.c | sb->sv_type = FSTYPE_SYSV2; |
sb | 251 | fs/sysv/inode.c | static struct super_block * detected_sysv2 (struct super_block *sb, struct buffer_head *bh) |
sb | 255 | fs/sysv/inode.c | if (sb->sv_block_size == BLOCK_SIZE) |
sb | 266 | fs/sysv/inode.c | sb->sv_convert = 0; |
sb | 267 | fs/sysv/inode.c | sb->sv_kludge_symlinks = 0; /* ?? */ |
sb | 268 | fs/sysv/inode.c | sb->sv_truncate = 1; |
sb | 269 | fs/sysv/inode.c | sb->sv_link_max = SYSV_LINK_MAX; |
sb | 270 | fs/sysv/inode.c | sb->sv_fic_size = SYSV_NICINOD; |
sb | 271 | fs/sysv/inode.c | sb->sv_flc_size = SYSV_NICFREE; |
sb | 272 | fs/sysv/inode.c | sb->sv_bh1 = bh; |
sb | 273 | fs/sysv/inode.c | sb->sv_bh2 = bh; |
sb | 274 | fs/sysv/inode.c | sb->sv_sbd1 = (char *) sbd; |
sb | 275 | fs/sysv/inode.c | sb->sv_sbd2 = (char *) sbd; |
sb | 276 | fs/sysv/inode.c | sb->sv_sb_fic_count = &sbd->s_ninode; |
sb | 277 | fs/sysv/inode.c | sb->sv_sb_fic_inodes = &sbd->s_inode[0]; |
sb | 278 | fs/sysv/inode.c | sb->sv_sb_total_free_inodes = &sbd->s_tinode; |
sb | 279 | fs/sysv/inode.c | sb->sv_sb_flc_count = &sbd->s_nfree; |
sb | 280 | fs/sysv/inode.c | sb->sv_sb_flc_blocks = &sbd->s_free[0]; |
sb | 281 | fs/sysv/inode.c | sb->sv_sb_total_free_blocks = &sbd->s_tfree; |
sb | 282 | fs/sysv/inode.c | sb->sv_sb_time = &sbd->s_time; |
sb | 283 | fs/sysv/inode.c | sb->sv_sb_state = &sbd->s_state; |
sb | 284 | fs/sysv/inode.c | sb->sv_block_base = 0; |
sb | 285 | fs/sysv/inode.c | sb->sv_firstinodezone = 2; |
sb | 286 | fs/sysv/inode.c | sb->sv_firstdatazone = sbd->s_isize; |
sb | 287 | fs/sysv/inode.c | sb->sv_nzones = sbd->s_fsize; |
sb | 288 | fs/sysv/inode.c | sb->sv_ndatazones = sb->sv_nzones - sb->sv_firstdatazone; |
sb | 289 | fs/sysv/inode.c | return sb; |
sb | 292 | fs/sysv/inode.c | static const char* detect_coherent (struct super_block *sb, struct buffer_head *bh) |
sb | 300 | fs/sysv/inode.c | detected_bs512(sb); |
sb | 301 | fs/sysv/inode.c | sb->sv_type = FSTYPE_COH; |
sb | 304 | fs/sysv/inode.c | static struct super_block * detected_coherent (struct super_block *sb, struct buffer_head *bh) |
sb | 314 | fs/sysv/inode.c | sb->sv_convert = 1; |
sb | 315 | fs/sysv/inode.c | sb->sv_kludge_symlinks = 1; |
sb | 316 | fs/sysv/inode.c | sb->sv_truncate = 1; |
sb | 317 | fs/sysv/inode.c | sb->sv_link_max = COH_LINK_MAX; |
sb | 318 | fs/sysv/inode.c | sb->sv_fic_size = COH_NICINOD; |
sb | 319 | fs/sysv/inode.c | sb->sv_flc_size = COH_NICFREE; |
sb | 320 | fs/sysv/inode.c | sb->sv_bh1 = bh; |
sb | 321 | fs/sysv/inode.c | sb->sv_bh2 = bh; |
sb | 322 | fs/sysv/inode.c | sb->sv_sbd1 = (char *) sbd; |
sb | 323 | fs/sysv/inode.c | sb->sv_sbd2 = (char *) sbd; |
sb | 324 | fs/sysv/inode.c | sb->sv_sb_fic_count = &sbd->s_ninode; |
sb | 325 | fs/sysv/inode.c | sb->sv_sb_fic_inodes = &sbd->s_inode[0]; |
sb | 326 | fs/sysv/inode.c | sb->sv_sb_total_free_inodes = &sbd->s_tinode; |
sb | 327 | fs/sysv/inode.c | sb->sv_sb_flc_count = &sbd->s_nfree; |
sb | 328 | fs/sysv/inode.c | sb->sv_sb_flc_blocks = &sbd->s_free[0]; |
sb | 329 | fs/sysv/inode.c | sb->sv_sb_total_free_blocks = &sbd->s_tfree; |
sb | 330 | fs/sysv/inode.c | sb->sv_sb_time = &sbd->s_time; |
sb | 331 | fs/sysv/inode.c | sb->sv_block_base = 0; |
sb | 332 | fs/sysv/inode.c | sb->sv_firstinodezone = 2; |
sb | 333 | fs/sysv/inode.c | sb->sv_firstdatazone = sbd->s_isize; |
sb | 334 | fs/sysv/inode.c | sb->sv_nzones = from_coh_ulong(sbd->s_fsize); |
sb | 335 | fs/sysv/inode.c | sb->sv_ndatazones = sb->sv_nzones - sb->sv_firstdatazone; |
sb | 336 | fs/sysv/inode.c | return sb; |
sb | 339 | fs/sysv/inode.c | struct super_block *sysv_read_super(struct super_block *sb,void *data, |
sb | 344 | fs/sysv/inode.c | kdev_t dev = sb->s_dev; |
sb | 356 | fs/sysv/inode.c | lock_super(sb); |
sb | 361 | fs/sysv/inode.c | if ((found = detect_xenix(sb,bh)) != NULL) |
sb | 367 | fs/sysv/inode.c | if ((found = detect_sysv4(sb,bh)) != NULL) |
sb | 369 | fs/sysv/inode.c | if ((found = detect_sysv2(sb,bh)) != NULL) |
sb | 372 | fs/sysv/inode.c | if ((found = detect_coherent(sb,bh)) != NULL) |
sb | 383 | fs/sysv/inode.c | if ((found = detect_sysv4(sb,bh)) != NULL) { |
sb | 384 | fs/sysv/inode.c | sb->sv_block_base = offsets[i] << sb->sv_block_size_ratio_bits; |
sb | 387 | fs/sysv/inode.c | if ((found = detect_sysv2(sb,bh)) != NULL) { |
sb | 388 | fs/sysv/inode.c | sb->sv_block_base = offsets[i] << sb->sv_block_size_ratio_bits; |
sb | 394 | fs/sysv/inode.c | sb->s_dev = 0; |
sb | 395 | fs/sysv/inode.c | unlock_super(sb); |
sb | 404 | fs/sysv/inode.c | if (sb->sv_block_size == BLOCK_SIZE) { |
sb | 405 | fs/sysv/inode.c | switch (sb->sv_type) { |
sb | 407 | fs/sysv/inode.c | if (!detected_xenix(sb,bh,bh)) |
sb | 411 | fs/sysv/inode.c | if (!detected_sysv4(sb,bh)) |
sb | 415 | fs/sysv/inode.c | if (!detected_sysv2(sb,bh)) |
sb | 421 | fs/sysv/inode.c | sb->s_dev = 0; |
sb | 422 | fs/sysv/inode.c | unlock_super(sb); |
sb | 430 | fs/sysv/inode.c | unsigned long blocknr = bh->b_blocknr << sb->sv_block_size_ratio_bits; |
sb | 433 | fs/sysv/inode.c | set_blocksize(dev,sb->sv_block_size); |
sb | 435 | fs/sysv/inode.c | switch (sb->sv_type) { |
sb | 437 | fs/sysv/inode.c | if ((bh1 = bread(dev, blocknr, sb->sv_block_size)) == NULL) |
sb | 439 | fs/sysv/inode.c | if ((bh2 = bread(dev, blocknr+1, sb->sv_block_size)) == NULL) |
sb | 441 | fs/sysv/inode.c | if (!detected_xenix(sb,bh1,bh2)) |
sb | 445 | fs/sysv/inode.c | if ((bh2 = bread(dev, blocknr+1, sb->sv_block_size)) == NULL) |
sb | 447 | fs/sysv/inode.c | if (!detected_sysv4(sb,bh2)) |
sb | 451 | fs/sysv/inode.c | if ((bh2 = bread(dev, blocknr+1, sb->sv_block_size)) == NULL) |
sb | 453 | fs/sysv/inode.c | if (!detected_sysv2(sb,bh2)) |
sb | 457 | fs/sysv/inode.c | if ((bh2 = bread(dev, blocknr+1, sb->sv_block_size)) == NULL) |
sb | 459 | fs/sysv/inode.c | if (!detected_coherent(sb,bh2)) |
sb | 466 | fs/sysv/inode.c | set_blocksize(sb->s_dev,BLOCK_SIZE); |
sb | 467 | fs/sysv/inode.c | sb->s_dev = 0; |
sb | 468 | fs/sysv/inode.c | unlock_super(sb); |
sb | 473 | fs/sysv/inode.c | sb->sv_ninodes = (sb->sv_firstdatazone - sb->sv_firstinodezone) << sb->sv_inodes_per_block_bits; |
sb | 476 | fs/sysv/inode.c | found, sb->sv_block_size, kdevname(dev)); |
sb | 477 | fs/sysv/inode.c | sb->s_magic = SYSV_MAGIC_BASE + sb->sv_type; |
sb | 479 | fs/sysv/inode.c | sb->s_blocksize = sb->sv_block_size; |
sb | 480 | fs/sysv/inode.c | sb->s_blocksize_bits = sb->sv_block_size_bits; |
sb | 482 | fs/sysv/inode.c | sb->s_dev = dev; |
sb | 483 | fs/sysv/inode.c | sb->s_op = &sysv_sops; |
sb | 484 | fs/sysv/inode.c | sb->s_mounted = iget(sb,SYSV_ROOT_INO); |
sb | 485 | fs/sysv/inode.c | unlock_super(sb); |
sb | 486 | fs/sysv/inode.c | if (!sb->s_mounted) { |
sb | 488 | fs/sysv/inode.c | sysv_put_super(sb); |
sb | 491 | fs/sysv/inode.c | sb->s_dirt = 1; |
sb | 494 | fs/sysv/inode.c | return sb; |
sb | 498 | fs/sysv/inode.c | void sysv_write_super (struct super_block *sb) |
sb | 500 | fs/sysv/inode.c | lock_super(sb); |
sb | 501 | fs/sysv/inode.c | if (buffer_dirty(sb->sv_bh1) || buffer_dirty(sb->sv_bh2)) { |
sb | 506 | fs/sysv/inode.c | unsigned long old_time = *sb->sv_sb_time; |
sb | 507 | fs/sysv/inode.c | if (sb->sv_convert) |
sb | 509 | fs/sysv/inode.c | if (sb->sv_type == FSTYPE_SYSV4) |
sb | 510 | fs/sysv/inode.c | if (*sb->sv_sb_state == 0x7c269d38 - old_time) |
sb | 511 | fs/sysv/inode.c | *sb->sv_sb_state = 0x7c269d38 - time; |
sb | 512 | fs/sysv/inode.c | if (sb->sv_convert) |
sb | 514 | fs/sysv/inode.c | *sb->sv_sb_time = time; |
sb | 515 | fs/sysv/inode.c | mark_buffer_dirty(sb->sv_bh2, 1); |
sb | 517 | fs/sysv/inode.c | sb->s_dirt = 0; |
sb | 518 | fs/sysv/inode.c | unlock_super(sb); |
sb | 521 | fs/sysv/inode.c | void sysv_put_super(struct super_block *sb) |
sb | 524 | fs/sysv/inode.c | lock_super(sb); |
sb | 525 | fs/sysv/inode.c | brelse(sb->sv_bh1); |
sb | 526 | fs/sysv/inode.c | if (sb->sv_bh1 != sb->sv_bh2) brelse(sb->sv_bh2); |
sb | 528 | fs/sysv/inode.c | if (sb->s_blocksize != BLOCK_SIZE) |
sb | 529 | fs/sysv/inode.c | set_blocksize(sb->s_dev,BLOCK_SIZE); |
sb | 530 | fs/sysv/inode.c | sb->s_dev = 0; |
sb | 531 | fs/sysv/inode.c | unlock_super(sb); |
sb | 535 | fs/sysv/inode.c | void sysv_statfs(struct super_block *sb, struct statfs *buf, int bufsiz) |
sb | 539 | fs/sysv/inode.c | tmp.f_type = sb->s_magic; /* type of filesystem */ |
sb | 540 | fs/sysv/inode.c | tmp.f_bsize = sb->sv_block_size; /* block size */ |
sb | 541 | fs/sysv/inode.c | tmp.f_blocks = sb->sv_ndatazones; /* total data blocks in file system */ |
sb | 542 | fs/sysv/inode.c | tmp.f_bfree = sysv_count_free_blocks(sb); /* free blocks in fs */ |
sb | 544 | fs/sysv/inode.c | tmp.f_files = sb->sv_ninodes; /* total file nodes in file system */ |
sb | 545 | fs/sysv/inode.c | tmp.f_ffree = sysv_count_free_inodes(sb); /* free file nodes in fs */ |
sb | 554 | fs/sysv/inode.c | static inline int inode_bmap(struct super_block * sb, struct inode * inode, int nr) |
sb | 559 | fs/sysv/inode.c | return tmp + sb->sv_block_base; |
sb | 562 | fs/sysv/inode.c | static int block_bmap(struct super_block * sb, struct buffer_head * bh, int nr, int convert) |
sb | 574 | fs/sysv/inode.c | return tmp + sb->sv_block_base; |
sb | 580 | fs/sysv/inode.c | struct super_block * sb = inode->i_sb; |
sb | 586 | fs/sysv/inode.c | return inode_bmap(sb,inode,block); |
sb | 588 | fs/sysv/inode.c | convert = sb->sv_convert; |
sb | 589 | fs/sysv/inode.c | if (block < sb->sv_ind_per_block) { |
sb | 590 | fs/sysv/inode.c | i = inode_bmap(sb,inode,10); |
sb | 593 | fs/sysv/inode.c | bh = bread(inode->i_dev,i,sb->sv_block_size); |
sb | 594 | fs/sysv/inode.c | return block_bmap(sb, bh, block, convert); |
sb | 596 | fs/sysv/inode.c | block -= sb->sv_ind_per_block; |
sb | 597 | fs/sysv/inode.c | if (block < sb->sv_ind_per_block_2) { |
sb | 598 | fs/sysv/inode.c | i = inode_bmap(sb,inode,11); |
sb | 601 | fs/sysv/inode.c | bh = bread(inode->i_dev,i,sb->sv_block_size); |
sb | 602 | fs/sysv/inode.c | i = block_bmap(sb, bh, block >> sb->sv_ind_per_block_bits, convert); |
sb | 605 | fs/sysv/inode.c | bh = bread(inode->i_dev,i,sb->sv_block_size); |
sb | 606 | fs/sysv/inode.c | return block_bmap(sb, bh, block & sb->sv_ind_per_block_1, convert); |
sb | 608 | fs/sysv/inode.c | block -= sb->sv_ind_per_block_2; |
sb | 609 | fs/sysv/inode.c | if (block < sb->sv_ind_per_block_3) { |
sb | 610 | fs/sysv/inode.c | i = inode_bmap(sb,inode,12); |
sb | 613 | fs/sysv/inode.c | bh = bread(inode->i_dev,i,sb->sv_block_size); |
sb | 614 | fs/sysv/inode.c | i = block_bmap(sb, bh, block >> sb->sv_ind_per_block_2_bits, convert); |
sb | 617 | fs/sysv/inode.c | bh = bread(inode->i_dev,i,sb->sv_block_size); |
sb | 618 | fs/sysv/inode.c | i = block_bmap(sb, bh, (block >> sb->sv_ind_per_block_bits) & sb->sv_ind_per_block_1,convert); |
sb | 621 | fs/sysv/inode.c | bh = bread(inode->i_dev,i,sb->sv_block_size); |
sb | 622 | fs/sysv/inode.c | return block_bmap(sb, bh, block & sb->sv_ind_per_block_1, convert); |
sb | 639 | fs/sysv/inode.c | struct super_block *sb; |
sb | 644 | fs/sysv/inode.c | sb = inode->i_sb; |
sb | 649 | fs/sysv/inode.c | result = sv_getblk(sb, inode->i_dev, tmp); |
sb | 657 | fs/sysv/inode.c | tmp = sysv_new_block(sb); |
sb | 660 | fs/sysv/inode.c | result = sv_getblk(sb, inode->i_dev, tmp); |
sb | 662 | fs/sysv/inode.c | sysv_free_block(sb,tmp); |
sb | 675 | fs/sysv/inode.c | struct super_block *sb; |
sb | 690 | fs/sysv/inode.c | sb = inode->i_sb; |
sb | 694 | fs/sysv/inode.c | if (sb->sv_convert) |
sb | 697 | fs/sysv/inode.c | result = sv_getblk(sb, bh->b_dev, block); |
sb | 709 | fs/sysv/inode.c | block = sysv_new_block(sb); |
sb | 714 | fs/sysv/inode.c | result = sv_getblk(sb, bh->b_dev, block); |
sb | 716 | fs/sysv/inode.c | sysv_free_block(sb,block); |
sb | 720 | fs/sysv/inode.c | *p = (sb->sv_convert ? to_coh_ulong(block) : block); |
sb | 728 | fs/sysv/inode.c | struct super_block * sb = inode->i_sb; |
sb | 734 | fs/sysv/inode.c | if (block < sb->sv_ind_per_block) { |
sb | 738 | fs/sysv/inode.c | block -= sb->sv_ind_per_block; |
sb | 739 | fs/sysv/inode.c | if (block < sb->sv_ind_per_block_2) { |
sb | 741 | fs/sysv/inode.c | bh = block_getblk(inode, bh, block >> sb->sv_ind_per_block_bits, create); |
sb | 742 | fs/sysv/inode.c | return block_getblk(inode, bh, block & sb->sv_ind_per_block_1, create); |
sb | 744 | fs/sysv/inode.c | block -= sb->sv_ind_per_block_2; |
sb | 745 | fs/sysv/inode.c | if (block < sb->sv_ind_per_block_3) { |
sb | 747 | fs/sysv/inode.c | bh = block_getblk(inode, bh, block >> sb->sv_ind_per_block_2_bits, create); |
sb | 748 | fs/sysv/inode.c | bh = block_getblk(inode, bh, (block >> sb->sv_ind_per_block_bits) & sb->sv_ind_per_block_1, create); |
sb | 749 | fs/sysv/inode.c | return block_getblk(inode, bh, block & sb->sv_ind_per_block_1, create); |
sb | 801 | fs/sysv/inode.c | struct super_block * sb = inode->i_sb; |
sb | 810 | fs/sysv/inode.c | if (!ino || ino > sb->sv_ninodes) { |
sb | 816 | fs/sysv/inode.c | block = sb->sv_firstinodezone + ((ino-1) >> sb->sv_inodes_per_block_bits); |
sb | 817 | fs/sysv/inode.c | if (!(bh = sv_bread(sb,inode->i_dev,block))) { |
sb | 823 | fs/sysv/inode.c | raw_inode = (struct sysv_inode *) bh->b_data + ((ino-1) & sb->sv_inodes_per_block_1); |
sb | 825 | fs/sysv/inode.c | if (sb->sv_kludge_symlinks) |
sb | 832 | fs/sysv/inode.c | if (sb->sv_convert) { |
sb | 847 | fs/sysv/inode.c | if (sb->sv_convert) |
sb | 890 | fs/sysv/inode.c | struct super_block * sb = inode->i_sb; |
sb | 897 | fs/sysv/inode.c | if (!ino || ino > sb->sv_ninodes) { |
sb | 904 | fs/sysv/inode.c | block = sb->sv_firstinodezone + ((ino-1) >> sb->sv_inodes_per_block_bits); |
sb | 905 | fs/sysv/inode.c | if (!(bh = sv_bread(sb,inode->i_dev,block))) { |
sb | 910 | fs/sysv/inode.c | raw_inode = (struct sysv_inode *) bh->b_data + ((ino-1) & sb->sv_inodes_per_block_1); |
sb | 912 | fs/sysv/inode.c | if (sb->sv_kludge_symlinks) |
sb | 918 | fs/sysv/inode.c | if (sb->sv_convert) { |
sb | 932 | fs/sysv/inode.c | if (sb->sv_convert) |
sb | 63 | fs/sysv/namei.c | struct super_block * sb; |
sb | 70 | fs/sysv/namei.c | sb = dir->i_sb; |
sb | 72 | fs/sysv/namei.c | if (sb->sv_truncate) |
sb | 83 | fs/sysv/namei.c | pos += sb->sv_block_size; |
sb | 92 | fs/sysv/namei.c | if (offset < sb->sv_block_size) |
sb | 146 | fs/sysv/namei.c | struct super_block * sb; |
sb | 156 | fs/sysv/namei.c | sb = dir->i_sb; |
sb | 158 | fs/sysv/namei.c | if (sb->sv_truncate) |
sb | 194 | fs/sysv/namei.c | if (offset < sb->sv_block_size) |
sb | 367 | fs/sysv/namei.c | struct super_block * sb; |
sb | 390 | fs/sysv/namei.c | sb = inode->i_sb; |
sb | 396 | fs/sysv/namei.c | pos += sb->sv_block_size; |
sb | 407 | fs/sysv/namei.c | if (offset < sb->sv_block_size) |
sb | 538 | fs/sysv/namei.c | struct super_block * sb; |
sb | 557 | fs/sysv/namei.c | sb = inode->i_sb; |
sb | 560 | fs/sysv/namei.c | while (i < sb->sv_block_size_1 && (c = *(symname++))) |
sb | 42 | fs/sysv/truncate.c | struct super_block * sb; |
sb | 49 | fs/sysv/truncate.c | sb = inode->i_sb; |
sb | 51 | fs/sysv/truncate.c | for (i = ((unsigned long) inode->i_size + sb->sv_block_size_1) >> sb->sv_block_size_bits; i < 10; i++) { |
sb | 56 | fs/sysv/truncate.c | bh = sv_get_hash_table(sb, inode->i_dev, block); |
sb | 57 | fs/sysv/truncate.c | if ((i << sb->sv_block_size_bits) < inode->i_size) { |
sb | 69 | fs/sysv/truncate.c | sysv_free_block(sb,block); |
sb | 77 | fs/sysv/truncate.c | struct super_block * sb; |
sb | 90 | fs/sysv/truncate.c | sb = inode->i_sb; |
sb | 91 | fs/sysv/truncate.c | indbh = sv_bread(sb, inode->i_dev, indblock); |
sb | 105 | fs/sysv/truncate.c | i = (inode->i_size - offset + sb->sv_block_size_1) >> sb->sv_block_size_bits; |
sb | 106 | fs/sysv/truncate.c | for (; i < sb->sv_ind_per_block; i++) { |
sb | 109 | fs/sysv/truncate.c | if (sb->sv_convert) |
sb | 113 | fs/sysv/truncate.c | bh = sv_get_hash_table(sb, inode->i_dev, block); |
sb | 114 | fs/sysv/truncate.c | if ((i << sb->sv_block_size_bits) + offset < inode->i_size) { |
sb | 126 | fs/sysv/truncate.c | sysv_free_block(sb,block); |
sb | 128 | fs/sysv/truncate.c | for (i = 0; i < sb->sv_ind_per_block; i++) |
sb | 137 | fs/sysv/truncate.c | sysv_free_block(sb,indblock); |
sb | 146 | fs/sysv/truncate.c | struct super_block * sb; |
sb | 158 | fs/sysv/truncate.c | sb = inode->i_sb; |
sb | 159 | fs/sysv/truncate.c | indbh = sv_bread(sb, inode->i_dev, indblock); |
sb | 172 | fs/sysv/truncate.c | i = (inode->i_size - offset + sb->sv_ind_per_block_block_size_1) >> sb->sv_ind_per_block_block_size_bits; |
sb | 173 | fs/sysv/truncate.c | for (; i < sb->sv_ind_per_block; i++) { |
sb | 177 | fs/sysv/truncate.c | if (sb->sv_convert) |
sb | 181 | fs/sysv/truncate.c | retry |= trunc_indirect(inode,offset+(i<<sb->sv_ind_per_block_bits),ind,sb->sv_convert,&dirty); |
sb | 185 | fs/sysv/truncate.c | for (i = 0; i < sb->sv_ind_per_block; i++) |
sb | 194 | fs/sysv/truncate.c | sysv_free_block(sb,indblock); |
sb | 203 | fs/sysv/truncate.c | struct super_block * sb; |
sb | 215 | fs/sysv/truncate.c | sb = inode->i_sb; |
sb | 216 | fs/sysv/truncate.c | indbh = sv_bread(sb, inode->i_dev, indblock); |
sb | 229 | fs/sysv/truncate.c | i = (inode->i_size - offset + sb->sv_ind_per_block_2_block_size_1) >> sb->sv_ind_per_block_2_block_size_bits; |
sb | 230 | fs/sysv/truncate.c | for (; i < sb->sv_ind_per_block; i++) { |
sb | 234 | fs/sysv/truncate.c | if (sb->sv_convert) |
sb | 238 | fs/sysv/truncate.c | retry |= trunc_dindirect(inode,offset+(i<<sb->sv_ind_per_block_2_bits),ind,sb->sv_convert,&dirty); |
sb | 242 | fs/sysv/truncate.c | for (i = 0; i < sb->sv_ind_per_block; i++) |
sb | 251 | fs/sysv/truncate.c | sysv_free_block(sb,indblock); |
sb | 259 | fs/sysv/truncate.c | struct super_block * sb; |
sb | 261 | fs/sysv/truncate.c | sb = inode->i_sb; |
sb | 263 | fs/sysv/truncate.c | | trunc_indirect(inode,sb->sv_ind0_size,&inode->u.sysv_i.i_data[10],0,&inode->i_dirt) |
sb | 264 | fs/sysv/truncate.c | | trunc_dindirect(inode,sb->sv_ind1_size,&inode->u.sysv_i.i_data[11],0,&inode->i_dirt) |
sb | 265 | fs/sysv/truncate.c | | trunc_tindirect(inode,sb->sv_ind2_size,&inode->u.sysv_i.i_data[12],0,&inode->i_dirt); |
sb | 51 | fs/umsdos/inode.c | void UMSDOS_put_super(struct super_block *sb) |
sb | 53 | fs/umsdos/inode.c | msdos_put_super(sb); |
sb | 58 | fs/umsdos/inode.c | void UMSDOS_statfs(struct super_block *sb,struct statfs *buf, int bufsiz) |
sb | 60 | fs/umsdos/inode.c | fat_statfs(sb,buf,bufsiz); |
sb | 401 | fs/umsdos/inode.c | struct super_block *sb; |
sb | 403 | fs/umsdos/inode.c | sb = msdos_read_super(s,data,silent); |
sb | 406 | fs/umsdos/inode.c | if (sb != NULL){ |
sb | 407 | fs/umsdos/inode.c | MSDOS_SB(sb)->options.dotsOK = 0; /* disable hidden==dotfile */ |
sb | 408 | fs/umsdos/inode.c | sb->s_op = &umsdos_sops; |
sb | 409 | fs/umsdos/inode.c | PRINTK (("umsdos_read_super %p\n",sb->s_mounted)); |
sb | 410 | fs/umsdos/inode.c | umsdos_setup_dir_inode (sb->s_mounted); |
sb | 446 | fs/umsdos/inode.c | if (umsdos_real_lookup (sb->s_mounted,UMSDOS_PSDROOT_NAME |
sb | 493 | fs/umsdos/inode.c | return sb; |
sb | 61 | fs/vfat/namei.c | void vfat_put_super(struct super_block *sb) |
sb | 63 | fs/vfat/namei.c | fat_put_super(sb); |
sb | 130 | fs/vfat/namei.c | struct super_block *vfat_read_super(struct super_block *sb,void *data, |
sb | 137 | fs/vfat/namei.c | sb->s_op = &vfat_sops; |
sb | 138 | fs/vfat/namei.c | res = fat_read_super(sb, data, silent); |
sb | 140 | fs/vfat/namei.c | sb->s_dev = 0; |
sb | 145 | fs/vfat/namei.c | if (!parse_options((char *) data, &(MSDOS_SB(sb)->options))) { |
sb | 148 | fs/vfat/namei.c | MSDOS_SB(sb)->options.isvfat = 1; |
sb | 149 | fs/vfat/namei.c | MSDOS_SB(sb)->options.dotsOK = 0; |
sb | 182 | fs/vfat/namei.c | static void dump_fat(struct super_block *sb,int start) |
sb | 187 | fs/vfat/namei.c | start = fat_access(sb,start,-1); |
sb | 544 | fs/vfat/namei.c | struct super_block *sb = dir->i_sb; |
sb | 565 | fs/vfat/namei.c | inode = iget(sb,ino); |
sb | 805 | fs/vfat/namei.c | struct super_block *sb = dir->i_sb; |
sb | 823 | fs/vfat/namei.c | vf.posix = MSDOS_SB(sb)->options.posixfs; |
sb | 982 | fs/vfat/namei.c | struct super_block *sb = dir->i_sb; |
sb | 1041 | fs/vfat/namei.c | struct super_block *sb = dir->i_sb; |
sb | 1085 | fs/vfat/namei.c | struct super_block *sb = dir->i_sb; |
sb | 1124 | fs/vfat/namei.c | struct super_block *sb = dir->i_sb; |
sb | 1154 | fs/vfat/namei.c | struct super_block *sb = dir->i_sb; |
sb | 1188 | fs/vfat/namei.c | struct super_block *sb = dir->i_sb; |
sb | 1212 | fs/vfat/namei.c | struct super_block *sb = dir->i_sb; |
sb | 1245 | fs/vfat/namei.c | struct super_block *sb = dir->i_sb; |
sb | 1288 | fs/vfat/namei.c | struct super_block *sb = dir->i_sb; |
sb | 1355 | fs/vfat/namei.c | struct super_block *sb = old_dir->i_sb; |
sb | 91 | fs/xiafs/bitmap.c | #define get_imap_zone(sb, bit_nr, not_que) \ |
sb | 92 | fs/xiafs/bitmap.c | get__map_zone((sb), (sb)->u.xiafs_sb.s_imap_buf, \ |
sb | 93 | fs/xiafs/bitmap.c | (sb)->u.xiafs_sb.s_imap_iznr, \ |
sb | 94 | fs/xiafs/bitmap.c | (sb)->u.xiafs_sb.s_imap_cached, 1, \ |
sb | 95 | fs/xiafs/bitmap.c | (sb)->u.xiafs_sb.s_imap_zones, _XIAFS_IMAP_SLOTS, \ |
sb | 98 | fs/xiafs/bitmap.c | #define get_zmap_zone(sb, bit_nr, not_que) \ |
sb | 99 | fs/xiafs/bitmap.c | get__map_zone((sb), (sb)->u.xiafs_sb.s_zmap_buf, \ |
sb | 100 | fs/xiafs/bitmap.c | (sb)->u.xiafs_sb.s_zmap_zznr, \ |
sb | 101 | fs/xiafs/bitmap.c | (sb)->u.xiafs_sb.s_zmap_cached, \ |
sb | 102 | fs/xiafs/bitmap.c | 1+(sb)->u.xiafs_sb.s_imap_zones, \ |
sb | 103 | fs/xiafs/bitmap.c | (sb)->u.xiafs_sb.s_zmap_zones, _XIAFS_ZMAP_SLOTS, \ |
sb | 107 | fs/xiafs/bitmap.c | get__map_zone(struct super_block *sb, struct buffer_head * bmap_buf[], |
sb | 114 | fs/xiafs/bitmap.c | z_nr = bit_nr >> XIAFS_BITS_PER_Z_BITS(sb); |
sb | 121 | fs/xiafs/bitmap.c | lock_super(sb); |
sb | 134 | fs/xiafs/bitmap.c | tmp_bh=bread(sb->s_dev, z_nr+first_zone, XIAFS_ZSIZE(sb)); /* cache not hit */ |
sb | 137 | fs/xiafs/bitmap.c | unlock_super(sb); |
sb | 150 | fs/xiafs/bitmap.c | #define xiafs_unlock_super(sb, cache) if (cache) unlock_super(sb); |
sb | 152 | fs/xiafs/bitmap.c | #define get_free_ibit(sb, prev_bit) \ |
sb | 153 | fs/xiafs/bitmap.c | get_free__bit(sb, sb->u.xiafs_sb.s_imap_buf, \ |
sb | 154 | fs/xiafs/bitmap.c | sb->u.xiafs_sb.s_imap_iznr, \ |
sb | 155 | fs/xiafs/bitmap.c | sb->u.xiafs_sb.s_imap_cached, \ |
sb | 156 | fs/xiafs/bitmap.c | 1, sb->u.xiafs_sb.s_imap_zones, \ |
sb | 159 | fs/xiafs/bitmap.c | #define get_free_zbit(sb, prev_bit) \ |
sb | 160 | fs/xiafs/bitmap.c | get_free__bit(sb, sb->u.xiafs_sb.s_zmap_buf, \ |
sb | 161 | fs/xiafs/bitmap.c | sb->u.xiafs_sb.s_zmap_zznr, \ |
sb | 162 | fs/xiafs/bitmap.c | sb->u.xiafs_sb.s_zmap_cached, \ |
sb | 163 | fs/xiafs/bitmap.c | 1 + sb->u.xiafs_sb.s_imap_zones, \ |
sb | 164 | fs/xiafs/bitmap.c | sb->u.xiafs_sb.s_zmap_zones, \ |
sb | 168 | fs/xiafs/bitmap.c | get_free__bit(struct super_block *sb, struct buffer_head * bmap_buf[], |
sb | 177 | fs/xiafs/bitmap.c | total_bits=bmap_zones << XIAFS_BITS_PER_Z_BITS(sb); |
sb | 181 | fs/xiafs/bitmap.c | end_bit=XIAFS_BITS_PER_Z(sb); |
sb | 195 | fs/xiafs/bitmap.c | bh = get__map_zone(sb, bmap_buf, bznr, cache, first_zone, |
sb | 202 | fs/xiafs/bitmap.c | xiafs_unlock_super(sb, sb->u.xiafs_sb.s_zmap_cached); |
sb | 210 | fs/xiafs/bitmap.c | xiafs_unlock_super(sb, cache); |
sb | 211 | fs/xiafs/bitmap.c | return (pos & ~(XIAFS_BITS_PER_Z(sb)-1))+tmp; |
sb | 214 | fs/xiafs/bitmap.c | void xiafs_free_zone(struct super_block * sb, int d_addr) |
sb | 219 | fs/xiafs/bitmap.c | if (!sb) { |
sb | 223 | fs/xiafs/bitmap.c | if (d_addr < sb->u.xiafs_sb.s_firstdatazone || |
sb | 224 | fs/xiafs/bitmap.c | d_addr >= sb->u.xiafs_sb.s_nzones) { |
sb | 228 | fs/xiafs/bitmap.c | bh = get_hash_table(sb->s_dev, d_addr, XIAFS_ZSIZE(sb)); |
sb | 232 | fs/xiafs/bitmap.c | bit=d_addr - sb->u.xiafs_sb.s_firstdatazone + 1; |
sb | 233 | fs/xiafs/bitmap.c | bh = get_zmap_zone(sb, bit, NULL); |
sb | 236 | fs/xiafs/bitmap.c | offset = bit & (XIAFS_BITS_PER_Z(sb) -1); |
sb | 240 | fs/xiafs/bitmap.c | kdevname(sb->s_dev), bit, bit, WHERE_ERR); |
sb | 242 | fs/xiafs/bitmap.c | xiafs_unlock_super(sb, sb->u.xiafs_sb.s_zmap_cached); |
sb | 245 | fs/xiafs/bitmap.c | int xiafs_new_zone(struct super_block * sb, u_long prev_addr) |
sb | 250 | fs/xiafs/bitmap.c | if (!sb) { |
sb | 254 | fs/xiafs/bitmap.c | if (prev_addr < sb->u.xiafs_sb.s_firstdatazone || |
sb | 255 | fs/xiafs/bitmap.c | prev_addr >= sb->u.xiafs_sb.s_nzones) { |
sb | 256 | fs/xiafs/bitmap.c | prev_addr=sb->u.xiafs_sb.s_firstdatazone; |
sb | 258 | fs/xiafs/bitmap.c | prev_znr=prev_addr-sb->u.xiafs_sb.s_firstdatazone+1; |
sb | 259 | fs/xiafs/bitmap.c | tmp=get_free_zbit(sb, prev_znr); |
sb | 262 | fs/xiafs/bitmap.c | tmp += sb->u.xiafs_sb.s_firstdatazone -1; |
sb | 263 | fs/xiafs/bitmap.c | if (!(bh = getblk(sb->s_dev, tmp, XIAFS_ZSIZE(sb)))) { |
sb | 281 | fs/xiafs/bitmap.c | struct super_block * sb; |
sb | 292 | fs/xiafs/bitmap.c | sb = inode->i_sb; |
sb | 294 | fs/xiafs/bitmap.c | bh = get_imap_zone(sb, ino, NULL); |
sb | 298 | fs/xiafs/bitmap.c | if (!clear_bit(ino & (XIAFS_BITS_PER_Z(sb)-1), bh->b_data)) |
sb | 303 | fs/xiafs/bitmap.c | xiafs_unlock_super(sb, sb->u.xiafs_sb.s_imap_cached); |
sb | 308 | fs/xiafs/bitmap.c | struct super_block * sb; |
sb | 312 | fs/xiafs/bitmap.c | sb = dir->i_sb; |
sb | 315 | fs/xiafs/bitmap.c | inode->i_sb = sb; |
sb | 318 | fs/xiafs/bitmap.c | tmp=get_free_ibit(sb, dir->i_ino); |
sb | 325 | fs/xiafs/bitmap.c | inode->i_dev = sb->s_dev; |
sb | 353 | fs/xiafs/bitmap.c | unsigned long xiafs_count_free_inodes(struct super_block *sb) |
sb | 360 | fs/xiafs/bitmap.c | izones=sb->u.xiafs_sb.s_imap_zones; |
sb | 362 | fs/xiafs/bitmap.c | bh=get_imap_zone(sb, i << XIAFS_BITS_PER_Z_BITS(sb), ¬_que); |
sb | 365 | fs/xiafs/bitmap.c | xiafs_unlock_super(sb, sb->u.xiafs_sb.s_imap_cached); |
sb | 368 | fs/xiafs/bitmap.c | i=izones << XIAFS_BITS_PER_Z_BITS(sb); |
sb | 372 | fs/xiafs/bitmap.c | unsigned long xiafs_count_free_zones(struct super_block *sb) |
sb | 379 | fs/xiafs/bitmap.c | zzones=sb->u.xiafs_sb.s_zmap_zones; |
sb | 381 | fs/xiafs/bitmap.c | bh=get_zmap_zone(sb, i << XIAFS_BITS_PER_Z_BITS(sb), ¬_que); |
sb | 384 | fs/xiafs/bitmap.c | xiafs_unlock_super(sb, sb->u.xiafs_sb.s_zmap_cached); |
sb | 387 | fs/xiafs/bitmap.c | i=zzones << XIAFS_BITS_PER_Z_BITS(sb); |
sb | 37 | fs/xiafs/inode.c | void xiafs_put_super(struct super_block *sb) |
sb | 41 | fs/xiafs/inode.c | lock_super(sb); |
sb | 42 | fs/xiafs/inode.c | sb->s_dev = 0; |
sb | 44 | fs/xiafs/inode.c | brelse(sb->u.xiafs_sb.s_imap_buf[i]); |
sb | 46 | fs/xiafs/inode.c | brelse(sb->u.xiafs_sb.s_zmap_buf[i]); |
sb | 47 | fs/xiafs/inode.c | unlock_super(sb); |
sb | 169 | fs/xiafs/inode.c | void xiafs_statfs(struct super_block *sb, struct statfs *buf, int bufsiz) |
sb | 174 | fs/xiafs/inode.c | tmp.f_bsize = XIAFS_ZSIZE(sb); |
sb | 175 | fs/xiafs/inode.c | tmp.f_blocks = sb->u.xiafs_sb.s_ndatazones; |
sb | 176 | fs/xiafs/inode.c | tmp.f_bfree = xiafs_count_free_zones(sb); |
sb | 178 | fs/xiafs/inode.c | tmp.f_files = sb->u.xiafs_sb.s_ninodes; |
sb | 179 | fs/xiafs/inode.c | tmp.f_ffree = xiafs_count_free_inodes(sb); |
sb | 292 | include/linux/ext2_fs.h | #define test_opt(sb, opt) ((sb)->u.ext2_sb.s_mount_opt & \ |
sb | 80 | include/linux/ext_fs.h | extern unsigned long ext_count_free_inodes(struct super_block *sb); |
sb | 81 | include/linux/ext_fs.h | extern int ext_new_block(struct super_block * sb); |
sb | 82 | include/linux/ext_fs.h | extern void ext_free_block(struct super_block * sb, int block); |
sb | 83 | include/linux/ext_fs.h | extern unsigned long ext_count_free_blocks(struct super_block *sb); |
sb | 571 | include/linux/fs.h | extern struct inode * __iget(struct super_block * sb,int nr,int crsmnt); |
sb | 634 | include/linux/fs.h | extern inline struct inode * iget(struct super_block * sb,int nr) |
sb | 636 | include/linux/fs.h | return __iget(sb, nr, 1); |
sb | 171 | include/linux/iso_fs.h | extern unsigned long isofs_count_free_inodes(struct super_block *sb); |
sb | 45 | include/linux/locks.h | extern inline void wait_on_super(struct super_block * sb) |
sb | 47 | include/linux/locks.h | if (sb->s_lock) |
sb | 48 | include/linux/locks.h | __wait_on_super(sb); |
sb | 51 | include/linux/locks.h | extern inline void lock_super(struct super_block * sb) |
sb | 53 | include/linux/locks.h | if (sb->s_lock) |
sb | 54 | include/linux/locks.h | __wait_on_super(sb); |
sb | 55 | include/linux/locks.h | sb->s_lock = 1; |
sb | 58 | include/linux/locks.h | extern inline void unlock_super(struct super_block * sb) |
sb | 60 | include/linux/locks.h | sb->s_lock = 0; |
sb | 61 | include/linux/locks.h | wake_up(&sb->s_wait); |
sb | 106 | include/linux/minix_fs.h | extern unsigned long minix_count_free_inodes(struct super_block *sb); |
sb | 107 | include/linux/minix_fs.h | extern int minix_new_block(struct super_block * sb); |
sb | 108 | include/linux/minix_fs.h | extern void minix_free_block(struct super_block * sb, int block); |
sb | 109 | include/linux/minix_fs.h | extern unsigned long minix_count_free_blocks(struct super_block *sb); |
sb | 121 | include/linux/minix_fs.h | extern int minix_remount (struct super_block * sb, int * flags, char * data); |
sb | 174 | include/linux/msdos_fs.h | extern void lock_fat(struct super_block *sb); |
sb | 175 | include/linux/msdos_fs.h | extern void unlock_fat(struct super_block *sb); |
sb | 190 | include/linux/msdos_fs.h | extern int fat_access(struct super_block *sb,int nr,int new_value); |
sb | 204 | include/linux/msdos_fs.h | extern void fat_put_super(struct super_block *sb); |
sb | 207 | include/linux/msdos_fs.h | extern void msdos_put_super(struct super_block *sb); |
sb | 208 | include/linux/msdos_fs.h | extern void fat_statfs(struct super_block *sb,struct statfs *buf, int); |
sb | 241 | include/linux/msdos_fs.h | extern struct super_block *msdos_read_super(struct super_block *sb,void *data, int silent); |
sb | 74 | include/linux/ncp_fs.h | #define NCP_SBP(sb) ((struct ncp_server *)((sb)->u.generic_sbp)) |
sb | 147 | include/linux/ncp_fs.h | struct super_block *ncp_read_super(struct super_block *sb, |
sb | 105 | include/linux/nfs_fs.h | extern struct super_block *nfs_read_super(struct super_block *sb, |
sb | 108 | include/linux/nfs_fs.h | extern struct inode *nfs_fhget(struct super_block *sb, struct nfs_fh *fhandle, |
sb | 134 | include/linux/nfs_fs.h | extern int nfs_root_mount(struct super_block *sb); |
sb | 42 | include/linux/smb_fs.h | #define SMB_SBP(sb) ((struct smb_sb_info *)(sb->u.generic_sbp)) |
sb | 115 | include/linux/smb_fs.h | struct super_block *smb_read_super(struct super_block *sb, |
sb | 340 | include/linux/sysv_fs.h | sv_get_hash_table (struct super_block *sb, kdev_t dev, unsigned int block) |
sb | 342 | include/linux/sysv_fs.h | return get_hash_table (dev, block + sb->sv_block_base, sb->sv_block_size); |
sb | 347 | include/linux/sysv_fs.h | sv_getblk (struct super_block *sb, kdev_t dev, unsigned int block) |
sb | 349 | include/linux/sysv_fs.h | return getblk (dev, block + sb->sv_block_base, sb->sv_block_size); |
sb | 354 | include/linux/sysv_fs.h | sv_bread (struct super_block *sb, kdev_t dev, unsigned int block) |
sb | 356 | include/linux/sysv_fs.h | return bread (dev, block + sb->sv_block_base, sb->sv_block_size); |
sb | 379 | include/linux/sysv_fs.h | extern unsigned long sysv_count_free_inodes(struct super_block *sb); |
sb | 380 | include/linux/sysv_fs.h | extern int sysv_new_block(struct super_block * sb); |
sb | 381 | include/linux/sysv_fs.h | extern void sysv_free_block(struct super_block * sb, unsigned int block); |
sb | 382 | include/linux/sysv_fs.h | extern unsigned long sysv_count_free_blocks(struct super_block *sb); |
sb | 85 | include/linux/xia_fs.h | extern unsigned long xiafs_count_free_inodes(struct super_block *sb); |
sb | 86 | include/linux/xia_fs.h | extern int xiafs_new_zone(struct super_block * sb, u_long prev_addr); |
sb | 87 | include/linux/xia_fs.h | extern void xiafs_free_zone(struct super_block * sb, int block); |
sb | 88 | include/linux/xia_fs.h | extern unsigned long xiafs_count_free_zones(struct super_block *sb); |