Changes by: yura
Update of /cvs/linux-ntfs/ntfsprogs/ntfsprogs
In directory delta357:/tmp/cvs-serv8129/ntfsprogs
Modified Files:
ntfsmount.c
Log Message:
fix st_blocks calculation
Index: ntfsmount.c
===================================================================
RCS file: /cvs/linux-ntfs/ntfsprogs/ntfsprogs/ntfsmount.c,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -p -r1.98 -r1.99
--- ntfsmount.c 21 Nov 2006 15:40:56 -0000 1.98
+++ ntfsmount.c 21 Nov 2006 16:24:37 -0000 1.99
@@ -322,8 +322,7 @@ static int ntfs_fuse_getattr(const char
na = ntfs_attr_open(ni, AT_INDEX_ALLOCATION, NTFS_INDEX_I30, 4);
if (na) {
stbuf->st_size = na->data_size;
- stbuf->st_blocks = na->allocated_size >>
- vol->sector_size_bits;
+ stbuf->st_blocks = na->allocated_size >> 9;
ntfs_attr_close(na);
} else {
stbuf->st_size = 0;
@@ -334,7 +333,7 @@ static int ntfs_fuse_getattr(const char
/* Regular or Interix (INTX) file. */
stbuf->st_mode = S_IFREG;
stbuf->st_size = ni->data_size;
- stbuf->st_blocks = ni->allocated_size >> vol->sector_size_bits;
+ stbuf->st_blocks = ni->allocated_size >> 9;
stbuf->st_nlink = le16_to_cpu(ni->mrec->link_count);
if (ni->flags & FILE_ATTR_SYSTEM || stream_name_len) {
na = ntfs_attr_open(ni, AT_DATA, stream_name,
@@ -346,8 +345,7 @@ static int ntfs_fuse_getattr(const char
}
if (stream_name_len) {
stbuf->st_size = na->data_size;
- stbuf->st_blocks = na->allocated_size >>
- vol->sector_size_bits;
+ stbuf->st_blocks = ni->allocated_size >> 9;
}
/* Check whether it's Interix FIFO or socket. */
if (!(ni->flags & FILE_ATTR_HIDDEN) &&
|