OCFS2: Allow huge (> 16 TiB) volumes to mount
authorPatrick J. LoPresti <lopresti@gmail.com>
Thu, 22 Jul 2010 22:05:57 +0000 (15:05 -0700)
committerJoel Becker <joel.becker@oracle.com>
Fri, 10 Sep 2010 15:42:10 +0000 (08:42 -0700)
commit3bdb8efd94a73bb137e3315cd831cbc874052b4b
treeab9d273ca7a066fbb36884a703016c0eaaabe2c7
parent1113e1b504f6e8d4364c0b73c9097828067d4617
OCFS2: Allow huge (> 16 TiB) volumes to mount

The OCFS2 developers have already done all of the hard work to allow
volumes larger than 16 TiB.  But there is still a "sanity check" in
fs/ocfs2/super.c that prevents the mounting of such volumes, even when
the cluster size and journal options would allow it.

This patch replaces that sanity check with a more sophisticated one to
mount a huge volume provided that (a) it is addressable by the raw
word/address size of the system (borrowing a test from ext4); (b) the
volume is using JBD2; and (c) the JBD2_FEATURE_INCOMPAT_64BIT flag is
set on the journal.

I factored out the sanity check into its own function.  I also moved it
from ocfs2_initialize_super() down to ocfs2_check_volume(); any earlier,
and the journal will not have been initialized yet.

This patch is one of a pair, and it depends on the other ("JBD2: Allow
feature checks before journal recovery").

I have tested this patch on small volumes, huge volumes, and huge
volumes without 64-bit block support in the journal.  All of them appear
to work or to fail gracefully, as appropriate.

Signed-off-by: Patrick LoPresti <lopresti@gmail.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
fs/ocfs2/super.c
This page took 0.024473 seconds and 5 git commands to generate.