Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libpuffs Remove suspension support from here too.



details:   https://anonhg.NetBSD.org/src/rev/8d0c9593281c
branches:  trunk
changeset: 749660:8d0c9593281c
user:      pooka <pooka%NetBSD.org@localhost>
date:      Sat Dec 05 12:13:08 2009 +0000

description:
Remove suspension support from here too.

diffstat:

 lib/libpuffs/Makefile        |   5 +-
 lib/libpuffs/puffs_suspend.3 |  85 --------------------------------------------
 lib/libpuffs/suspend.c       |  21 ++--------
 3 files changed, 6 insertions(+), 105 deletions(-)

diffs (156 lines):

diff -r 0281ada5e18f -r 8d0c9593281c lib/libpuffs/Makefile
--- a/lib/libpuffs/Makefile     Sat Dec 05 11:44:56 2009 +0000
+++ b/lib/libpuffs/Makefile     Sat Dec 05 12:13:08 2009 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.22 2007/12/04 21:24:10 pooka Exp $
+#      $NetBSD: Makefile,v 1.23 2009/12/05 12:13:08 pooka Exp $
 #
 
 .include <bsd.own.mk>
@@ -18,8 +18,7 @@
                framebuf.c null.c opdump.c paths.c pnode.c requests.c   \
                subr.c suspend.c
 MAN=           puffs.3 puffs_cc.3 puffs_cred.3 puffs_flush.3           \
-               puffs_framebuf.3 puffs_node.3 puffs_ops.3 puffs_path.3  \
-               puffs_suspend.3
+               puffs_framebuf.3 puffs_node.3 puffs_ops.3 puffs_path.3
 INCS=          puffs.h puffsdump.h
 INCSDIR=       /usr/include
 LINTFLAGS+=-S -w
diff -r 0281ada5e18f -r 8d0c9593281c lib/libpuffs/puffs_suspend.3
--- a/lib/libpuffs/puffs_suspend.3      Sat Dec 05 11:44:56 2009 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-.\"    $NetBSD: puffs_suspend.3,v 1.3 2009/02/20 14:26:56 pooka Exp $
-.\"
-.\" Copyright (c) 2007 Antti Kantee.  All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\"    notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\"    notice, this list of conditions and the following disclaimer in the
-.\"    documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.Dd January 27, 2007
-.Dt PUFFS_SUSPEND 3
-.Os
-.Sh NAME
-.Nm puffs_suspend
-.Nd puffs file system suspension and snapshotting
-.Sh LIBRARY
-.Lb libpuffs
-.Sh SYNOPSIS
-.In puffs.h
-.Ft int
-.Fn puffs_fs_suspend "struct puffs_usermount *pu"
-.Sh DESCRIPTION
-The function
-.Fn puffs_fs_suspend
-requests the kernel to suspend operations to the file system indicated by
-.Fa pu .
-There are several possible outcomes: nothing, an error or success.
-These will be indicated through the callback of the same name.
-The file system must set this callback if it wants to be notified of
-file system suspension.
-The interface call itself returns 0 on success or \-1 on error and
-sets
-.Va errno .
-In case an error is returned, the callback will never be called.
-However, the converse does not hold and the callback may never be
-called even if the library call is successful.
-.Pp
-In case the kernel is successful to start suspending the file system,
-the callback is called with status
-.Dv PUFFS_SUSPEND START .
-The file system implementation may use this as a hint on how to handle
-following operations.
-Once the file system has successfully been suspended, the status
-.Dv PUFFS_SUSPEND_SUSPENDED
-will be delivered.
-In case there was an error while suspending,
-.Dv PUFFS_SUSPEND_ERROR
-is given.
-This effectively nullifies any
-.Dv PUFFS_SUSPEND_START
-given earlier.
-Operation will automatically resume after suspension and the status
-.Dv PUFFS_SUSPEND_RESUME
-is delivered to the callback.
-Error or success is always provided in case start is given.
-.Pp
-The file system is supposed to do a file system specific snapshotting
-routine when it receives
-.Dv PUFFS_SUSPEND_SUSPENDED .
-.Sh SEE ALSO
-.Xr puffs 3 ,
-.Xr puffs_cc 3
-.Sh BUGS
-Currently the implementation works only for single-threaded file systems
-which do not use
-.Nm puffs_cc .
-.Pp
-File system data and metadata are not always totally correctly
-synchronized at suspend.
diff -r 0281ada5e18f -r 8d0c9593281c lib/libpuffs/suspend.c
--- a/lib/libpuffs/suspend.c    Sat Dec 05 11:44:56 2009 +0000
+++ b/lib/libpuffs/suspend.c    Sat Dec 05 12:13:08 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: suspend.c,v 1.9 2007/11/17 17:12:11 pooka Exp $        */
+/*     $NetBSD: suspend.c,v 1.10 2009/12/05 12:13:08 pooka Exp $       */
 
 /*
  * Copyright (c) 2007  Antti Kantee.  All Rights Reserved.
@@ -27,7 +27,7 @@
 
 #include <sys/cdefs.h>
 #if !defined(lint)
-__RCSID("$NetBSD: suspend.c,v 1.9 2007/11/17 17:12:11 pooka Exp $");
+__RCSID("$NetBSD: suspend.c,v 1.10 2009/12/05 12:13:08 pooka Exp $");
 #endif /* !lint */
 
 /*
@@ -36,27 +36,14 @@
 
 #include <sys/types.h>
 
-#include <assert.h>
 #include <errno.h>
 #include <puffs.h>
-#include <stdio.h>
-#include <unistd.h>
-
-#include "puffs_priv.h"
 
 /*ARGSUSED*/
 int
 puffs_fs_suspend(struct puffs_usermount *pu)
 {
-       struct puffs_req preq;
-       size_t n;
 
-       preq.preq_pth.pth_framelen = sizeof(struct puffs_req);
-       preq.preq_opclass = PUFFSOP_SUSPEND;
-
-       n = write(pu->pu_fd, &preq, sizeof(preq));
-
-       /* XXX */
-       assert(n == sizeof(preq));
-       return 0;
+       /* used to be, no longer is.  just return error to avoid ABI bump */
+       return EOPNOTSUPP;
 }



Home | Main Index | Thread Index | Old Index