diff options
-rw-r--r-- | fs/reiserfs/super.c | 6 | ||||
-rw-r--r-- | include/linux/reiserfs_fs.h | 6 | ||||
-rw-r--r-- | include/linux/reiserfs_fs_sb.h | 3 |
3 files changed, 13 insertions, 2 deletions
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index f3c820b75829..4ad40afe54e1 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c | |||
@@ -1280,6 +1280,8 @@ static int reiserfs_remount(struct super_block *s, int *mount_flags, char *arg) | |||
1280 | REISERFS_SB(s)->s_mount_state = sb_umount_state(rs); | 1280 | REISERFS_SB(s)->s_mount_state = sb_umount_state(rs); |
1281 | s->s_flags &= ~MS_RDONLY; | 1281 | s->s_flags &= ~MS_RDONLY; |
1282 | set_sb_umount_state(rs, REISERFS_ERROR_FS); | 1282 | set_sb_umount_state(rs, REISERFS_ERROR_FS); |
1283 | if (!old_format_only(s)) | ||
1284 | set_sb_mnt_count(rs, sb_mnt_count(rs) + 1); | ||
1283 | /* mark_buffer_dirty (SB_BUFFER_WITH_SB (s), 1); */ | 1285 | /* mark_buffer_dirty (SB_BUFFER_WITH_SB (s), 1); */ |
1284 | journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB(s)); | 1286 | journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB(s)); |
1285 | REISERFS_SB(s)->s_mount_state = REISERFS_VALID_FS; | 1287 | REISERFS_SB(s)->s_mount_state = REISERFS_VALID_FS; |
@@ -1819,7 +1821,9 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent) | |||
1819 | } else if (!silent) { | 1821 | } else if (!silent) { |
1820 | reiserfs_info(s, "using 3.5.x disk format\n"); | 1822 | reiserfs_info(s, "using 3.5.x disk format\n"); |
1821 | } | 1823 | } |
1822 | } | 1824 | } else |
1825 | set_sb_mnt_count(rs, sb_mnt_count(rs) + 1); | ||
1826 | |||
1823 | 1827 | ||
1824 | journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB(s)); | 1828 | journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB(s)); |
1825 | errval = journal_end(&th, s, 1); | 1829 | errval = journal_end(&th, s, 1); |
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index bc5114d35e99..ab748a03fe97 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -171,7 +171,11 @@ struct reiserfs_super_block { | |||
171 | __le32 s_flags; /* Right now used only by inode-attributes, if enabled */ | 171 | __le32 s_flags; /* Right now used only by inode-attributes, if enabled */ |
172 | unsigned char s_uuid[16]; /* filesystem unique identifier */ | 172 | unsigned char s_uuid[16]; /* filesystem unique identifier */ |
173 | unsigned char s_label[16]; /* filesystem volume label */ | 173 | unsigned char s_label[16]; /* filesystem volume label */ |
174 | char s_unused[88]; /* zero filled by mkreiserfs and | 174 | __le16 s_mnt_count; /* Count of mounts since last fsck */ |
175 | __le16 s_max_mnt_count; /* Maximum mounts before check */ | ||
176 | __le32 s_lastcheck; /* Timestamp of last fsck */ | ||
177 | __le32 s_check_interval; /* Interval between checks */ | ||
178 | char s_unused[76]; /* zero filled by mkreiserfs and | ||
175 | * reiserfs_convert_objectid_map_v1() | 179 | * reiserfs_convert_objectid_map_v1() |
176 | * so any additions must be updated | 180 | * so any additions must be updated |
177 | * there as well. */ | 181 | * there as well. */ |
diff --git a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h index bda6b562a1e0..ccd38f351530 100644 --- a/include/linux/reiserfs_fs_sb.h +++ b/include/linux/reiserfs_fs_sb.h | |||
@@ -73,6 +73,9 @@ typedef enum { | |||
73 | #define sb_version(sbp) (le16_to_cpu((sbp)->s_v1.s_version)) | 73 | #define sb_version(sbp) (le16_to_cpu((sbp)->s_v1.s_version)) |
74 | #define set_sb_version(sbp,v) ((sbp)->s_v1.s_version = cpu_to_le16(v)) | 74 | #define set_sb_version(sbp,v) ((sbp)->s_v1.s_version = cpu_to_le16(v)) |
75 | 75 | ||
76 | #define sb_mnt_count(sbp) (le16_to_cpu((sbp)->s_mnt_count)) | ||
77 | #define set_sb_mnt_count(sbp, v) ((sbp)->s_mnt_count = cpu_to_le16(v)) | ||
78 | |||
76 | #define sb_reserved_for_journal(sbp) \ | 79 | #define sb_reserved_for_journal(sbp) \ |
77 | (le16_to_cpu((sbp)->s_v1.s_reserved_for_journal)) | 80 | (le16_to_cpu((sbp)->s_v1.s_reserved_for_journal)) |
78 | #define set_sb_reserved_for_journal(sbp,v) \ | 81 | #define set_sb_reserved_for_journal(sbp,v) \ |