git: 3f908eed27b4 - stable/13 - Enable taking snapshots on UFS/FFS filesystems using journaled soft updates.

From: Kirk McKusick <mckusick_at_FreeBSD.org>
Date: Wed, 18 Jan 2023 00:32:11 UTC
The branch stable/13 has been updated by mckusick:

URL: https://cgit.FreeBSD.org/src/commit/?id=3f908eed27b47ae40947e3fec2b262acdb5efcd5

commit 3f908eed27b47ae40947e3fec2b262acdb5efcd5
Author:     Kirk McKusick <mckusick@FreeBSD.org>
AuthorDate: 2022-11-13 06:56:03 +0000
Commit:     Kirk McKusick <mckusick@FreeBSD.org>
CommitDate: 2023-01-18 00:30:46 +0000

    Enable taking snapshots on UFS/FFS filesystems using journaled soft updates.
    
    Sponsored by: The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D36491
    
    (cherry picked from commit 78f41298760509f5c2b5865b2158c801d4023363)
---
 sbin/newfs/newfs.8         | 4 +---
 sbin/tunefs/tunefs.8       | 4 +---
 sys/ufs/ffs/ffs_snapshot.c | 9 ---------
 3 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/sbin/newfs/newfs.8 b/sbin/newfs/newfs.8
index 43896fe0bdb4..803b3221503d 100644
--- a/sbin/newfs/newfs.8
+++ b/sbin/newfs/newfs.8
@@ -205,9 +205,7 @@ is running.
 Running a full fsck on a UFS filesystem is the equivalent of
 running a scrub on a ZFS filesystem.
 .Pp
-Presently it is not possible to take a snapshot on a UFS filesystem
-running with journaled soft updates.
-Thus it is not possible to reliably dump mounted filesystems or
+Presently it is not possible
 to run background fsck on filesystems enabled for journaling.
 .It Fl k Ar held-for-metadata-blocks
 Set the amount of space to be held for metadata blocks in each cylinder group.
diff --git a/sbin/tunefs/tunefs.8 b/sbin/tunefs/tunefs.8
index b9a581df6784..0264c3e5f772 100644
--- a/sbin/tunefs/tunefs.8
+++ b/sbin/tunefs/tunefs.8
@@ -131,9 +131,7 @@ is running.
 Running a full fsck on a UFS filesystem is the equivalent of
 running a scrub on a ZFS filesystem.
 .Pp
-Presently it is not possible to take a snapshot on a UFS filesystem
-running with journaled soft updates.
-Thus it is not possible to reliably dump mounted filesystems or
+Presently it is not possible
 to run background fsck on filesystems enabled for journaling.
 .It Fl J Cm enable | disable
 Turn on/off gjournal flag.
diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c
index 89301576f48a..709038db071f 100644
--- a/sys/ufs/ffs/ffs_snapshot.c
+++ b/sys/ufs/ffs/ffs_snapshot.c
@@ -226,15 +226,6 @@ ffs_snapshot(struct mount *mp, char *snapfile)
 	ump = VFSTOUFS(mp);
 	fs = ump->um_fs;
 	sn = NULL;
-	/*
-	 * At the moment, journaled soft updates cannot support
-	 * taking snapshots.
-	 */
-	if (MOUNTEDSUJ(mp)) {
-		vfs_mount_error(mp, "%s: Snapshots are not yet supported when "
-		    "running with journaled soft updates", fs->fs_fsmnt);
-		return (EOPNOTSUPP);
-	}
 	MNT_ILOCK(mp);
 	flag = mp->mnt_flag;
 	MNT_IUNLOCK(mp);