• Home
  • Raw
  • Download

Lines Matching refs:s

19 static void mark_dirty(struct super_block *s)  in mark_dirty()  argument
21 if (hpfs_sb(s)->sb_chkdsk && !(s->s_flags & MS_RDONLY)) { in mark_dirty()
24 if ((sb = hpfs_map_sector(s, 17, &bh, 0))) { in mark_dirty()
36 static void unmark_dirty(struct super_block *s) in unmark_dirty() argument
40 if (s->s_flags & MS_RDONLY) return; in unmark_dirty()
41 if ((sb = hpfs_map_sector(s, 17, &bh, 0))) { in unmark_dirty()
42 sb->dirty = hpfs_sb(s)->sb_chkdsk > 1 - hpfs_sb(s)->sb_was_error; in unmark_dirty()
43 sb->old_wrote = hpfs_sb(s)->sb_chkdsk >= 2 && !hpfs_sb(s)->sb_was_error; in unmark_dirty()
52 void hpfs_error(struct super_block *s, const char *fmt, ...) in hpfs_error() argument
61 if (!hpfs_sb(s)->sb_was_error) { in hpfs_error()
62 if (hpfs_sb(s)->sb_err == 2) { in hpfs_error()
64 mark_dirty(s); in hpfs_error()
66 } else if (hpfs_sb(s)->sb_err == 1) { in hpfs_error()
67 if (s->s_flags & MS_RDONLY) printk("; already mounted read-only\n"); in hpfs_error()
70 mark_dirty(s); in hpfs_error()
71 s->s_flags |= MS_RDONLY; in hpfs_error()
73 …} else if (s->s_flags & MS_RDONLY) printk("; going on - but anything won't be destroyed because it… in hpfs_error()
76 hpfs_sb(s)->sb_was_error = 1; in hpfs_error()
87 int hpfs_stop_cycles(struct super_block *s, int key, int *c1, int *c2, in hpfs_stop_cycles() argument
91 hpfs_error(s, "cycle detected on key %08x in %s", key, msg); in hpfs_stop_cycles()
99 static void hpfs_put_super(struct super_block *s) in hpfs_put_super() argument
101 struct hpfs_sb_info *sbi = hpfs_sb(s); in hpfs_put_super()
104 unmark_dirty(s); in hpfs_put_super()
105 s->s_fs_info = NULL; in hpfs_put_super()
109 unsigned hpfs_count_one_bitmap(struct super_block *s, secno secno) in hpfs_count_one_bitmap() argument
114 if (!(bits = hpfs_map_4sectors(s, secno, &qbh, 4))) return 0; in hpfs_count_one_bitmap()
125 static unsigned count_bitmaps(struct super_block *s) in count_bitmaps() argument
128 n_bands = (hpfs_sb(s)->sb_fs_size + 0x3fff) >> 14; in count_bitmaps()
131 count += hpfs_count_one_bitmap(s, hpfs_sb(s)->sb_bmp_dir[n]); in count_bitmaps()
137 struct super_block *s = dentry->d_sb; in hpfs_statfs() local
138 struct hpfs_sb_info *sbi = hpfs_sb(s); in hpfs_statfs()
142 sbi->sb_n_free = count_bitmaps(s); in hpfs_statfs()
143 sbi->sb_n_free_dnodes = hpfs_count_one_bitmap(s, sbi->sb_dmap); in hpfs_statfs()
145 buf->f_type = s->s_magic; in hpfs_statfs()
381 static int hpfs_remount_fs(struct super_block *s, int *flags, char *data) in hpfs_remount_fs() argument
388 struct hpfs_sb_info *sbi = hpfs_sb(s); in hpfs_remount_fs()
413 unmark_dirty(s); in hpfs_remount_fs()
421 if (!(*flags & MS_RDONLY)) mark_dirty(s); in hpfs_remount_fs()
423 kfree(s->s_options); in hpfs_remount_fs()
424 s->s_options = new_opts; in hpfs_remount_fs()
446 static int hpfs_fill_super(struct super_block *s, void *options, int silent) in hpfs_fill_super() argument
466 save_mount_options(s, options); in hpfs_fill_super()
471 s->s_fs_info = sbi; in hpfs_fill_super()
500 sb_set_blocksize(s, 512); in hpfs_fill_super()
502 if (!(bootblock = hpfs_map_sector(s, 0, &bh0, 0))) goto bail1; in hpfs_fill_super()
503 if (!(superblock = hpfs_map_sector(s, 16, &bh1, 1))) goto bail2; in hpfs_fill_super()
504 if (!(spareblock = hpfs_map_sector(s, 17, &bh2, 0))) goto bail3; in hpfs_fill_super()
515 if (!(s->s_flags & MS_RDONLY) && in hpfs_fill_super()
523 s->s_flags |= MS_NOATIME; in hpfs_fill_super()
526 s->s_magic = HPFS_SUPER_MAGIC; in hpfs_fill_super()
527 s->s_op = &hpfs_sops; in hpfs_fill_super()
553 if (!(sbi->sb_bmp_dir = hpfs_load_bitmap_directory(s, superblock->bitmaps))) in hpfs_fill_super()
562 hpfs_error(s, "improperly stopped"); in hpfs_fill_super()
565 if (!(s->s_flags & MS_RDONLY)) { in hpfs_fill_super()
574 mark_dirty(s); in hpfs_fill_super()
577 hpfs_error(s, "hotfixes not supported here, try chkdsk"); in hpfs_fill_super()
584 mark_dirty(s); in hpfs_fill_super()
587 hpfs_error(s, "warning: spare dnodes used, try chkdsk"); in hpfs_fill_super()
594 …hpfs_error(s, "dir band size mismatch: dir_band_start==%08x, dir_band_end==%08x, n_dir_band==%08x", in hpfs_fill_super()
600 if (hpfs_chk_sectors(s, superblock->dir_band_start, superblock->n_dir_band, "dir_band") || in hpfs_fill_super()
601 hpfs_chk_sectors(s, superblock->dir_band_bitmap, 4, "dir_band_bitmap") || in hpfs_fill_super()
602 hpfs_chk_sectors(s, superblock->bitmaps, 4, "bitmaps")) { in hpfs_fill_super()
603 mark_dirty(s); in hpfs_fill_super()
611 if (!(sbi->sb_cp_table = hpfs_load_code_page(s, spareblock->code_page_dir))) in hpfs_fill_super()
618 root = iget_locked(s, sbi->sb_root); in hpfs_fill_super()
624 s->s_root = d_alloc_root(root); in hpfs_fill_super()
625 if (!s->s_root) { in hpfs_fill_super()
629 hpfs_set_dentry_operations(s->s_root); in hpfs_fill_super()
635 root_dno = hpfs_fnode_dno(s, sbi->sb_root); in hpfs_fill_super()
639 hpfs_error(s, "unable to find root dir"); in hpfs_fill_super()
641 root->i_atime.tv_sec = local_to_gmt(s, de->read_date); in hpfs_fill_super()
643 root->i_mtime.tv_sec = local_to_gmt(s, de->write_date); in hpfs_fill_super()
645 root->i_ctime.tv_sec = local_to_gmt(s, de->creation_date); in hpfs_fill_super()
664 s->s_fs_info = NULL; in hpfs_fill_super()