Whamcloud - gitweb
ext2fs: Handle internal journal over 2^32 bytes
authorAndreas Dilger <adilger@whamcloud.com>
Sat, 11 Jun 2011 16:17:29 +0000 (12:17 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 11 Jun 2011 16:17:29 +0000 (12:17 -0400)
commit931b58e1cb2158c1f5218059cce92e94917ef485
tree0198f3a4542a4489039ed048e3550e9ad093b6c5
parent534a4c3db58064caee4fc3e9e294251240d9d28a
ext2fs: Handle internal journal over 2^32 bytes

The write_journal_inode() code is only setting the low 32-bit i_size
for the journal size, even though it is possible to specify a journal
up to 10M blocks in size.  Trying to create a journal larger than 2GB
will succeed, but an immediate e2fsck would fail.  Store i_size_high
for the journal inode when creating it, and load it upon access.

Use s_jnl_blocks[15] to store the journal i_size_high backup.  This
field is currently unused, as EXT2_N_BLOCKS is 15, so it is using
s_jnl_blocks[0..14], and i_size is in s_jnl_blocks[16].

Rename the "size" argument "num_blocks" for the journal creation functions
to clarify this parameter is in units of filesystem blocks and not bytes.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
debugfs/logdump.c
e2fsck/journal.c
e2fsck/unix.c
lib/ext2fs/ext2fs.h
lib/ext2fs/mkjournal.c
lib/ext2fs/swapfs.c
resize/resize2fs.c