+2011-01-26 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Fix
+ computation of st_blocks.
+ (fhandler_base::fstat_helper): Fix formatting.
+
2011-01-24 Corinna Vinschen <corinna@vinschen.de>
* include/features.h (__STDC_ISO_10646__): Define. Add comment.
nfs_attr->rdev.specdata2);
buf->st_size = nfs_attr->size;
buf->st_blksize = PREFERRED_IO_BLKSIZE;
- buf->st_blocks = nfs_attr->used / 512;
+ buf->st_blocks = (nfs_attr->used + S_BLKSIZE - 1) / S_BLKSIZE;
buf->st_atim = nfs_attr->atime;
buf->st_mtim = nfs_attr->mtime;
buf->st_ctim = nfs_attr->ctime;
/ S_BLKSIZE;
else
/* Otherwise compute no. of blocks from file size. */
- buf->st_blocks = (buf->st_size + S_BLKSIZE - 1) / S_BLKSIZE;
+ buf->st_blocks = (buf->st_size + S_BLKSIZE - 1) / S_BLKSIZE;
buf->st_mode = 0;
/* Using a side effect: get_file_attributes checks for directory.