Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 519112

Summary: statfs on NFS partition always returns 0
Product: Red Hat Enterprise Linux 5 Reporter: Issue Tracker <tao>
Component: kernelAssignee: Jeff Layton <jlayton>
Status: CLOSED ERRATA QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: high Docs Contact:
Priority: high    
Version: 5.3CC: branto, cward, dzickus, jlayton, rwheeler, steved, tao, tumeya
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 520092 (view as bug list) Environment:
Last Closed: 2010-03-30 07:18:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 520092, 526775, 526950, 533192    

Description Issue Tracker 2009-08-25 08:27:49 UTC
Escalated to Bugzilla from IssueTracker

Comment 1 Takuma Umeya 2009-08-25 08:36:48 UTC
Description of problem:
statfs on NFS partition always returns 0 regardless of success/fail. 

Steps to Reproduce:
1. Start NFS service:
    # echo "/test        *(rw,no_root_squash)" >> /etc/exports
    # service nfs start
2. Setup client:
    # mount -t nfs -o soft,timeo=5 server:/test /mnt/nfs
3. Stop NFS service:
    # service nfs stop
4. From the client, run the attached test program:

Actual results:
The program returns with 0, which actually should return negative number according to statfs(2) but returns 0. 

Expected results: 
Should return negative number. 

According to the call trace nfs_statfs is not returning the value properly. 
sys_statfs() => return 0
  vfs_statfs() => return 0
    nfs_statfs() => return 0
      nfs3_proc_statfs() => return -5

The patch is already upstream: 
1a0ba9ae485c5fd17d0bff2f14d9dd75b8985593

Comment 2 Takuma Umeya 2009-08-25 08:40:03 UTC
Created attachment 358536 [details]
proposed patch

Comment 3 Takuma Umeya 2009-08-25 08:51:55 UTC
Created attachment 358538 [details]
reproducer code

Comment 4 Jeff Layton 2009-08-28 10:39:36 UTC
I've added the above patch to my test kernels:

http://people.redhat.com/jlayton

...if you or they are able to test it and verify that it works, then that would be helpful.

Comment 7 RHEL Program Management 2009-09-25 17:40:42 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 8 Don Zickus 2009-10-06 19:38:57 UTC
in kernel-2.6.18-168.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5

Please do NOT transition this bugzilla state to VERIFIED until our QE team
has sent specific instructions indicating when to do so.  However feel free
to provide a comment indicating that this fix has been verified.

Comment 10 Chris Ward 2010-02-11 10:03:15 UTC
~~ Attention Customers and Partners - RHEL 5.5 Beta is now available on RHN ~~

RHEL 5.5 Beta has been released! There should be a fix present in this 
release that addresses your request. Please test and report back results 
here, by March 3rd 2010 (2010-03-03) or sooner.

Upon successful verification of this request, post your results and update 
the Verified field in Bugzilla with the appropriate value.

If you encounter any issues while testing, please describe them and set 
this bug into NEED_INFO. If you encounter new defects or have additional 
patch(es) to request for inclusion, please clone this bug per each request
and escalate through your support representative.

Comment 15 errata-xmlrpc 2010-03-30 07:18:13 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2010-0178.html