Bug 520018 - statfs on NFS partition always returns 0
Summary: statfs on NFS partition always returns 0
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel
Version: 4.8
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Jeff Layton
QA Contact: Petr Beňas
URL:
Whiteboard:
: 520092 (view as bug list)
Depends On:
Blocks: 589293
TreeView+ depends on / blocked
 
Reported: 2009-08-28 02:20 UTC by Issue Tracker
Modified: 2018-11-14 20:35 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-02-16 15:51:35 UTC


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


Links
System 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 15:14:55 UTC

Description Issue Tracker 2009-08-28 02:20:10 UTC
Escalated to Bugzilla from IssueTracker

Comment 1 Takuma Umeya 2009-08-28 02:22:39 UTC
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-28 03:20:00 UTC
Created attachment 358986 [details]
Proposed patch against inode.c of EL4.

Comment 3 Takuma Umeya 2009-08-28 03:21:12 UTC
Created attachment 358987 [details]
reproducer code

Comment 4 Jeff Layton 2009-09-01 20:09:33 UTC
*** Bug 520092 has been marked as a duplicate of this bug. ***

Comment 5 Jeff Layton 2009-09-04 11:27:26 UTC
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 11:28:22 UTC
Created attachment 359795 [details]
proposed patch

Comment 10 RHEL Product and Program Management 2009-09-08 15:17:20 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 11 Vivek Goyal 2010-09-23 13:02:40 UTC
Committed in 89.37.EL . RPMS are available at http://people.redhat.com/vgoyal/rhel4/

Comment 16 Petr Beňas 2010-10-20 14:20:19 UTC
Reproduced in 2.6.9-89.36.EL and verified in 2.6.9-89.37.EL.

Comment 19 errata-xmlrpc 2011-02-16 15:51:35 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-2011-0263.html


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