tag | line | file | source code |
sb | 79 | fs/buffer.c | struct super_block * sb; |
sb | 81 | fs/buffer.c | if (sb = get_super (dev)) |
sb | 82 | fs/buffer.c | if (sb->s_op && sb->s_op->write_super && sb->s_dirt) |
sb | 83 | fs/buffer.c | sb->s_op->write_super (sb); |
sb | 87 | fs/ext/bitmap.c | struct super_block * sb; |
sb | 91 | fs/ext/bitmap.c | if (!(sb = get_super(dev))) |
sb | 93 | fs/ext/bitmap.c | if (block < sb->s_firstdatazone || block >= sb->s_nzones) |
sb | 106 | fs/ext/bitmap.c | zone = block - sb->s_firstdatazone + 1; |
sb | 109 | fs/ext/bitmap.c | bh = sb->s_zmap[zone]; |
sb | 119 | fs/ext/bitmap.c | struct super_block * sb; |
sb | 122 | fs/ext/bitmap.c | if (!(sb = get_super(dev))) |
sb | 126 | fs/ext/bitmap.c | if (bh=sb->s_zmap[i]) |
sb | 134 | fs/ext/bitmap.c | j += i*8192 + sb->s_firstdatazone-1; |
sb | 135 | fs/ext/bitmap.c | if (j >= sb->s_nzones) |
sb | 151 | fs/ext/bitmap.c | unsigned long ext_count_free_blocks(struct super_block *sb) |
sb | 153 | fs/ext/bitmap.c | return (sb->s_nzones - count_used(sb->s_zmap,sb->s_zmap_blocks,sb->s_nzones)) |
sb | 154 | fs/ext/bitmap.c | << sb->s_log_zone_size; |
sb | 237 | fs/ext/bitmap.c | unsigned long ext_count_free_inodes(struct super_block *sb) |
sb | 239 | fs/ext/bitmap.c | return sb->s_ninodes - count_used(sb->s_imap,sb->s_imap_blocks,sb->s_ninodes); |
sb | 51 | fs/ext/freelists.c | struct super_block * sb; |
sb | 55 | fs/ext/freelists.c | if (!(sb = get_super(dev))) |
sb | 57 | fs/ext/freelists.c | lock_super (sb); |
sb | 58 | fs/ext/freelists.c | if (block < sb->u.ext_sb.s_firstdatazone || block >= sb->u.ext_sb.s_nzones) |
sb | 60 | fs/ext/freelists.c | bh = get_hash_table(dev, block, sb->s_blocksize); |
sb | 64 | fs/ext/freelists.c | free_super (sb); |
sb | 72 | fs/ext/freelists.c | if (sb->u.ext_sb.s_zmap[1]) |
sb | 73 | fs/ext/freelists.c | efb = (struct ext_free_block *) sb->u.ext_sb.s_zmap[1]->b_data; |
sb | 74 | fs/ext/freelists.c | if (!sb->u.ext_sb.s_zmap[1] || efb->count == 254) { |
sb | 78 | fs/ext/freelists.c | if (sb->u.ext_sb.s_zmap[1]) |
sb | 79 | fs/ext/freelists.c | brelse (sb->u.ext_sb.s_zmap[1]); |
sb | 80 | fs/ext/freelists.c | if (!(sb->u.ext_sb.s_zmap[1] = bread (dev, block, sb->s_blocksize))) |
sb | 82 | fs/ext/freelists.c | efb = (struct ext_free_block *) sb->u.ext_sb.s_zmap[1]->b_data; |
sb | 83 | fs/ext/freelists.c | efb->next = (unsigned long) sb->u.ext_sb.s_zmap[0]; |
sb | 85 | fs/ext/freelists.c | sb->u.ext_sb.s_zmap[0] = (struct buffer_head *) block; |
sb | 89 | fs/ext/freelists.c | sb->u.ext_sb.s_zmap[2] = (struct buffer_head *) (((unsigned long) sb->u.ext_sb.s_zmap[2]) + 1); |
sb | 90 | fs/ext/freelists.c | sb->s_dirt = 1; |
sb | 91 | fs/ext/freelists.c | sb->u.ext_sb.s_zmap[1]->b_dirt = 1; |
sb | 92 | fs/ext/freelists.c | free_super (sb); |
sb | 99 | fs/ext/freelists.c | struct super_block * sb; |
sb | 103 | fs/ext/freelists.c | if (!(sb = get_super(dev))) |
sb | 105 | fs/ext/freelists.c | if (!sb->u.ext_sb.s_zmap[1]) |
sb | 107 | fs/ext/freelists.c | lock_super (sb); |
sb | 108 | fs/ext/freelists.c | efb = (struct ext_free_block *) sb->u.ext_sb.s_zmap[1]->b_data; |
sb | 111 | fs/ext/freelists.c | sb->u.ext_sb.s_zmap[1]->b_dirt = 1; |
sb | 116 | fs/ext/freelists.c | j = (unsigned long) sb->u.ext_sb.s_zmap[0]; |
sb | 117 | fs/ext/freelists.c | sb->u.ext_sb.s_zmap[0] = (struct buffer_head *) efb->next; |
sb | 118 | fs/ext/freelists.c | brelse (sb->u.ext_sb.s_zmap[1]); |
sb | 119 | fs/ext/freelists.c | if (!sb->u.ext_sb.s_zmap[0]) { |
sb | 120 | fs/ext/freelists.c | sb->u.ext_sb.s_zmap[1] = NULL; |
sb | 122 | fs/ext/freelists.c | if (!(sb->u.ext_sb.s_zmap[1] = bread (dev, (unsigned long) sb->u.ext_sb.s_zmap[0], sb->s_blocksize))) |
sb | 126 | fs/ext/freelists.c | if (j < sb->u.ext_sb.s_firstdatazone || j > sb->u.ext_sb.s_nzones) { |
sb | 130 | fs/ext/freelists.c | sb->u.ext_sb.s_zmap[2] = (struct buffer_head *) (((unsigned long) sb->u.ext_sb.s_zmap[2]) - 1); |
sb | 131 | fs/ext/freelists.c | sb->s_dirt = 1; |
sb | 133 | fs/ext/freelists.c | if (!(bh=getblk(dev, j, sb->s_blocksize))) |
sb | 144 | fs/ext/freelists.c | free_super (sb); |
sb | 148 | fs/ext/freelists.c | unsigned long ext_count_free_blocks(struct super_block *sb) |
sb | 155 | fs/ext/freelists.c | lock_super (sb); |
sb | 156 | fs/ext/freelists.c | if (!sb->u.ext_sb.s_zmap[1]) |
sb | 159 | fs/ext/freelists.c | efb = (struct ext_free_block *) sb->u.ext_sb.s_zmap[1]->b_data; |
sb | 163 | fs/ext/freelists.c | if (!(bh = bread (sb->s_dev, block, sb->s_blocksize))) { |
sb | 175 | fs/ext/freelists.c | (unsigned long) sb->u.ext_sb.s_zmap[2], count); |
sb | 176 | fs/ext/freelists.c | free_super (sb); |
sb | 179 | fs/ext/freelists.c | return (unsigned long) sb->u.ext_sb.s_zmap[2]; |
sb | 301 | fs/ext/freelists.c | unsigned long ext_count_free_inodes(struct super_block *sb) |
sb | 308 | fs/ext/freelists.c | lock_super (sb); |
sb | 309 | fs/ext/freelists.c | if (!sb->u.ext_sb.s_imap[1]) |
sb | 312 | fs/ext/freelists.c | efi = ((struct ext_free_inode *) sb->u.ext_sb.s_imap[1]->b_data) + |
sb | 313 | fs/ext/freelists.c | ((((unsigned long) sb->u.ext_sb.s_imap[0])-1)%EXT_INODES_PER_BLOCK); |
sb | 317 | fs/ext/freelists.c | if (ino < 1 || ino > sb->u.ext_sb.s_ninodes) { |
sb | 319 | fs/ext/freelists.c | (int) sb->u.ext_sb.s_imap[0],ino); |
sb | 323 | fs/ext/freelists.c | if (!(bh = bread (sb->s_dev, block, sb->s_blocksize))) { |
sb | 336 | fs/ext/freelists.c | (unsigned long) sb->u.ext_sb.s_imap[2], count); |
sb | 337 | fs/ext/freelists.c | free_super (sb); |
sb | 340 | fs/ext/freelists.c | return (unsigned long) sb->u.ext_sb.s_imap[2]; |
sb | 32 | fs/ext/inode.c | void ext_put_super(struct super_block *sb) |
sb | 38 | fs/ext/inode.c | lock_super(sb); |
sb | 39 | fs/ext/inode.c | sb->s_dev = 0; |
sb | 42 | fs/ext/inode.c | brelse(sb->u.ext_sb.s_imap[i]); |
sb | 44 | fs/ext/inode.c | brelse(sb->u.ext_sb.s_zmap[i]); |
sb | 47 | fs/ext/inode.c | if (sb->u.ext_sb.s_imap[1]) |
sb | 48 | fs/ext/inode.c | brelse (sb->u.ext_sb.s_imap[1]); |
sb | 49 | fs/ext/inode.c | if (sb->u.ext_sb.s_zmap[1]) |
sb | 50 | fs/ext/inode.c | brelse (sb->u.ext_sb.s_zmap[1]); |
sb | 52 | fs/ext/inode.c | free_super(sb); |
sb | 173 | fs/ext/inode.c | void ext_write_super (struct super_block *sb) |
sb | 182 | fs/ext/inode.c | if (!(bh = bread(sb->s_dev, 1, BLOCK_SIZE))) { |
sb | 187 | fs/ext/inode.c | es->s_firstfreeblock = (unsigned long) sb->u.ext_sb.s_zmap[0]; |
sb | 188 | fs/ext/inode.c | es->s_freeblockscount = (unsigned long) sb->u.ext_sb.s_zmap[2]; |
sb | 189 | fs/ext/inode.c | es->s_firstfreeinode = (unsigned long) sb->u.ext_sb.s_imap[0]; |
sb | 190 | fs/ext/inode.c | es->s_freeinodescount = (unsigned long) sb->u.ext_sb.s_imap[2]; |
sb | 193 | fs/ext/inode.c | sb->s_dirt = 0; |
sb | 197 | fs/ext/inode.c | void ext_statfs (struct super_block *sb, struct statfs *buf) |
sb | 203 | fs/ext/inode.c | put_fs_long(sb->u.ext_sb.s_nzones << sb->u.ext_sb.s_log_zone_size, &buf->f_blocks); |
sb | 204 | fs/ext/inode.c | tmp = ext_count_free_blocks(sb); |
sb | 207 | fs/ext/inode.c | put_fs_long(sb->u.ext_sb.s_ninodes, &buf->f_files); |
sb | 208 | fs/ext/inode.c | put_fs_long(ext_count_free_inodes(sb), &buf->f_ffree); |
sb | 78 | fs/minix/bitmap.c | struct super_block * sb; |
sb | 82 | fs/minix/bitmap.c | if (!(sb = get_super(dev))) |
sb | 84 | fs/minix/bitmap.c | if (block < sb->u.minix_sb.s_firstdatazone || block >= sb->u.minix_sb.s_nzones) |
sb | 97 | fs/minix/bitmap.c | zone = block - sb->u.minix_sb.s_firstdatazone + 1; |
sb | 100 | fs/minix/bitmap.c | bh = sb->u.minix_sb.s_zmap[zone]; |
sb | 110 | fs/minix/bitmap.c | struct super_block * sb; |
sb | 113 | fs/minix/bitmap.c | if (!(sb = get_super(dev))) |
sb | 117 | fs/minix/bitmap.c | if (bh=sb->u.minix_sb.s_zmap[i]) |
sb | 125 | fs/minix/bitmap.c | j += i*8192 + sb->u.minix_sb.s_firstdatazone-1; |
sb | 126 | fs/minix/bitmap.c | if (j >= sb->u.minix_sb.s_nzones) |
sb | 139 | fs/minix/bitmap.c | unsigned long minix_count_free_blocks(struct super_block *sb) |
sb | 141 | 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 | 142 | fs/minix/bitmap.c | << sb->u.minix_sb.s_log_zone_size; |
sb | 222 | fs/minix/bitmap.c | unsigned long minix_count_free_inodes(struct super_block *sb) |
sb | 224 | 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 | 26 | fs/minix/inode.c | void minix_put_super(struct super_block *sb) |
sb | 30 | fs/minix/inode.c | lock_super(sb); |
sb | 31 | fs/minix/inode.c | sb->s_dev = 0; |
sb | 33 | fs/minix/inode.c | brelse(sb->u.minix_sb.s_imap[i]); |
sb | 35 | fs/minix/inode.c | brelse(sb->u.minix_sb.s_zmap[i]); |
sb | 36 | fs/minix/inode.c | free_super(sb); |
sb | 118 | fs/minix/inode.c | void minix_statfs (struct super_block *sb, struct statfs *buf) |
sb | 124 | fs/minix/inode.c | put_fs_long(sb->u.minix_sb.s_nzones << sb->u.minix_sb.s_log_zone_size, &buf->f_blocks); |
sb | 125 | fs/minix/inode.c | tmp = minix_count_free_blocks(sb); |
sb | 128 | fs/minix/inode.c | put_fs_long(sb->u.minix_sb.s_ninodes, &buf->f_files); |
sb | 129 | fs/minix/inode.c | put_fs_long(minix_count_free_inodes(sb), &buf->f_ffree); |
sb | 17 | fs/msdos/fat.c | int fat_access(struct super_block *sb,int this,int new_value) |
sb | 24 | fs/msdos/fat.c | if (MSDOS_SB(sb)->fat_bits == 16) first = last = this*2; |
sb | 29 | fs/msdos/fat.c | if (!(bh = msdos_sread(sb->s_dev,MSDOS_SB(sb)->fat_start+(first >> |
sb | 39 | fs/msdos/fat.c | if (!(bh2 = msdos_sread(sb->s_dev,MSDOS_SB(sb)->fat_start+(last |
sb | 46 | fs/msdos/fat.c | if (MSDOS_SB(sb)->fat_bits == 16) { |
sb | 60 | fs/msdos/fat.c | if (MSDOS_SB(sb)->fat_bits == 16) |
sb | 75 | fs/msdos/fat.c | for (copy = 1; copy < MSDOS_SB(sb)->fats; copy++) { |
sb | 76 | fs/msdos/fat.c | if (!(c_bh = msdos_sread(sb->s_dev,MSDOS_SB(sb)-> |
sb | 77 | fs/msdos/fat.c | fat_start+(first >> SECTOR_BITS)+MSDOS_SB(sb)-> |
sb | 82 | fs/msdos/fat.c | if (!(c_bh2 = msdos_sread(sb->s_dev, |
sb | 83 | fs/msdos/fat.c | MSDOS_SB(sb)->fat_start+(first >> |
sb | 84 | fs/msdos/fat.c | SECTOR_BITS)+MSDOS_SB(sb)->fat_length*copy |
sb | 229 | fs/msdos/fat.c | struct msdos_sb_info *sb; |
sb | 232 | fs/msdos/fat.c | sb = MSDOS_SB(inode->i_sb); |
sb | 235 | fs/msdos/fat.c | if (sector >= sb->dir_entries >> MSDOS_DPS_BITS) return 0; |
sb | 236 | fs/msdos/fat.c | return sector+sb->dir_start; |
sb | 238 | fs/msdos/fat.c | cluster = sector/sb->cluster_size; |
sb | 239 | fs/msdos/fat.c | offset = sector % sb->cluster_size; |
sb | 241 | fs/msdos/fat.c | return (cluster-2)*sb->cluster_size+sb->data_start+offset; |
sb | 37 | fs/msdos/inode.c | void msdos_put_super(struct super_block *sb) |
sb | 39 | fs/msdos/inode.c | cache_inval_dev(sb->s_dev); |
sb | 40 | fs/msdos/inode.c | lock_super(sb); |
sb | 41 | fs/msdos/inode.c | sb->s_dev = 0; |
sb | 42 | fs/msdos/inode.c | free_super(sb); |
sb | 157 | fs/msdos/inode.c | void msdos_statfs(struct super_block *sb,struct statfs *buf) |
sb | 161 | fs/msdos/inode.c | cluster_size = MSDOS_SB(sb)->cluster_size; |
sb | 162 | fs/msdos/inode.c | put_fs_long(sb->s_magic,&buf->f_type); |
sb | 164 | fs/msdos/inode.c | put_fs_long(MSDOS_SB(sb)->clusters*cluster_size,&buf->f_blocks); |
sb | 166 | fs/msdos/inode.c | for (this = 2; this < MSDOS_SB(sb)->clusters+2; this++) |
sb | 167 | fs/msdos/inode.c | if (!fat_access(sb,this,-1)) free++; |
sb | 178 | fs/msdos/inode.c | struct msdos_sb_info *sb; |
sb | 181 | fs/msdos/inode.c | sb = MSDOS_SB(inode->i_sb); |
sb | 182 | fs/msdos/inode.c | if ((sb->cluster_size & 1) || (sb->data_start & 1)) return 0; |
sb | 184 | fs/msdos/inode.c | if (sb->dir_start & 1) return 0; |
sb | 185 | fs/msdos/inode.c | return (sb->dir_start >> 1)+block; |
sb | 187 | fs/msdos/inode.c | cluster = (block*2)/sb->cluster_size; |
sb | 188 | fs/msdos/inode.c | offset = (block*2) % sb->cluster_size; |
sb | 190 | fs/msdos/inode.c | return ((cluster-2)*sb->cluster_size+sb->data_start+offset) >> 1; |
sb | 280 | fs/msdos/misc.c | static int raw_found(struct super_block *sb,int sector,char *name,int number, |
sb | 287 | fs/msdos/misc.c | if (!(bh = msdos_sread(sb->s_dev,sector,(void **) &data))) return -EIO; |
sb | 302 | fs/msdos/misc.c | static int raw_scan_root(struct super_block *sb,char *name,int number,int *ino) |
sb | 306 | fs/msdos/misc.c | for (count = 0; count < MSDOS_SB(sb)->dir_entries/MSDOS_DPS; count++) { |
sb | 307 | fs/msdos/misc.c | if ((cluster = raw_found(sb,MSDOS_SB(sb)->dir_start+count,name, |
sb | 314 | fs/msdos/misc.c | static int raw_scan_nonroot(struct super_block *sb,int start,char *name, |
sb | 320 | fs/msdos/misc.c | for (count = 0; count < MSDOS_SB(sb)->cluster_size; count++) { |
sb | 321 | fs/msdos/misc.c | if ((cluster = raw_found(sb,(start-2)*MSDOS_SB(sb)-> |
sb | 322 | fs/msdos/misc.c | cluster_size+MSDOS_SB(sb)->data_start+count,name, |
sb | 325 | fs/msdos/misc.c | if (!(start = fat_access(sb,start,-1))) panic("FAT error"); |
sb | 332 | fs/msdos/misc.c | static int raw_scan(struct super_block *sb,int start,char *name,int number, |
sb | 335 | fs/msdos/misc.c | if (start) return raw_scan_nonroot(sb,start,name,number,ino); |
sb | 336 | fs/msdos/misc.c | else return raw_scan_root(sb,name,number,ino); |
sb | 64 | fs/namei.c | struct super_block * sb; |
sb | 70 | fs/namei.c | else if ((sb = dir->i_sb) && (dir == sb->s_mounted)) { |
sb | 71 | fs/namei.c | sb = dir->i_sb; |
sb | 73 | fs/namei.c | if (dir = sb->s_covered) |
sb | 56 | fs/super.c | void lock_super(struct super_block * sb) |
sb | 59 | fs/super.c | while (sb->s_lock) |
sb | 60 | fs/super.c | sleep_on(&(sb->s_wait)); |
sb | 61 | fs/super.c | sb->s_lock = 1; |
sb | 65 | fs/super.c | void free_super(struct super_block * sb) |
sb | 67 | fs/super.c | sb->s_lock = 0; |
sb | 68 | fs/super.c | wake_up(&(sb->s_wait)); |
sb | 71 | fs/super.c | void wait_on_super(struct super_block * sb) |
sb | 74 | fs/super.c | while (sb->s_lock) |
sb | 75 | fs/super.c | sleep_on(&(sb->s_wait)); |
sb | 99 | fs/super.c | struct super_block * sb; |
sb | 105 | fs/super.c | if (!(sb = get_super(dev))) |
sb | 107 | fs/super.c | if (sb->s_covered) { |
sb | 111 | fs/super.c | if (sb->s_op && sb->s_op->put_super) |
sb | 112 | fs/super.c | sb->s_op->put_super(sb); |
sb | 148 | fs/super.c | struct super_block * sb; |
sb | 153 | fs/super.c | if (!(sb=get_super(dev)) || !(sb->s_covered)) |
sb | 155 | fs/super.c | if (!sb->s_covered->i_mount) |
sb | 159 | fs/super.c | if (inode == sb->s_mounted && inode->i_count == 1) |
sb | 163 | fs/super.c | sb->s_covered->i_mount=0; |
sb | 164 | fs/super.c | iput(sb->s_covered); |
sb | 165 | fs/super.c | sb->s_covered = NULL; |
sb | 166 | fs/super.c | iput(sb->s_mounted); |
sb | 167 | fs/super.c | sb->s_mounted = NULL; |
sb | 168 | fs/super.c | if (sb->s_op && sb->s_op->write_super && sb->s_dirt) |
sb | 169 | fs/super.c | sb->s_op->write_super (sb); |
sb | 210 | fs/super.c | struct super_block * sb; |
sb | 231 | fs/super.c | sb = read_super(dev,type,flags,data); |
sb | 232 | fs/super.c | if (!sb || sb->s_covered) { |
sb | 236 | fs/super.c | sb->s_flags = flags; |
sb | 237 | fs/super.c | sb->s_covered = dir_i; |
sb | 97 | include/linux/ext_fs.h | extern unsigned long ext_count_free_inodes(struct super_block *sb); |
sb | 100 | include/linux/ext_fs.h | extern unsigned long ext_count_free_blocks(struct super_block *sb); |
sb | 208 | include/linux/fs.h | void (*put_super)(struct super_block *sb); |
sb | 209 | include/linux/fs.h | void (*write_super) (struct super_block *sb); |
sb | 210 | include/linux/fs.h | void (*statfs) (struct super_block *sb, struct statfs *buf); |
sb | 214 | include/linux/fs.h | struct super_block *(*read_super)(struct super_block *sb,void *mode); |
sb | 270 | include/linux/fs.h | extern void lock_super(struct super_block * sb); |
sb | 271 | include/linux/fs.h | extern void free_super(struct super_block * sb); |
sb | 64 | include/linux/minix_fs.h | extern unsigned long minix_count_free_inodes(struct super_block *sb); |
sb | 67 | include/linux/minix_fs.h | extern unsigned long minix_count_free_blocks(struct super_block *sb); |
sb | 127 | include/linux/msdos_fs.h | extern int fat_access(struct super_block *sb,int this,int new_value); |
sb | 152 | include/linux/msdos_fs.h | extern void msdos_put_super(struct super_block *sb); |
sb | 154 | include/linux/msdos_fs.h | extern void msdos_statfs(struct super_block *sb,struct statfs *buf); |
sb | 62 | tools/build.c | struct stat sb; |
sb | 68 | tools/build.c | if (stat(argv[4], &sb)) { |
sb | 72 | tools/build.c | major_root = major(sb.st_rdev); |
sb | 73 | tools/build.c | minor_root = minor(sb.st_rdev); |