xfs_log.c (6a2cf60b3e6341a3163d3cac3f4bede126c2e894) xfs_log.c (0d5a75e9e23ee39cd0d8a167393dcedb4f0f47b2)
1/*
2 * Copyright (c) 2000-2005 Silicon Graphics, Inc.
3 * All Rights Reserved.
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation.
8 *

--- 774 unchanged lines hidden (view full) ---

783/*
784 * Unmount record used to have a string "Unmount filesystem--" in the
785 * data section where the "Un" was really a magic number (XLOG_UNMOUNT_TYPE).
786 * We just write the magic number now since that particular field isn't
787 * currently architecture converted and "Unmount" is a bit foo.
788 * As far as I know, there weren't any dependencies on the old behaviour.
789 */
790
1/*
2 * Copyright (c) 2000-2005 Silicon Graphics, Inc.
3 * All Rights Reserved.
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation.
8 *

--- 774 unchanged lines hidden (view full) ---

783/*
784 * Unmount record used to have a string "Unmount filesystem--" in the
785 * data section where the "Un" was really a magic number (XLOG_UNMOUNT_TYPE).
786 * We just write the magic number now since that particular field isn't
787 * currently architecture converted and "Unmount" is a bit foo.
788 * As far as I know, there weren't any dependencies on the old behaviour.
789 */
790
791int
791static int
792xfs_log_unmount_write(xfs_mount_t *mp)
793{
794 struct xlog *log = mp->m_log;
795 xlog_in_core_t *iclog;
796#ifdef DEBUG
797 xlog_in_core_t *first_iclog;
798#endif
799 xlog_ticket_t *tic = NULL;

--- 231 unchanged lines hidden (view full) ---

1031 *
1032 * If there are any items in the AIl or CIL, then we do not want to attempt to
1033 * cover the log as we may be in a situation where there isn't log space
1034 * available to run a dummy transaction and this can lead to deadlocks when the
1035 * tail of the log is pinned by an item that is modified in the CIL. Hence
1036 * there's no point in running a dummy transaction at this point because we
1037 * can't start trying to idle the log until both the CIL and AIL are empty.
1038 */
792xfs_log_unmount_write(xfs_mount_t *mp)
793{
794 struct xlog *log = mp->m_log;
795 xlog_in_core_t *iclog;
796#ifdef DEBUG
797 xlog_in_core_t *first_iclog;
798#endif
799 xlog_ticket_t *tic = NULL;

--- 231 unchanged lines hidden (view full) ---

1031 *
1032 * If there are any items in the AIl or CIL, then we do not want to attempt to
1033 * cover the log as we may be in a situation where there isn't log space
1034 * available to run a dummy transaction and this can lead to deadlocks when the
1035 * tail of the log is pinned by an item that is modified in the CIL. Hence
1036 * there's no point in running a dummy transaction at this point because we
1037 * can't start trying to idle the log until both the CIL and AIL are empty.
1038 */
1039int
1039static int
1040xfs_log_need_covered(xfs_mount_t *mp)
1041{
1042 struct xlog *log = mp->m_log;
1043 int needed = 0;
1044
1045 if (!xfs_fs_writable(mp, SB_FREEZE_WRITE))
1046 return 0;
1047

--- 124 unchanged lines hidden (view full) ---

1172
1173
1174/*
1175 * Log function which is called when an io completes.
1176 *
1177 * The log manager needs its own routine, in order to control what
1178 * happens with the buffer after the write completes.
1179 */
1040xfs_log_need_covered(xfs_mount_t *mp)
1041{
1042 struct xlog *log = mp->m_log;
1043 int needed = 0;
1044
1045 if (!xfs_fs_writable(mp, SB_FREEZE_WRITE))
1046 return 0;
1047

--- 124 unchanged lines hidden (view full) ---

1172
1173
1174/*
1175 * Log function which is called when an io completes.
1176 *
1177 * The log manager needs its own routine, in order to control what
1178 * happens with the buffer after the write completes.
1179 */
1180void
1180static void
1181xlog_iodone(xfs_buf_t *bp)
1182{
1183 struct xlog_in_core *iclog = bp->b_fspriv;
1184 struct xlog *l = iclog->ic_log;
1185 int aborted = 0;
1186
1187 /*
1188 * Race to shutdown the filesystem if we see an error or the iclog is in

--- 108 unchanged lines hidden (view full) ---

1297 msecs_to_jiffies(xfs_syncd_centisecs * 10));
1298}
1299
1300/*
1301 * Every sync period we need to unpin all items in the AIL and push them to
1302 * disk. If there is nothing dirty, then we might need to cover the log to
1303 * indicate that the filesystem is idle.
1304 */
1181xlog_iodone(xfs_buf_t *bp)
1182{
1183 struct xlog_in_core *iclog = bp->b_fspriv;
1184 struct xlog *l = iclog->ic_log;
1185 int aborted = 0;
1186
1187 /*
1188 * Race to shutdown the filesystem if we see an error or the iclog is in

--- 108 unchanged lines hidden (view full) ---

1297 msecs_to_jiffies(xfs_syncd_centisecs * 10));
1298}
1299
1300/*
1301 * Every sync period we need to unpin all items in the AIL and push them to
1302 * disk. If there is nothing dirty, then we might need to cover the log to
1303 * indicate that the filesystem is idle.
1304 */
1305void
1305static void
1306xfs_log_worker(
1307 struct work_struct *work)
1308{
1309 struct xlog *log = container_of(to_delayed_work(work),
1310 struct xlog, l_work);
1311 struct xfs_mount *mp = log->l_mp;
1312
1313 /* dgc: errors ignored - not fatal and nowhere to report them */

--- 2750 unchanged lines hidden ---
1306xfs_log_worker(
1307 struct work_struct *work)
1308{
1309 struct xlog *log = container_of(to_delayed_work(work),
1310 struct xlog, l_work);
1311 struct xfs_mount *mp = log->l_mp;
1312
1313 /* dgc: errors ignored - not fatal and nowhere to report them */

--- 2750 unchanged lines hidden ---