Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 520018 - statfs on NFS partition always returns 0
statfs on NFS partition always returns 0
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
4.8
All Linux
high Severity high
: rc
: ---
Assigned To: Jeff Layton
Petr Beňas
:
: 520092 (view as bug list)
Depends On:
Blocks: 589293
  Show dependency treegraph
 
Reported: 2009-08-27 22:20 EDT by Issue Tracker
Modified: 2015-01-04 17:59 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-02-16 10:51:35 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Proposed patch against inode.c of EL4. (1009 bytes, patch)
2009-08-27 23:20 EDT, Takuma Umeya
no flags Details | Diff
reproducer code (591 bytes, text/plain)
2009-08-27 23:21 EDT, Takuma Umeya
no flags Details
proposed patch (2.22 KB, patch)
2009-09-04 07:28 EDT, Jeff Layton
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0263 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 4.9 kernel security and bug fix update 2011-02-16 10:14:55 EST

  None (edit)
Description Issue Tracker 2009-08-27 22:20:10 EDT
Escalated to Bugzilla from IssueTracker
Comment 1 Takuma Umeya 2009-08-27 22:22:39 EDT
This report is for EL4. For EL5 it's reported in BZ519112. 

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-27 23:20:00 EDT
Created attachment 358986 [details]
Proposed patch against inode.c of EL4.
Comment 3 Takuma Umeya 2009-08-27 23:21:12 EDT
Created attachment 358987 [details]
reproducer code
Comment 4 Jeff Layton 2009-09-01 16:09:33 EDT
*** Bug 520092 has been marked as a duplicate of this bug. ***
Comment 5 Jeff Layton 2009-09-04 07:27:26 EDT
The test kernels on my people.redhat.com page have a patch to fix this (and also to turn the printk in this function into a dprintk). Could you test them and let me know whether they resolve the issue for you?

http://people.redhat.com/jlayton/
Comment 6 Jeff Layton 2009-09-04 07:28:22 EDT
Created attachment 359795 [details]
proposed patch
Comment 10 RHEL Product and Program Management 2009-09-08 11:17:20 EDT
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 11 Vivek Goyal 2010-09-23 09:02:40 EDT
Committed in 89.37.EL . RPMS are available at http://people.redhat.com/vgoyal/rhel4/
Comment 16 Petr Beňas 2010-10-20 10:20:19 EDT
Reproduced in 2.6.9-89.36.EL and verified in 2.6.9-89.37.EL.
Comment 19 errata-xmlrpc 2011-02-16 10:51:35 EST
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-2011-0263.html

Note You need to log in before you can comment on or make changes to this bug.