ffs_softdep.c (7b7ed832e46c198d547c60c2dbf0d2f9d9561838) | ffs_softdep.c (59d4932531aa4e97f68b2d42290a68cae6b17375) |
---|---|
1/*- 2 * Copyright 1998, 2000 Marshall Kirk McKusick. All Rights Reserved. 3 * 4 * The soft updates code is derived from the appendix of a University 5 * of Michigan technical report (Gregory R. Ganger and Yale N. Patt, 6 * "Soft Updates: A Solution to the Metadata Update Problem in File 7 * Systems", CSE-TR-254-95, August 1995). 8 * --- 728 unchanged lines hidden (view full) --- 737 FREE_LOCK(&lk); 738 VFS_UNLOCK_GIANT(vfslocked); 739 remaining = 0; 740 mtx_lock(&mountlist_mtx); 741 for (mp = TAILQ_FIRST(&mountlist); mp != NULL; mp = nmp) { 742 nmp = TAILQ_NEXT(mp, mnt_list); 743 if ((mp->mnt_flag & MNT_SOFTDEP) == 0) 744 continue; | 1/*- 2 * Copyright 1998, 2000 Marshall Kirk McKusick. All Rights Reserved. 3 * 4 * The soft updates code is derived from the appendix of a University 5 * of Michigan technical report (Gregory R. Ganger and Yale N. Patt, 6 * "Soft Updates: A Solution to the Metadata Update Problem in File 7 * Systems", CSE-TR-254-95, August 1995). 8 * --- 728 unchanged lines hidden (view full) --- 737 FREE_LOCK(&lk); 738 VFS_UNLOCK_GIANT(vfslocked); 739 remaining = 0; 740 mtx_lock(&mountlist_mtx); 741 for (mp = TAILQ_FIRST(&mountlist); mp != NULL; mp = nmp) { 742 nmp = TAILQ_NEXT(mp, mnt_list); 743 if ((mp->mnt_flag & MNT_SOFTDEP) == 0) 744 continue; |
745 if (vfs_busy(mp, LK_NOWAIT, &mountlist_mtx, td)) | 745 if (vfs_busy(mp, LK_NOWAIT, &mountlist_mtx)) |
746 continue; 747 vfslocked = VFS_LOCK_GIANT(mp); 748 softdep_process_worklist(mp, 0); 749 ump = VFSTOUFS(mp); 750 remaining += ump->softdep_on_worklist - 751 ump->softdep_on_worklist_inprogress; 752 VFS_UNLOCK_GIANT(vfslocked); 753 mtx_lock(&mountlist_mtx); 754 nmp = TAILQ_NEXT(mp, mnt_list); | 746 continue; 747 vfslocked = VFS_LOCK_GIANT(mp); 748 softdep_process_worklist(mp, 0); 749 ump = VFSTOUFS(mp); 750 remaining += ump->softdep_on_worklist - 751 ump->softdep_on_worklist_inprogress; 752 VFS_UNLOCK_GIANT(vfslocked); 753 mtx_lock(&mountlist_mtx); 754 nmp = TAILQ_NEXT(mp, mnt_list); |
755 vfs_unbusy(mp, td); | 755 vfs_unbusy(mp); |
756 } 757 mtx_unlock(&mountlist_mtx); 758 if (remaining) 759 continue; 760 ACQUIRE_LOCK(&lk); 761 if (!req_pending) 762 msleep(&req_pending, &lk, PVM, "sdflush", hz); 763 req_pending = 0; --- 5573 unchanged lines hidden --- | 756 } 757 mtx_unlock(&mountlist_mtx); 758 if (remaining) 759 continue; 760 ACQUIRE_LOCK(&lk); 761 if (!req_pending) 762 msleep(&req_pending, &lk, PVM, "sdflush", hz); 763 req_pending = 0; --- 5573 unchanged lines hidden --- |