aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2008-01-28 23:58:27 -0500
committerTheodore Ts'o <tytso@mit.edu>2008-01-28 23:58:27 -0500
commit8180a5627d126362c2f64e4fa886d6f608d9632a (patch)
tree1b3a3261f72f8245afdd87088703641c76f60392 /fs/ext4/super.c
parent0fc1b451471dfc3cabd6e99ef441df9804616e63 (diff)
ext4: Support large files
This patch converts ext4_inode i_blocks to represent total blocks occupied by the inode in file system block size. Earlier the variable used to represent this in 512 byte block size. This actually limited the total size of the file. The feature is enabled transparently when we write an inode whose i_blocks cannot be represnted as 512 byte units in a 48 bit variable. inode flag EXT4_HUGE_FILE_FL Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r--fs/ext4/super.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 2b9dc96ec43e..64067de70c6f 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1631,11 +1631,14 @@ static loff_t ext4_max_size(int bits)
1631 upper_limit >>= (bits - 9); 1631 upper_limit >>= (bits - 9);
1632 1632
1633 } else { 1633 } else {
1634 /* We use 48 bit ext4_inode i_blocks */ 1634 /*
1635 * We use 48 bit ext4_inode i_blocks
1636 * With EXT4_HUGE_FILE_FL set the i_blocks
1637 * represent total number of blocks in
1638 * file system block size
1639 */
1635 upper_limit = (1LL << 48) - 1; 1640 upper_limit = (1LL << 48) - 1;
1636 1641
1637 /* total blocks in file system block size */
1638 upper_limit >>= (bits - 9);
1639 } 1642 }
1640 1643
1641 /* indirect blocks */ 1644 /* indirect blocks */