From dd29fa4a741733485a5b868b0897983a7e6d8055 Mon Sep 17 00:00:00 2001 From: prabahar Date: Wed, 24 May 2006 12:01:59 -0700 Subject: 5083170 need mechanism to report non-recoverable ESTALE error --- usr/src/uts/common/syscall/statfs.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'usr/src/uts/common/syscall/statfs.c') 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 #include +#include #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)); } -- cgit v1.2.3