Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Jun 2021 20:47:33 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 50acaaef54b4 - main - ffs_softdep: force sync if journal is low in journal_check_space
Message-ID:  <202106232047.15NKlXjQ009942@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by kib:

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

commit 50acaaef54b4d7811393eb8c05a398d7a1882418
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-06-15 10:27:37 +0000
Commit:     Konstantin Belousov <kib@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);
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106232047.15NKlXjQ009942>