The branch main has been updated by kib:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=50acaaef54b4d7811393eb8c05a398d7a1882418

commit 50acaaef54b4d7811393eb8c05a398d7a1882418
Author:     Konstantin Belousov <k...@freebsd.org>
AuthorDate: 2021-06-15 10:27:37 +0000
Commit:     Konstantin Belousov <k...@freebsd.org>
CommitDate: 2021-06-23 20:47:05 +0000

    ffs_softdep: force sync if journal is low in journal_check_space
    
    This effectively causes syncing of the mount point from softdep_prealloc(),
    softdep_prerename(), and softdep_prelink().  Typically it avoids the need
    for journal suspension at this point, at all.
    
    Suggested and reviewed by:      mckusick
    Discussed with: markj
    Tested by:      pho
    Sponsored by:   The FreeBSD Foundation
    MFC after:      2 weeks
    Differential revision:  https://reviews.freebsd.org/D30041
---
 sys/ufs/ffs/ffs_softdep.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c
index efb63d94af31..2f9819ff7023 100644
--- a/sys/ufs/ffs/ffs_softdep.c
+++ b/sys/ufs/ffs/ffs_softdep.c
@@ -3226,10 +3226,17 @@ static void
 journal_check_space(ump)
        struct ufsmount *ump;
 {
+       struct mount *mp;
+
        LOCK_OWNED(ump);
 
        if (journal_space(ump, 0) == 0) {
                softdep_speedup(ump);
+               mp = UFSTOVFS(ump);
+               FREE_LOCK(ump);
+               VFS_SYNC(mp, MNT_NOWAIT);
+               ffs_sbupdate(ump, MNT_WAIT, 0);
+               ACQUIRE_LOCK(ump);
                if (journal_space(ump, 1) == 0)
                        journal_suspend(ump);
        }
_______________________________________________
dev-commits-src-main@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main
To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"

Reply via email to