You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-commits@hadoop.apache.org by to...@apache.org on 2010/03/10 23:16:56 UTC

svn commit: r921594 - in /hadoop/hdfs/trunk: CHANGES.txt src/contrib/fuse-dfs/src/fuse_impls_statfs.c

Author: tomwhite
Date: Wed Mar 10 22:16:56 2010
New Revision: 921594

URL: http://svn.apache.org/viewvc?rev=921594&view=rev
Log:
HDFS-857. Incorrect type for fuse-dfs capacity can cause "df" to return negative values on 32-bit machines. Contributed by Brian Bockelman.

Modified:
    hadoop/hdfs/trunk/CHANGES.txt
    hadoop/hdfs/trunk/src/contrib/fuse-dfs/src/fuse_impls_statfs.c

Modified: hadoop/hdfs/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/CHANGES.txt?rev=921594&r1=921593&r2=921594&view=diff
==============================================================================
--- hadoop/hdfs/trunk/CHANGES.txt (original)
+++ hadoop/hdfs/trunk/CHANGES.txt Wed Mar 10 22:16:56 2010
@@ -179,6 +179,9 @@ Trunk (unreleased changes)
     HDFS-856. Hardcoded replication level for new files in fuse-dfs.
     (Brian Bockelman via tomwhite)
 
+    HDFS-857. Incorrect type for fuse-dfs capacity can cause "df" to return
+    negative values on 32-bit machines. (Brian Bockelman via tomwhite)
+
 Release 0.21.0 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/hdfs/trunk/src/contrib/fuse-dfs/src/fuse_impls_statfs.c
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/src/contrib/fuse-dfs/src/fuse_impls_statfs.c?rev=921594&r1=921593&r2=921594&view=diff
==============================================================================
--- hadoop/hdfs/trunk/src/contrib/fuse-dfs/src/fuse_impls_statfs.c (original)
+++ hadoop/hdfs/trunk/src/contrib/fuse-dfs/src/fuse_impls_statfs.c Wed Mar 10 22:16:56 2010
@@ -43,9 +43,9 @@ int dfs_statfs(const char *path, struct 
     return -EIO;
   }
 
-  const long cap   = hdfsGetCapacity(userFS);
-  const long used  = hdfsGetUsed(userFS);
-  const long bsize = hdfsGetDefaultBlockSize(userFS);
+  const tOffset cap   = hdfsGetCapacity(userFS);
+  const tOffset used  = hdfsGetUsed(userFS);
+  const tOffset bsize = hdfsGetDefaultBlockSize(userFS);
 
   // fill in the statvfs structure