Ffs snapshots don't work (yet) with WAPBL:

- no snapshot creation on logging file systems.
- refuse to mount logging file systems with persistent snapshots.

Ok: Simon Burge <simonb@netbsd.org>
This commit is contained in:
hannken 2008-07-31 15:37:56 +00:00
parent 2703aa2d0d
commit 85271ee0ad
2 changed files with 17 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ffs_snapshot.c,v 1.72 2008/07/30 10:09:30 hannken Exp $ */
/* $NetBSD: ffs_snapshot.c,v 1.73 2008/07/31 15:37:56 hannken Exp $ */
/*
* Copyright 2000 Marshall Kirk McKusick. All Rights Reserved.
@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ffs_snapshot.c,v 1.72 2008/07/30 10:09:30 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: ffs_snapshot.c,v 1.73 2008/07/31 15:37:56 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
@ -207,6 +207,9 @@ ffs_snapshot(struct mount *mp, struct vnode *vp,
ns = UFS_FSNEEDSWAP(fs);
si = VFSTOUFS(mp)->um_snapinfo;
/* Snapshots do not work yet with WAPBL. */
if ((mp->mnt_flag & MNT_LOG))
return EOPNOTSUPP;
/*
* Need to serialize access to snapshot code per filesystem.
*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: ffs_vfsops.c,v 1.231 2008/07/31 05:38:06 simonb Exp $ */
/* $NetBSD: ffs_vfsops.c,v 1.232 2008/07/31 15:37:56 hannken Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.231 2008/07/31 05:38:06 simonb Exp $");
__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.232 2008/07/31 15:37:56 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
@ -1291,6 +1291,16 @@ ffs_mountfs(struct vnode *devvp, struct mount *mp, struct lwp *l)
goto out;
}
}
/* Snapshots do not work yet with WAPBL. */
if (ronly == 0 && fs->fs_snapinum[0] != 0 && (mp->mnt_flag & MNT_LOG)) {
printf("%s fs has snapshots -- logging not supported yet\n",
fs->fs_fsmnt);
error = EINVAL;
free(fs->fs_csp, M_UFSMNT);
goto out;
}
if (ronly == 0 && fs->fs_snapinum[0] != 0)
ffs_snapshot_mount(mp);
#ifdef WAPBL
if (!ronly) {
@ -1308,9 +1318,6 @@ ffs_mountfs(struct vnode *devvp, struct mount *mp, struct lwp *l)
}
}
#endif /* WAPBL */
if (ronly == 0 && fs->fs_snapinum[0] != 0)
ffs_snapshot_mount(mp);
#ifdef UFS_EXTATTR
/*
* Initialize file-backed extended attributes on UFS1 file