Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 520092 - statfs on NFS partition always returns 0
Summary: statfs on NFS partition always returns 0
Keywords:
Status: CLOSED DUPLICATE of bug 520018
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: Red Hat Kernel QE team
URL:
Whiteboard:
Depends On: 519112
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-08-28 10:40 UTC by Jeff Layton
Modified: 2009-09-01 20:09 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 519112
Environment:
Last Closed: 2009-09-01 20:09:33 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Jeff Layton 2009-08-28 10:40:54 UTC
+++ This bug was initially created as a clone of Bug #519112 +++

Escalated to Bugzilla from IssueTracker

--- Additional comment from tumeya@redhat.com on 2009-08-25 04:36:48 EDT ---

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

--- Additional comment from tumeya@redhat.com on 2009-08-25 04:40:03 EDT ---

Created an attachment (id=358536)
proposed patch

--- Additional comment from tumeya@redhat.com on 2009-08-25 04:51:55 EDT ---

Created an attachment (id=358538)
reproducer code

--- Additional comment from jlayton@redhat.com on 2009-08-28 06:39:36 EDT ---

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 1 Jeff Layton 2009-09-01 20:09:33 UTC
Cloned this bug by accident. Closing as not

*** This bug has been marked as a duplicate of bug 520018 ***


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