Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Add generic genfs_suspendctl() and use it for all file systems.
details: https://anonhg.NetBSD.org/src/rev/82847755db4c
branches: trunk
changeset: 351537:82847755db4c
user: hannken <hannken%NetBSD.org@localhost>
date: Fri Feb 17 08:31:23 2017 +0000
description:
Add generic genfs_suspendctl() and use it for all file systems.
Layered file systems need work.
diffstat:
external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c | 1 +
sys/coda/coda_vfsops.c | 6 +-
sys/fs/adosfs/advfsops.c | 6 +-
sys/fs/cd9660/cd9660_vfsops.c | 6 +-
sys/fs/efs/efs_vfsops.c | 6 +-
sys/fs/filecorefs/filecore_vfsops.c | 6 +-
sys/fs/hfs/hfs_vfsops.c | 6 +-
sys/fs/msdosfs/msdosfs_vfsops.c | 30 +-------------
sys/fs/nilfs/nilfs_vfsops.c | 6 +-
sys/fs/ntfs/ntfs_vfsops.c | 6 +-
sys/fs/ptyfs/ptyfs_vfsops.c | 6 +-
sys/fs/puffs/puffs_vfsops.c | 6 +-
sys/fs/smbfs/smbfs_vfsops.c | 6 +-
sys/fs/sysvbfs/sysvbfs.c | 6 +-
sys/fs/tmpfs/tmpfs_vfsops.c | 6 +-
sys/fs/udf/udf_vfsops.c | 6 +-
sys/fs/union/union_vfsops.c | 7 +-
sys/fs/v7fs/v7fs_extern.c | 6 +-
sys/miscfs/fdesc/fdesc_vfsops.c | 6 +-
sys/miscfs/genfs/genfs.h | 4 +-
sys/miscfs/genfs/genfs_vfsops.c | 35 ++++++++++++++++-
sys/miscfs/genfs/layer_extern.h | 3 +-
sys/miscfs/genfs/layer_vfsops.c | 22 +++++++++-
sys/miscfs/kernfs/kernfs_vfsops.c | 6 +-
sys/miscfs/nullfs/null_vfsops.c | 6 +-
sys/miscfs/overlay/overlay_vfsops.c | 6 +-
sys/miscfs/procfs/procfs_vfsops.c | 6 +-
sys/miscfs/umapfs/umap_vfsops.c | 6 +-
sys/nfs/nfs_vfsops.c | 6 +-
sys/rump/librump/rumpvfs/rumpfs.c | 6 +-
sys/ufs/chfs/chfs_vfsops.c | 4 +-
sys/ufs/ext2fs/ext2fs_vfsops.c | 6 +-
sys/ufs/ffs/ffs_vfsops.c | 30 +-------------
sys/ufs/lfs/lfs_vfsops.c | 6 +-
sys/ufs/mfs/mfs_vfsops.c | 6 +-
35 files changed, 149 insertions(+), 143 deletions(-)
diffs (truncated from 1020 to 300 lines):
diff -r f8a175024c34 -r 82847755db4c external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c Fri Feb 17 08:30:00 2017 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c Fri Feb 17 08:31:23 2017 +0000
@@ -116,6 +116,7 @@
.vfs_fhtovp = (void *)eopnotsupp,
.vfs_quotactl = (void *)eopnotsupp,
.vfs_extattrctl = (void *)eopnotsupp,
+ .vfs_suspendctl = genfs_suspendctl,
.vfs_snapshot = (void *)eopnotsupp,
.vfs_fsync = (void *)eopnotsupp,
};
diff -r f8a175024c34 -r 82847755db4c sys/coda/coda_vfsops.c
--- a/sys/coda/coda_vfsops.c Fri Feb 17 08:30:00 2017 +0000
+++ b/sys/coda/coda_vfsops.c Fri Feb 17 08:31:23 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: coda_vfsops.c,v 1.84 2014/12/13 15:59:30 hannken Exp $ */
+/* $NetBSD: coda_vfsops.c,v 1.85 2017/02/17 08:31:23 hannken Exp $ */
/*
*
@@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: coda_vfsops.c,v 1.84 2014/12/13 15:59:30 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: coda_vfsops.c,v 1.85 2017/02/17 08:31:23 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -114,7 +114,7 @@
.vfs_mountroot = (void *)eopnotsupp,
.vfs_snapshot = (void *)eopnotsupp,
.vfs_extattrctl = vfs_stdextattrctl,
- .vfs_suspendctl = (void *)eopnotsupp,
+ .vfs_suspendctl = genfs_suspendctl,
.vfs_renamelock_enter = genfs_renamelock_enter,
.vfs_renamelock_exit = genfs_renamelock_exit,
.vfs_fsync = (void *)eopnotsupp,
diff -r f8a175024c34 -r 82847755db4c sys/fs/adosfs/advfsops.c
--- a/sys/fs/adosfs/advfsops.c Fri Feb 17 08:30:00 2017 +0000
+++ b/sys/fs/adosfs/advfsops.c Fri Feb 17 08:31:23 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: advfsops.c,v 1.75 2015/11/18 22:06:25 phx Exp $ */
+/* $NetBSD: advfsops.c,v 1.76 2017/02/17 08:31:24 hannken Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: advfsops.c,v 1.75 2015/11/18 22:06:25 phx Exp $");
+__KERNEL_RCSID(0, "$NetBSD: advfsops.c,v 1.76 2017/02/17 08:31:24 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -804,7 +804,7 @@
.vfs_done = adosfs_done,
.vfs_snapshot = (void *)eopnotsupp,
.vfs_extattrctl = vfs_stdextattrctl,
- .vfs_suspendctl = (void *)eopnotsupp,
+ .vfs_suspendctl = genfs_suspendctl,
.vfs_renamelock_enter = genfs_renamelock_enter,
.vfs_renamelock_exit = genfs_renamelock_exit,
.vfs_fsync = (void *)eopnotsupp,
diff -r f8a175024c34 -r 82847755db4c sys/fs/cd9660/cd9660_vfsops.c
--- a/sys/fs/cd9660/cd9660_vfsops.c Fri Feb 17 08:30:00 2017 +0000
+++ b/sys/fs/cd9660/cd9660_vfsops.c Fri Feb 17 08:31:23 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cd9660_vfsops.c,v 1.90 2015/03/28 19:24:05 maxv Exp $ */
+/* $NetBSD: cd9660_vfsops.c,v 1.91 2017/02/17 08:31:24 hannken Exp $ */
/*-
* Copyright (c) 1994
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.90 2015/03/28 19:24:05 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.91 2017/02/17 08:31:24 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -111,7 +111,7 @@
.vfs_mountroot = cd9660_mountroot,
.vfs_snapshot = (void *)eopnotsupp,
.vfs_extattrctl = vfs_stdextattrctl,
- .vfs_suspendctl = (void *)eopnotsupp,
+ .vfs_suspendctl = genfs_suspendctl,
.vfs_renamelock_enter = genfs_renamelock_enter,
.vfs_renamelock_exit = genfs_renamelock_exit,
.vfs_fsync = (void *)eopnotsupp,
diff -r f8a175024c34 -r 82847755db4c sys/fs/efs/efs_vfsops.c
--- a/sys/fs/efs/efs_vfsops.c Fri Feb 17 08:30:00 2017 +0000
+++ b/sys/fs/efs/efs_vfsops.c Fri Feb 17 08:31:23 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: efs_vfsops.c,v 1.27 2016/07/07 06:55:42 msaitoh Exp $ */
+/* $NetBSD: efs_vfsops.c,v 1.28 2017/02/17 08:31:24 hannken Exp $ */
/*
* Copyright (c) 2006 Stephen M. Rumble <rumble%ephemeral.org@localhost>
@@ -17,7 +17,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: efs_vfsops.c,v 1.27 2016/07/07 06:55:42 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: efs_vfsops.c,v 1.28 2017/02/17 08:31:24 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -575,7 +575,7 @@
.vfs_mountroot = (void *)eopnotsupp,
.vfs_snapshot = (void *)eopnotsupp,
.vfs_extattrctl = vfs_stdextattrctl,
- .vfs_suspendctl = (void *)eopnotsupp,
+ .vfs_suspendctl = genfs_suspendctl,
.vfs_opv_descs = efs_vnodeopv_descs
/* .vfs_refcount */
/* .vfs_list */
diff -r f8a175024c34 -r 82847755db4c sys/fs/filecorefs/filecore_vfsops.c
--- a/sys/fs/filecorefs/filecore_vfsops.c Fri Feb 17 08:30:00 2017 +0000
+++ b/sys/fs/filecorefs/filecore_vfsops.c Fri Feb 17 08:31:23 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: filecore_vfsops.c,v 1.78 2015/03/28 19:24:05 maxv Exp $ */
+/* $NetBSD: filecore_vfsops.c,v 1.79 2017/02/17 08:31:24 hannken Exp $ */
/*-
* Copyright (c) 1994 The Regents of the University of California.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: filecore_vfsops.c,v 1.78 2015/03/28 19:24:05 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: filecore_vfsops.c,v 1.79 2017/02/17 08:31:24 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -125,7 +125,7 @@
.vfs_done = filecore_done,
.vfs_snapshot = (void *)eopnotsupp,
.vfs_extattrctl = vfs_stdextattrctl,
- .vfs_suspendctl = (void *)eopnotsupp,
+ .vfs_suspendctl = genfs_suspendctl,
.vfs_renamelock_enter = genfs_renamelock_enter,
.vfs_renamelock_exit = genfs_renamelock_exit,
.vfs_fsync = (void *)eopnotsupp,
diff -r f8a175024c34 -r 82847755db4c sys/fs/hfs/hfs_vfsops.c
--- a/sys/fs/hfs/hfs_vfsops.c Fri Feb 17 08:30:00 2017 +0000
+++ b/sys/fs/hfs/hfs_vfsops.c Fri Feb 17 08:31:23 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hfs_vfsops.c,v 1.33 2014/12/29 17:17:54 maxv Exp $ */
+/* $NetBSD: hfs_vfsops.c,v 1.34 2017/02/17 08:31:24 hannken Exp $ */
/*-
* Copyright (c) 2005, 2007 The NetBSD Foundation, Inc.
@@ -99,7 +99,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hfs_vfsops.c,v 1.33 2014/12/29 17:17:54 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hfs_vfsops.c,v 1.34 2017/02/17 08:31:24 hannken Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -166,7 +166,7 @@
.vfs_reinit = hfs_reinit,
.vfs_done = hfs_done,
.vfs_extattrctl = vfs_stdextattrctl,
- .vfs_suspendctl = (void *)eopnotsupp,
+ .vfs_suspendctl = genfs_suspendctl,
.vfs_renamelock_enter = genfs_renamelock_enter,
.vfs_renamelock_exit = genfs_renamelock_exit,
.vfs_fsync = (void *)eopnotsupp,
diff -r f8a175024c34 -r 82847755db4c sys/fs/msdosfs/msdosfs_vfsops.c
--- a/sys/fs/msdosfs/msdosfs_vfsops.c Fri Feb 17 08:30:00 2017 +0000
+++ b/sys/fs/msdosfs/msdosfs_vfsops.c Fri Feb 17 08:31:23 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: msdosfs_vfsops.c,v 1.121 2017/02/17 08:29:11 hannken Exp $ */
+/* $NetBSD: msdosfs_vfsops.c,v 1.122 2017/02/17 08:31:24 hannken Exp $ */
/*-
* Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: msdosfs_vfsops.c,v 1.121 2017/02/17 08:29:11 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msdosfs_vfsops.c,v 1.122 2017/02/17 08:31:24 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -136,7 +136,7 @@
.vfs_mountroot = msdosfs_mountroot,
.vfs_snapshot = (void *)eopnotsupp,
.vfs_extattrctl = vfs_stdextattrctl,
- .vfs_suspendctl = msdosfs_suspendctl,
+ .vfs_suspendctl = genfs_suspendctl,
.vfs_renamelock_enter = genfs_renamelock_enter,
.vfs_renamelock_exit = genfs_renamelock_exit,
.vfs_fsync = (void *)eopnotsupp,
@@ -1109,27 +1109,3 @@
return (EOPNOTSUPP);
}
-
-int
-msdosfs_suspendctl(struct mount *mp, int cmd)
-{
- int error;
- struct lwp *l = curlwp;
-
- switch (cmd) {
- case SUSPEND_SUSPEND:
- if ((error = fstrans_setstate(mp, FSTRANS_SUSPENDING)) != 0)
- return error;
- if ((error = fstrans_setstate(mp, FSTRANS_SUSPENDED)) != 0) {
- (void) fstrans_setstate(mp, FSTRANS_NORMAL);
- return error;
- }
- return 0;
-
- case SUSPEND_RESUME:
- return fstrans_setstate(mp, FSTRANS_NORMAL);
-
- default:
- return EINVAL;
- }
-}
diff -r f8a175024c34 -r 82847755db4c sys/fs/nilfs/nilfs_vfsops.c
--- a/sys/fs/nilfs/nilfs_vfsops.c Fri Feb 17 08:30:00 2017 +0000
+++ b/sys/fs/nilfs/nilfs_vfsops.c Fri Feb 17 08:31:23 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nilfs_vfsops.c,v 1.22 2016/07/07 06:55:42 msaitoh Exp $ */
+/* $NetBSD: nilfs_vfsops.c,v 1.23 2017/02/17 08:31:24 hannken Exp $ */
/*
* Copyright (c) 2008, 2009 Reinoud Zandijk
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: nilfs_vfsops.c,v 1.22 2016/07/07 06:55:42 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nilfs_vfsops.c,v 1.23 2017/02/17 08:31:24 hannken Exp $");
#endif /* not lint */
@@ -182,7 +182,7 @@
.vfs_mountroot = nilfs_mountroot,
.vfs_snapshot = nilfs_snapshot,
.vfs_extattrctl = vfs_stdextattrctl,
- .vfs_suspendctl = (void *)eopnotsupp,
+ .vfs_suspendctl = genfs_suspendctl,
.vfs_renamelock_enter = genfs_renamelock_enter,
.vfs_renamelock_exit = genfs_renamelock_exit,
.vfs_fsync = (void *)eopnotsupp,
diff -r f8a175024c34 -r 82847755db4c sys/fs/ntfs/ntfs_vfsops.c
--- a/sys/fs/ntfs/ntfs_vfsops.c Fri Feb 17 08:30:00 2017 +0000
+++ b/sys/fs/ntfs/ntfs_vfsops.c Fri Feb 17 08:31:23 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ntfs_vfsops.c,v 1.104 2015/03/28 19:24:05 maxv Exp $ */
+/* $NetBSD: ntfs_vfsops.c,v 1.105 2017/02/17 08:31:24 hannken Exp $ */
/*-
* Copyright (c) 1998, 1999 Semen Ustimenko
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ntfs_vfsops.c,v 1.104 2015/03/28 19:24:05 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ntfs_vfsops.c,v 1.105 2017/02/17 08:31:24 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -883,7 +883,7 @@
.vfs_mountroot = ntfs_mountroot,
.vfs_snapshot = (void *)eopnotsupp,
.vfs_extattrctl = vfs_stdextattrctl,
- .vfs_suspendctl = (void *)eopnotsupp,
+ .vfs_suspendctl = genfs_suspendctl,
.vfs_renamelock_enter = genfs_renamelock_enter,
.vfs_renamelock_exit = genfs_renamelock_exit,
.vfs_fsync = (void *)eopnotsupp,
diff -r f8a175024c34 -r 82847755db4c sys/fs/ptyfs/ptyfs_vfsops.c
--- a/sys/fs/ptyfs/ptyfs_vfsops.c Fri Feb 17 08:30:00 2017 +0000
+++ b/sys/fs/ptyfs/ptyfs_vfsops.c Fri Feb 17 08:31:23 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ptyfs_vfsops.c,v 1.55 2014/10/21 16:05:01 christos Exp $ */
+/* $NetBSD: ptyfs_vfsops.c,v 1.56 2017/02/17 08:31:24 hannken Exp $ */
/*
* Copyright (c) 1992, 1993, 1995
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ptyfs_vfsops.c,v 1.55 2014/10/21 16:05:01 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ptyfs_vfsops.c,v 1.56 2017/02/17 08:31:24 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
Home |
Main Index |
Thread Index |
Old Index