summaryrefslogtreecommitdiffstats
path: root/fs/ntfs/layout.h
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@cantab.net>2005-03-03 14:43:43 +0000
committerAnton Altaparmakov <aia21@cantab.net>2005-05-05 11:15:46 +0100
commit9451f8519c5e6d5d064c30033fc3d4ce77de321c (patch)
tree104eedf065c4091838a27f6e674875a035c30820 /fs/ntfs/layout.h
parent413826868fb49d200b741bcaeaf58ea5c5e45321 (diff)
downloadblackbird-op-linux-9451f8519c5e6d5d064c30033fc3d4ce77de321c.tar.gz
blackbird-op-linux-9451f8519c5e6d5d064c30033fc3d4ce77de321c.zip
NTFS: Correct sparse file handling. The compressed values need to be
checked and set in the ntfs inode as done for compressed files and the compressed size needs to be used for vfs inode->i_blocks instead of the allocated size, again, as done for compressed files. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
Diffstat (limited to 'fs/ntfs/layout.h')
-rw-r--r--fs/ntfs/layout.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/fs/ntfs/layout.h b/fs/ntfs/layout.h
index 7cb8806d4559..8d1f1326612f 100644
--- a/fs/ntfs/layout.h
+++ b/fs/ntfs/layout.h
@@ -749,10 +749,11 @@ typedef struct {
record header aligned to 8-byte boundary. */
/* 34*/ u8 compression_unit; /* The compression unit expressed
as the log to the base 2 of the number of
- clusters in a compression unit. 0 means not
- compressed. (This effectively limits the
+ clusters in a compression unit. 0 means not
+ compressed. (This effectively limits the
compression unit size to be a power of two
- clusters.) WinNT4 only uses a value of 4. */
+ clusters.) WinNT4 only uses a value of 4.
+ Sparse files also have this set to 4. */
/* 35*/ u8 reserved[5]; /* Align to 8-byte boundary. */
/* The sizes below are only used when lowest_vcn is zero, as otherwise it would
be difficult to keep them up-to-date.*/
@@ -772,10 +773,10 @@ typedef struct {
data_size. */
/* sizeof(uncompressed attr) = 64*/
/* 64*/ sle64 compressed_size; /* Byte size of the attribute
- value after compression. Only present when
- compressed. Always is a multiple of the
- cluster size. Represents the actual amount of
- disk space being used on the disk. */
+ value after compression. Only present when
+ compressed or sparse. Always is a multiple of
+ the cluster size. Represents the actual amount
+ of disk space being used on the disk. */
/* sizeof(compressed attr) = 72*/
} __attribute__ ((__packed__)) non_resident;
} __attribute__ ((__packed__)) data;
OpenPOWER on IntegriCloud