diff options
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r-- | fs/xfs/xfs_inode.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index 1f22d65fed0a..c1dc7ef5a1d8 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c | |||
@@ -343,6 +343,16 @@ xfs_iformat( | |||
343 | return XFS_ERROR(EFSCORRUPTED); | 343 | return XFS_ERROR(EFSCORRUPTED); |
344 | } | 344 | } |
345 | 345 | ||
346 | if (unlikely((ip->i_d.di_flags & XFS_DIFLAG_REALTIME) && | ||
347 | !ip->i_mount->m_rtdev_targp)) { | ||
348 | xfs_fs_repair_cmn_err(CE_WARN, ip->i_mount, | ||
349 | "corrupt dinode %Lu, has realtime flag set.", | ||
350 | ip->i_ino); | ||
351 | XFS_CORRUPTION_ERROR("xfs_iformat(realtime)", | ||
352 | XFS_ERRLEVEL_LOW, ip->i_mount, dip); | ||
353 | return XFS_ERROR(EFSCORRUPTED); | ||
354 | } | ||
355 | |||
346 | switch (ip->i_d.di_mode & S_IFMT) { | 356 | switch (ip->i_d.di_mode & S_IFMT) { |
347 | case S_IFIFO: | 357 | case S_IFIFO: |
348 | case S_IFCHR: | 358 | case S_IFCHR: |
@@ -641,7 +651,7 @@ xfs_iformat_btree( | |||
641 | return 0; | 651 | return 0; |
642 | } | 652 | } |
643 | 653 | ||
644 | void | 654 | STATIC void |
645 | xfs_dinode_from_disk( | 655 | xfs_dinode_from_disk( |
646 | xfs_icdinode_t *to, | 656 | xfs_icdinode_t *to, |
647 | xfs_dinode_t *from) | 657 | xfs_dinode_t *from) |
@@ -1237,7 +1247,7 @@ xfs_isize_check( | |||
1237 | * In that case the pages will still be in memory, but the inode size | 1247 | * In that case the pages will still be in memory, but the inode size |
1238 | * will never have been updated. | 1248 | * will never have been updated. |
1239 | */ | 1249 | */ |
1240 | xfs_fsize_t | 1250 | STATIC xfs_fsize_t |
1241 | xfs_file_last_byte( | 1251 | xfs_file_last_byte( |
1242 | xfs_inode_t *ip) | 1252 | xfs_inode_t *ip) |
1243 | { | 1253 | { |
@@ -3827,7 +3837,7 @@ xfs_iext_inline_to_direct( | |||
3827 | /* | 3837 | /* |
3828 | * Resize an extent indirection array to new_size bytes. | 3838 | * Resize an extent indirection array to new_size bytes. |
3829 | */ | 3839 | */ |
3830 | void | 3840 | STATIC void |
3831 | xfs_iext_realloc_indirect( | 3841 | xfs_iext_realloc_indirect( |
3832 | xfs_ifork_t *ifp, /* inode fork pointer */ | 3842 | xfs_ifork_t *ifp, /* inode fork pointer */ |
3833 | int new_size) /* new indirection array size */ | 3843 | int new_size) /* new indirection array size */ |
@@ -3852,7 +3862,7 @@ xfs_iext_realloc_indirect( | |||
3852 | /* | 3862 | /* |
3853 | * Switch from indirection array to linear (direct) extent allocations. | 3863 | * Switch from indirection array to linear (direct) extent allocations. |
3854 | */ | 3864 | */ |
3855 | void | 3865 | STATIC void |
3856 | xfs_iext_indirect_to_direct( | 3866 | xfs_iext_indirect_to_direct( |
3857 | xfs_ifork_t *ifp) /* inode fork pointer */ | 3867 | xfs_ifork_t *ifp) /* inode fork pointer */ |
3858 | { | 3868 | { |