]> bbs.cooldavid.org Git - net-next-2.6.git/commit - fs/ocfs2/ocfs2.h
ocfs2: clean up localalloc mount option size parsing
authorMark Fasheh <mfasheh@suse.com>
Tue, 6 Apr 2010 01:17:13 +0000 (18:17 -0700)
committerJoel Becker <joel.becker@oracle.com>
Thu, 6 May 2010 01:18:06 +0000 (18:18 -0700)
commit73c8a80003d13be54e2309865030404441075182
tree9b5a47939c22838133f46ea6d207254aa68d177b
parenta57c8fd2ad238258cc983049008aea5f985804b2
ocfs2: clean up localalloc mount option size parsing

This patch pulls the local alloc sizing code into localalloc.c and provides
a callout to it from ocfs2_fill_super(). Behavior is essentially unchanged
except that I correctly calculate the maximum local alloc size. The old code
in ocfs2_parse_options() calculated the max size as:

ocfs2_local_alloc_size(sb) * 8

which is correct, in bits. Unfortunately though the option passed in is in
megabytes. Ultimately, this bug made no real difference - the shrink code
would catch a too-large size and bring it down to something reasonable.
Still, it's less than efficient as-is.

Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
fs/ocfs2/localalloc.c
fs/ocfs2/localalloc.h
fs/ocfs2/ocfs2.h
fs/ocfs2/super.c