diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-21 21:10:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-21 21:10:19 -0400 |
commit | 52ab3f3dc711eeccbfbcc5d4f5c5d9b9ff59650f (patch) | |
tree | f6fa8468885835152f131e3abc094da369d15669 /fs/xfs/xfs_log.c | |
parent | 43104f1da88f5335e9a45695df92a735ad550dda (diff) | |
parent | 98174e46974323e4941c72e46345f7277755e146 (diff) |
Merge git://oss.sgi.com:8090/xfs-2.6
* git://oss.sgi.com:8090/xfs-2.6: (43 commits)
[XFS] Remove files from the build that are now unused.
[XFS] Fix a Makefile issue related to exports.o handling.
[XFS] Remove version 1 directory code. Never functioned on Linux, just
[XFS] Map EFSCORRUPTED to an actual error code, not just a made up one
[XFS] Kill direct access to ->count in valusema(); all we ever use it for
[XFS] Remove unneeded conditional code on NFS export interface related
[XFS] Remove an incorrect use of unlikely() on a relatively likely code
[XFS] Push some common code out of write path into core XFS code for
[XFS] Remove unnecessary local from open_exec dmapi path.
[XFS] Minor XFS documentation updates.
[XFS] Fix broken const use inside local suffix_strtoul routine.
[XFS] Fix nused counter. It's currently getting set to -1 rather than
[XFS] Fix mismerge of the fs_writable cleanup patch causing a freeze/thaw
[XFS] Fix up debug code so that bulkstat wont generate thousands of
[XFS] Remove unused parameter from di2xflags routine.
[XFS] Cleanup a missed porting conversion, and freezing.
[XFS] Resolve a namespace collision on remaining vtypes for FreeBSD
[XFS] Resolve a namespace collision on vnode/vnodeops for FreeBSD porters.
[XFS] Resolve a namespace collision on vfs/vfsops for FreeBSD porters.
[XFS] statvfs component of directory/project quota support, code
...
Diffstat (limited to 'fs/xfs/xfs_log.c')
-rw-r--r-- | fs/xfs/xfs_log.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index 32e841d2f26d..d8f5d4cbe8b7 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include "xfs_trans.h" | 24 | #include "xfs_trans.h" |
25 | #include "xfs_sb.h" | 25 | #include "xfs_sb.h" |
26 | #include "xfs_ag.h" | 26 | #include "xfs_ag.h" |
27 | #include "xfs_dir.h" | ||
28 | #include "xfs_dir2.h" | 27 | #include "xfs_dir2.h" |
29 | #include "xfs_dmapi.h" | 28 | #include "xfs_dmapi.h" |
30 | #include "xfs_mount.h" | 29 | #include "xfs_mount.h" |
@@ -36,7 +35,6 @@ | |||
36 | #include "xfs_ialloc_btree.h" | 35 | #include "xfs_ialloc_btree.h" |
37 | #include "xfs_log_recover.h" | 36 | #include "xfs_log_recover.h" |
38 | #include "xfs_trans_priv.h" | 37 | #include "xfs_trans_priv.h" |
39 | #include "xfs_dir_sf.h" | ||
40 | #include "xfs_dir2_sf.h" | 38 | #include "xfs_dir2_sf.h" |
41 | #include "xfs_attr_sf.h" | 39 | #include "xfs_attr_sf.h" |
42 | #include "xfs_dinode.h" | 40 | #include "xfs_dinode.h" |
@@ -402,7 +400,7 @@ xfs_log_release_iclog(xfs_mount_t *mp, | |||
402 | xlog_in_core_t *iclog = (xlog_in_core_t *)iclog_hndl; | 400 | xlog_in_core_t *iclog = (xlog_in_core_t *)iclog_hndl; |
403 | 401 | ||
404 | if (xlog_state_release_iclog(log, iclog)) { | 402 | if (xlog_state_release_iclog(log, iclog)) { |
405 | xfs_force_shutdown(mp, XFS_LOG_IO_ERROR); | 403 | xfs_force_shutdown(mp, SHUTDOWN_LOG_IO_ERROR); |
406 | return EIO; | 404 | return EIO; |
407 | } | 405 | } |
408 | 406 | ||
@@ -498,9 +496,8 @@ xfs_log_mount(xfs_mount_t *mp, | |||
498 | * just worked. | 496 | * just worked. |
499 | */ | 497 | */ |
500 | if (!(mp->m_flags & XFS_MOUNT_NORECOVERY)) { | 498 | if (!(mp->m_flags & XFS_MOUNT_NORECOVERY)) { |
501 | int error; | 499 | bhv_vfs_t *vfsp = XFS_MTOVFS(mp); |
502 | vfs_t *vfsp = XFS_MTOVFS(mp); | 500 | int error, readonly = (vfsp->vfs_flag & VFS_RDONLY); |
503 | int readonly = (vfsp->vfs_flag & VFS_RDONLY); | ||
504 | 501 | ||
505 | if (readonly) | 502 | if (readonly) |
506 | vfsp->vfs_flag &= ~VFS_RDONLY; | 503 | vfsp->vfs_flag &= ~VFS_RDONLY; |
@@ -726,7 +723,7 @@ xfs_log_write(xfs_mount_t * mp, | |||
726 | return XFS_ERROR(EIO); | 723 | return XFS_ERROR(EIO); |
727 | 724 | ||
728 | if ((error = xlog_write(mp, reg, nentries, tic, start_lsn, NULL, 0))) { | 725 | if ((error = xlog_write(mp, reg, nentries, tic, start_lsn, NULL, 0))) { |
729 | xfs_force_shutdown(mp, XFS_LOG_IO_ERROR); | 726 | xfs_force_shutdown(mp, SHUTDOWN_LOG_IO_ERROR); |
730 | } | 727 | } |
731 | return error; | 728 | return error; |
732 | } /* xfs_log_write */ | 729 | } /* xfs_log_write */ |
@@ -816,9 +813,9 @@ xfs_log_need_covered(xfs_mount_t *mp) | |||
816 | SPLDECL(s); | 813 | SPLDECL(s); |
817 | int needed = 0, gen; | 814 | int needed = 0, gen; |
818 | xlog_t *log = mp->m_log; | 815 | xlog_t *log = mp->m_log; |
819 | vfs_t *vfsp = XFS_MTOVFS(mp); | 816 | bhv_vfs_t *vfsp = XFS_MTOVFS(mp); |
820 | 817 | ||
821 | if (fs_frozen(vfsp) || XFS_FORCED_SHUTDOWN(mp) || | 818 | if (vfs_test_for_freeze(vfsp) || XFS_FORCED_SHUTDOWN(mp) || |
822 | (vfsp->vfs_flag & VFS_RDONLY)) | 819 | (vfsp->vfs_flag & VFS_RDONLY)) |
823 | return 0; | 820 | return 0; |
824 | 821 | ||
@@ -956,7 +953,7 @@ xlog_iodone(xfs_buf_t *bp) | |||
956 | XFS_ERRTAG_IODONE_IOERR, XFS_RANDOM_IODONE_IOERR)) { | 953 | XFS_ERRTAG_IODONE_IOERR, XFS_RANDOM_IODONE_IOERR)) { |
957 | xfs_ioerror_alert("xlog_iodone", l->l_mp, bp, XFS_BUF_ADDR(bp)); | 954 | xfs_ioerror_alert("xlog_iodone", l->l_mp, bp, XFS_BUF_ADDR(bp)); |
958 | XFS_BUF_STALE(bp); | 955 | XFS_BUF_STALE(bp); |
959 | xfs_force_shutdown(l->l_mp, XFS_LOG_IO_ERROR); | 956 | xfs_force_shutdown(l->l_mp, SHUTDOWN_LOG_IO_ERROR); |
960 | /* | 957 | /* |
961 | * This flag will be propagated to the trans-committed | 958 | * This flag will be propagated to the trans-committed |
962 | * callback routines to let them know that the log-commit | 959 | * callback routines to let them know that the log-commit |
@@ -1261,7 +1258,7 @@ xlog_commit_record(xfs_mount_t *mp, | |||
1261 | ASSERT_ALWAYS(iclog); | 1258 | ASSERT_ALWAYS(iclog); |
1262 | if ((error = xlog_write(mp, reg, 1, ticket, commitlsnp, | 1259 | if ((error = xlog_write(mp, reg, 1, ticket, commitlsnp, |
1263 | iclog, XLOG_COMMIT_TRANS))) { | 1260 | iclog, XLOG_COMMIT_TRANS))) { |
1264 | xfs_force_shutdown(mp, XFS_LOG_IO_ERROR); | 1261 | xfs_force_shutdown(mp, SHUTDOWN_LOG_IO_ERROR); |
1265 | } | 1262 | } |
1266 | return error; | 1263 | return error; |
1267 | } /* xlog_commit_record */ | 1264 | } /* xlog_commit_record */ |
@@ -1790,7 +1787,7 @@ xlog_write(xfs_mount_t * mp, | |||
1790 | xfs_cmn_err(XFS_PTAG_LOGRES, CE_ALERT, mp, | 1787 | xfs_cmn_err(XFS_PTAG_LOGRES, CE_ALERT, mp, |
1791 | "xfs_log_write: reservation ran out. Need to up reservation"); | 1788 | "xfs_log_write: reservation ran out. Need to up reservation"); |
1792 | /* If we did not panic, shutdown the filesystem */ | 1789 | /* If we did not panic, shutdown the filesystem */ |
1793 | xfs_force_shutdown(mp, XFS_CORRUPT_INCORE); | 1790 | xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE); |
1794 | #endif | 1791 | #endif |
1795 | } else | 1792 | } else |
1796 | ticket->t_curr_res -= len; | 1793 | ticket->t_curr_res -= len; |