Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/libexec/lfs_cleanerd Attempt to recover slightly more gracef...
details: https://anonhg.NetBSD.org/src/rev/84043d16b58d
branches: trunk
changeset: 748017:84043d16b58d
user: pooka <pooka%NetBSD.org@localhost>
date: Fri Oct 09 16:35:17 2009 +0000
description:
Attempt to recover slightly more gracefully if the kernel socket is shutdown.
diffstat:
libexec/lfs_cleanerd/lfs_cleanerd.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diffs (29 lines):
diff -r b015fb0a4395 -r 84043d16b58d libexec/lfs_cleanerd/lfs_cleanerd.c
--- a/libexec/lfs_cleanerd/lfs_cleanerd.c Fri Oct 09 15:59:27 2009 +0000
+++ b/libexec/lfs_cleanerd/lfs_cleanerd.c Fri Oct 09 16:35:17 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_cleanerd.c,v 1.21 2009/08/06 00:51:55 pooka Exp $ */
+/* $NetBSD: lfs_cleanerd.c,v 1.22 2009/10/09 16:35:17 pooka Exp $ */
/*-
* Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -1549,9 +1549,17 @@
} while(cleaned_one);
tv.tv_sec = segwait_timeout;
tv.tv_usec = 0;
+ /* XXX: why couldn't others work if fsp socket is shutdown? */
error = kops.ko_fcntl(fsp[0]->clfs_ifilefd,LFCNSEGWAITALL,&tv);
- if (error)
- err(1, "LFCNSEGWAITALL");
+ if (error) {
+ if (errno == ESHUTDOWN) {
+ for (i = 0; i < nfss; i++) {
+ handle_error(fsp, i);
+ assert(nfss == 0);
+ }
+ } else
+ err(1, "LFCNSEGWAITALL");
+ }
}
/* NOTREACHED */
Home |
Main Index |
Thread Index |
Old Index