summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/syscall/statfs.c
diff options
context:
space:
mode:
authorprabahar <none@none>2006-05-24 12:01:59 -0700
committerprabahar <none@none>2006-05-24 12:01:59 -0700
commitdd29fa4a741733485a5b868b0897983a7e6d8055 (patch)
treea441189a80dc5501ba4568e818fb561493e96338 /usr/src/uts/common/syscall/statfs.c
parent49f91442e363055ed8b4f0f6e96c18703df6be90 (diff)
downloadillumos-gate-dd29fa4a741733485a5b868b0897983a7e6d8055.tar.gz
5083170 need mechanism to report non-recoverable ESTALE error
Diffstat (limited to 'usr/src/uts/common/syscall/statfs.c')
-rw-r--r--usr/src/uts/common/syscall/statfs.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/usr/src/uts/common/syscall/statfs.c b/usr/src/uts/common/syscall/statfs.c
index 5d8c2cd395..51d90e7363 100644
--- a/usr/src/uts/common/syscall/statfs.c
+++ b/usr/src/uts/common/syscall/statfs.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2001 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -50,6 +49,7 @@
#include <sys/pathname.h>
#include <vm/page.h>
+#include <fs/fs_subr.h>
#if defined(_SYSCALL32_IMPL) || defined(_ILP32)
@@ -68,10 +68,11 @@ statfs32(char *fname, struct statfs32 *sbp, int32_t len, int32_t fstyp)
{
vnode_t *vp;
int error;
+ int estale_retry = 0;
lookup:
if (error = lookupname(fname, UIO_USERSPACE, FOLLOW, NULLVPP, &vp)) {
- if (error == ESTALE)
+ if ((error == ESTALE) && fs_need_estale_retry(estale_retry++))
goto lookup;
return (set_errno(error));
}
@@ -81,7 +82,7 @@ lookup:
error = cstatfs(vp->v_vfsp, sbp, len);
VN_RELE(vp);
if (error) {
- if (error == ESTALE)
+ if ((error == ESTALE) && fs_need_estale_retry(estale_retry++))
goto lookup;
return (set_errno(error));
}