From 86b571509ac2b56537f532f09cbf48591d351575 Mon Sep 17 00:00:00 2001 From: Kirk McKusick Date: Tue, 17 Jan 2012 01:14:56 +0000 Subject: [PATCH] There are several bugs/hangs when trying to take a snapshot on a UFS/FFS filesystem running with journaled soft updates. Until these problems have been tracked down, return ENOTSUPP when an attempt is made to take a snapshot on a filesystem running with journaled soft updates. MFC after: 2 weeks --- sys/ufs/ffs/ffs_snapshot.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c index c8d89698e8de..adc1d781755e 100644 --- a/sys/ufs/ffs/ffs_snapshot.c +++ b/sys/ufs/ffs/ffs_snapshot.c @@ -225,10 +225,18 @@ ffs_snapshot(mp, 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); - /* * Need to serialize access to snapshot code per filesystem. */