tag | line | file | source code |
sb | 42 | arch/i386/boot/compressed/xtract.c | struct stat sb; |
sb | 94 | arch/i386/boot/tools/build.c | struct stat sb; |
sb | 101 | arch/i386/boot/tools/build.c | if (stat("/", &sb)) { |
sb | 105 | arch/i386/boot/tools/build.c | major_root = major(sb.st_dev); |
sb | 106 | arch/i386/boot/tools/build.c | minor_root = minor(sb.st_dev); |
sb | 108 | arch/i386/boot/tools/build.c | if (stat(argv[4], &sb)) { |
sb | 112 | arch/i386/boot/tools/build.c | major_root = major(sb.st_rdev); |
sb | 113 | arch/i386/boot/tools/build.c | minor_root = minor(sb.st_rdev); |
sb | 107 | drivers/block/ramdisk.c | } sb; |
sb | 109 | drivers/block/ramdisk.c | (struct minix_super_block *)&sb; |
sb | 111 | drivers/block/ramdisk.c | (struct ext2_super_block *)&sb; |
sb | 134 | drivers/block/ramdisk.c | *((struct super_block *) &sb) = |
sb | 778 | drivers/char/tpqic02.c | static int send_qic02_data(char sb[], unsigned size, int ignore_ex) |
sb | 788 | drivers/char/tpqic02.c | stat = notify_cmd(sb[i], ignore_ex); |
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 | 33 | fs/ext/inode.c | void ext_put_super(struct super_block *sb) |
sb | 36 | fs/ext/inode.c | lock_super(sb); |
sb | 37 | fs/ext/inode.c | sb->s_dev = 0; |
sb | 38 | fs/ext/inode.c | if (sb->u.ext_sb.s_firstfreeinodeblock) |
sb | 39 | fs/ext/inode.c | brelse (sb->u.ext_sb.s_firstfreeinodeblock); |
sb | 40 | fs/ext/inode.c | if (sb->u.ext_sb.s_firstfreeblock) |
sb | 41 | fs/ext/inode.c | brelse (sb->u.ext_sb.s_firstfreeblock); |
sb | 42 | fs/ext/inode.c | unlock_super(sb); |
sb | 128 | fs/ext/inode.c | void ext_write_super (struct super_block *sb) |
sb | 133 | fs/ext/inode.c | if (!(bh = bread(sb->s_dev, 1, BLOCK_SIZE))) { |
sb | 138 | fs/ext/inode.c | es->s_firstfreeblock = sb->u.ext_sb.s_firstfreeblocknumber; |
sb | 139 | fs/ext/inode.c | es->s_freeblockscount = sb->u.ext_sb.s_freeblockscount; |
sb | 140 | fs/ext/inode.c | es->s_firstfreeinode = sb->u.ext_sb.s_firstfreeinodenumber; |
sb | 141 | fs/ext/inode.c | es->s_freeinodescount = sb->u.ext_sb.s_freeinodescount; |
sb | 144 | fs/ext/inode.c | sb->s_dirt = 0; |
sb | 147 | fs/ext/inode.c | void ext_statfs (struct super_block *sb, struct statfs *buf) |
sb | 153 | fs/ext/inode.c | put_fs_long(sb->u.ext_sb.s_nzones << sb->u.ext_sb.s_log_zone_size, |
sb | 155 | fs/ext/inode.c | tmp = ext_count_free_blocks(sb); |
sb | 158 | fs/ext/inode.c | put_fs_long(sb->u.ext_sb.s_ninodes, &buf->f_files); |
sb | 159 | fs/ext/inode.c | put_fs_long(ext_count_free_inodes(sb), &buf->f_ffree); |
sb | 37 | fs/ext2/balloc.c | static struct ext2_group_desc * get_group_desc (struct super_block * sb, |
sb | 45 | fs/ext2/balloc.c | if (block_group >= sb->u.ext2_sb.s_groups_count) |
sb | 46 | fs/ext2/balloc.c | ext2_panic (sb, "get_group_desc", |
sb | 49 | fs/ext2/balloc.c | block_group, sb->u.ext2_sb.s_groups_count); |
sb | 51 | fs/ext2/balloc.c | group_desc = block_group / EXT2_DESC_PER_BLOCK(sb); |
sb | 52 | fs/ext2/balloc.c | desc = block_group % EXT2_DESC_PER_BLOCK(sb); |
sb | 53 | fs/ext2/balloc.c | if (!sb->u.ext2_sb.s_group_desc[group_desc]) |
sb | 54 | fs/ext2/balloc.c | ext2_panic (sb, "get_group_desc", |
sb | 59 | fs/ext2/balloc.c | sb->u.ext2_sb.s_group_desc[group_desc]->b_data; |
sb | 61 | fs/ext2/balloc.c | *bh = sb->u.ext2_sb.s_group_desc[group_desc]; |
sb | 65 | fs/ext2/balloc.c | static void read_block_bitmap (struct super_block * sb, |
sb | 72 | fs/ext2/balloc.c | gdp = get_group_desc (sb, block_group, NULL); |
sb | 73 | fs/ext2/balloc.c | bh = bread (sb->s_dev, gdp->bg_block_bitmap, sb->s_blocksize); |
sb | 75 | fs/ext2/balloc.c | ext2_panic (sb, "read_block_bitmap", |
sb | 79 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap_number[bitmap_nr] = block_group; |
sb | 80 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap[bitmap_nr] = bh; |
sb | 94 | fs/ext2/balloc.c | static int load__block_bitmap (struct super_block * sb, |
sb | 101 | fs/ext2/balloc.c | if (block_group >= sb->u.ext2_sb.s_groups_count) |
sb | 102 | fs/ext2/balloc.c | ext2_panic (sb, "load_block_bitmap", |
sb | 105 | fs/ext2/balloc.c | block_group, sb->u.ext2_sb.s_groups_count); |
sb | 107 | fs/ext2/balloc.c | if (sb->u.ext2_sb.s_groups_count <= EXT2_MAX_GROUP_LOADED) { |
sb | 108 | fs/ext2/balloc.c | if (sb->u.ext2_sb.s_block_bitmap[block_group]) { |
sb | 109 | fs/ext2/balloc.c | if (sb->u.ext2_sb.s_block_bitmap_number[block_group] != |
sb | 111 | fs/ext2/balloc.c | ext2_panic (sb, "load_block_bitmap", |
sb | 116 | fs/ext2/balloc.c | read_block_bitmap (sb, block_group, block_group); |
sb | 121 | fs/ext2/balloc.c | for (i = 0; i < sb->u.ext2_sb.s_loaded_block_bitmaps && |
sb | 122 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap_number[i] != block_group; i++) |
sb | 124 | fs/ext2/balloc.c | if (i < sb->u.ext2_sb.s_loaded_block_bitmaps && |
sb | 125 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap_number[i] == block_group) { |
sb | 126 | fs/ext2/balloc.c | block_bitmap_number = sb->u.ext2_sb.s_block_bitmap_number[i]; |
sb | 127 | fs/ext2/balloc.c | block_bitmap = sb->u.ext2_sb.s_block_bitmap[i]; |
sb | 129 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap_number[j] = |
sb | 130 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap_number[j - 1]; |
sb | 131 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap[j] = |
sb | 132 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap[j - 1]; |
sb | 134 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap_number[0] = block_bitmap_number; |
sb | 135 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap[0] = block_bitmap; |
sb | 137 | fs/ext2/balloc.c | if (sb->u.ext2_sb.s_loaded_block_bitmaps < EXT2_MAX_GROUP_LOADED) |
sb | 138 | fs/ext2/balloc.c | sb->u.ext2_sb.s_loaded_block_bitmaps++; |
sb | 140 | fs/ext2/balloc.c | brelse (sb->u.ext2_sb.s_block_bitmap[EXT2_MAX_GROUP_LOADED - 1]); |
sb | 141 | fs/ext2/balloc.c | for (j = sb->u.ext2_sb.s_loaded_block_bitmaps - 1; j > 0; j--) { |
sb | 142 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap_number[j] = |
sb | 143 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap_number[j - 1]; |
sb | 144 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap[j] = |
sb | 145 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap[j - 1]; |
sb | 147 | fs/ext2/balloc.c | read_block_bitmap (sb, block_group, 0); |
sb | 152 | fs/ext2/balloc.c | static inline int load_block_bitmap (struct super_block * sb, |
sb | 155 | fs/ext2/balloc.c | if (sb->u.ext2_sb.s_loaded_block_bitmaps > 0 && |
sb | 156 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap_number[0] == block_group) |
sb | 159 | fs/ext2/balloc.c | if (sb->u.ext2_sb.s_groups_count <= EXT2_MAX_GROUP_LOADED && |
sb | 160 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap_number[block_group] == block_group && |
sb | 161 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap[block_group]) |
sb | 164 | fs/ext2/balloc.c | return load__block_bitmap (sb, block_group); |
sb | 167 | fs/ext2/balloc.c | void ext2_free_blocks (struct super_block * sb, unsigned long block, |
sb | 179 | fs/ext2/balloc.c | if (!sb) { |
sb | 183 | fs/ext2/balloc.c | lock_super (sb); |
sb | 184 | fs/ext2/balloc.c | es = sb->u.ext2_sb.s_es; |
sb | 187 | fs/ext2/balloc.c | ext2_error (sb, "ext2_free_blocks", |
sb | 190 | fs/ext2/balloc.c | unlock_super (sb); |
sb | 197 | fs/ext2/balloc.c | EXT2_BLOCKS_PER_GROUP(sb); |
sb | 198 | fs/ext2/balloc.c | bit = (block - es->s_first_data_block) % EXT2_BLOCKS_PER_GROUP(sb); |
sb | 199 | fs/ext2/balloc.c | if (bit + count > EXT2_BLOCKS_PER_GROUP(sb)) |
sb | 200 | fs/ext2/balloc.c | ext2_panic (sb, "ext2_free_blocks", |
sb | 204 | fs/ext2/balloc.c | bitmap_nr = load_block_bitmap (sb, block_group); |
sb | 205 | fs/ext2/balloc.c | bh = sb->u.ext2_sb.s_block_bitmap[bitmap_nr]; |
sb | 206 | fs/ext2/balloc.c | gdp = get_group_desc (sb, block_group, &bh2); |
sb | 208 | fs/ext2/balloc.c | if (test_opt (sb, CHECK_STRICT) && |
sb | 212 | fs/ext2/balloc.c | sb->u.ext2_sb.s_itb_per_group) || |
sb | 214 | fs/ext2/balloc.c | sb->u.ext2_sb.s_itb_per_group))) |
sb | 215 | fs/ext2/balloc.c | ext2_panic (sb, "ext2_free_blocks", |
sb | 222 | fs/ext2/balloc.c | ext2_warning (sb, "ext2_free_blocks", |
sb | 232 | fs/ext2/balloc.c | mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1); |
sb | 235 | fs/ext2/balloc.c | if (sb->s_flags & MS_SYNCHRONOUS) { |
sb | 239 | fs/ext2/balloc.c | sb->s_dirt = 1; |
sb | 240 | fs/ext2/balloc.c | unlock_super (sb); |
sb | 251 | fs/ext2/balloc.c | int ext2_new_block (struct super_block * sb, unsigned long goal, |
sb | 267 | fs/ext2/balloc.c | if (!sb) { |
sb | 271 | fs/ext2/balloc.c | lock_super (sb); |
sb | 272 | fs/ext2/balloc.c | es = sb->u.ext2_sb.s_es; |
sb | 274 | fs/ext2/balloc.c | (!fsuser() && (sb->u.ext2_sb.s_resuid != current->fsuid) && |
sb | 275 | fs/ext2/balloc.c | (sb->u.ext2_sb.s_resgid == 0 || |
sb | 276 | fs/ext2/balloc.c | !in_group_p (sb->u.ext2_sb.s_resgid)))) { |
sb | 277 | fs/ext2/balloc.c | unlock_super (sb); |
sb | 289 | fs/ext2/balloc.c | i = (goal - es->s_first_data_block) / EXT2_BLOCKS_PER_GROUP(sb); |
sb | 290 | fs/ext2/balloc.c | gdp = get_group_desc (sb, i, &bh2); |
sb | 292 | fs/ext2/balloc.c | j = ((goal - es->s_first_data_block) % EXT2_BLOCKS_PER_GROUP(sb)); |
sb | 297 | fs/ext2/balloc.c | bitmap_nr = load_block_bitmap (sb, i); |
sb | 298 | fs/ext2/balloc.c | bh = sb->u.ext2_sb.s_block_bitmap[bitmap_nr]; |
sb | 316 | fs/ext2/balloc.c | if (j < EXT2_BLOCKS_PER_GROUP(sb) - 32) |
sb | 323 | fs/ext2/balloc.c | if ((j + k) < EXT2_BLOCKS_PER_GROUP(sb)) { |
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 | 403 | fs/ext2/balloc.c | tmp = j + i * EXT2_BLOCKS_PER_GROUP(sb) + es->s_first_data_block; |
sb | 405 | fs/ext2/balloc.c | if (test_opt (sb, CHECK_STRICT) && |
sb | 408 | fs/ext2/balloc.c | in_range (tmp, gdp->bg_inode_table, sb->u.ext2_sb.s_itb_per_group))) |
sb | 409 | fs/ext2/balloc.c | ext2_panic (sb, "ext2_new_block", |
sb | 414 | fs/ext2/balloc.c | ext2_warning (sb, "ext2_new_block", |
sb | 429 | fs/ext2/balloc.c | k < 8 && (j + k) < EXT2_BLOCKS_PER_GROUP(sb); k++) { |
sb | 444 | fs/ext2/balloc.c | if (sb->s_flags & MS_SYNCHRONOUS) { |
sb | 450 | fs/ext2/balloc.c | ext2_error (sb, "ext2_new_block", |
sb | 453 | fs/ext2/balloc.c | unlock_super (sb); |
sb | 456 | fs/ext2/balloc.c | if (!(bh = getblk (sb->s_dev, j, sb->s_blocksize))) { |
sb | 457 | fs/ext2/balloc.c | ext2_error (sb, "ext2_new_block", "cannot get block %d", j); |
sb | 458 | fs/ext2/balloc.c | unlock_super (sb); |
sb | 461 | fs/ext2/balloc.c | memset(bh->b_data, 0, sb->s_blocksize); |
sb | 472 | fs/ext2/balloc.c | mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1); |
sb | 473 | fs/ext2/balloc.c | sb->s_dirt = 1; |
sb | 474 | fs/ext2/balloc.c | unlock_super (sb); |
sb | 478 | fs/ext2/balloc.c | unsigned long ext2_count_free_blocks (struct super_block * sb) |
sb | 487 | fs/ext2/balloc.c | lock_super (sb); |
sb | 488 | fs/ext2/balloc.c | es = sb->u.ext2_sb.s_es; |
sb | 492 | fs/ext2/balloc.c | for (i = 0; i < sb->u.ext2_sb.s_groups_count; i++) { |
sb | 493 | fs/ext2/balloc.c | gdp = get_group_desc (sb, i, NULL); |
sb | 495 | fs/ext2/balloc.c | bitmap_nr = load_block_bitmap (sb, i); |
sb | 496 | fs/ext2/balloc.c | x = ext2_count_free (sb->u.ext2_sb.s_block_bitmap[bitmap_nr], |
sb | 497 | fs/ext2/balloc.c | sb->s_blocksize); |
sb | 504 | fs/ext2/balloc.c | unlock_super (sb); |
sb | 507 | fs/ext2/balloc.c | return sb->u.ext2_sb.s_es->s_free_blocks_count; |
sb | 512 | fs/ext2/balloc.c | struct super_block * sb, |
sb | 515 | fs/ext2/balloc.c | return test_bit ((block - sb->u.ext2_sb.s_es->s_first_data_block) % |
sb | 516 | fs/ext2/balloc.c | EXT2_BLOCKS_PER_GROUP(sb), map); |
sb | 519 | fs/ext2/balloc.c | void ext2_check_blocks_bitmap (struct super_block * sb) |
sb | 529 | fs/ext2/balloc.c | lock_super (sb); |
sb | 530 | fs/ext2/balloc.c | es = sb->u.ext2_sb.s_es; |
sb | 534 | fs/ext2/balloc.c | desc_blocks = (sb->u.ext2_sb.s_groups_count + EXT2_DESC_PER_BLOCK(sb) - 1) / |
sb | 535 | fs/ext2/balloc.c | EXT2_DESC_PER_BLOCK(sb); |
sb | 536 | fs/ext2/balloc.c | for (i = 0; i < sb->u.ext2_sb.s_groups_count; i++) { |
sb | 537 | fs/ext2/balloc.c | gdp = get_group_desc (sb, i, NULL); |
sb | 539 | fs/ext2/balloc.c | bitmap_nr = load_block_bitmap (sb, i); |
sb | 540 | fs/ext2/balloc.c | bh = sb->u.ext2_sb.s_block_bitmap[bitmap_nr]; |
sb | 543 | fs/ext2/balloc.c | ext2_error (sb, "ext2_check_blocks_bitmap", |
sb | 548 | fs/ext2/balloc.c | ext2_error (sb, "ext2_check_blocks_bitmap", |
sb | 552 | fs/ext2/balloc.c | if (!block_in_use (gdp->bg_block_bitmap, sb, bh->b_data)) |
sb | 553 | fs/ext2/balloc.c | ext2_error (sb, "ext2_check_blocks_bitmap", |
sb | 557 | fs/ext2/balloc.c | if (!block_in_use (gdp->bg_inode_bitmap, sb, bh->b_data)) |
sb | 558 | fs/ext2/balloc.c | ext2_error (sb, "ext2_check_blocks_bitmap", |
sb | 562 | fs/ext2/balloc.c | for (j = 0; j < sb->u.ext2_sb.s_itb_per_group; j++) |
sb | 563 | fs/ext2/balloc.c | if (!block_in_use (gdp->bg_inode_table + j, sb, bh->b_data)) |
sb | 564 | fs/ext2/balloc.c | ext2_error (sb, "ext2_check_blocks_bitmap", |
sb | 568 | fs/ext2/balloc.c | x = ext2_count_free (bh, sb->s_blocksize); |
sb | 570 | fs/ext2/balloc.c | ext2_error (sb, "ext2_check_blocks_bitmap", |
sb | 577 | fs/ext2/balloc.c | ext2_error (sb, "ext2_check_blocks_bitmap", |
sb | 581 | fs/ext2/balloc.c | unlock_super (sb); |
sb | 107 | fs/ext2/dir.c | struct super_block * sb; |
sb | 112 | fs/ext2/dir.c | sb = inode->i_sb; |
sb | 116 | fs/ext2/dir.c | offset = filp->f_pos & (sb->s_blocksize - 1); |
sb | 119 | fs/ext2/dir.c | blk = (filp->f_pos) >> EXT2_BLOCK_SIZE_BITS(sb); |
sb | 122 | fs/ext2/dir.c | filp->f_pos += sb->s_blocksize - offset; |
sb | 130 | fs/ext2/dir.c | for (i = 16 >> (EXT2_BLOCK_SIZE_BITS(sb) - 9), num = 0; |
sb | 151 | fs/ext2/dir.c | for (i = 0; i < sb->s_blocksize && i < offset; ) { |
sb | 165 | fs/ext2/dir.c | filp->f_pos = (filp->f_pos & ~(sb->s_blocksize - 1)) |
sb | 171 | fs/ext2/dir.c | && offset < sb->s_blocksize) { |
sb | 177 | fs/ext2/dir.c | filp->f_pos = (filp->f_pos & (sb->s_blocksize - 1)) |
sb | 178 | fs/ext2/dir.c | + sb->s_blocksize; |
sb | 89 | fs/ext2/file.c | struct super_block * sb; |
sb | 97 | fs/ext2/file.c | sb = inode->i_sb; |
sb | 99 | fs/ext2/file.c | ext2_warning (sb, "ext2_file_read", "mode = %07o", |
sb | 114 | fs/ext2/file.c | block = offset >> EXT2_BLOCK_SIZE_BITS(sb); |
sb | 115 | fs/ext2/file.c | offset &= (sb->s_blocksize - 1); |
sb | 116 | fs/ext2/file.c | size = (size + sb->s_blocksize - 1) >> EXT2_BLOCK_SIZE_BITS(sb); |
sb | 117 | fs/ext2/file.c | blocks = (left + offset + sb->s_blocksize - 1) >> EXT2_BLOCK_SIZE_BITS(sb); |
sb | 120 | fs/ext2/file.c | if (blocks < read_ahead[MAJOR(inode->i_dev)] >> (EXT2_BLOCK_SIZE_BITS(sb) - 9)) |
sb | 121 | fs/ext2/file.c | blocks = read_ahead[MAJOR(inode->i_dev)] >> (EXT2_BLOCK_SIZE_BITS(sb) - 9); |
sb | 190 | fs/ext2/file.c | if (left < sb->s_blocksize - offset) |
sb | 193 | fs/ext2/file.c | chars = sb->s_blocksize - offset; |
sb | 239 | fs/ext2/file.c | struct super_block * sb; |
sb | 248 | fs/ext2/file.c | sb = inode->i_sb; |
sb | 249 | fs/ext2/file.c | if (sb->s_flags & MS_RDONLY) |
sb | 256 | fs/ext2/file.c | ext2_warning (sb, "ext2_file_write", "mode = %07o", |
sb | 281 | fs/ext2/file.c | bh = ext2_getblk (inode, pos2 / sb->s_blocksize, 1, &err); |
sb | 287 | fs/ext2/file.c | c = sb->s_blocksize - (pos2 % sb->s_blocksize); |
sb | 290 | fs/ext2/file.c | if (c != sb->s_blocksize && !bh->b_uptodate) { |
sb | 300 | fs/ext2/file.c | p = (pos2 % sb->s_blocksize) + bh->b_data; |
sb | 36 | fs/ext2/ialloc.c | static struct ext2_group_desc * get_group_desc (struct super_block * sb, |
sb | 44 | fs/ext2/ialloc.c | if (block_group >= sb->u.ext2_sb.s_groups_count) |
sb | 45 | fs/ext2/ialloc.c | ext2_panic (sb, "get_group_desc", |
sb | 48 | fs/ext2/ialloc.c | block_group, sb->u.ext2_sb.s_groups_count); |
sb | 50 | fs/ext2/ialloc.c | group_desc = block_group / EXT2_DESC_PER_BLOCK(sb); |
sb | 51 | fs/ext2/ialloc.c | desc = block_group % EXT2_DESC_PER_BLOCK(sb); |
sb | 52 | fs/ext2/ialloc.c | if (!sb->u.ext2_sb.s_group_desc[group_desc]) |
sb | 53 | fs/ext2/ialloc.c | ext2_panic (sb, "get_group_desc", |
sb | 58 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_group_desc[group_desc]->b_data; |
sb | 60 | fs/ext2/ialloc.c | *bh = sb->u.ext2_sb.s_group_desc[group_desc]; |
sb | 64 | fs/ext2/ialloc.c | static void read_inode_bitmap (struct super_block * sb, |
sb | 71 | fs/ext2/ialloc.c | gdp = get_group_desc (sb, block_group, NULL); |
sb | 72 | fs/ext2/ialloc.c | bh = bread (sb->s_dev, gdp->bg_inode_bitmap, sb->s_blocksize); |
sb | 74 | fs/ext2/ialloc.c | ext2_panic (sb, "read_inode_bitmap", |
sb | 78 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap_number[bitmap_nr] = block_group; |
sb | 79 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap[bitmap_nr] = bh; |
sb | 93 | fs/ext2/ialloc.c | static int load_inode_bitmap (struct super_block * sb, |
sb | 100 | fs/ext2/ialloc.c | if (block_group >= sb->u.ext2_sb.s_groups_count) |
sb | 101 | fs/ext2/ialloc.c | ext2_panic (sb, "load_inode_bitmap", |
sb | 104 | fs/ext2/ialloc.c | block_group, sb->u.ext2_sb.s_groups_count); |
sb | 105 | fs/ext2/ialloc.c | if (sb->u.ext2_sb.s_loaded_inode_bitmaps > 0 && |
sb | 106 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap_number[0] == block_group) |
sb | 108 | fs/ext2/ialloc.c | if (sb->u.ext2_sb.s_groups_count <= EXT2_MAX_GROUP_LOADED) { |
sb | 109 | fs/ext2/ialloc.c | if (sb->u.ext2_sb.s_inode_bitmap[block_group]) { |
sb | 110 | fs/ext2/ialloc.c | if (sb->u.ext2_sb.s_inode_bitmap_number[block_group] != block_group) |
sb | 111 | fs/ext2/ialloc.c | ext2_panic (sb, "load_inode_bitmap", |
sb | 116 | fs/ext2/ialloc.c | read_inode_bitmap (sb, block_group, block_group); |
sb | 121 | fs/ext2/ialloc.c | for (i = 0; i < sb->u.ext2_sb.s_loaded_inode_bitmaps && |
sb | 122 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap_number[i] != block_group; |
sb | 125 | fs/ext2/ialloc.c | if (i < sb->u.ext2_sb.s_loaded_inode_bitmaps && |
sb | 126 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap_number[i] == block_group) { |
sb | 127 | fs/ext2/ialloc.c | inode_bitmap_number = sb->u.ext2_sb.s_inode_bitmap_number[i]; |
sb | 128 | fs/ext2/ialloc.c | inode_bitmap = sb->u.ext2_sb.s_inode_bitmap[i]; |
sb | 130 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap_number[j] = |
sb | 131 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap_number[j - 1]; |
sb | 132 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap[j] = |
sb | 133 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap[j - 1]; |
sb | 135 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap_number[0] = inode_bitmap_number; |
sb | 136 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap[0] = inode_bitmap; |
sb | 138 | fs/ext2/ialloc.c | if (sb->u.ext2_sb.s_loaded_inode_bitmaps < EXT2_MAX_GROUP_LOADED) |
sb | 139 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_loaded_inode_bitmaps++; |
sb | 141 | fs/ext2/ialloc.c | brelse (sb->u.ext2_sb.s_inode_bitmap[EXT2_MAX_GROUP_LOADED - 1]); |
sb | 142 | fs/ext2/ialloc.c | for (j = sb->u.ext2_sb.s_loaded_inode_bitmaps - 1; j > 0; j--) { |
sb | 143 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap_number[j] = |
sb | 144 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap_number[j - 1]; |
sb | 145 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap[j] = |
sb | 146 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap[j - 1]; |
sb | 148 | fs/ext2/ialloc.c | read_inode_bitmap (sb, block_group, 0); |
sb | 190 | fs/ext2/ialloc.c | struct super_block * sb; |
sb | 222 | fs/ext2/ialloc.c | sb = inode->i_sb; |
sb | 223 | fs/ext2/ialloc.c | lock_super (sb); |
sb | 225 | fs/ext2/ialloc.c | inode->i_ino > sb->u.ext2_sb.s_es->s_inodes_count) { |
sb | 226 | fs/ext2/ialloc.c | ext2_error (sb, "free_inode", |
sb | 228 | fs/ext2/ialloc.c | unlock_super (sb); |
sb | 231 | fs/ext2/ialloc.c | es = sb->u.ext2_sb.s_es; |
sb | 232 | fs/ext2/ialloc.c | block_group = (inode->i_ino - 1) / EXT2_INODES_PER_GROUP(sb); |
sb | 233 | fs/ext2/ialloc.c | bit = (inode->i_ino - 1) % EXT2_INODES_PER_GROUP(sb); |
sb | 234 | fs/ext2/ialloc.c | bitmap_nr = load_inode_bitmap (sb, block_group); |
sb | 235 | fs/ext2/ialloc.c | bh = sb->u.ext2_sb.s_inode_bitmap[bitmap_nr]; |
sb | 237 | fs/ext2/ialloc.c | ext2_warning (sb, "ext2_free_inode", |
sb | 240 | fs/ext2/ialloc.c | gdp = get_group_desc (sb, block_group, &bh2); |
sb | 246 | fs/ext2/ialloc.c | mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1); |
sb | 250 | fs/ext2/ialloc.c | if (sb->s_flags & MS_SYNCHRONOUS) { |
sb | 255 | fs/ext2/ialloc.c | sb->s_dirt = 1; |
sb | 257 | fs/ext2/ialloc.c | unlock_super (sb); |
sb | 307 | fs/ext2/ialloc.c | struct super_block * sb; |
sb | 319 | fs/ext2/ialloc.c | sb = dir->i_sb; |
sb | 320 | fs/ext2/ialloc.c | inode->i_sb = sb; |
sb | 321 | fs/ext2/ialloc.c | inode->i_flags = sb->s_flags; |
sb | 322 | fs/ext2/ialloc.c | lock_super (sb); |
sb | 323 | fs/ext2/ialloc.c | es = sb->u.ext2_sb.s_es; |
sb | 329 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_groups_count; |
sb | 344 | fs/ext2/ialloc.c | for (j = 0; j < sb->u.ext2_sb.s_groups_count; j++) { |
sb | 345 | fs/ext2/ialloc.c | tmp = get_group_desc (sb, j, &bh2); |
sb | 364 | fs/ext2/ialloc.c | tmp = get_group_desc (sb, i, &bh2); |
sb | 373 | fs/ext2/ialloc.c | for (j = 1; j < sb->u.ext2_sb.s_groups_count; j <<= 1) { |
sb | 375 | fs/ext2/ialloc.c | if (i >= sb->u.ext2_sb.s_groups_count) |
sb | 376 | fs/ext2/ialloc.c | i -= sb->u.ext2_sb.s_groups_count; |
sb | 377 | fs/ext2/ialloc.c | tmp = get_group_desc (sb, i, &bh2); |
sb | 389 | fs/ext2/ialloc.c | for (j = 2; j < sb->u.ext2_sb.s_groups_count; j++) { |
sb | 390 | fs/ext2/ialloc.c | if (++i >= sb->u.ext2_sb.s_groups_count) |
sb | 392 | fs/ext2/ialloc.c | tmp = get_group_desc (sb, i, &bh2); |
sb | 402 | fs/ext2/ialloc.c | unlock_super (sb); |
sb | 406 | fs/ext2/ialloc.c | bitmap_nr = load_inode_bitmap (sb, i); |
sb | 407 | fs/ext2/ialloc.c | bh = sb->u.ext2_sb.s_inode_bitmap[bitmap_nr]; |
sb | 409 | fs/ext2/ialloc.c | EXT2_INODES_PER_GROUP(sb))) < |
sb | 410 | fs/ext2/ialloc.c | EXT2_INODES_PER_GROUP(sb)) { |
sb | 412 | fs/ext2/ialloc.c | ext2_warning (sb, "ext2_new_inode", |
sb | 417 | fs/ext2/ialloc.c | if (sb->s_flags & MS_SYNCHRONOUS) { |
sb | 423 | fs/ext2/ialloc.c | ext2_error (sb, "ext2_new_inode", |
sb | 426 | fs/ext2/ialloc.c | unlock_super (sb); |
sb | 432 | fs/ext2/ialloc.c | j += i * EXT2_INODES_PER_GROUP(sb) + 1; |
sb | 434 | fs/ext2/ialloc.c | ext2_error (sb, "ext2_new_inode", |
sb | 437 | fs/ext2/ialloc.c | unlock_super (sb); |
sb | 446 | fs/ext2/ialloc.c | mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1); |
sb | 447 | fs/ext2/ialloc.c | sb->s_dirt = 1; |
sb | 449 | fs/ext2/ialloc.c | inode->i_sb = sb; |
sb | 452 | fs/ext2/ialloc.c | inode->i_dev = sb->s_dev; |
sb | 454 | fs/ext2/ialloc.c | if (test_opt (sb, GRPID)) |
sb | 464 | fs/ext2/ialloc.c | inode->i_blksize = sb->s_blocksize; |
sb | 485 | fs/ext2/ialloc.c | unlock_super (sb); |
sb | 489 | fs/ext2/ialloc.c | unsigned long ext2_count_free_inodes (struct super_block * sb) |
sb | 498 | fs/ext2/ialloc.c | lock_super (sb); |
sb | 499 | fs/ext2/ialloc.c | es = sb->u.ext2_sb.s_es; |
sb | 503 | fs/ext2/ialloc.c | for (i = 0; i < sb->u.ext2_sb.s_groups_count; i++) { |
sb | 504 | fs/ext2/ialloc.c | gdp = get_group_desc (sb, i, NULL); |
sb | 506 | fs/ext2/ialloc.c | bitmap_nr = load_inode_bitmap (sb, i); |
sb | 507 | fs/ext2/ialloc.c | x = ext2_count_free (sb->u.ext2_sb.s_inode_bitmap[bitmap_nr], |
sb | 508 | fs/ext2/ialloc.c | EXT2_INODES_PER_GROUP(sb) / 8); |
sb | 515 | fs/ext2/ialloc.c | unlock_super (sb); |
sb | 518 | fs/ext2/ialloc.c | return sb->u.ext2_sb.s_es->s_free_inodes_count; |
sb | 522 | fs/ext2/ialloc.c | void ext2_check_inodes_bitmap (struct super_block * sb) |
sb | 530 | fs/ext2/ialloc.c | lock_super (sb); |
sb | 531 | fs/ext2/ialloc.c | es = sb->u.ext2_sb.s_es; |
sb | 535 | fs/ext2/ialloc.c | for (i = 0; i < sb->u.ext2_sb.s_groups_count; i++) { |
sb | 536 | fs/ext2/ialloc.c | gdp = get_group_desc (sb, i, NULL); |
sb | 538 | fs/ext2/ialloc.c | bitmap_nr = load_inode_bitmap (sb, i); |
sb | 539 | fs/ext2/ialloc.c | x = ext2_count_free (sb->u.ext2_sb.s_inode_bitmap[bitmap_nr], |
sb | 540 | fs/ext2/ialloc.c | EXT2_INODES_PER_GROUP(sb) / 8); |
sb | 542 | fs/ext2/ialloc.c | ext2_error (sb, "ext2_check_inodes_bitmap", |
sb | 549 | fs/ext2/ialloc.c | ext2_error (sb, "ext2_check_inodes_bitmap", |
sb | 553 | fs/ext2/ialloc.c | unlock_super (sb); |
sb | 71 | fs/ext2/namei.c | struct super_block * sb; |
sb | 80 | fs/ext2/namei.c | sb = dir->i_sb; |
sb | 95 | fs/ext2/namei.c | if ((block << EXT2_BLOCK_SIZE_BITS (sb)) >= dir->i_size) |
sb | 116 | fs/ext2/namei.c | ext2_panic (sb, "ext2_find_entry", |
sb | 127 | fs/ext2/namei.c | dlimit = bh->b_data + sb->s_blocksize; |
sb | 146 | fs/ext2/namei.c | if (((block + NAMEI_RA_SIZE) << EXT2_BLOCK_SIZE_BITS (sb)) >= |
sb | 225 | fs/ext2/namei.c | struct super_block * sb; |
sb | 231 | fs/ext2/namei.c | sb = dir->i_sb; |
sb | 257 | fs/ext2/namei.c | if ((char *)de >= sb->s_blocksize + bh->b_data) { |
sb | 260 | fs/ext2/namei.c | bh = ext2_bread (dir, offset >> EXT2_BLOCK_SIZE_BITS(sb), 1, err); |
sb | 273 | fs/ext2/namei.c | de->rec_len = sb->s_blocksize; |
sb | 274 | fs/ext2/namei.c | dir->i_size = offset + sb->s_blocksize; |
sb | 553 | fs/ext2/namei.c | struct super_block * sb; |
sb | 556 | fs/ext2/namei.c | sb = inode->i_sb; |
sb | 574 | fs/ext2/namei.c | if ((void *) de >= (void *) (bh->b_data + sb->s_blocksize)) { |
sb | 576 | fs/ext2/namei.c | bh = ext2_bread (inode, offset >> EXT2_BLOCK_SIZE_BITS(sb), 1, &err); |
sb | 578 | fs/ext2/namei.c | offset += sb->s_blocksize; |
sb | 29 | fs/ext2/super.c | void ext2_error (struct super_block * sb, const char * function, |
sb | 35 | fs/ext2/super.c | if (!(sb->s_flags & MS_RDONLY)) { |
sb | 36 | fs/ext2/super.c | sb->u.ext2_sb.s_mount_state |= EXT2_ERROR_FS; |
sb | 37 | fs/ext2/super.c | sb->u.ext2_sb.s_es->s_state |= EXT2_ERROR_FS; |
sb | 38 | fs/ext2/super.c | mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1); |
sb | 39 | fs/ext2/super.c | sb->s_dirt = 1; |
sb | 44 | fs/ext2/super.c | if (test_opt (sb, ERRORS_PANIC) || |
sb | 45 | fs/ext2/super.c | (sb->u.ext2_sb.s_es->s_errors == EXT2_ERRORS_PANIC && |
sb | 46 | fs/ext2/super.c | !test_opt (sb, ERRORS_CONT) && !test_opt (sb, ERRORS_RO))) |
sb | 48 | fs/ext2/super.c | MAJOR(sb->s_dev), MINOR(sb->s_dev), function, buf); |
sb | 50 | fs/ext2/super.c | MAJOR(sb->s_dev), MINOR(sb->s_dev), function, buf); |
sb | 51 | fs/ext2/super.c | if (test_opt (sb, ERRORS_RO) || |
sb | 52 | fs/ext2/super.c | (sb->u.ext2_sb.s_es->s_errors == EXT2_ERRORS_RO && |
sb | 53 | fs/ext2/super.c | !test_opt (sb, ERRORS_CONT) && !test_opt (sb, ERRORS_PANIC))) { |
sb | 55 | fs/ext2/super.c | sb->s_flags |= MS_RDONLY; |
sb | 59 | fs/ext2/super.c | NORET_TYPE void ext2_panic (struct super_block * sb, const char * function, |
sb | 65 | fs/ext2/super.c | if (!(sb->s_flags & MS_RDONLY)) { |
sb | 66 | fs/ext2/super.c | sb->u.ext2_sb.s_mount_state |= EXT2_ERROR_FS; |
sb | 67 | fs/ext2/super.c | sb->u.ext2_sb.s_es->s_state |= EXT2_ERROR_FS; |
sb | 68 | fs/ext2/super.c | mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1); |
sb | 69 | fs/ext2/super.c | sb->s_dirt = 1; |
sb | 75 | fs/ext2/super.c | MAJOR(sb->s_dev), MINOR(sb->s_dev), function, buf); |
sb | 78 | fs/ext2/super.c | void ext2_warning (struct super_block * sb, const char * function, |
sb | 88 | fs/ext2/super.c | MAJOR(sb->s_dev), MINOR(sb->s_dev), function, buf); |
sb | 91 | fs/ext2/super.c | void ext2_put_super (struct super_block * sb) |
sb | 96 | fs/ext2/super.c | lock_super (sb); |
sb | 97 | fs/ext2/super.c | if (!(sb->s_flags & MS_RDONLY)) { |
sb | 98 | fs/ext2/super.c | sb->u.ext2_sb.s_es->s_state = sb->u.ext2_sb.s_mount_state; |
sb | 99 | fs/ext2/super.c | mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1); |
sb | 101 | fs/ext2/super.c | sb->s_dev = 0; |
sb | 102 | fs/ext2/super.c | db_count = sb->u.ext2_sb.s_db_per_group; |
sb | 104 | fs/ext2/super.c | if (sb->u.ext2_sb.s_group_desc[i]) |
sb | 105 | fs/ext2/super.c | brelse (sb->u.ext2_sb.s_group_desc[i]); |
sb | 106 | fs/ext2/super.c | kfree_s (sb->u.ext2_sb.s_group_desc, |
sb | 109 | fs/ext2/super.c | if (sb->u.ext2_sb.s_inode_bitmap[i]) |
sb | 110 | fs/ext2/super.c | brelse (sb->u.ext2_sb.s_inode_bitmap[i]); |
sb | 112 | fs/ext2/super.c | if (sb->u.ext2_sb.s_block_bitmap[i]) |
sb | 113 | fs/ext2/super.c | brelse (sb->u.ext2_sb.s_block_bitmap[i]); |
sb | 114 | fs/ext2/super.c | brelse (sb->u.ext2_sb.s_sbh); |
sb | 115 | fs/ext2/super.c | unlock_super (sb); |
sb | 132 | fs/ext2/super.c | static int convert_pre_02b_fs (struct super_block * sb, |
sb | 143 | fs/ext2/super.c | bh2 = bread (sb->s_dev, 2, BLOCK_SIZE); |
sb | 149 | fs/ext2/super.c | groups_count = (sb->u.ext2_sb.s_blocks_count - |
sb | 150 | fs/ext2/super.c | sb->u.ext2_sb.s_first_data_block + |
sb | 151 | fs/ext2/super.c | (EXT2_BLOCK_SIZE(sb) * 8) - 1) / |
sb | 152 | fs/ext2/super.c | (EXT2_BLOCK_SIZE(sb) * 8); |
sb | 166 | fs/ext2/super.c | sb->s_magic = EXT2_SUPER_MAGIC; |
sb | 298 | fs/ext2/super.c | static void ext2_setup_super (struct super_block * sb, |
sb | 304 | fs/ext2/super.c | sb->s_flags |= MS_RDONLY; |
sb | 306 | fs/ext2/super.c | if (!(sb->s_flags & MS_RDONLY)) { |
sb | 307 | fs/ext2/super.c | if (!(sb->u.ext2_sb.s_mount_state & EXT2_VALID_FS)) |
sb | 310 | fs/ext2/super.c | else if ((sb->u.ext2_sb.s_mount_state & EXT2_ERROR_FS)) |
sb | 326 | fs/ext2/super.c | mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1); |
sb | 327 | fs/ext2/super.c | sb->s_dirt = 1; |
sb | 328 | fs/ext2/super.c | if (test_opt (sb, DEBUG)) |
sb | 331 | fs/ext2/super.c | EXT2FS_VERSION, EXT2FS_DATE, sb->s_blocksize, |
sb | 332 | fs/ext2/super.c | sb->u.ext2_sb.s_frag_size, |
sb | 333 | fs/ext2/super.c | sb->u.ext2_sb.s_groups_count, |
sb | 334 | fs/ext2/super.c | EXT2_BLOCKS_PER_GROUP(sb), |
sb | 335 | fs/ext2/super.c | EXT2_INODES_PER_GROUP(sb), |
sb | 336 | fs/ext2/super.c | sb->u.ext2_sb.s_mount_opt); |
sb | 337 | fs/ext2/super.c | if (test_opt (sb, CHECK)) { |
sb | 338 | fs/ext2/super.c | ext2_check_blocks_bitmap (sb); |
sb | 339 | fs/ext2/super.c | ext2_check_inodes_bitmap (sb); |
sb | 344 | fs/ext2/super.c | static int ext2_check_descriptors (struct super_block * sb) |
sb | 348 | fs/ext2/super.c | unsigned long block = sb->u.ext2_sb.s_es->s_first_data_block; |
sb | 353 | fs/ext2/super.c | for (i = 0; i < sb->u.ext2_sb.s_groups_count; i++) |
sb | 355 | fs/ext2/super.c | if ((i % EXT2_DESC_PER_BLOCK(sb)) == 0) |
sb | 356 | fs/ext2/super.c | gdp = (struct ext2_group_desc *) sb->u.ext2_sb.s_group_desc[desc_block++]->b_data; |
sb | 358 | fs/ext2/super.c | gdp->bg_block_bitmap >= block + EXT2_BLOCKS_PER_GROUP(sb)) |
sb | 360 | fs/ext2/super.c | ext2_error (sb, "ext2_check_descriptors", |
sb | 367 | fs/ext2/super.c | gdp->bg_inode_bitmap >= block + EXT2_BLOCKS_PER_GROUP(sb)) |
sb | 369 | fs/ext2/super.c | ext2_error (sb, "ext2_check_descriptors", |
sb | 376 | fs/ext2/super.c | gdp->bg_inode_table + sb->u.ext2_sb.s_itb_per_group >= |
sb | 377 | fs/ext2/super.c | block + EXT2_BLOCKS_PER_GROUP(sb)) |
sb | 379 | fs/ext2/super.c | ext2_error (sb, "ext2_check_descriptors", |
sb | 385 | fs/ext2/super.c | block += EXT2_BLOCKS_PER_GROUP(sb); |
sb | 391 | fs/ext2/super.c | struct super_block * ext2_read_super (struct super_block * sb, void * data, |
sb | 400 | fs/ext2/super.c | int dev = sb->s_dev; |
sb | 407 | fs/ext2/super.c | set_opt (sb->u.ext2_sb.s_mount_opt, CHECK_NORMAL); |
sb | 409 | fs/ext2/super.c | &sb->u.ext2_sb.s_mount_opt)) { |
sb | 410 | fs/ext2/super.c | sb->s_dev = 0; |
sb | 414 | fs/ext2/super.c | lock_super (sb); |
sb | 417 | fs/ext2/super.c | sb->s_dev = 0; |
sb | 418 | fs/ext2/super.c | unlock_super (sb); |
sb | 427 | fs/ext2/super.c | sb->u.ext2_sb.s_es = es; |
sb | 428 | fs/ext2/super.c | sb->s_magic = es->s_magic; |
sb | 429 | fs/ext2/super.c | if (sb->s_magic != EXT2_SUPER_MAGIC |
sb | 431 | fs/ext2/super.c | && sb->s_magic != EXT2_PRE_02B_MAGIC |
sb | 434 | fs/ext2/super.c | sb->s_dev = 0; |
sb | 435 | fs/ext2/super.c | unlock_super (sb); |
sb | 442 | fs/ext2/super.c | sb->s_blocksize = EXT2_MIN_BLOCK_SIZE << es->s_log_block_size; |
sb | 443 | fs/ext2/super.c | sb->s_blocksize_bits = EXT2_BLOCK_SIZE_BITS(sb); |
sb | 444 | fs/ext2/super.c | if (sb->s_blocksize != BLOCK_SIZE && |
sb | 445 | fs/ext2/super.c | (sb->s_blocksize == 1024 || sb->s_blocksize == 2048 || |
sb | 446 | fs/ext2/super.c | sb->s_blocksize == 4096)) { |
sb | 450 | fs/ext2/super.c | set_blocksize (dev, sb->s_blocksize); |
sb | 451 | fs/ext2/super.c | logic_sb_block = (sb_block*BLOCK_SIZE) / sb->s_blocksize; |
sb | 452 | fs/ext2/super.c | offset = (sb_block*BLOCK_SIZE) % sb->s_blocksize; |
sb | 453 | fs/ext2/super.c | bh = bread (dev, logic_sb_block, sb->s_blocksize); |
sb | 457 | fs/ext2/super.c | sb->u.ext2_sb.s_es = es; |
sb | 459 | fs/ext2/super.c | sb->s_dev = 0; |
sb | 460 | fs/ext2/super.c | unlock_super (sb); |
sb | 466 | fs/ext2/super.c | sb->u.ext2_sb.s_frag_size = EXT2_MIN_FRAG_SIZE << |
sb | 468 | fs/ext2/super.c | if (sb->u.ext2_sb.s_frag_size) |
sb | 469 | fs/ext2/super.c | sb->u.ext2_sb.s_frags_per_block = sb->s_blocksize / |
sb | 470 | fs/ext2/super.c | sb->u.ext2_sb.s_frag_size; |
sb | 472 | fs/ext2/super.c | sb->s_magic = 0; |
sb | 473 | fs/ext2/super.c | sb->u.ext2_sb.s_blocks_per_group = es->s_blocks_per_group; |
sb | 474 | fs/ext2/super.c | sb->u.ext2_sb.s_frags_per_group = es->s_frags_per_group; |
sb | 475 | fs/ext2/super.c | sb->u.ext2_sb.s_inodes_per_group = es->s_inodes_per_group; |
sb | 476 | fs/ext2/super.c | sb->u.ext2_sb.s_inodes_per_block = sb->s_blocksize / |
sb | 478 | fs/ext2/super.c | sb->u.ext2_sb.s_itb_per_group = sb->u.ext2_sb.s_inodes_per_group / |
sb | 479 | fs/ext2/super.c | sb->u.ext2_sb.s_inodes_per_block; |
sb | 480 | fs/ext2/super.c | sb->u.ext2_sb.s_desc_per_block = sb->s_blocksize / |
sb | 482 | fs/ext2/super.c | sb->u.ext2_sb.s_sbh = bh; |
sb | 483 | fs/ext2/super.c | sb->u.ext2_sb.s_es = es; |
sb | 485 | fs/ext2/super.c | sb->u.ext2_sb.s_resuid = resuid; |
sb | 487 | fs/ext2/super.c | sb->u.ext2_sb.s_resuid = es->s_def_resuid; |
sb | 489 | fs/ext2/super.c | sb->u.ext2_sb.s_resgid = resgid; |
sb | 491 | fs/ext2/super.c | sb->u.ext2_sb.s_resgid = es->s_def_resgid; |
sb | 492 | fs/ext2/super.c | sb->u.ext2_sb.s_mount_state = es->s_state; |
sb | 493 | fs/ext2/super.c | sb->u.ext2_sb.s_rename_lock = 0; |
sb | 494 | fs/ext2/super.c | sb->u.ext2_sb.s_rename_wait = NULL; |
sb | 496 | fs/ext2/super.c | if (sb->s_magic == EXT2_PRE_02B_MAGIC) { |
sb | 501 | fs/ext2/super.c | sb->s_dev = 0; |
sb | 502 | fs/ext2/super.c | unlock_super (sb); |
sb | 510 | fs/ext2/super.c | if (!(sb->s_flags & MS_RDONLY)) { |
sb | 511 | fs/ext2/super.c | sb->s_dev = 0; |
sb | 512 | fs/ext2/super.c | unlock_super (sb); |
sb | 517 | fs/ext2/super.c | if (!convert_pre_02b_fs (sb, bh)) { |
sb | 518 | fs/ext2/super.c | sb->s_dev = 0; |
sb | 519 | fs/ext2/super.c | unlock_super (sb); |
sb | 528 | fs/ext2/super.c | if (sb->s_magic != EXT2_SUPER_MAGIC) { |
sb | 529 | fs/ext2/super.c | sb->s_dev = 0; |
sb | 530 | fs/ext2/super.c | unlock_super (sb); |
sb | 537 | fs/ext2/super.c | if (sb->s_blocksize != bh->b_size) { |
sb | 538 | fs/ext2/super.c | sb->s_dev = 0; |
sb | 539 | fs/ext2/super.c | unlock_super (sb); |
sb | 547 | fs/ext2/super.c | if (sb->s_blocksize != sb->u.ext2_sb.s_frag_size) { |
sb | 548 | fs/ext2/super.c | sb->s_dev = 0; |
sb | 549 | fs/ext2/super.c | unlock_super (sb); |
sb | 552 | fs/ext2/super.c | sb->u.ext2_sb.s_frag_size, sb->s_blocksize); |
sb | 556 | fs/ext2/super.c | sb->u.ext2_sb.s_groups_count = (es->s_blocks_count - |
sb | 558 | fs/ext2/super.c | EXT2_BLOCKS_PER_GROUP(sb) - 1) / |
sb | 559 | fs/ext2/super.c | EXT2_BLOCKS_PER_GROUP(sb); |
sb | 560 | fs/ext2/super.c | db_count = (sb->u.ext2_sb.s_groups_count + EXT2_DESC_PER_BLOCK(sb) - 1) / |
sb | 561 | fs/ext2/super.c | EXT2_DESC_PER_BLOCK(sb); |
sb | 562 | fs/ext2/super.c | sb->u.ext2_sb.s_group_desc = kmalloc (db_count * sizeof (struct buffer_head *), GFP_KERNEL); |
sb | 563 | fs/ext2/super.c | if (sb->u.ext2_sb.s_group_desc == NULL) { |
sb | 564 | fs/ext2/super.c | sb->s_dev = 0; |
sb | 565 | fs/ext2/super.c | unlock_super (sb); |
sb | 571 | fs/ext2/super.c | sb->u.ext2_sb.s_group_desc[i] = bread (dev, logic_sb_block + i + 1, |
sb | 572 | fs/ext2/super.c | sb->s_blocksize); |
sb | 573 | fs/ext2/super.c | if (!sb->u.ext2_sb.s_group_desc[i]) { |
sb | 574 | fs/ext2/super.c | sb->s_dev = 0; |
sb | 575 | fs/ext2/super.c | unlock_super (sb); |
sb | 577 | fs/ext2/super.c | brelse (sb->u.ext2_sb.s_group_desc[j]); |
sb | 578 | fs/ext2/super.c | kfree_s (sb->u.ext2_sb.s_group_desc, |
sb | 585 | fs/ext2/super.c | if (!ext2_check_descriptors (sb)) { |
sb | 586 | fs/ext2/super.c | sb->s_dev = 0; |
sb | 587 | fs/ext2/super.c | unlock_super (sb); |
sb | 589 | fs/ext2/super.c | brelse (sb->u.ext2_sb.s_group_desc[j]); |
sb | 590 | fs/ext2/super.c | kfree_s (sb->u.ext2_sb.s_group_desc, |
sb | 597 | fs/ext2/super.c | sb->u.ext2_sb.s_inode_bitmap_number[i] = 0; |
sb | 598 | fs/ext2/super.c | sb->u.ext2_sb.s_inode_bitmap[i] = NULL; |
sb | 599 | fs/ext2/super.c | sb->u.ext2_sb.s_block_bitmap_number[i] = 0; |
sb | 600 | fs/ext2/super.c | sb->u.ext2_sb.s_block_bitmap[i] = NULL; |
sb | 602 | fs/ext2/super.c | sb->u.ext2_sb.s_loaded_inode_bitmaps = 0; |
sb | 603 | fs/ext2/super.c | sb->u.ext2_sb.s_loaded_block_bitmaps = 0; |
sb | 604 | fs/ext2/super.c | sb->u.ext2_sb.s_db_per_group = db_count; |
sb | 605 | fs/ext2/super.c | unlock_super (sb); |
sb | 609 | fs/ext2/super.c | sb->s_dev = dev; |
sb | 610 | fs/ext2/super.c | sb->s_op = &ext2_sops; |
sb | 611 | fs/ext2/super.c | if (!(sb->s_mounted = iget (sb, EXT2_ROOT_INO))) { |
sb | 612 | fs/ext2/super.c | sb->s_dev = 0; |
sb | 614 | fs/ext2/super.c | if (sb->u.ext2_sb.s_group_desc[i]) |
sb | 615 | fs/ext2/super.c | brelse (sb->u.ext2_sb.s_group_desc[i]); |
sb | 616 | fs/ext2/super.c | kfree_s (sb->u.ext2_sb.s_group_desc, |
sb | 625 | fs/ext2/super.c | mark_buffer_dirty(sb->u.ext2_sb.s_group_desc[i], 1); |
sb | 626 | fs/ext2/super.c | sb->s_dirt = 1; |
sb | 629 | fs/ext2/super.c | ext2_setup_super (sb, es); |
sb | 630 | fs/ext2/super.c | return sb; |
sb | 633 | fs/ext2/super.c | static void ext2_commit_super (struct super_block * sb, |
sb | 637 | fs/ext2/super.c | mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1); |
sb | 638 | fs/ext2/super.c | sb->s_dirt = 0; |
sb | 652 | fs/ext2/super.c | void ext2_write_super (struct super_block * sb) |
sb | 656 | fs/ext2/super.c | if (!(sb->s_flags & MS_RDONLY)) { |
sb | 657 | fs/ext2/super.c | es = sb->u.ext2_sb.s_es; |
sb | 665 | fs/ext2/super.c | ext2_commit_super (sb, es); |
sb | 667 | fs/ext2/super.c | sb->s_dirt = 0; |
sb | 670 | fs/ext2/super.c | int ext2_remount (struct super_block * sb, int * flags, char * data) |
sb | 673 | fs/ext2/super.c | unsigned short resuid = sb->u.ext2_sb.s_resuid; |
sb | 674 | fs/ext2/super.c | unsigned short resgid = sb->u.ext2_sb.s_resgid; |
sb | 681 | fs/ext2/super.c | set_opt (sb->u.ext2_sb.s_mount_opt, CHECK_NORMAL); |
sb | 686 | fs/ext2/super.c | sb->u.ext2_sb.s_mount_opt = new_mount_opt; |
sb | 687 | fs/ext2/super.c | sb->u.ext2_sb.s_resuid = resuid; |
sb | 688 | fs/ext2/super.c | sb->u.ext2_sb.s_resgid = resgid; |
sb | 689 | fs/ext2/super.c | es = sb->u.ext2_sb.s_es; |
sb | 690 | fs/ext2/super.c | if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) |
sb | 694 | fs/ext2/super.c | !(sb->u.ext2_sb.s_mount_state & EXT2_VALID_FS)) |
sb | 700 | fs/ext2/super.c | es->s_state = sb->u.ext2_sb.s_mount_state; |
sb | 702 | fs/ext2/super.c | mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1); |
sb | 703 | fs/ext2/super.c | sb->s_dirt = 1; |
sb | 704 | fs/ext2/super.c | ext2_commit_super (sb, es); |
sb | 712 | fs/ext2/super.c | sb->u.ext2_sb.s_mount_state = es->s_state; |
sb | 713 | fs/ext2/super.c | sb->s_flags &= ~MS_RDONLY; |
sb | 714 | fs/ext2/super.c | ext2_setup_super (sb, es); |
sb | 719 | fs/ext2/super.c | void ext2_statfs (struct super_block * sb, struct statfs * buf) |
sb | 725 | fs/ext2/super.c | if (test_opt (sb, MINIX_DF)) |
sb | 732 | fs/ext2/super.c | sb->u.ext2_sb.s_db_per_group /* descriptors */ + |
sb | 735 | fs/ext2/super.c | sb->u.ext2_sb.s_itb_per_group /* inode table */; |
sb | 736 | fs/ext2/super.c | overhead = sb->u.ext2_sb.s_es->s_first_data_block + |
sb | 737 | fs/ext2/super.c | sb->u.ext2_sb.s_groups_count * overhead_per_group; |
sb | 741 | fs/ext2/super.c | put_fs_long (sb->s_blocksize, &buf->f_bsize); |
sb | 742 | fs/ext2/super.c | put_fs_long (sb->u.ext2_sb.s_es->s_blocks_count - overhead, |
sb | 744 | fs/ext2/super.c | tmp = ext2_count_free_blocks (sb); |
sb | 746 | fs/ext2/super.c | if (tmp >= sb->u.ext2_sb.s_es->s_r_blocks_count) |
sb | 747 | fs/ext2/super.c | put_fs_long (tmp - sb->u.ext2_sb.s_es->s_r_blocks_count, |
sb | 751 | fs/ext2/super.c | put_fs_long (sb->u.ext2_sb.s_es->s_inodes_count, &buf->f_files); |
sb | 752 | fs/ext2/super.c | put_fs_long (ext2_count_free_inodes (sb), &buf->f_ffree); |
sb | 499 | fs/inode.c | struct inode * __iget(struct super_block * sb, int nr, int crossmntp) |
sb | 506 | fs/inode.c | if (!sb) |
sb | 508 | fs/inode.c | h = hash(sb->s_dev, nr); |
sb | 511 | fs/inode.c | if (inode->i_dev == sb->s_dev && inode->i_ino == nr) |
sb | 523 | fs/inode.c | inode->i_sb = sb; |
sb | 524 | fs/inode.c | inode->i_dev = sb->s_dev; |
sb | 526 | fs/inode.c | inode->i_flags = sb->s_flags; |
sb | 537 | fs/inode.c | if (inode->i_dev != sb->s_dev || inode->i_ino != nr) { |
sb | 34 | fs/isofs/inode.c | void isofs_put_super(struct super_block *sb) |
sb | 36 | fs/isofs/inode.c | lock_super(sb); |
sb | 42 | fs/isofs/inode.c | sb->s_dev = 0; |
sb | 43 | fs/isofs/inode.c | unlock_super(sb); |
sb | 359 | fs/isofs/inode.c | void isofs_statfs (struct super_block *sb, struct statfs *buf) |
sb | 363 | fs/isofs/inode.c | put_fs_long(sb->u.isofs_sb.s_nzones, &buf->f_blocks); |
sb | 366 | fs/isofs/inode.c | put_fs_long(sb->u.isofs_sb.s_ninodes, &buf->f_files); |
sb | 46 | fs/minix/bitmap.c | void minix_free_block(struct super_block * sb, int block) |
sb | 51 | fs/minix/bitmap.c | if (!sb) { |
sb | 55 | fs/minix/bitmap.c | if (block < sb->u.minix_sb.s_firstdatazone || |
sb | 56 | fs/minix/bitmap.c | block >= sb->u.minix_sb.s_nzones) { |
sb | 60 | fs/minix/bitmap.c | bh = get_hash_table(sb->s_dev,block,BLOCK_SIZE); |
sb | 64 | fs/minix/bitmap.c | zone = block - sb->u.minix_sb.s_firstdatazone + 1; |
sb | 67 | fs/minix/bitmap.c | bh = sb->u.minix_sb.s_zmap[zone]; |
sb | 73 | fs/minix/bitmap.c | printk("free_block (%04x:%d): bit already cleared\n",sb->s_dev,block); |
sb | 78 | fs/minix/bitmap.c | int minix_new_block(struct super_block * sb) |
sb | 83 | fs/minix/bitmap.c | if (!sb) { |
sb | 90 | fs/minix/bitmap.c | if ((bh=sb->u.minix_sb.s_zmap[i]) != NULL) |
sb | 100 | fs/minix/bitmap.c | j += i*8192 + sb->u.minix_sb.s_firstdatazone-1; |
sb | 101 | fs/minix/bitmap.c | if (j < sb->u.minix_sb.s_firstdatazone || |
sb | 102 | fs/minix/bitmap.c | j >= sb->u.minix_sb.s_nzones) |
sb | 104 | fs/minix/bitmap.c | if (!(bh = getblk(sb->s_dev,j,BLOCK_SIZE))) { |
sb | 115 | fs/minix/bitmap.c | unsigned long minix_count_free_blocks(struct super_block *sb) |
sb | 117 | fs/minix/bitmap.c | return (sb->u.minix_sb.s_nzones - count_used(sb->u.minix_sb.s_zmap,sb->u.minix_sb.s_zmap_blocks,sb->u.minix_sb.s_nzones)) |
sb | 118 | fs/minix/bitmap.c | << sb->u.minix_sb.s_log_zone_size; |
sb | 161 | fs/minix/bitmap.c | struct super_block * sb; |
sb | 168 | fs/minix/bitmap.c | sb = dir->i_sb; |
sb | 169 | fs/minix/bitmap.c | inode->i_sb = sb; |
sb | 193 | fs/minix/bitmap.c | inode->i_dev = sb->s_dev; |
sb | 205 | fs/minix/bitmap.c | unsigned long minix_count_free_inodes(struct super_block *sb) |
sb | 207 | fs/minix/bitmap.c | return sb->u.minix_sb.s_ninodes - count_used(sb->u.minix_sb.s_imap,sb->u.minix_sb.s_imap_blocks,sb->u.minix_sb.s_ninodes); |
sb | 36 | fs/minix/inode.c | static void minix_commit_super (struct super_block * sb, |
sb | 39 | fs/minix/inode.c | mark_buffer_dirty(sb->u.minix_sb.s_sbh, 1); |
sb | 40 | fs/minix/inode.c | sb->s_dirt = 0; |
sb | 43 | fs/minix/inode.c | void minix_write_super (struct super_block * sb) |
sb | 47 | fs/minix/inode.c | if (!(sb->s_flags & MS_RDONLY)) { |
sb | 48 | fs/minix/inode.c | ms = sb->u.minix_sb.s_ms; |
sb | 52 | fs/minix/inode.c | minix_commit_super (sb, ms); |
sb | 54 | fs/minix/inode.c | sb->s_dirt = 0; |
sb | 58 | fs/minix/inode.c | void minix_put_super(struct super_block *sb) |
sb | 62 | fs/minix/inode.c | lock_super(sb); |
sb | 63 | fs/minix/inode.c | if (!(sb->s_flags & MS_RDONLY)) { |
sb | 64 | fs/minix/inode.c | sb->u.minix_sb.s_ms->s_state = sb->u.minix_sb.s_mount_state; |
sb | 65 | fs/minix/inode.c | mark_buffer_dirty(sb->u.minix_sb.s_sbh, 1); |
sb | 67 | fs/minix/inode.c | sb->s_dev = 0; |
sb | 69 | fs/minix/inode.c | brelse(sb->u.minix_sb.s_imap[i]); |
sb | 71 | fs/minix/inode.c | brelse(sb->u.minix_sb.s_zmap[i]); |
sb | 72 | fs/minix/inode.c | brelse (sb->u.minix_sb.s_sbh); |
sb | 73 | fs/minix/inode.c | unlock_super(sb); |
sb | 89 | fs/minix/inode.c | int minix_remount (struct super_block * sb, int * flags, char * data) |
sb | 93 | fs/minix/inode.c | ms = sb->u.minix_sb.s_ms; |
sb | 94 | fs/minix/inode.c | if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) |
sb | 98 | fs/minix/inode.c | !(sb->u.minix_sb.s_mount_state & MINIX_VALID_FS)) |
sb | 101 | fs/minix/inode.c | ms->s_state = sb->u.minix_sb.s_mount_state; |
sb | 102 | fs/minix/inode.c | mark_buffer_dirty(sb->u.minix_sb.s_sbh, 1); |
sb | 103 | fs/minix/inode.c | sb->s_dirt = 1; |
sb | 104 | fs/minix/inode.c | minix_commit_super (sb, ms); |
sb | 108 | fs/minix/inode.c | sb->u.minix_sb.s_mount_state = ms->s_state; |
sb | 110 | fs/minix/inode.c | mark_buffer_dirty(sb->u.minix_sb.s_sbh, 1); |
sb | 111 | fs/minix/inode.c | sb->s_dirt = 1; |
sb | 113 | fs/minix/inode.c | if (!(sb->u.minix_sb.s_mount_state & MINIX_VALID_FS)) |
sb | 116 | fs/minix/inode.c | else if ((sb->u.minix_sb.s_mount_state & MINIX_ERROR_FS)) |
sb | 223 | fs/minix/inode.c | void minix_statfs(struct super_block *sb, struct statfs *buf) |
sb | 229 | fs/minix/inode.c | tmp = sb->u.minix_sb.s_nzones - sb->u.minix_sb.s_firstdatazone; |
sb | 230 | fs/minix/inode.c | tmp <<= sb->u.minix_sb.s_log_zone_size; |
sb | 232 | fs/minix/inode.c | tmp = minix_count_free_blocks(sb); |
sb | 235 | fs/minix/inode.c | put_fs_long(sb->u.minix_sb.s_ninodes, &buf->f_files); |
sb | 236 | fs/minix/inode.c | put_fs_long(minix_count_free_inodes(sb), &buf->f_ffree); |
sb | 237 | fs/minix/inode.c | put_fs_long(sb->u.minix_sb.s_namelen, &buf->f_namelen); |
sb | 8 | fs/msdos/buffer.c | struct super_block *sb, |
sb | 12 | fs/msdos/buffer.c | if (sb->s_blocksize == 512){ |
sb | 13 | fs/msdos/buffer.c | ret = bread (sb->s_dev,block,512); |
sb | 15 | fs/msdos/buffer.c | struct buffer_head *real = bread (sb->s_dev,block>>1,1024); |
sb | 61 | fs/msdos/buffer.c | struct super_block *sb, |
sb | 65 | fs/msdos/buffer.c | if (sb->s_blocksize == 512){ |
sb | 66 | fs/msdos/buffer.c | ret = getblk (sb->s_dev,block,512); |
sb | 74 | fs/msdos/buffer.c | ret = msdos_bread (sb,block); |
sb | 80 | fs/msdos/buffer.c | struct super_block *sb, |
sb | 84 | fs/msdos/buffer.c | if (sb->s_blocksize == 512){ |
sb | 97 | fs/msdos/buffer.c | struct super_block *sb, |
sb | 101 | fs/msdos/buffer.c | if (sb->s_blocksize != 512){ |
sb | 108 | fs/msdos/buffer.c | struct super_block *sb, |
sb | 112 | fs/msdos/buffer.c | if (sb->s_blocksize != 512){ |
sb | 118 | fs/msdos/buffer.c | struct super_block *sb, |
sb | 121 | fs/msdos/buffer.c | if (sb->s_blocksize != 512){ |
sb | 128 | fs/msdos/buffer.c | struct super_block *sb, |
sb | 133 | fs/msdos/buffer.c | if (sb->s_blocksize == 512){ |
sb | 67 | fs/msdos/dir.c | struct super_block *sb = inode->i_sb; |
sb | 20 | fs/msdos/fat.c | int fat_access(struct super_block *sb,int nr,int new_value) |
sb | 26 | fs/msdos/fat.c | if ((unsigned) (nr-2) >= MSDOS_SB(sb)->clusters) return 0; |
sb | 27 | fs/msdos/fat.c | if (MSDOS_SB(sb)->fat_bits == 16) first = last = nr*2; |
sb | 32 | fs/msdos/fat.c | if (!(bh = bread(sb->s_dev,MSDOS_SB(sb)->fat_start+(first >> |
sb | 40 | fs/msdos/fat.c | if (!(bh2 = bread(sb->s_dev,MSDOS_SB(sb)->fat_start+(last |
sb | 47 | fs/msdos/fat.c | if (MSDOS_SB(sb)->fat_bits == 16) { |
sb | 62 | fs/msdos/fat.c | if (MSDOS_SB(sb)->fat_bits == 16) |
sb | 77 | fs/msdos/fat.c | for (copy = 1; copy < MSDOS_SB(sb)->fats; copy++) { |
sb | 78 | fs/msdos/fat.c | if (!(c_bh = bread(sb->s_dev,MSDOS_SB(sb)-> |
sb | 79 | fs/msdos/fat.c | fat_start+(first >> SECTOR_BITS)+MSDOS_SB(sb)-> |
sb | 84 | fs/msdos/fat.c | if (!(c_bh2 = bread(sb->s_dev, |
sb | 85 | fs/msdos/fat.c | MSDOS_SB(sb)->fat_start+(first >> |
sb | 86 | fs/msdos/fat.c | SECTOR_BITS)+MSDOS_SB(sb)->fat_length*copy |
sb | 239 | fs/msdos/fat.c | struct msdos_sb_info *sb; |
sb | 242 | fs/msdos/fat.c | sb = MSDOS_SB(inode->i_sb); |
sb | 245 | fs/msdos/fat.c | if (sector >= sb->dir_entries >> MSDOS_DPS_BITS) return 0; |
sb | 246 | fs/msdos/fat.c | return sector+sb->dir_start; |
sb | 248 | fs/msdos/fat.c | cluster = sector/sb->cluster_size; |
sb | 249 | fs/msdos/fat.c | offset = sector % sb->cluster_size; |
sb | 251 | fs/msdos/fat.c | return (cluster-2)*sb->cluster_size+sb->data_start+offset; |
sb | 123 | fs/msdos/file.c | struct super_block *sb = inode->i_sb; |
sb | 137 | fs/msdos/file.c | if (!msdos_is_uptodate(sb,bh)) bhreq[nbreq++] = bh; |
sb | 142 | fs/msdos/file.c | if (nbreq > 0) msdos_ll_rw_block (sb,READ,nbreq,bhreq); |
sb | 155 | fs/msdos/file.c | struct super_block *sb = inode->i_sb; |
sb | 225 | fs/msdos/file.c | if (!msdos_is_uptodate(sb,bh)){ |
sb | 269 | fs/msdos/file.c | struct super_block *sb = inode->i_sb; |
sb | 346 | fs/msdos/file.c | msdos_set_uptodate(sb,bh,1); |
sb | 33 | fs/msdos/inode.c | struct super_block *sb; |
sb | 42 | fs/msdos/inode.c | sb = inode->i_sb; |
sb | 49 | fs/msdos/inode.c | fs_panic(sb,"..."); |
sb | 58 | fs/msdos/inode.c | void msdos_put_super(struct super_block *sb) |
sb | 60 | fs/msdos/inode.c | cache_inval_dev(sb->s_dev); |
sb | 61 | fs/msdos/inode.c | set_blocksize (sb->s_dev,BLOCK_SIZE); |
sb | 62 | fs/msdos/inode.c | lock_super(sb); |
sb | 63 | fs/msdos/inode.c | sb->s_dev = 0; |
sb | 64 | fs/msdos/inode.c | unlock_super(sb); |
sb | 168 | fs/msdos/inode.c | struct super_block *msdos_read_super(struct super_block *sb,void *data, |
sb | 180 | fs/msdos/inode.c | if (hardsect_size[MAJOR(sb->s_dev)] != NULL){ |
sb | 181 | fs/msdos/inode.c | blksize = hardsect_size[MAJOR(sb->s_dev)][MINOR(sb->s_dev)]; |
sb | 189 | fs/msdos/inode.c | sb->s_dev = 0; |
sb | 193 | fs/msdos/inode.c | lock_super(sb); |
sb | 195 | fs/msdos/inode.c | sb->s_blocksize = 1024; |
sb | 196 | fs/msdos/inode.c | set_blocksize(sb->s_dev, 1024); |
sb | 197 | fs/msdos/inode.c | bh = bread(sb->s_dev, 0, 1024); |
sb | 198 | fs/msdos/inode.c | unlock_super(sb); |
sb | 199 | fs/msdos/inode.c | if (bh == NULL || !msdos_is_uptodate(sb,bh)) { |
sb | 201 | fs/msdos/inode.c | sb->s_dev = 0; |
sb | 206 | fs/msdos/inode.c | set_blocksize(sb->s_dev, blksize); |
sb | 227 | fs/msdos/inode.c | MSDOS_SB(sb)->cluster_size = b->cluster_size*sector_mult; |
sb | 228 | fs/msdos/inode.c | MSDOS_SB(sb)->fats = b->fats; |
sb | 229 | fs/msdos/inode.c | MSDOS_SB(sb)->fat_start = CF_LE_W(b->reserved)*sector_mult; |
sb | 230 | fs/msdos/inode.c | MSDOS_SB(sb)->fat_length = CF_LE_W(b->fat_length)*sector_mult; |
sb | 231 | fs/msdos/inode.c | MSDOS_SB(sb)->dir_start = (CF_LE_W(b->reserved)+b->fats*CF_LE_W( |
sb | 233 | fs/msdos/inode.c | MSDOS_SB(sb)->dir_entries = CF_LE_W(*((unsigned short *) &b->dir_entries |
sb | 235 | fs/msdos/inode.c | MSDOS_SB(sb)->data_start = MSDOS_SB(sb)->dir_start+ROUND_TO_MULTIPLE(( |
sb | 236 | fs/msdos/inode.c | MSDOS_SB(sb)->dir_entries << MSDOS_DIR_BITS) >> SECTOR_BITS, |
sb | 240 | fs/msdos/inode.c | CF_LE_L(b->total_sect))*sector_mult-MSDOS_SB(sb)->data_start; |
sb | 243 | fs/msdos/inode.c | MSDOS_SB(sb)->clusters = b->cluster_size ? data_sectors/ |
sb | 245 | fs/msdos/inode.c | MSDOS_SB(sb)->fat_bits = fat ? fat : MSDOS_SB(sb)->clusters > |
sb | 247 | fs/msdos/inode.c | error = !MSDOS_SB(sb)->fats || (MSDOS_SB(sb)->dir_entries & |
sb | 248 | fs/msdos/inode.c | (MSDOS_DPS-1)) || MSDOS_SB(sb)->clusters+2 > MSDOS_SB(sb)-> |
sb | 249 | fs/msdos/inode.c | fat_length*SECTOR_SIZE*8/MSDOS_SB(sb)->fat_bits || |
sb | 258 | fs/msdos/inode.c | sb->s_blocksize = blksize; /* Using this small block size solve the */ |
sb | 262 | fs/msdos/inode.c | sb->s_blocksize_bits = blksize == 512 ? 9 : 10; |
sb | 266 | fs/msdos/inode.c | "uid=%d,gid=%d,umask=%03o%s]\n",MSDOS_SB(sb)->fat_bits,check, |
sb | 267 | fs/msdos/inode.c | conversion,uid,gid,umask,MSDOS_CAN_BMAP(MSDOS_SB(sb)) ? |
sb | 270 | fs/msdos/inode.c | "se=%d,ts=%ld,ls=%d]\n",b->media,MSDOS_SB(sb)->cluster_size, |
sb | 271 | fs/msdos/inode.c | MSDOS_SB(sb)->fats,MSDOS_SB(sb)->fat_start,MSDOS_SB(sb)-> |
sb | 272 | fs/msdos/inode.c | fat_length,MSDOS_SB(sb)->dir_start,MSDOS_SB(sb)->dir_entries, |
sb | 273 | fs/msdos/inode.c | MSDOS_SB(sb)->data_start,CF_LE_W(*(unsigned short *) &b-> |
sb | 280 | fs/msdos/inode.c | sb->s_dev); |
sb | 281 | fs/msdos/inode.c | sb->s_dev = 0; |
sb | 284 | fs/msdos/inode.c | sb->s_magic = MSDOS_SUPER_MAGIC; |
sb | 285 | fs/msdos/inode.c | MSDOS_SB(sb)->name_check = check; |
sb | 286 | fs/msdos/inode.c | MSDOS_SB(sb)->conversion = conversion; |
sb | 288 | fs/msdos/inode.c | sb->s_op = &msdos_sops; |
sb | 289 | fs/msdos/inode.c | MSDOS_SB(sb)->fs_uid = uid; |
sb | 290 | fs/msdos/inode.c | MSDOS_SB(sb)->fs_gid = gid; |
sb | 291 | fs/msdos/inode.c | MSDOS_SB(sb)->fs_umask = umask; |
sb | 292 | fs/msdos/inode.c | MSDOS_SB(sb)->quiet = quiet; |
sb | 293 | fs/msdos/inode.c | MSDOS_SB(sb)->free_clusters = -1; /* don't know yet */ |
sb | 294 | fs/msdos/inode.c | MSDOS_SB(sb)->fat_wait = NULL; |
sb | 295 | fs/msdos/inode.c | MSDOS_SB(sb)->fat_lock = 0; |
sb | 296 | fs/msdos/inode.c | MSDOS_SB(sb)->prev_free = 0; |
sb | 297 | fs/msdos/inode.c | if (!(sb->s_mounted = iget(sb,MSDOS_ROOT_INO))) { |
sb | 298 | fs/msdos/inode.c | sb->s_dev = 0; |
sb | 305 | fs/msdos/inode.c | return sb; |
sb | 309 | fs/msdos/inode.c | void msdos_statfs(struct super_block *sb,struct statfs *buf) |
sb | 313 | fs/msdos/inode.c | put_fs_long(sb->s_magic,&buf->f_type); |
sb | 314 | fs/msdos/inode.c | put_fs_long(MSDOS_SB(sb)->cluster_size*SECTOR_SIZE,&buf->f_bsize); |
sb | 315 | fs/msdos/inode.c | put_fs_long(MSDOS_SB(sb)->clusters,&buf->f_blocks); |
sb | 316 | fs/msdos/inode.c | lock_fat(sb); |
sb | 317 | fs/msdos/inode.c | if (MSDOS_SB(sb)->free_clusters != -1) |
sb | 318 | fs/msdos/inode.c | free = MSDOS_SB(sb)->free_clusters; |
sb | 321 | fs/msdos/inode.c | for (nr = 2; nr < MSDOS_SB(sb)->clusters+2; nr++) |
sb | 322 | fs/msdos/inode.c | if (!fat_access(sb,nr,-1)) free++; |
sb | 323 | fs/msdos/inode.c | MSDOS_SB(sb)->free_clusters = free; |
sb | 325 | fs/msdos/inode.c | unlock_fat(sb); |
sb | 336 | fs/msdos/inode.c | struct msdos_sb_info *sb; |
sb | 339 | fs/msdos/inode.c | sb = MSDOS_SB(inode->i_sb); |
sb | 341 | fs/msdos/inode.c | return sb->dir_start + block; |
sb | 343 | fs/msdos/inode.c | cluster = block/sb->cluster_size; |
sb | 344 | fs/msdos/inode.c | offset = block % sb->cluster_size; |
sb | 346 | fs/msdos/inode.c | return (cluster-2)*sb->cluster_size+sb->data_start+offset; |
sb | 352 | fs/msdos/inode.c | struct super_block *sb = inode->i_sb; |
sb | 416 | fs/msdos/inode.c | inode->i_op = sb->s_blocksize == 1024 |
sb | 438 | fs/msdos/inode.c | struct super_block *sb = inode->i_sb; |
sb | 94 | fs/msdos/misc.c | void lock_fat(struct super_block *sb) |
sb | 96 | fs/msdos/misc.c | while (MSDOS_SB(sb)->fat_lock) sleep_on(&MSDOS_SB(sb)->fat_wait); |
sb | 97 | fs/msdos/misc.c | MSDOS_SB(sb)->fat_lock = 1; |
sb | 101 | fs/msdos/misc.c | void unlock_fat(struct super_block *sb) |
sb | 103 | fs/msdos/misc.c | MSDOS_SB(sb)->fat_lock = 0; |
sb | 104 | fs/msdos/misc.c | wake_up(&MSDOS_SB(sb)->fat_wait); |
sb | 115 | fs/msdos/misc.c | struct super_block *sb = inode->i_sb; |
sb | 178 | fs/msdos/misc.c | msdos_set_uptodate(sb,bh,1); |
sb | 260 | fs/msdos/misc.c | struct super_block *sb = dir->i_sb; |
sb | 324 | fs/msdos/misc.c | inode = iget(sb,sector*MSDOS_DPS+entry); \ |
sb | 340 | fs/msdos/misc.c | static int raw_scan_sector(struct super_block *sb,int sector,char *name, |
sb | 349 | fs/msdos/misc.c | if (!(bh = bread(sb->s_dev,sector,SECTOR_SIZE))) return -EIO; |
sb | 381 | fs/msdos/misc.c | static int raw_scan_root(struct super_block *sb,char *name,int *number,int *ino, |
sb | 386 | fs/msdos/misc.c | for (count = 0; count < MSDOS_SB(sb)->dir_entries/MSDOS_DPS; count++) { |
sb | 387 | fs/msdos/misc.c | if ((cluster = raw_scan_sector(sb,MSDOS_SB(sb)->dir_start+count, |
sb | 399 | fs/msdos/misc.c | static int raw_scan_nonroot(struct super_block *sb,int start,char *name, |
sb | 409 | fs/msdos/misc.c | for (count = 0; count < MSDOS_SB(sb)->cluster_size; count++) { |
sb | 410 | fs/msdos/misc.c | if ((cluster = raw_scan_sector(sb,(start-2)* |
sb | 411 | fs/msdos/misc.c | MSDOS_SB(sb)->cluster_size+MSDOS_SB(sb)->data_start+ |
sb | 415 | fs/msdos/misc.c | if (!(start = fat_access(sb,start,-1))) { |
sb | 416 | fs/msdos/misc.c | fs_panic(sb,"FAT error"); |
sb | 435 | fs/msdos/misc.c | static int raw_scan(struct super_block *sb,int start,char *name,int *number, |
sb | 439 | fs/msdos/misc.c | return raw_scan_nonroot(sb,start,name,number,ino,res_bh,res_de); |
sb | 440 | fs/msdos/misc.c | else return raw_scan_root(sb,name,number,ino,res_bh,res_de); |
sb | 2 | fs/msdos/msbuffer.h | struct buffer_head *msdos_bread (struct super_block *sb, int block); |
sb | 3 | fs/msdos/msbuffer.h | struct buffer_head *msdos_getblk (struct super_block *sb, int block); |
sb | 4 | fs/msdos/msbuffer.h | void msdos_brelse (struct super_block *sb, struct buffer_head *bh); |
sb | 5 | fs/msdos/msbuffer.h | void msdos_mark_buffer_dirty (struct super_block *sb, |
sb | 8 | fs/msdos/msbuffer.h | void msdos_set_uptodate (struct super_block *sb, |
sb | 11 | fs/msdos/msbuffer.h | int msdos_is_uptodate (struct super_block *sb, struct buffer_head *bh); |
sb | 12 | fs/msdos/msbuffer.h | void msdos_ll_rw_block (struct super_block *sb, int opr, |
sb | 18 | fs/msdos/msbuffer.h | #define brelse(b) msdos_brelse(sb,b) |
sb | 19 | fs/msdos/msbuffer.h | #define bread(d,b,s) msdos_bread(sb,b) |
sb | 20 | fs/msdos/msbuffer.h | #define getblk(d,b,s) msdos_getblk(sb,b) |
sb | 21 | fs/msdos/msbuffer.h | #define mark_buffer_dirty(b,v) msdos_mark_buffer_dirty(sb,b,v) |
sb | 112 | fs/msdos/namei.c | struct super_block *sb = dir->i_sb; |
sb | 179 | fs/msdos/namei.c | struct super_block *sb = dir->i_sb; |
sb | 216 | fs/msdos/namei.c | struct super_block *sb = dir->i_sb; |
sb | 244 | fs/msdos/namei.c | static void dump_fat(struct super_block *sb,int start) |
sb | 249 | fs/msdos/namei.c | start = fat_access(sb,start,-1); |
sb | 264 | fs/msdos/namei.c | struct super_block *sb = dir->i_sb; |
sb | 322 | fs/msdos/namei.c | struct super_block *sb = dir->i_sb; |
sb | 348 | fs/msdos/namei.c | struct super_block *sb = dir->i_sb; |
sb | 390 | fs/msdos/namei.c | struct super_block *sb = dir->i_sb; |
sb | 437 | fs/msdos/namei.c | struct super_block *sb = old_dir->i_sb; |
sb | 489 | 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 | 160 | fs/namei.c | struct super_block * sb; |
sb | 172 | fs/namei.c | } else if ((sb = dir->i_sb) && (dir == sb->s_mounted)) { |
sb | 173 | fs/namei.c | sb = dir->i_sb; |
sb | 175 | fs/namei.c | dir = sb->s_covered; |
sb | 55 | fs/nfs/inode.c | void nfs_put_super(struct super_block *sb) |
sb | 58 | fs/nfs/inode.c | close_fp(sb->u.nfs_sb.s_server.file, 0); |
sb | 59 | fs/nfs/inode.c | lock_super(sb); |
sb | 60 | fs/nfs/inode.c | sb->s_dev = 0; |
sb | 61 | fs/nfs/inode.c | unlock_super(sb); |
sb | 73 | fs/nfs/inode.c | struct super_block *nfs_read_super(struct super_block *sb, void *raw_data, |
sb | 80 | fs/nfs/inode.c | dev_t dev = sb->s_dev; |
sb | 84 | fs/nfs/inode.c | sb->s_dev = 0; |
sb | 94 | fs/nfs/inode.c | sb->s_dev = 0; |
sb | 99 | fs/nfs/inode.c | sb->s_dev = 0; |
sb | 103 | fs/nfs/inode.c | lock_super(sb); |
sb | 104 | fs/nfs/inode.c | sb->s_blocksize = 1024; /* XXX */ |
sb | 105 | fs/nfs/inode.c | sb->s_blocksize_bits = 10; |
sb | 106 | fs/nfs/inode.c | sb->s_magic = NFS_SUPER_MAGIC; |
sb | 107 | fs/nfs/inode.c | sb->s_dev = dev; |
sb | 108 | fs/nfs/inode.c | sb->s_op = &nfs_sops; |
sb | 109 | fs/nfs/inode.c | server = &sb->u.nfs_sb.s_server; |
sb | 131 | fs/nfs/inode.c | sb->u.nfs_sb.s_root = data->root; |
sb | 132 | fs/nfs/inode.c | unlock_super(sb); |
sb | 133 | fs/nfs/inode.c | if (!(sb->s_mounted = nfs_fhget(sb, &data->root, NULL))) { |
sb | 134 | fs/nfs/inode.c | sb->s_dev = 0; |
sb | 139 | fs/nfs/inode.c | return sb; |
sb | 142 | fs/nfs/inode.c | void nfs_statfs(struct super_block *sb, struct statfs *buf) |
sb | 148 | fs/nfs/inode.c | error = nfs_proc_statfs(&sb->u.nfs_sb.s_server, &sb->u.nfs_sb.s_root, |
sb | 174 | fs/nfs/inode.c | struct inode *nfs_fhget(struct super_block *sb, struct nfs_fh *fhandle, |
sb | 181 | fs/nfs/inode.c | if (!sb) { |
sb | 186 | fs/nfs/inode.c | error = nfs_proc_getattr(&sb->u.nfs_sb.s_server, fhandle, |
sb | 194 | fs/nfs/inode.c | if (!(inode = iget(sb, fattr->fileid))) { |
sb | 198 | fs/nfs/inode.c | if (inode->i_dev == sb->s_dev) { |
sb | 58 | fs/proc/fd.c | struct super_block * sb; |
sb | 67 | fs/proc/fd.c | sb = dir->i_sb; |
sb | 78 | fs/proc/fd.c | if (!(*result = iget(sb,(pid << 16)+PROC_PID_INO))) { |
sb | 112 | fs/proc/fd.c | if (!(*result = iget(sb,ino))) |
sb | 29 | fs/proc/inode.c | void proc_put_super(struct super_block *sb) |
sb | 31 | fs/proc/inode.c | lock_super(sb); |
sb | 32 | fs/proc/inode.c | sb->s_dev = 0; |
sb | 33 | fs/proc/inode.c | unlock_super(sb); |
sb | 64 | fs/proc/inode.c | void proc_statfs(struct super_block *sb, struct statfs *buf) |
sb | 34 | fs/super.c | static int do_remount_sb(struct super_block *sb, int flags, char * data); |
sb | 184 | fs/super.c | void __wait_on_super(struct super_block * sb) |
sb | 188 | fs/super.c | add_wait_queue(&sb->s_wait, &wait); |
sb | 191 | fs/super.c | if (sb->s_lock) { |
sb | 195 | fs/super.c | remove_wait_queue(&sb->s_wait, &wait); |
sb | 201 | fs/super.c | struct super_block * sb; |
sb | 203 | fs/super.c | for (sb = super_blocks + 0 ; sb < super_blocks + NR_SUPER ; sb++) { |
sb | 204 | fs/super.c | if (!sb->s_dev) |
sb | 206 | fs/super.c | if (dev && sb->s_dev != dev) |
sb | 208 | fs/super.c | wait_on_super(sb); |
sb | 209 | fs/super.c | if (!sb->s_dev || !sb->s_dirt) |
sb | 211 | fs/super.c | if (dev && (dev != sb->s_dev)) |
sb | 213 | fs/super.c | if (sb->s_op && sb->s_op->write_super) |
sb | 214 | fs/super.c | sb->s_op->write_super(sb); |
sb | 238 | fs/super.c | struct super_block * sb; |
sb | 245 | fs/super.c | if (!(sb = get_super(dev))) |
sb | 247 | fs/super.c | if (sb->s_covered) { |
sb | 252 | fs/super.c | if (sb->s_op && sb->s_op->put_super) |
sb | 253 | fs/super.c | sb->s_op->put_super(sb); |
sb | 324 | fs/super.c | struct super_block * sb; |
sb | 330 | fs/super.c | if (!(sb=get_super(dev))) |
sb | 332 | fs/super.c | if (!(sb->s_flags & MS_RDONLY)) { |
sb | 334 | fs/super.c | retval = do_remount_sb(sb, MS_RDONLY, 0); |
sb | 340 | fs/super.c | if (!(sb=get_super(dev)) || !(sb->s_covered)) |
sb | 342 | fs/super.c | if (!sb->s_covered->i_mount) |
sb | 345 | fs/super.c | if (!fs_may_umount(dev, sb->s_mounted)) |
sb | 347 | fs/super.c | sb->s_covered->i_mount = NULL; |
sb | 348 | fs/super.c | iput(sb->s_covered); |
sb | 349 | fs/super.c | sb->s_covered = NULL; |
sb | 350 | fs/super.c | iput(sb->s_mounted); |
sb | 351 | fs/super.c | sb->s_mounted = NULL; |
sb | 352 | fs/super.c | if (sb->s_op && sb->s_op->write_super && sb->s_dirt) |
sb | 353 | fs/super.c | sb->s_op->write_super(sb); |
sb | 433 | fs/super.c | struct super_block * sb; |
sb | 451 | fs/super.c | sb = read_super(dev,type,flags,data,0); |
sb | 452 | fs/super.c | if (!sb) { |
sb | 456 | fs/super.c | if (sb->s_covered) { |
sb | 460 | fs/super.c | sb->s_covered = dir_i; |
sb | 461 | fs/super.c | dir_i->i_mount = sb->s_mounted; |
sb | 472 | fs/super.c | static int do_remount_sb(struct super_block *sb, int flags, char *data) |
sb | 476 | fs/super.c | if (!(flags & MS_RDONLY ) && sb->s_dev && is_read_only(sb->s_dev)) |
sb | 480 | fs/super.c | if ((flags & MS_RDONLY) && !(sb->s_flags & MS_RDONLY)) |
sb | 481 | fs/super.c | if (!fs_may_remount_ro(sb->s_dev)) |
sb | 483 | fs/super.c | if (sb->s_op && sb->s_op->remount_fs) { |
sb | 484 | fs/super.c | retval = sb->s_op->remount_fs(sb, &flags, data); |
sb | 488 | fs/super.c | sb->s_flags = (sb->s_flags & ~MS_RMT_MASK) | |
sb | 647 | fs/super.c | struct super_block * sb; |
sb | 680 | fs/super.c | sb = read_super(ROOT_DEV,fs_type->name,root_mountflags,NULL,1); |
sb | 681 | fs/super.c | if (sb) { |
sb | 682 | fs/super.c | inode = sb->s_mounted; |
sb | 684 | fs/super.c | sb->s_covered = inode; |
sb | 685 | fs/super.c | sb->s_flags = root_mountflags; |
sb | 690 | fs/super.c | (sb->s_flags & MS_RDONLY) ? " readonly" : ""); |
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 | 77 | fs/sysv/dir.c | if (!inode || !(sb = inode->i_sb) || !S_ISDIR(inode->i_mode)) |
sb | 82 | fs/sysv/dir.c | offset = filp->f_pos & sb->sv_block_size_1; |
sb | 83 | fs/sysv/dir.c | bh = sysv_file_bread(inode, filp->f_pos >> sb->sv_block_size_bits, 0); |
sb | 85 | fs/sysv/dir.c | filp->f_pos += sb->sv_block_size - offset; |
sb | 89 | fs/sysv/dir.c | while (offset < sb->sv_block_size && filp->f_pos < inode->i_size) { |
sb | 74 | fs/sysv/file.c | struct super_block * sb = inode->i_sb; |
sb | 103 | fs/sysv/file.c | block = offset >> sb->sv_block_size_bits; |
sb | 104 | fs/sysv/file.c | offset &= sb->sv_block_size_1; |
sb | 105 | fs/sysv/file.c | size = (size + sb->sv_block_size_1) >> sb->sv_block_size_bits; |
sb | 106 | fs/sysv/file.c | blocks = (left + offset + sb->sv_block_size_1) >> sb->sv_block_size_bits; |
sb | 109 | fs/sysv/file.c | blocks += read_ahead[MAJOR(inode->i_dev)] >> (sb->sv_block_size_bits - 9); |
sb | 162 | fs/sysv/file.c | if (left < sb->sv_block_size - offset) |
sb | 165 | fs/sysv/file.c | chars = sb->sv_block_size - offset; |
sb | 199 | fs/sysv/file.c | struct super_block * sb = inode->i_sb; |
sb | 226 | fs/sysv/file.c | bh = sysv_getblk (inode, pos >> sb->sv_block_size_bits, 1); |
sb | 232 | fs/sysv/file.c | c = sb->sv_block_size - (pos & sb->sv_block_size_1); |
sb | 235 | fs/sysv/file.c | if (c != sb->sv_block_size && !bh->b_uptodate) { |
sb | 246 | 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 | 87 | fs/sysv/ialloc.c | raw_inode = (struct sysv_inode *) bh->b_data + ((ino-1) & sb->sv_inodes_per_block_1); |
sb | 88 | fs/sysv/ialloc.c | lock_super(sb); |
sb | 89 | fs/sysv/ialloc.c | if (*sb->sv_sb_fic_count < sb->sv_fic_size) |
sb | 90 | fs/sysv/ialloc.c | *sv_sb_fic_inode(sb,(*sb->sv_sb_fic_count)++) = ino; |
sb | 91 | fs/sysv/ialloc.c | (*sb->sv_sb_total_free_inodes)++; |
sb | 92 | fs/sysv/ialloc.c | mark_buffer_dirty(sb->sv_bh1, 1); /* super-block has been modified */ |
sb | 93 | fs/sysv/ialloc.c | if (sb->sv_bh1 != sb->sv_bh2) mark_buffer_dirty(sb->sv_bh2, 1); |
sb | 94 | fs/sysv/ialloc.c | sb->s_dirt = 1; /* and needs time stamp */ |
sb | 97 | fs/sysv/ialloc.c | unlock_super(sb); |
sb | 105 | fs/sysv/ialloc.c | struct super_block * sb; |
sb | 112 | fs/sysv/ialloc.c | sb = dir->i_sb; |
sb | 113 | fs/sysv/ialloc.c | inode->i_sb = sb; |
sb | 115 | fs/sysv/ialloc.c | lock_super(sb); /* protect against task switches */ |
sb | 116 | fs/sysv/ialloc.c | if ((*sb->sv_sb_fic_count == 0) |
sb | 117 | fs/sysv/ialloc.c | || (*sv_sb_fic_inode(sb,(*sb->sv_sb_fic_count)-1) == 0) /* Applies only to SystemV2 FS */ |
sb | 126 | 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 | 127 | fs/sysv/ialloc.c | if (!(bh = sv_bread(sb, sb->s_dev, block))) { |
sb | 133 | fs/sysv/ialloc.c | for (; j < sb->sv_inodes_per_block && i < sb->sv_fic_size; ino++, j++, raw_inode++) { |
sb | 135 | fs/sysv/ialloc.c | *sv_sb_fic_inode(sb,i++) = ino; |
sb | 141 | fs/sysv/ialloc.c | unlock_super(sb); |
sb | 144 | fs/sysv/ialloc.c | *sb->sv_sb_fic_count = i; |
sb | 147 | fs/sysv/ialloc.c | ino = *sv_sb_fic_inode(sb,--(*sb->sv_sb_fic_count)); |
sb | 148 | fs/sysv/ialloc.c | mark_buffer_dirty(sb->sv_bh1, 1); /* super-block has been modified */ |
sb | 149 | fs/sysv/ialloc.c | if (sb->sv_bh1 != sb->sv_bh2) mark_buffer_dirty(sb->sv_bh2, 1); |
sb | 150 | fs/sysv/ialloc.c | sb->s_dirt = 1; /* and needs time stamp */ |
sb | 153 | fs/sysv/ialloc.c | inode->i_dev = sb->s_dev; |
sb | 169 | fs/sysv/ialloc.c | (*sb->sv_sb_total_free_inodes)--; |
sb | 170 | fs/sysv/ialloc.c | mark_buffer_dirty(sb->sv_bh2, 1); /* super-block has been modified again */ |
sb | 171 | fs/sysv/ialloc.c | sb->s_dirt = 1; /* and needs time stamp again */ |
sb | 172 | fs/sysv/ialloc.c | unlock_super(sb); |
sb | 176 | fs/sysv/ialloc.c | unsigned long sysv_count_free_inodes(struct super_block * sb) |
sb | 185 | fs/sysv/ialloc.c | lock_super(sb); |
sb | 192 | fs/sysv/ialloc.c | for (block = sb->sv_firstinodezone, j = SYSV_ROOT_INO ; block < sb->sv_firstdatazone ; block++, j = 0) { |
sb | 193 | fs/sysv/ialloc.c | if (!(bh = sv_bread(sb, sb->s_dev, block))) { |
sb | 199 | fs/sysv/ialloc.c | for (; j < sb->sv_inodes_per_block ; j++, raw_inode++) |
sb | 204 | fs/sysv/ialloc.c | if (count != *sb->sv_sb_total_free_inodes) { |
sb | 205 | 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 | 206 | fs/sysv/ialloc.c | if (!(sb->s_flags & MS_RDONLY)) { |
sb | 207 | fs/sysv/ialloc.c | *sb->sv_sb_total_free_inodes = count; |
sb | 208 | fs/sysv/ialloc.c | mark_buffer_dirty(sb->sv_bh2, 1); /* super-block has been modified */ |
sb | 209 | fs/sysv/ialloc.c | sb->s_dirt = 1; /* and needs time stamp */ |
sb | 212 | fs/sysv/ialloc.c | unlock_super(sb); |
sb | 215 | fs/sysv/ialloc.c | return *sb->sv_sb_total_free_inodes; |
sb | 71 | fs/sysv/inode.c | static void detected_bs512 (struct super_block *sb) |
sb | 73 | fs/sysv/inode.c | sb->sv_block_size = 512; |
sb | 74 | fs/sysv/inode.c | sb->sv_block_size_1 = 512-1; |
sb | 75 | fs/sysv/inode.c | sb->sv_block_size_bits = 9; |
sb | 76 | fs/sysv/inode.c | sb->sv_block_size_ratio = 2; |
sb | 77 | fs/sysv/inode.c | sb->sv_block_size_ratio_bits = 1; |
sb | 78 | fs/sysv/inode.c | sb->sv_inodes_per_block = 512/64; |
sb | 79 | fs/sysv/inode.c | sb->sv_inodes_per_block_1 = 512/64-1; |
sb | 80 | fs/sysv/inode.c | sb->sv_inodes_per_block_bits = 9-6; |
sb | 81 | fs/sysv/inode.c | sb->sv_toobig_block = 10 + |
sb | 82 | fs/sysv/inode.c | (sb->sv_ind_per_block = 512/4) + |
sb | 83 | fs/sysv/inode.c | (sb->sv_ind_per_block_2 = (512/4)*(512/4)) + |
sb | 84 | fs/sysv/inode.c | (sb->sv_ind_per_block_3 = (512/4)*(512/4)*(512/4)); |
sb | 85 | fs/sysv/inode.c | sb->sv_ind_per_block_1 = 512/4-1; |
sb | 86 | fs/sysv/inode.c | sb->sv_ind_per_block_2_1 = (512/4)*(512/4)-1; |
sb | 87 | fs/sysv/inode.c | sb->sv_ind_per_block_2_bits = 2 * |
sb | 88 | fs/sysv/inode.c | (sb->sv_ind_per_block_bits = 9-2); |
sb | 89 | fs/sysv/inode.c | sb->sv_ind_per_block_block_size_1 = (512/4)*512-1; |
sb | 90 | fs/sysv/inode.c | sb->sv_ind_per_block_block_size_bits = (9-2)+9; |
sb | 91 | fs/sysv/inode.c | sb->sv_ind_per_block_2_block_size_1 = (512/4)*(512/4)*512-1; |
sb | 92 | fs/sysv/inode.c | sb->sv_ind_per_block_2_block_size_bits = (9-2)+(9-2)+9; |
sb | 93 | fs/sysv/inode.c | sb->sv_ind0_size = 10 * 512; |
sb | 94 | fs/sysv/inode.c | sb->sv_ind1_size = (10 + (512/4))* 512; |
sb | 95 | fs/sysv/inode.c | sb->sv_ind2_size = (10 + (512/4) + (512/4)*(512/4)) * 512; |
sb | 98 | fs/sysv/inode.c | static void detected_bs1024 (struct super_block *sb) |
sb | 100 | fs/sysv/inode.c | sb->sv_block_size = 1024; |
sb | 101 | fs/sysv/inode.c | sb->sv_block_size_1 = 1024-1; |
sb | 102 | fs/sysv/inode.c | sb->sv_block_size_bits = 10; |
sb | 103 | fs/sysv/inode.c | sb->sv_block_size_ratio = 1; |
sb | 104 | fs/sysv/inode.c | sb->sv_block_size_ratio_bits = 0; |
sb | 105 | fs/sysv/inode.c | sb->sv_inodes_per_block = 1024/64; |
sb | 106 | fs/sysv/inode.c | sb->sv_inodes_per_block_1 = 1024/64-1; |
sb | 107 | fs/sysv/inode.c | sb->sv_inodes_per_block_bits = 10-6; |
sb | 108 | fs/sysv/inode.c | sb->sv_toobig_block = 10 + |
sb | 109 | fs/sysv/inode.c | (sb->sv_ind_per_block = 1024/4) + |
sb | 110 | fs/sysv/inode.c | (sb->sv_ind_per_block_2 = (1024/4)*(1024/4)) + |
sb | 111 | fs/sysv/inode.c | (sb->sv_ind_per_block_3 = (1024/4)*(1024/4)*(1024/4)); |
sb | 112 | fs/sysv/inode.c | sb->sv_ind_per_block_1 = 1024/4-1; |
sb | 113 | fs/sysv/inode.c | sb->sv_ind_per_block_2_1 = (1024/4)*(1024/4)-1; |
sb | 114 | fs/sysv/inode.c | sb->sv_ind_per_block_2_bits = 2 * |
sb | 115 | fs/sysv/inode.c | (sb->sv_ind_per_block_bits = 10-2); |
sb | 116 | fs/sysv/inode.c | sb->sv_ind_per_block_block_size_1 = (1024/4)*1024-1; |
sb | 117 | fs/sysv/inode.c | sb->sv_ind_per_block_block_size_bits = (10-2)+10; |
sb | 118 | fs/sysv/inode.c | sb->sv_ind_per_block_2_block_size_1 = (1024/4)*(1024/4)*1024-1; |
sb | 119 | fs/sysv/inode.c | sb->sv_ind_per_block_2_block_size_bits = (10-2)+(10-2)+10; |
sb | 120 | fs/sysv/inode.c | sb->sv_ind0_size = 10 * 1024; |
sb | 121 | fs/sysv/inode.c | sb->sv_ind1_size = (10 + (1024/4))* 1024; |
sb | 122 | fs/sysv/inode.c | sb->sv_ind2_size = (10 + (1024/4) + (1024/4)*(1024/4)) * 1024; |
sb | 125 | fs/sysv/inode.c | static const char* detect_xenix (struct super_block *sb, struct buffer_head *bh) |
sb | 133 | fs/sysv/inode.c | case 1: detected_bs512(sb); break; |
sb | 134 | fs/sysv/inode.c | case 2: detected_bs1024(sb); break; |
sb | 137 | fs/sysv/inode.c | sb->sv_type = FSTYPE_XENIX; |
sb | 140 | fs/sysv/inode.c | static struct super_block * detected_xenix (struct super_block *sb, struct buffer_head *bh1, struct buffer_head *bh2) |
sb | 145 | fs/sysv/inode.c | if (sb->sv_block_size == BLOCK_SIZE) |
sb | 157 | fs/sysv/inode.c | sb->sv_convert = 0; |
sb | 158 | fs/sysv/inode.c | sb->sv_kludge_symlinks = 1; |
sb | 159 | fs/sysv/inode.c | sb->sv_truncate = 1; |
sb | 160 | fs/sysv/inode.c | sb->sv_link_max = XENIX_LINK_MAX; |
sb | 161 | fs/sysv/inode.c | sb->sv_fic_size = XENIX_NICINOD; |
sb | 162 | fs/sysv/inode.c | sb->sv_flc_size = XENIX_NICFREE; |
sb | 163 | fs/sysv/inode.c | sb->sv_bh1 = bh1; |
sb | 164 | fs/sysv/inode.c | sb->sv_bh2 = bh2; |
sb | 165 | fs/sysv/inode.c | sb->sv_sbd1 = (char *) sbd1; |
sb | 166 | fs/sysv/inode.c | sb->sv_sbd2 = (char *) sbd2; |
sb | 167 | fs/sysv/inode.c | sb->sv_sb_fic_count = &sbd1->s_ninode; |
sb | 168 | fs/sysv/inode.c | sb->sv_sb_fic_inodes = &sbd1->s_inode[0]; |
sb | 169 | fs/sysv/inode.c | sb->sv_sb_total_free_inodes = &sbd2->s_tinode; |
sb | 170 | fs/sysv/inode.c | sb->sv_sb_flc_count = &sbd1->s_nfree; |
sb | 171 | fs/sysv/inode.c | sb->sv_sb_flc_blocks = &sbd1->s_free[0]; |
sb | 172 | fs/sysv/inode.c | sb->sv_sb_total_free_blocks = &sbd2->s_tfree; |
sb | 173 | fs/sysv/inode.c | sb->sv_sb_time = &sbd2->s_time; |
sb | 174 | fs/sysv/inode.c | sb->sv_block_base = 0; |
sb | 175 | fs/sysv/inode.c | sb->sv_firstinodezone = 2; |
sb | 176 | fs/sysv/inode.c | sb->sv_firstdatazone = sbd1->s_isize; |
sb | 177 | fs/sysv/inode.c | sb->sv_nzones = sbd1->s_fsize; |
sb | 178 | fs/sysv/inode.c | sb->sv_ndatazones = sb->sv_nzones - sb->sv_firstdatazone; |
sb | 179 | fs/sysv/inode.c | return sb; |
sb | 182 | fs/sysv/inode.c | static const char* detect_sysv4 (struct super_block *sb, struct buffer_head *bh) |
sb | 192 | fs/sysv/inode.c | case 1: detected_bs512(sb); break; |
sb | 193 | fs/sysv/inode.c | case 2: detected_bs1024(sb); break; |
sb | 196 | fs/sysv/inode.c | sb->sv_type = FSTYPE_SYSV4; |
sb | 199 | fs/sysv/inode.c | static struct super_block * detected_sysv4 (struct super_block *sb, struct buffer_head *bh) |
sb | 203 | fs/sysv/inode.c | if (sb->sv_block_size == BLOCK_SIZE) |
sb | 214 | fs/sysv/inode.c | sb->sv_convert = 0; |
sb | 215 | fs/sysv/inode.c | sb->sv_kludge_symlinks = 0; /* ?? */ |
sb | 216 | fs/sysv/inode.c | sb->sv_truncate = 1; |
sb | 217 | fs/sysv/inode.c | sb->sv_link_max = SYSV_LINK_MAX; |
sb | 218 | fs/sysv/inode.c | sb->sv_fic_size = SYSV_NICINOD; |
sb | 219 | fs/sysv/inode.c | sb->sv_flc_size = SYSV_NICFREE; |
sb | 220 | fs/sysv/inode.c | sb->sv_bh1 = bh; |
sb | 221 | fs/sysv/inode.c | sb->sv_bh2 = bh; |
sb | 222 | fs/sysv/inode.c | sb->sv_sbd1 = (char *) sbd; |
sb | 223 | fs/sysv/inode.c | sb->sv_sbd2 = (char *) sbd; |
sb | 224 | fs/sysv/inode.c | sb->sv_sb_fic_count = &sbd->s_ninode; |
sb | 225 | fs/sysv/inode.c | sb->sv_sb_fic_inodes = &sbd->s_inode[0]; |
sb | 226 | fs/sysv/inode.c | sb->sv_sb_total_free_inodes = &sbd->s_tinode; |
sb | 227 | fs/sysv/inode.c | sb->sv_sb_flc_count = &sbd->s_nfree; |
sb | 228 | fs/sysv/inode.c | sb->sv_sb_flc_blocks = &sbd->s_free[0]; |
sb | 229 | fs/sysv/inode.c | sb->sv_sb_total_free_blocks = &sbd->s_tfree; |
sb | 230 | fs/sysv/inode.c | sb->sv_sb_time = &sbd->s_time; |
sb | 231 | fs/sysv/inode.c | sb->sv_sb_state = &sbd->s_state; |
sb | 232 | fs/sysv/inode.c | sb->sv_block_base = 0; |
sb | 233 | fs/sysv/inode.c | sb->sv_firstinodezone = 2; |
sb | 234 | fs/sysv/inode.c | sb->sv_firstdatazone = sbd->s_isize; |
sb | 235 | fs/sysv/inode.c | sb->sv_nzones = sbd->s_fsize; |
sb | 236 | fs/sysv/inode.c | sb->sv_ndatazones = sb->sv_nzones - sb->sv_firstdatazone; |
sb | 237 | fs/sysv/inode.c | return sb; |
sb | 240 | fs/sysv/inode.c | static const char* detect_sysv2 (struct super_block *sb, struct buffer_head *bh) |
sb | 250 | fs/sysv/inode.c | case 1: detected_bs512(sb); break; |
sb | 251 | fs/sysv/inode.c | case 2: detected_bs1024(sb); break; |
sb | 254 | fs/sysv/inode.c | sb->sv_type = FSTYPE_SYSV2; |
sb | 257 | fs/sysv/inode.c | static struct super_block * detected_sysv2 (struct super_block *sb, struct buffer_head *bh) |
sb | 261 | fs/sysv/inode.c | if (sb->sv_block_size == BLOCK_SIZE) |
sb | 272 | fs/sysv/inode.c | sb->sv_convert = 0; |
sb | 273 | fs/sysv/inode.c | sb->sv_kludge_symlinks = 0; /* ?? */ |
sb | 274 | fs/sysv/inode.c | sb->sv_truncate = 1; |
sb | 275 | fs/sysv/inode.c | sb->sv_link_max = SYSV_LINK_MAX; |
sb | 276 | fs/sysv/inode.c | sb->sv_fic_size = SYSV_NICINOD; |
sb | 277 | fs/sysv/inode.c | sb->sv_flc_size = SYSV_NICFREE; |
sb | 278 | fs/sysv/inode.c | sb->sv_bh1 = bh; |
sb | 279 | fs/sysv/inode.c | sb->sv_bh2 = bh; |
sb | 280 | fs/sysv/inode.c | sb->sv_sbd1 = (char *) sbd; |
sb | 281 | fs/sysv/inode.c | sb->sv_sbd2 = (char *) sbd; |
sb | 282 | fs/sysv/inode.c | sb->sv_sb_fic_count = &sbd->s_ninode; |
sb | 283 | fs/sysv/inode.c | sb->sv_sb_fic_inodes = &sbd->s_inode[0]; |
sb | 284 | fs/sysv/inode.c | sb->sv_sb_total_free_inodes = &sbd->s_tinode; |
sb | 285 | fs/sysv/inode.c | sb->sv_sb_flc_count = &sbd->s_nfree; |
sb | 286 | fs/sysv/inode.c | sb->sv_sb_flc_blocks = &sbd->s_free[0]; |
sb | 287 | fs/sysv/inode.c | sb->sv_sb_total_free_blocks = &sbd->s_tfree; |
sb | 288 | fs/sysv/inode.c | sb->sv_sb_time = &sbd->s_time; |
sb | 289 | fs/sysv/inode.c | sb->sv_sb_state = &sbd->s_state; |
sb | 290 | fs/sysv/inode.c | sb->sv_block_base = 0; |
sb | 291 | fs/sysv/inode.c | sb->sv_firstinodezone = 2; |
sb | 292 | fs/sysv/inode.c | sb->sv_firstdatazone = sbd->s_isize; |
sb | 293 | fs/sysv/inode.c | sb->sv_nzones = sbd->s_fsize; |
sb | 294 | fs/sysv/inode.c | sb->sv_ndatazones = sb->sv_nzones - sb->sv_firstdatazone; |
sb | 295 | fs/sysv/inode.c | return sb; |
sb | 298 | fs/sysv/inode.c | static const char* detect_coherent (struct super_block *sb, struct buffer_head *bh) |
sb | 306 | fs/sysv/inode.c | detected_bs512(sb); |
sb | 307 | fs/sysv/inode.c | sb->sv_type = FSTYPE_COH; |
sb | 310 | fs/sysv/inode.c | static struct super_block * detected_coherent (struct super_block *sb, struct buffer_head *bh) |
sb | 320 | fs/sysv/inode.c | sb->sv_convert = 1; |
sb | 321 | fs/sysv/inode.c | sb->sv_kludge_symlinks = 1; |
sb | 322 | fs/sysv/inode.c | sb->sv_truncate = 1; |
sb | 323 | fs/sysv/inode.c | sb->sv_link_max = COH_LINK_MAX; |
sb | 324 | fs/sysv/inode.c | sb->sv_fic_size = COH_NICINOD; |
sb | 325 | fs/sysv/inode.c | sb->sv_flc_size = COH_NICFREE; |
sb | 326 | fs/sysv/inode.c | sb->sv_bh1 = bh; |
sb | 327 | fs/sysv/inode.c | sb->sv_bh2 = bh; |
sb | 328 | fs/sysv/inode.c | sb->sv_sbd1 = (char *) sbd; |
sb | 329 | fs/sysv/inode.c | sb->sv_sbd2 = (char *) sbd; |
sb | 330 | fs/sysv/inode.c | sb->sv_sb_fic_count = &sbd->s_ninode; |
sb | 331 | fs/sysv/inode.c | sb->sv_sb_fic_inodes = &sbd->s_inode[0]; |
sb | 332 | fs/sysv/inode.c | sb->sv_sb_total_free_inodes = &sbd->s_tinode; |
sb | 333 | fs/sysv/inode.c | sb->sv_sb_flc_count = &sbd->s_nfree; |
sb | 334 | fs/sysv/inode.c | sb->sv_sb_flc_blocks = &sbd->s_free[0]; |
sb | 335 | fs/sysv/inode.c | sb->sv_sb_total_free_blocks = &sbd->s_tfree; |
sb | 336 | fs/sysv/inode.c | sb->sv_sb_time = &sbd->s_time; |
sb | 337 | fs/sysv/inode.c | sb->sv_sb_state = &sbd->s_state; |
sb | 338 | fs/sysv/inode.c | sb->sv_block_base = 0; |
sb | 339 | fs/sysv/inode.c | sb->sv_firstinodezone = 2; |
sb | 340 | fs/sysv/inode.c | sb->sv_firstdatazone = sbd->s_isize; |
sb | 341 | fs/sysv/inode.c | sb->sv_nzones = from_coh_ulong(sbd->s_fsize); |
sb | 342 | fs/sysv/inode.c | sb->sv_ndatazones = sb->sv_nzones - sb->sv_firstdatazone; |
sb | 343 | fs/sysv/inode.c | return sb; |
sb | 346 | fs/sysv/inode.c | struct super_block *sysv_read_super(struct super_block *sb,void *data, |
sb | 351 | fs/sysv/inode.c | int dev = sb->s_dev; |
sb | 363 | fs/sysv/inode.c | lock_super(sb); |
sb | 368 | fs/sysv/inode.c | if ((found = detect_xenix(sb,bh)) != NULL) |
sb | 374 | fs/sysv/inode.c | if ((found = detect_sysv4(sb,bh)) != NULL) |
sb | 376 | fs/sysv/inode.c | if ((found = detect_sysv2(sb,bh)) != NULL) |
sb | 379 | fs/sysv/inode.c | if ((found = detect_coherent(sb,bh)) != NULL) |
sb | 390 | fs/sysv/inode.c | if ((found = detect_sysv4(sb,bh)) != NULL) { |
sb | 391 | fs/sysv/inode.c | sb->sv_block_base = offsets[i] << sb->sv_block_size_ratio_bits; |
sb | 394 | fs/sysv/inode.c | if ((found = detect_sysv2(sb,bh)) != NULL) { |
sb | 395 | fs/sysv/inode.c | sb->sv_block_base = offsets[i] << sb->sv_block_size_ratio_bits; |
sb | 401 | fs/sysv/inode.c | sb->s_dev=0; |
sb | 402 | fs/sysv/inode.c | unlock_super(sb); |
sb | 410 | fs/sysv/inode.c | if (sb->sv_block_size == BLOCK_SIZE) { |
sb | 411 | fs/sysv/inode.c | switch (sb->sv_type) { |
sb | 413 | fs/sysv/inode.c | if (!detected_xenix(sb,bh,bh)) |
sb | 417 | fs/sysv/inode.c | if (!detected_sysv4(sb,bh)) |
sb | 421 | fs/sysv/inode.c | if (!detected_sysv2(sb,bh)) |
sb | 427 | fs/sysv/inode.c | sb->s_dev = 0; |
sb | 428 | fs/sysv/inode.c | unlock_super(sb); |
sb | 436 | fs/sysv/inode.c | unsigned long blocknr = bh->b_blocknr << sb->sv_block_size_ratio_bits; |
sb | 439 | fs/sysv/inode.c | set_blocksize(dev,sb->sv_block_size); |
sb | 441 | fs/sysv/inode.c | switch (sb->sv_type) { |
sb | 443 | fs/sysv/inode.c | if ((bh1 = bread(dev, blocknr, sb->sv_block_size)) == NULL) |
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_xenix(sb,bh1,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_sysv4(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_sysv2(sb,bh2)) |
sb | 463 | fs/sysv/inode.c | if ((bh2 = bread(dev, blocknr+1, sb->sv_block_size)) == NULL) |
sb | 465 | fs/sysv/inode.c | if (!detected_coherent(sb,bh2)) |
sb | 472 | fs/sysv/inode.c | set_blocksize(sb->s_dev,BLOCK_SIZE); |
sb | 473 | fs/sysv/inode.c | sb->s_dev = 0; |
sb | 474 | fs/sysv/inode.c | unlock_super(sb); |
sb | 479 | fs/sysv/inode.c | sb->sv_ninodes = (sb->sv_firstdatazone - sb->sv_firstinodezone) << sb->sv_inodes_per_block_bits; |
sb | 481 | fs/sysv/inode.c | printk("VFS: Found a %s FS (block size = %d) on device %d/%d\n",found,sb->sv_block_size,MAJOR(dev),MINOR(dev)); |
sb | 482 | fs/sysv/inode.c | sb->s_magic = SYSV_MAGIC_BASE + sb->sv_type; |
sb | 484 | fs/sysv/inode.c | sb->s_blocksize = sb->sv_block_size; |
sb | 485 | fs/sysv/inode.c | sb->s_blocksize_bits = sb->sv_block_size_bits; |
sb | 487 | fs/sysv/inode.c | sb->s_dev = dev; |
sb | 488 | fs/sysv/inode.c | sb->s_op = &sysv_sops; |
sb | 489 | fs/sysv/inode.c | sb->s_mounted = iget(sb,SYSV_ROOT_INO); |
sb | 490 | fs/sysv/inode.c | unlock_super(sb); |
sb | 491 | fs/sysv/inode.c | if (!sb->s_mounted) { |
sb | 493 | fs/sysv/inode.c | sysv_put_super(sb); |
sb | 496 | fs/sysv/inode.c | sb->s_dirt = 1; |
sb | 499 | fs/sysv/inode.c | return sb; |
sb | 503 | fs/sysv/inode.c | void sysv_write_super (struct super_block *sb) |
sb | 505 | fs/sysv/inode.c | lock_super(sb); |
sb | 506 | fs/sysv/inode.c | if (sb->sv_bh1->b_dirt || sb->sv_bh2->b_dirt) { |
sb | 511 | fs/sysv/inode.c | unsigned long old_time = *sb->sv_sb_time; |
sb | 512 | fs/sysv/inode.c | if (sb->sv_convert) |
sb | 514 | fs/sysv/inode.c | switch (sb->sv_type) { |
sb | 516 | fs/sysv/inode.c | if (*sb->sv_sb_state == 0x7c269d38 - old_time) |
sb | 517 | fs/sysv/inode.c | *sb->sv_sb_state = 0x7c269d38 - time; |
sb | 521 | fs/sysv/inode.c | if (sb->sv_convert) |
sb | 523 | fs/sysv/inode.c | *sb->sv_sb_time = time; |
sb | 524 | fs/sysv/inode.c | mark_buffer_dirty(sb->sv_bh2, 1); |
sb | 526 | fs/sysv/inode.c | sb->s_dirt = 0; |
sb | 527 | fs/sysv/inode.c | unlock_super(sb); |
sb | 530 | fs/sysv/inode.c | void sysv_put_super(struct super_block *sb) |
sb | 533 | fs/sysv/inode.c | lock_super(sb); |
sb | 534 | fs/sysv/inode.c | brelse(sb->sv_bh1); |
sb | 535 | fs/sysv/inode.c | if (sb->sv_bh1 != sb->sv_bh2) brelse(sb->sv_bh2); |
sb | 537 | fs/sysv/inode.c | if (sb->s_blocksize != BLOCK_SIZE) |
sb | 538 | fs/sysv/inode.c | set_blocksize(sb->s_dev,BLOCK_SIZE); |
sb | 539 | fs/sysv/inode.c | sb->s_dev = 0; |
sb | 540 | fs/sysv/inode.c | unlock_super(sb); |
sb | 544 | fs/sysv/inode.c | void sysv_statfs(struct super_block *sb, struct statfs *buf) |
sb | 548 | fs/sysv/inode.c | put_fs_long(sb->s_magic, &buf->f_type); /* type of filesystem */ |
sb | 549 | fs/sysv/inode.c | put_fs_long(sb->sv_block_size, &buf->f_bsize); /* block size */ |
sb | 550 | fs/sysv/inode.c | put_fs_long(sb->sv_ndatazones, &buf->f_blocks); /* total data blocks in file system */ |
sb | 551 | fs/sysv/inode.c | tmp = sysv_count_free_blocks(sb); |
sb | 554 | fs/sysv/inode.c | put_fs_long(sb->sv_ninodes, &buf->f_files); /* total file nodes in file system */ |
sb | 555 | fs/sysv/inode.c | put_fs_long(sysv_count_free_inodes(sb), &buf->f_ffree); /* free file nodes in fs */ |
sb | 563 | fs/sysv/inode.c | static inline int inode_bmap(struct super_block * sb, struct inode * inode, int nr) |
sb | 568 | fs/sysv/inode.c | return tmp + sb->sv_block_base; |
sb | 571 | fs/sysv/inode.c | static int block_bmap(struct super_block * sb, struct buffer_head * bh, int nr, int convert) |
sb | 583 | fs/sysv/inode.c | return tmp + sb->sv_block_base; |
sb | 589 | fs/sysv/inode.c | struct super_block * sb = inode->i_sb; |
sb | 595 | fs/sysv/inode.c | return inode_bmap(sb,inode,block); |
sb | 597 | fs/sysv/inode.c | convert = sb->sv_convert; |
sb | 598 | fs/sysv/inode.c | if (block < sb->sv_ind_per_block) { |
sb | 599 | fs/sysv/inode.c | i = inode_bmap(sb,inode,10); |
sb | 602 | fs/sysv/inode.c | bh = bread(inode->i_dev,i,sb->sv_block_size); |
sb | 603 | fs/sysv/inode.c | return block_bmap(sb, bh, block, convert); |
sb | 605 | fs/sysv/inode.c | block -= sb->sv_ind_per_block; |
sb | 606 | fs/sysv/inode.c | if (block < sb->sv_ind_per_block_2) { |
sb | 607 | fs/sysv/inode.c | i = inode_bmap(sb,inode,11); |
sb | 610 | fs/sysv/inode.c | bh = bread(inode->i_dev,i,sb->sv_block_size); |
sb | 611 | fs/sysv/inode.c | i = block_bmap(sb, bh, block >> sb->sv_ind_per_block_bits, convert); |
sb | 614 | fs/sysv/inode.c | bh = bread(inode->i_dev,i,sb->sv_block_size); |
sb | 615 | fs/sysv/inode.c | return block_bmap(sb, bh, block & sb->sv_ind_per_block_1, convert); |
sb | 617 | fs/sysv/inode.c | block -= sb->sv_ind_per_block_2; |
sb | 618 | fs/sysv/inode.c | if (block < sb->sv_ind_per_block_3) { |
sb | 619 | fs/sysv/inode.c | i = inode_bmap(sb,inode,12); |
sb | 622 | fs/sysv/inode.c | bh = bread(inode->i_dev,i,sb->sv_block_size); |
sb | 623 | fs/sysv/inode.c | i = block_bmap(sb, bh, block >> sb->sv_ind_per_block_2_bits, convert); |
sb | 626 | fs/sysv/inode.c | bh = bread(inode->i_dev,i,sb->sv_block_size); |
sb | 627 | fs/sysv/inode.c | i = block_bmap(sb, bh, (block >> sb->sv_ind_per_block_bits) & sb->sv_ind_per_block_1,convert); |
sb | 630 | fs/sysv/inode.c | bh = bread(inode->i_dev,i,sb->sv_block_size); |
sb | 631 | fs/sysv/inode.c | return block_bmap(sb, bh, block & sb->sv_ind_per_block_1, convert); |
sb | 648 | fs/sysv/inode.c | struct super_block *sb; |
sb | 653 | fs/sysv/inode.c | sb = inode->i_sb; |
sb | 658 | fs/sysv/inode.c | result = sv_getblk(sb, inode->i_dev, tmp); |
sb | 666 | fs/sysv/inode.c | tmp = sysv_new_block(sb); |
sb | 669 | fs/sysv/inode.c | result = sv_getblk(sb, inode->i_dev, tmp); |
sb | 671 | fs/sysv/inode.c | sysv_free_block(sb,tmp); |
sb | 684 | fs/sysv/inode.c | struct super_block *sb; |
sb | 699 | fs/sysv/inode.c | sb = inode->i_sb; |
sb | 703 | fs/sysv/inode.c | if (sb->sv_convert) |
sb | 706 | fs/sysv/inode.c | result = sv_getblk(sb, bh->b_dev, block); |
sb | 718 | fs/sysv/inode.c | block = sysv_new_block(sb); |
sb | 723 | fs/sysv/inode.c | result = sv_getblk(sb, bh->b_dev, block); |
sb | 725 | fs/sysv/inode.c | sysv_free_block(sb,block); |
sb | 729 | fs/sysv/inode.c | *p = (sb->sv_convert ? to_coh_ulong(block) : block); |
sb | 737 | fs/sysv/inode.c | struct super_block * sb = inode->i_sb; |
sb | 743 | fs/sysv/inode.c | if (block < sb->sv_ind_per_block) { |
sb | 747 | fs/sysv/inode.c | block -= sb->sv_ind_per_block; |
sb | 748 | fs/sysv/inode.c | if (block < sb->sv_ind_per_block_2) { |
sb | 750 | fs/sysv/inode.c | bh = block_getblk(inode, bh, block >> sb->sv_ind_per_block_bits, create); |
sb | 751 | fs/sysv/inode.c | return block_getblk(inode, bh, block & sb->sv_ind_per_block_1, create); |
sb | 753 | fs/sysv/inode.c | block -= sb->sv_ind_per_block_2; |
sb | 754 | fs/sysv/inode.c | if (block < sb->sv_ind_per_block_3) { |
sb | 756 | fs/sysv/inode.c | bh = block_getblk(inode, bh, block >> sb->sv_ind_per_block_2_bits, create); |
sb | 757 | fs/sysv/inode.c | bh = block_getblk(inode, bh, (block >> sb->sv_ind_per_block_bits) & sb->sv_ind_per_block_1, create); |
sb | 758 | fs/sysv/inode.c | return block_getblk(inode, bh, block & sb->sv_ind_per_block_1, create); |
sb | 810 | fs/sysv/inode.c | struct super_block * sb = inode->i_sb; |
sb | 819 | fs/sysv/inode.c | if (!ino || ino > sb->sv_ninodes) { |
sb | 824 | fs/sysv/inode.c | block = sb->sv_firstinodezone + ((ino-1) >> sb->sv_inodes_per_block_bits); |
sb | 825 | fs/sysv/inode.c | if (!(bh = sv_bread(sb,inode->i_dev,block))) { |
sb | 830 | fs/sysv/inode.c | raw_inode = (struct sysv_inode *) bh->b_data + ((ino-1) & sb->sv_inodes_per_block_1); |
sb | 832 | fs/sysv/inode.c | if (sb->sv_kludge_symlinks) |
sb | 839 | fs/sysv/inode.c | if (sb->sv_convert) { |
sb | 854 | fs/sysv/inode.c | if (sb->sv_convert) |
sb | 897 | fs/sysv/inode.c | struct super_block * sb = inode->i_sb; |
sb | 904 | fs/sysv/inode.c | if (!ino || ino > sb->sv_ninodes) { |
sb | 910 | fs/sysv/inode.c | block = sb->sv_firstinodezone + ((ino-1) >> sb->sv_inodes_per_block_bits); |
sb | 911 | fs/sysv/inode.c | if (!(bh = sv_bread(sb,inode->i_dev,block))) { |
sb | 916 | fs/sysv/inode.c | raw_inode = (struct sysv_inode *) bh->b_data + ((ino-1) & sb->sv_inodes_per_block_1); |
sb | 918 | fs/sysv/inode.c | if (sb->sv_kludge_symlinks) |
sb | 924 | fs/sysv/inode.c | if (sb->sv_convert) { |
sb | 938 | 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 | 193 | fs/sysv/namei.c | if (offset < sb->sv_block_size) |
sb | 366 | fs/sysv/namei.c | struct super_block * sb; |
sb | 389 | fs/sysv/namei.c | sb = inode->i_sb; |
sb | 395 | fs/sysv/namei.c | pos += sb->sv_block_size; |
sb | 406 | fs/sysv/namei.c | if (offset < sb->sv_block_size) |
sb | 535 | fs/sysv/namei.c | struct super_block * sb; |
sb | 554 | fs/sysv/namei.c | sb = inode->i_sb; |
sb | 557 | 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 | 176 | fs/sysv/truncate.c | if (sb->sv_convert) |
sb | 180 | fs/sysv/truncate.c | retry |= trunc_indirect(inode,offset+(i<<sb->sv_ind_per_block_bits),ind,sb->sv_convert,&indbh->b_dirt); |
sb | 182 | fs/sysv/truncate.c | for (i = 0; i < sb->sv_ind_per_block; i++) |
sb | 191 | fs/sysv/truncate.c | sysv_free_block(sb,indblock); |
sb | 200 | fs/sysv/truncate.c | struct super_block * sb; |
sb | 212 | fs/sysv/truncate.c | sb = inode->i_sb; |
sb | 213 | fs/sysv/truncate.c | indbh = sv_bread(sb, inode->i_dev, indblock); |
sb | 226 | 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 | 227 | fs/sysv/truncate.c | for (; i < sb->sv_ind_per_block; i++) { |
sb | 230 | fs/sysv/truncate.c | if (sb->sv_convert) |
sb | 234 | fs/sysv/truncate.c | retry |= trunc_dindirect(inode,offset+(i<<sb->sv_ind_per_block_2_bits),ind,sb->sv_convert,&indbh->b_dirt); |
sb | 236 | fs/sysv/truncate.c | for (i = 0; i < sb->sv_ind_per_block; i++) |
sb | 245 | fs/sysv/truncate.c | sysv_free_block(sb,indblock); |
sb | 253 | fs/sysv/truncate.c | struct super_block * sb; |
sb | 255 | fs/sysv/truncate.c | sb = inode->i_sb; |
sb | 257 | fs/sysv/truncate.c | | trunc_indirect(inode,sb->sv_ind0_size,&inode->u.sysv_i.i_data[10],0,&inode->i_dirt) |
sb | 258 | fs/sysv/truncate.c | | trunc_dindirect(inode,sb->sv_ind1_size,&inode->u.sysv_i.i_data[11],0,&inode->i_dirt) |
sb | 259 | fs/sysv/truncate.c | | trunc_tindirect(inode,sb->sv_ind2_size,&inode->u.sysv_i.i_data[12],0,&inode->i_dirt); |
sb | 55 | fs/umsdos/inode.c | void UMSDOS_put_super(struct super_block *sb) |
sb | 57 | fs/umsdos/inode.c | msdos_put_super(sb); |
sb | 64 | fs/umsdos/inode.c | void UMSDOS_statfs(struct super_block *sb,struct statfs *buf) |
sb | 66 | fs/umsdos/inode.c | msdos_statfs(sb,buf); |
sb | 407 | fs/umsdos/inode.c | struct super_block *sb = msdos_read_super(s,data,silent); |
sb | 410 | fs/umsdos/inode.c | if (sb != NULL){ |
sb | 411 | fs/umsdos/inode.c | sb->s_op = &umsdos_sops; |
sb | 412 | fs/umsdos/inode.c | PRINTK (("umsdos_read_super %p\n",sb->s_mounted)); |
sb | 413 | fs/umsdos/inode.c | umsdos_setup_dir_inode (sb->s_mounted); |
sb | 449 | fs/umsdos/inode.c | if (umsdos_real_lookup (sb->s_mounted,UMSDOS_PSDROOT_NAME |
sb | 480 | fs/umsdos/inode.c | return 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 | 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 | 291 | fs/xiafs/bitmap.c | sb = inode->i_sb; |
sb | 293 | fs/xiafs/bitmap.c | bh = get_imap_zone(sb, ino, NULL); |
sb | 297 | fs/xiafs/bitmap.c | if (!clear_bit(ino & (XIAFS_BITS_PER_Z(sb)-1), bh->b_data)) |
sb | 302 | fs/xiafs/bitmap.c | xiafs_unlock_super(sb, sb->u.xiafs_sb.s_imap_cached); |
sb | 307 | fs/xiafs/bitmap.c | struct super_block * sb; |
sb | 311 | fs/xiafs/bitmap.c | sb = dir->i_sb; |
sb | 314 | fs/xiafs/bitmap.c | inode->i_sb = sb; |
sb | 317 | fs/xiafs/bitmap.c | tmp=get_free_ibit(sb, dir->i_ino); |
sb | 324 | fs/xiafs/bitmap.c | inode->i_dev = sb->s_dev; |
sb | 352 | fs/xiafs/bitmap.c | unsigned long xiafs_count_free_inodes(struct super_block *sb) |
sb | 359 | fs/xiafs/bitmap.c | izones=sb->u.xiafs_sb.s_imap_zones; |
sb | 361 | fs/xiafs/bitmap.c | bh=get_imap_zone(sb, i << XIAFS_BITS_PER_Z_BITS(sb), ¬_que); |
sb | 364 | fs/xiafs/bitmap.c | xiafs_unlock_super(sb, sb->u.xiafs_sb.s_imap_cached); |
sb | 367 | fs/xiafs/bitmap.c | i=izones << XIAFS_BITS_PER_Z_BITS(sb); |
sb | 371 | fs/xiafs/bitmap.c | unsigned long xiafs_count_free_zones(struct super_block *sb) |
sb | 378 | fs/xiafs/bitmap.c | zzones=sb->u.xiafs_sb.s_zmap_zones; |
sb | 380 | fs/xiafs/bitmap.c | bh=get_zmap_zone(sb, i << XIAFS_BITS_PER_Z_BITS(sb), ¬_que); |
sb | 383 | fs/xiafs/bitmap.c | xiafs_unlock_super(sb, sb->u.xiafs_sb.s_zmap_cached); |
sb | 386 | fs/xiafs/bitmap.c | i=zzones << XIAFS_BITS_PER_Z_BITS(sb); |
sb | 43 | fs/xiafs/inode.c | void xiafs_put_super(struct super_block *sb) |
sb | 47 | fs/xiafs/inode.c | lock_super(sb); |
sb | 48 | fs/xiafs/inode.c | sb->s_dev = 0; |
sb | 50 | fs/xiafs/inode.c | brelse(sb->u.xiafs_sb.s_imap_buf[i]); |
sb | 52 | fs/xiafs/inode.c | brelse(sb->u.xiafs_sb.s_zmap_buf[i]); |
sb | 53 | fs/xiafs/inode.c | unlock_super(sb); |
sb | 174 | fs/xiafs/inode.c | void xiafs_statfs(struct super_block *sb, struct statfs *buf) |
sb | 179 | fs/xiafs/inode.c | put_fs_long(XIAFS_ZSIZE(sb), &buf->f_bsize); |
sb | 180 | fs/xiafs/inode.c | put_fs_long(sb->u.xiafs_sb.s_ndatazones, &buf->f_blocks); |
sb | 181 | fs/xiafs/inode.c | tmp = xiafs_count_free_zones(sb); |
sb | 184 | fs/xiafs/inode.c | put_fs_long(sb->u.xiafs_sb.s_ninodes, &buf->f_files); |
sb | 185 | fs/xiafs/inode.c | put_fs_long(xiafs_count_free_inodes(sb), &buf->f_ffree); |
sb | 309 | 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 | 477 | include/linux/fs.h | extern struct inode * __iget(struct super_block * sb,int nr,int crsmnt); |
sb | 520 | include/linux/fs.h | extern inline struct inode * iget(struct super_block * sb,int nr) |
sb | 522 | 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 | 36 | include/linux/locks.h | extern inline void wait_on_super(struct super_block * sb) |
sb | 38 | include/linux/locks.h | if (sb->s_lock) |
sb | 39 | include/linux/locks.h | __wait_on_super(sb); |
sb | 42 | include/linux/locks.h | extern inline void lock_super(struct super_block * sb) |
sb | 44 | include/linux/locks.h | if (sb->s_lock) |
sb | 45 | include/linux/locks.h | __wait_on_super(sb); |
sb | 46 | include/linux/locks.h | sb->s_lock = 1; |
sb | 49 | include/linux/locks.h | extern inline void unlock_super(struct super_block * sb) |
sb | 51 | include/linux/locks.h | sb->s_lock = 0; |
sb | 52 | include/linux/locks.h | wake_up(&sb->s_wait); |
sb | 99 | include/linux/minix_fs.h | extern unsigned long minix_count_free_inodes(struct super_block *sb); |
sb | 100 | include/linux/minix_fs.h | extern int minix_new_block(struct super_block * sb); |
sb | 101 | include/linux/minix_fs.h | extern void minix_free_block(struct super_block * sb, int block); |
sb | 102 | include/linux/minix_fs.h | extern unsigned long minix_count_free_blocks(struct super_block *sb); |
sb | 113 | include/linux/minix_fs.h | extern int minix_remount (struct super_block * sb, int * flags, char * data); |
sb | 119 | include/linux/msdos_fs.h | extern void lock_fat(struct super_block *sb); |
sb | 120 | include/linux/msdos_fs.h | extern void unlock_fat(struct super_block *sb); |
sb | 134 | include/linux/msdos_fs.h | extern int fat_access(struct super_block *sb,int nr,int new_value); |
sb | 160 | include/linux/msdos_fs.h | extern void msdos_put_super(struct super_block *sb); |
sb | 163 | include/linux/msdos_fs.h | extern void msdos_statfs(struct super_block *sb,struct statfs *buf); |
sb | 96 | include/linux/nfs_fs.h | extern struct super_block *nfs_read_super(struct super_block *sb, |
sb | 98 | include/linux/nfs_fs.h | extern struct inode *nfs_fhget(struct super_block *sb, struct nfs_fh *fhandle, |
sb | 340 | include/linux/sysv_fs.h | sv_get_hash_table (struct super_block *sb, int 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, int 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, int 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 | 83 | include/linux/xia_fs.h | extern unsigned long xiafs_count_free_inodes(struct super_block *sb); |
sb | 84 | include/linux/xia_fs.h | extern int xiafs_new_zone(struct super_block * sb, u_long prev_addr); |
sb | 85 | include/linux/xia_fs.h | extern void xiafs_free_zone(struct super_block * sb, int block); |
sb | 86 | include/linux/xia_fs.h | extern unsigned long xiafs_count_free_zones(struct super_block *sb); |