Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Jul 2011 18:06:13 +0000 (UTC)
From:      Kirk McKusick <mckusick@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r224027 - head/sys/ufs/ffs
Message-ID:  <201107141806.p6EI6Dr1039967@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mckusick
Date: Thu Jul 14 18:06:13 2011
New Revision: 224027
URL: http://svn.freebsd.org/changeset/base/224027

Log:
  Consistently check mount flag (MNTK_SUJ) rather than superblock
  flag (FS_SUJ) when determining whether to do journaling-based
  operations. The mount flag is set only when journaling is active
  while the superblock flag is set to indicate that journaling is to
  be used. For example, when the filesystem is mounted read-only, the
  journaling may be present (FS_SUJ) but not active (MNTK_SUJ).
  Inappropriate checking of the FS_SUJ flag was causing some
  journaling actions to be attempted at inappropriate times.

Modified:
  head/sys/ufs/ffs/ffs_softdep.c

Modified: head/sys/ufs/ffs/ffs_softdep.c
==============================================================================
--- head/sys/ufs/ffs/ffs_softdep.c	Thu Jul 14 17:50:16 2011	(r224026)
+++ head/sys/ufs/ffs/ffs_softdep.c	Thu Jul 14 18:06:13 2011	(r224027)
@@ -5199,7 +5199,7 @@ newfreefrag(ip, blkno, size, lbn)
 	freefrag->ff_blkno = blkno;
 	freefrag->ff_fragsize = size;
 
-	if (fs->fs_flags & FS_SUJ) {
+	if ((ip->i_ump->um_mountp->mnt_kern_flag & MNTK_SUJ) != 0) {
 		freefrag->ff_jdep = (struct worklist *)
 		    newjfreefrag(freefrag, ip, blkno, size, lbn);
 	} else {
@@ -8928,7 +8928,7 @@ softdep_setup_sbupdate(ump, fs, bp)
 	struct sbdep *sbdep;
 	struct worklist *wk;
 
-	if ((fs->fs_flags & FS_SUJ) == 0)
+	if ((ump->um_mountp->mnt_kern_flag & MNTK_SUJ) == 0)
 		return;
 	LIST_FOREACH(wk, &bp->b_dep, wk_list)
 		if (wk->wk_type == D_SBDEP)



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