* fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Fix

computation of st_blocks.
	(fhandler_base::fstat_helper): Fix formatting.
This commit is contained in:
Corinna Vinschen 2011-01-26 10:55:13 +00:00
parent cd06f7049b
commit 40aca06884
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
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.

View File

@ -323,7 +323,7 @@ fhandler_base::fstat_by_nfs_ea (struct __stat64 *buf)
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;
@ -538,7 +538,7 @@ fhandler_base::fstat_helper (struct __stat64 *buf,
/ 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.