Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Jul 2024 19:07:02 GMT
From:      Kirk McKusick <mckusick@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 21161df3e032 - stable/13 - Do not allow snapshots on UFS filesystems using gjournal.
Message-ID:  <202407281907.46SJ72tu015621@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by mckusick:

URL: https://cgit.FreeBSD.org/src/commit/?id=21161df3e032252e7533a183acbc5374157b66f1

commit 21161df3e032252e7533a183acbc5374157b66f1
Author:     Kirk McKusick <mckusick@FreeBSD.org>
AuthorDate: 2024-07-25 06:09:58 +0000
Commit:     Kirk McKusick <mckusick@FreeBSD.org>
CommitDate: 2024-07-28 19:06:52 +0000

    Do not allow snapshots on UFS filesystems using gjournal.
    
    PR:          280216
    
    (cherry picked from commit cab41e0dd31d184bdb0d14403ca71a0f6c9a5e83)
---
 sys/ufs/ffs/ffs_snapshot.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c
index d4280391f48c..bc4dbdf52e5b 100644
--- a/sys/ufs/ffs/ffs_snapshot.c
+++ b/sys/ufs/ffs/ffs_snapshot.c
@@ -224,6 +224,15 @@ ffs_snapshot(struct mount *mp, char *snapfile)
 	ump = VFSTOUFS(mp);
 	fs = ump->um_fs;
 	sn = NULL;
+	/*
+	 * At the moment, filesystems using gjournal cannot support
+	 * taking snapshots.
+	 */
+	if ((mp->mnt_flag & MNT_GJOURNAL) != 0) {
+		vfs_mount_error(mp, "%s: Snapshots are not yet supported when "
+		    "using gjournal", fs->fs_fsmnt);
+		return (EOPNOTSUPP);
+	}
 	MNT_ILOCK(mp);
 	flag = mp->mnt_flag;
 	MNT_IUNLOCK(mp);



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