Lines Matching refs:s
64 static int reiserfs_remount(struct super_block *s, int *flags, char *data);
67 static int reiserfs_sync_fs(struct super_block *s, int wait) in reiserfs_sync_fs() argument
75 dquot_writeback_dquots(s, -1); in reiserfs_sync_fs()
76 reiserfs_write_lock(s); in reiserfs_sync_fs()
77 if (!journal_begin(&th, s, 1)) in reiserfs_sync_fs()
79 reiserfs_flush_old_commits(s); in reiserfs_sync_fs()
80 reiserfs_write_unlock(s); in reiserfs_sync_fs()
87 struct super_block *s; in flush_old_commits() local
90 s = sbi->s_journal->j_work_sb; in flush_old_commits()
96 reiserfs_sync_fs(s, 1); in flush_old_commits()
99 void reiserfs_schedule_old_flush(struct super_block *s) in reiserfs_schedule_old_flush() argument
101 struct reiserfs_sb_info *sbi = REISERFS_SB(s); in reiserfs_schedule_old_flush()
108 if (s->s_flags & MS_RDONLY || !(s->s_flags & MS_ACTIVE)) in reiserfs_schedule_old_flush()
120 static void cancel_old_flush(struct super_block *s) in cancel_old_flush() argument
122 struct reiserfs_sb_info *sbi = REISERFS_SB(s); in cancel_old_flush()
124 cancel_delayed_work_sync(&REISERFS_SB(s)->old_work); in cancel_old_flush()
130 static int reiserfs_freeze(struct super_block *s) in reiserfs_freeze() argument
134 cancel_old_flush(s); in reiserfs_freeze()
136 reiserfs_write_lock(s); in reiserfs_freeze()
137 if (!(s->s_flags & MS_RDONLY)) { in reiserfs_freeze()
138 int err = journal_begin(&th, s, 1); in reiserfs_freeze()
142 reiserfs_prepare_for_journal(s, SB_BUFFER_WITH_SB(s), in reiserfs_freeze()
144 journal_mark_dirty(&th, SB_BUFFER_WITH_SB(s)); in reiserfs_freeze()
149 reiserfs_write_unlock(s); in reiserfs_freeze()
153 static int reiserfs_unfreeze(struct super_block *s) in reiserfs_unfreeze() argument
155 reiserfs_allow_writes(s); in reiserfs_unfreeze()
170 static int remove_save_link_only(struct super_block *s, in remove_save_link_only() argument
177 err = journal_begin(&th, s, JOURNAL_PER_BALANCE_CNT); in remove_save_link_only()
194 static int finish_unfinished(struct super_block *s) in finish_unfinished() argument
224 if (s->s_flags & MS_ACTIVE) { in finish_unfinished()
228 s->s_flags |= MS_ACTIVE; in finish_unfinished()
233 if (REISERFS_SB(s)->s_qf_names[i]) { in finish_unfinished()
236 if (sb_has_quota_active(s, i)) { in finish_unfinished()
240 ret = reiserfs_quota_on_mount(s, i); in finish_unfinished()
242 reiserfs_warning(s, "reiserfs-2500", in finish_unfinished()
250 REISERFS_SB(s)->s_is_unlinked_ok = 1; in finish_unfinished()
253 retval = search_item(s, &max_cpu_key, &path); in finish_unfinished()
255 reiserfs_error(s, "vs-2140", in finish_unfinished()
263 reiserfs_warning(s, "vs-2060", in finish_unfinished()
290 inode = reiserfs_iget(s, &obj_key); in finish_unfinished()
296 reiserfs_warning(s, "vs-2180", "iget failed for %K", in finish_unfinished()
298 retval = remove_save_link_only(s, &save_link_key, 1); in finish_unfinished()
304 reiserfs_warning(s, "vs-2185", in finish_unfinished()
307 retval = remove_save_link_only(s, &save_link_key, 0); in finish_unfinished()
322 reiserfs_warning(s, "green-2101", in finish_unfinished()
326 retval = remove_save_link_only(s, &save_link_key, 0); in finish_unfinished()
339 reiserfs_info(s, "Truncating %k to %lld ..", in finish_unfinished()
349 reiserfs_info(s, "Removing %k..", INODE_PKEY(inode)); in finish_unfinished()
356 reiserfs_warning(s, "super-2189", "Dead loop " in finish_unfinished()
360 retval = remove_save_link_only(s, in finish_unfinished()
369 REISERFS_SB(s)->s_is_unlinked_ok = 0; in finish_unfinished()
373 reiserfs_write_unlock(s); in finish_unfinished()
375 if (sb_dqopt(s)->files[i] && quota_enabled[i]) in finish_unfinished()
376 dquot_quota_off(s, i); in finish_unfinished()
378 reiserfs_write_lock(s); in finish_unfinished()
381 s->s_flags &= ~MS_ACTIVE; in finish_unfinished()
385 reiserfs_info(s, "There were %d uncompleted unlinks/truncates. " in finish_unfinished()
517 static void reiserfs_kill_sb(struct super_block *s) in reiserfs_kill_sb() argument
519 if (REISERFS_SB(s)) { in reiserfs_kill_sb()
520 reiserfs_proc_info_done(s); in reiserfs_kill_sb()
529 shrink_dcache_sb(s); in reiserfs_kill_sb()
531 dput(REISERFS_SB(s)->xattr_root); in reiserfs_kill_sb()
532 REISERFS_SB(s)->xattr_root = NULL; in reiserfs_kill_sb()
533 dput(REISERFS_SB(s)->priv_root); in reiserfs_kill_sb()
534 REISERFS_SB(s)->priv_root = NULL; in reiserfs_kill_sb()
537 kill_block_super(s); in reiserfs_kill_sb()
540 static void reiserfs_put_super(struct super_block *s) in reiserfs_put_super() argument
545 dquot_disable(s, -1, DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED); in reiserfs_put_super()
547 reiserfs_write_lock(s); in reiserfs_put_super()
553 if (!(s->s_flags & MS_RDONLY)) { in reiserfs_put_super()
554 if (!journal_begin(&th, s, 10)) { in reiserfs_put_super()
555 reiserfs_prepare_for_journal(s, SB_BUFFER_WITH_SB(s), in reiserfs_put_super()
557 set_sb_umount_state(SB_DISK_SUPER_BLOCK(s), in reiserfs_put_super()
558 REISERFS_SB(s)->s_mount_state); in reiserfs_put_super()
559 journal_mark_dirty(&th, SB_BUFFER_WITH_SB(s)); in reiserfs_put_super()
567 journal_release(&th, s); in reiserfs_put_super()
569 reiserfs_free_bitmap_cache(s); in reiserfs_put_super()
571 brelse(SB_BUFFER_WITH_SB(s)); in reiserfs_put_super()
573 print_statistics(s); in reiserfs_put_super()
575 if (REISERFS_SB(s)->reserved_blocks != 0) { in reiserfs_put_super()
576 reiserfs_warning(s, "green-2005", "reserved blocks left %d", in reiserfs_put_super()
577 REISERFS_SB(s)->reserved_blocks); in reiserfs_put_super()
580 reiserfs_write_unlock(s); in reiserfs_put_super()
581 mutex_destroy(&REISERFS_SB(s)->lock); in reiserfs_put_super()
582 destroy_workqueue(REISERFS_SB(s)->commit_wq); in reiserfs_put_super()
583 kfree(s->s_fs_info); in reiserfs_put_super()
584 s->s_fs_info = NULL; in reiserfs_put_super()
678 struct super_block *s = root->d_sb; in reiserfs_show_options() local
679 struct reiserfs_journal *journal = SB_JOURNAL(s); in reiserfs_show_options()
680 long opts = REISERFS_SB(s)->s_mount_opt; in reiserfs_show_options()
716 if (REISERFS_SB(s)->s_jdev) in reiserfs_show_options()
717 seq_show_option(seq, "jdev", REISERFS_SB(s)->s_jdev); in reiserfs_show_options()
723 if (REISERFS_SB(s)->s_qf_names[USRQUOTA]) in reiserfs_show_options()
725 REISERFS_SB(s)->s_qf_names[USRQUOTA]); in reiserfs_show_options()
728 if (REISERFS_SB(s)->s_qf_names[GRPQUOTA]) in reiserfs_show_options()
730 REISERFS_SB(s)->s_qf_names[GRPQUOTA]); in reiserfs_show_options()
733 if (REISERFS_SB(s)->s_jquota_fmt) { in reiserfs_show_options()
734 if (REISERFS_SB(s)->s_jquota_fmt == QFMT_VFS_OLD) in reiserfs_show_options()
736 else if (REISERFS_SB(s)->s_jquota_fmt == QFMT_VFS_V0) in reiserfs_show_options()
750 show_alloc_options(seq, s); in reiserfs_show_options()
933 static int reiserfs_getopt(struct super_block *s, char **cur, opt_desc_t * opts, in reiserfs_getopt() argument
963 if (reiserfs_parse_alloc_options(s, p + 6)) { in reiserfs_getopt()
976 reiserfs_warning(s, "super-6500", in reiserfs_getopt()
983 reiserfs_warning(s, "super-6501", in reiserfs_getopt()
993 reiserfs_warning(s, "super-6502", in reiserfs_getopt()
1002 reiserfs_warning(s, "super-6503", in reiserfs_getopt()
1012 reiserfs_warning(s, "super-6504", in reiserfs_getopt()
1019 reiserfs_warning(s, "super-6505", in reiserfs_getopt()
1035 reiserfs_warning(s, "super-6506", in reiserfs_getopt()
1058 reiserfs_warning(s, "super-6506", in reiserfs_getopt()
1065 static int reiserfs_parse_options(struct super_block *s, in reiserfs_parse_options() argument
1143 c = reiserfs_getopt(s, &pos, opts, &arg, mount_options); in reiserfs_parse_options()
1157 s->s_bdev->bd_inode->i_size >> s-> in reiserfs_parse_options()
1163 reiserfs_warning(s, "super-6507", in reiserfs_parse_options()
1176 reiserfs_warning(s, "super-6508", in reiserfs_parse_options()
1185 reiserfs_warning(s, "super-6509", "nolargeio option " in reiserfs_parse_options()
1194 reiserfs_warning(s, "super-6510", in reiserfs_parse_options()
1207 if (sb_any_quota_loaded(s) && in reiserfs_parse_options()
1208 (!*arg != !REISERFS_SB(s)->s_qf_names[qtype])) { in reiserfs_parse_options()
1209 reiserfs_warning(s, "super-6511", in reiserfs_parse_options()
1216 if (REISERFS_SB(s)->s_qf_names[qtype] in reiserfs_parse_options()
1217 && strcmp(REISERFS_SB(s)->s_qf_names[qtype], in reiserfs_parse_options()
1219 reiserfs_warning(s, "super-6512", in reiserfs_parse_options()
1226 reiserfs_warning(s, "super-6513", in reiserfs_parse_options()
1233 reiserfs_warning(s, "reiserfs-2502", in reiserfs_parse_options()
1245 REISERFS_SB(s)->s_qf_names[qtype]) in reiserfs_parse_options()
1260 reiserfs_warning(s, "super-6514", in reiserfs_parse_options()
1265 if (sb_any_quota_loaded(s) && in reiserfs_parse_options()
1266 *qfmt != REISERFS_SB(s)->s_jquota_fmt) { in reiserfs_parse_options()
1267 reiserfs_warning(s, "super-6515", in reiserfs_parse_options()
1276 reiserfs_warning(s, "reiserfs-2503", "journaled " in reiserfs_parse_options()
1284 if (!REISERFS_SB(s)->s_jquota_fmt && !*qfmt in reiserfs_parse_options()
1286 reiserfs_warning(s, "super-6515", in reiserfs_parse_options()
1291 sb_has_quota_loaded(s, USRQUOTA)) || in reiserfs_parse_options()
1293 sb_has_quota_loaded(s, GRPQUOTA))) { in reiserfs_parse_options()
1294 reiserfs_warning(s, "super-6516", "quota options must " in reiserfs_parse_options()
1303 static void switch_data_mode(struct super_block *s, unsigned long mode) in switch_data_mode() argument
1305 REISERFS_SB(s)->s_mount_opt &= ~((1 << REISERFS_DATA_LOG) | in switch_data_mode()
1308 REISERFS_SB(s)->s_mount_opt |= (1 << mode); in switch_data_mode()
1311 static void handle_data_mode(struct super_block *s, unsigned long mount_options) in handle_data_mode() argument
1314 if (!reiserfs_data_log(s)) { in handle_data_mode()
1315 switch_data_mode(s, REISERFS_DATA_LOG); in handle_data_mode()
1316 reiserfs_info(s, "switching to journaled data mode\n"); in handle_data_mode()
1319 if (!reiserfs_data_ordered(s)) { in handle_data_mode()
1320 switch_data_mode(s, REISERFS_DATA_ORDERED); in handle_data_mode()
1321 reiserfs_info(s, "switching to ordered data mode\n"); in handle_data_mode()
1324 if (!reiserfs_data_writeback(s)) { in handle_data_mode()
1325 switch_data_mode(s, REISERFS_DATA_WRITEBACK); in handle_data_mode()
1326 reiserfs_info(s, "switching to writeback data mode\n"); in handle_data_mode()
1331 static void handle_barrier_mode(struct super_block *s, unsigned long bits) in handle_barrier_mode() argument
1338 REISERFS_SB(s)->s_mount_opt &= ~all_barrier; in handle_barrier_mode()
1340 REISERFS_SB(s)->s_mount_opt |= flush; in handle_barrier_mode()
1343 REISERFS_SB(s)->s_mount_opt |= none; in handle_barrier_mode()
1349 static void handle_attrs(struct super_block *s) in handle_attrs() argument
1351 struct reiserfs_super_block *rs = SB_DISK_SUPER_BLOCK(s); in handle_attrs()
1353 if (reiserfs_attrs(s)) { in handle_attrs()
1354 if (old_format_only(s)) { in handle_attrs()
1355 reiserfs_warning(s, "super-6517", "cannot support " in handle_attrs()
1357 REISERFS_SB(s)->s_mount_opt &= ~(1 << REISERFS_ATTRS); in handle_attrs()
1361 reiserfs_warning(s, "super-6518", "cannot support " in handle_attrs()
1364 REISERFS_SB(s)->s_mount_opt &= ~(1 << REISERFS_ATTRS); in handle_attrs()
1370 static void handle_quota_files(struct super_block *s, char **qf_names, in handle_quota_files() argument
1376 if (qf_names[i] != REISERFS_SB(s)->s_qf_names[i]) in handle_quota_files()
1377 kfree(REISERFS_SB(s)->s_qf_names[i]); in handle_quota_files()
1378 REISERFS_SB(s)->s_qf_names[i] = qf_names[i]; in handle_quota_files()
1381 REISERFS_SB(s)->s_jquota_fmt = *qfmt; in handle_quota_files()
1385 static int reiserfs_remount(struct super_block *s, int *mount_flags, char *arg) in reiserfs_remount() argument
1390 unsigned long mount_options = REISERFS_SB(s)->s_mount_opt; in reiserfs_remount()
1393 struct reiserfs_journal *journal = SB_JOURNAL(s); in reiserfs_remount()
1402 sync_filesystem(s); in reiserfs_remount()
1403 reiserfs_write_lock(s); in reiserfs_remount()
1406 memcpy(qf_names, REISERFS_SB(s)->s_qf_names, sizeof(qf_names)); in reiserfs_remount()
1409 rs = SB_DISK_SUPER_BLOCK(s); in reiserfs_remount()
1412 (s, arg, &mount_options, &blocks, NULL, &commit_max_age, in reiserfs_remount()
1416 if (qf_names[i] != REISERFS_SB(s)->s_qf_names[i]) in reiserfs_remount()
1423 handle_quota_files(s, qf_names, &qfmt); in reiserfs_remount()
1426 handle_attrs(s); in reiserfs_remount()
1450 REISERFS_SB(s)->s_mount_opt = in reiserfs_remount()
1451 (REISERFS_SB(s)-> in reiserfs_remount()
1464 err = reiserfs_resize(s, blocks); in reiserfs_remount()
1470 reiserfs_write_unlock(s); in reiserfs_remount()
1471 reiserfs_xattr_init(s, *mount_flags); in reiserfs_remount()
1473 if (s->s_flags & MS_RDONLY) in reiserfs_remount()
1477 err = dquot_suspend(s, -1); in reiserfs_remount()
1483 || REISERFS_SB(s)->s_mount_state != REISERFS_VALID_FS) { in reiserfs_remount()
1487 reiserfs_write_lock(s); in reiserfs_remount()
1489 err = journal_begin(&th, s, 10); in reiserfs_remount()
1494 reiserfs_prepare_for_journal(s, SB_BUFFER_WITH_SB(s), 1); in reiserfs_remount()
1495 set_sb_umount_state(rs, REISERFS_SB(s)->s_mount_state); in reiserfs_remount()
1496 journal_mark_dirty(&th, SB_BUFFER_WITH_SB(s)); in reiserfs_remount()
1499 if (!(s->s_flags & MS_RDONLY)) { in reiserfs_remount()
1500 reiserfs_write_unlock(s); in reiserfs_remount()
1501 reiserfs_xattr_init(s, *mount_flags); in reiserfs_remount()
1510 handle_data_mode(s, mount_options); in reiserfs_remount()
1511 handle_barrier_mode(s, mount_options); in reiserfs_remount()
1512 REISERFS_SB(s)->s_mount_state = sb_umount_state(rs); in reiserfs_remount()
1515 s->s_flags &= ~MS_RDONLY; in reiserfs_remount()
1516 err = journal_begin(&th, s, 10); in reiserfs_remount()
1521 reiserfs_prepare_for_journal(s, SB_BUFFER_WITH_SB(s), 1); in reiserfs_remount()
1522 REISERFS_SB(s)->s_mount_state = sb_umount_state(rs); in reiserfs_remount()
1523 s->s_flags &= ~MS_RDONLY; in reiserfs_remount()
1525 if (!old_format_only(s)) in reiserfs_remount()
1528 journal_mark_dirty(&th, SB_BUFFER_WITH_SB(s)); in reiserfs_remount()
1529 REISERFS_SB(s)->s_mount_state = REISERFS_VALID_FS; in reiserfs_remount()
1532 SB_JOURNAL(s)->j_must_wait = 1; in reiserfs_remount()
1537 reiserfs_write_unlock(s); in reiserfs_remount()
1539 dquot_resume(s, -1); in reiserfs_remount()
1540 reiserfs_write_lock(s); in reiserfs_remount()
1541 finish_unfinished(s); in reiserfs_remount()
1542 reiserfs_write_unlock(s); in reiserfs_remount()
1543 reiserfs_xattr_init(s, *mount_flags); in reiserfs_remount()
1547 replace_mount_options(s, new_opts); in reiserfs_remount()
1551 reiserfs_write_unlock(s); in reiserfs_remount()
1557 static int read_super_block(struct super_block *s, int offset) in read_super_block() argument
1563 bh = sb_bread(s, offset / s->s_blocksize); in read_super_block()
1565 reiserfs_warning(s, "sh-2006", in read_super_block()
1567 s->s_id, offset / s->s_blocksize, in read_super_block()
1568 s->s_blocksize); in read_super_block()
1582 sb_set_blocksize(s, fs_blocksize); in read_super_block()
1584 bh = sb_bread(s, offset / s->s_blocksize); in read_super_block()
1586 reiserfs_warning(s, "sh-2007", in read_super_block()
1588 s->s_id, offset / s->s_blocksize, in read_super_block()
1589 s->s_blocksize); in read_super_block()
1594 if (sb_blocksize(rs) != s->s_blocksize) { in read_super_block()
1595 reiserfs_warning(s, "sh-2011", "can't find a reiserfs " in read_super_block()
1597 s->s_id, in read_super_block()
1599 s->s_blocksize); in read_super_block()
1606 reiserfs_warning(s, "super-6519", "Unfinished reiserfsck " in read_super_block()
1614 SB_BUFFER_WITH_SB(s) = bh; in read_super_block()
1615 SB_DISK_SUPER_BLOCK(s) = rs; in read_super_block()
1623 reiserfs_info(s, "found reiserfs format \"3.6\"" in read_super_block()
1626 reiserfs_info(s, "found reiserfs format \"3.5\"" in read_super_block()
1629 reiserfs_warning(s, "sh-2012", "found unknown " in read_super_block()
1639 reiserfs_info(s, in read_super_block()
1643 s->s_op = &reiserfs_sops; in read_super_block()
1644 s->s_export_op = &reiserfs_export_ops; in read_super_block()
1646 s->s_qcop = &reiserfs_qctl_operations; in read_super_block()
1647 s->dq_op = &reiserfs_quota_operations; in read_super_block()
1648 s->s_quota_types = QTYPE_MASK_USR | QTYPE_MASK_GRP; in read_super_block()
1655 s->s_maxbytes = (512LL << 32) - s->s_blocksize; in read_super_block()
1660 static int reread_meta_blocks(struct super_block *s) in reread_meta_blocks() argument
1662 ll_rw_block(READ, 1, &SB_BUFFER_WITH_SB(s)); in reread_meta_blocks()
1663 wait_on_buffer(SB_BUFFER_WITH_SB(s)); in reread_meta_blocks()
1664 if (!buffer_uptodate(SB_BUFFER_WITH_SB(s))) { in reread_meta_blocks()
1665 reiserfs_warning(s, "reiserfs-2504", "error reading the super"); in reread_meta_blocks()
1681 static __u32 find_hash_out(struct super_block *s) in find_hash_out() argument
1692 inode = d_inode(s->s_root); in find_hash_out()
1695 retval = search_by_entry_key(s, &key, &path, &de); in find_hash_out()
1708 if (reiserfs_rupasov_hash(s)) in find_hash_out()
1710 reiserfs_info(s, "FS seems to be empty, autodetect is using the default hash\n"); in find_hash_out()
1722 reiserfs_warning(s, "reiserfs-2506", in find_hash_out()
1737 reiserfs_warning(s, "reiserfs-2506", in find_hash_out()
1747 static int what_hash(struct super_block *s) in what_hash() argument
1751 code = sb_hash_function_code(SB_DISK_SUPER_BLOCK(s)); in what_hash()
1758 if (code == UNSET_HASH || reiserfs_hash_detect(s)) in what_hash()
1759 code = find_hash_out(s); in what_hash()
1761 if (code != UNSET_HASH && reiserfs_hash_detect(s)) { in what_hash()
1766 if (reiserfs_rupasov_hash(s) && code != YURA_HASH) { in what_hash()
1767 reiserfs_warning(s, "reiserfs-2507", in what_hash()
1772 } else if (reiserfs_tea_hash(s) && code != TEA_HASH) { in what_hash()
1773 reiserfs_warning(s, "reiserfs-2508", in what_hash()
1778 } else if (reiserfs_r5_hash(s) && code != R5_HASH) { in what_hash()
1779 reiserfs_warning(s, "reiserfs-2509", in what_hash()
1790 if (reiserfs_rupasov_hash(s)) { in what_hash()
1792 } else if (reiserfs_tea_hash(s)) { in what_hash()
1794 } else if (reiserfs_r5_hash(s)) { in what_hash()
1804 !(s->s_flags & MS_RDONLY) && in what_hash()
1805 code != sb_hash_function_code(SB_DISK_SUPER_BLOCK(s))) { in what_hash()
1806 set_sb_hash_function_code(SB_DISK_SUPER_BLOCK(s), code); in what_hash()
1812 static hashf_t hash_function(struct super_block *s) in hash_function() argument
1814 switch (what_hash(s)) { in hash_function()
1816 reiserfs_info(s, "Using tea hash to sort names\n"); in hash_function()
1819 reiserfs_info(s, "Using rupasov hash to sort names\n"); in hash_function()
1822 reiserfs_info(s, "Using r5 hash to sort names\n"); in hash_function()
1843 #define SWARN(silent, s, id, ...) \ argument
1845 reiserfs_warning(s, id, __VA_ARGS__)
1847 static int reiserfs_fill_super(struct super_block *s, void *data, int silent) in reiserfs_fill_super() argument
1863 save_mount_options(s, data); in reiserfs_fill_super()
1868 s->s_fs_info = sbi; in reiserfs_fill_super()
1878 reiserfs_init_alloc_options(s); in reiserfs_fill_super()
1886 s->s_id); in reiserfs_fill_super()
1888 SWARN(silent, s, "", "Cannot allocate commit workqueue"); in reiserfs_fill_super()
1895 (s, (char *)data, &sbi->s_mount_opt, &blocks, &jdev_name, in reiserfs_fill_super()
1902 SWARN(silent, s, "", "Cannot allocate memory for " in reiserfs_fill_super()
1908 handle_quota_files(s, qf_names, &qfmt); in reiserfs_fill_super()
1912 SWARN(silent, s, "jmacd-7", "resize option for remount only"); in reiserfs_fill_super()
1920 if (!read_super_block(s, REISERFS_OLD_DISK_OFFSET_IN_BYTES)) in reiserfs_fill_super()
1927 else if (read_super_block(s, REISERFS_DISK_OFFSET_IN_BYTES)) { in reiserfs_fill_super()
1928 SWARN(silent, s, "sh-2021", "can not find reiserfs on %s", in reiserfs_fill_super()
1929 s->s_id); in reiserfs_fill_super()
1933 rs = SB_DISK_SUPER_BLOCK(s); in reiserfs_fill_super()
1939 if (s->s_bdev && s->s_bdev->bd_inode in reiserfs_fill_super()
1940 && i_size_read(s->s_bdev->bd_inode) < in reiserfs_fill_super()
1942 SWARN(silent, s, "", "Filesystem cannot be " in reiserfs_fill_super()
1944 SWARN(silent, s, "", "You may need to run fsck " in reiserfs_fill_super()
1946 SWARN(silent, s, "", "Or may be you forgot to " in reiserfs_fill_super()
1951 sbi->s_mount_state = SB_REISERFS_STATE(s); in reiserfs_fill_super()
1954 if ((errval = reiserfs_init_bitmap_cache(s))) { in reiserfs_fill_super()
1955 SWARN(silent, s, "jmacd-8", "unable to read bitmap"); in reiserfs_fill_super()
1961 SWARN(silent, s, "", "CONFIG_REISERFS_CHECK is set ON"); in reiserfs_fill_super()
1962 SWARN(silent, s, "", "- it is slow mode for debugging."); in reiserfs_fill_super()
1966 if (!reiserfs_data_log(s) && !reiserfs_data_ordered(s) && in reiserfs_fill_super()
1967 !reiserfs_data_writeback(s)) { in reiserfs_fill_super()
1971 if (reiserfs_data_log(s)) { in reiserfs_fill_super()
1972 reiserfs_info(s, "using journaled data mode\n"); in reiserfs_fill_super()
1973 } else if (reiserfs_data_ordered(s)) { in reiserfs_fill_super()
1974 reiserfs_info(s, "using ordered data mode\n"); in reiserfs_fill_super()
1976 reiserfs_info(s, "using writeback data mode\n"); in reiserfs_fill_super()
1978 if (reiserfs_barrier_flush(s)) { in reiserfs_fill_super()
1982 if (journal_init(s, jdev_name, old_format, commit_max_age)) { in reiserfs_fill_super()
1983 SWARN(silent, s, "sh-2022", in reiserfs_fill_super()
1994 if (reread_meta_blocks(s)) { in reiserfs_fill_super()
1995 SWARN(silent, s, "jmacd-9", in reiserfs_fill_super()
2000 if (replay_only(s)) in reiserfs_fill_super()
2003 if (bdev_read_only(s->s_bdev) && !(s->s_flags & MS_RDONLY)) { in reiserfs_fill_super()
2004 SWARN(silent, s, "clm-7000", in reiserfs_fill_super()
2006 s->s_flags |= MS_RDONLY; in reiserfs_fill_super()
2011 iget5_locked(s, REISERFS_ROOT_OBJECTID, reiserfs_find_actor, in reiserfs_fill_super()
2014 SWARN(silent, s, "jmacd-10", "get root inode failed"); in reiserfs_fill_super()
2026 reiserfs_write_lock(s); in reiserfs_fill_super()
2033 s->s_root = d_make_root(root_inode); in reiserfs_fill_super()
2034 if (!s->s_root) in reiserfs_fill_super()
2037 sbi->s_hash_function = hash_function(s); in reiserfs_fill_super()
2039 dput(s->s_root); in reiserfs_fill_super()
2040 s->s_root = NULL; in reiserfs_fill_super()
2045 || (is_reiserfs_jr(rs) && SB_VERSION(s) == REISERFS_VERSION_1)) in reiserfs_fill_super()
2052 if (!(s->s_flags & MS_RDONLY)) { in reiserfs_fill_super()
2054 errval = journal_begin(&th, s, 1); in reiserfs_fill_super()
2056 dput(s->s_root); in reiserfs_fill_super()
2057 s->s_root = NULL; in reiserfs_fill_super()
2060 reiserfs_prepare_for_journal(s, SB_BUFFER_WITH_SB(s), 1); in reiserfs_fill_super()
2071 if (bmap_would_wrap(reiserfs_bmap_count(s)) && in reiserfs_fill_super()
2073 reiserfs_warning(s, "super-2030", "This file system " in reiserfs_fill_super()
2077 reiserfs_bmap_count(s)); in reiserfs_fill_super()
2082 if (old_format_only(s)) { in reiserfs_fill_super()
2087 if (convert_reiserfs(s)) { in reiserfs_fill_super()
2090 reiserfs_info(s, in reiserfs_fill_super()
2105 reiserfs_convert_objectid_map_v1(s); in reiserfs_fill_super()
2109 reiserfs_info(s, "using 3.5.x disk format\n"); in reiserfs_fill_super()
2115 journal_mark_dirty(&th, SB_BUFFER_WITH_SB(s)); in reiserfs_fill_super()
2118 dput(s->s_root); in reiserfs_fill_super()
2119 s->s_root = NULL; in reiserfs_fill_super()
2123 reiserfs_write_unlock(s); in reiserfs_fill_super()
2124 if ((errval = reiserfs_lookup_privroot(s)) || in reiserfs_fill_super()
2125 (errval = reiserfs_xattr_init(s, s->s_flags))) { in reiserfs_fill_super()
2126 dput(s->s_root); in reiserfs_fill_super()
2127 s->s_root = NULL; in reiserfs_fill_super()
2130 reiserfs_write_lock(s); in reiserfs_fill_super()
2135 finish_unfinished(s); in reiserfs_fill_super()
2137 if (old_format_only(s) && !silent) { in reiserfs_fill_super()
2138 reiserfs_info(s, "using 3.5.x disk format\n"); in reiserfs_fill_super()
2141 reiserfs_write_unlock(s); in reiserfs_fill_super()
2142 if ((errval = reiserfs_lookup_privroot(s)) || in reiserfs_fill_super()
2143 (errval = reiserfs_xattr_init(s, s->s_flags))) { in reiserfs_fill_super()
2144 dput(s->s_root); in reiserfs_fill_super()
2145 s->s_root = NULL; in reiserfs_fill_super()
2148 reiserfs_write_lock(s); in reiserfs_fill_super()
2155 handle_attrs(s); in reiserfs_fill_super()
2157 reiserfs_proc_info_init(s); in reiserfs_fill_super()
2162 reiserfs_write_unlock(s); in reiserfs_fill_super()
2167 reiserfs_write_unlock(s); in reiserfs_fill_super()
2172 reiserfs_write_lock(s); in reiserfs_fill_super()
2173 journal_release_error(NULL, s); in reiserfs_fill_super()
2174 reiserfs_write_unlock(s); in reiserfs_fill_super()
2180 cancel_delayed_work_sync(&REISERFS_SB(s)->old_work); in reiserfs_fill_super()
2182 reiserfs_free_bitmap_cache(s); in reiserfs_fill_super()
2183 if (SB_BUFFER_WITH_SB(s)) in reiserfs_fill_super()
2184 brelse(SB_BUFFER_WITH_SB(s)); in reiserfs_fill_super()
2194 s->s_fs_info = NULL; in reiserfs_fill_super()
2202 buf->f_namelen = (REISERFS_MAX_NAME(s->s_blocksize)); in reiserfs_statfs()