ext4: introduce ext4_get_group_number()
authorLukas Czerner <lczerner@redhat.com>
Thu, 4 Apr 2013 03:32:34 +0000 (23:32 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 4 Apr 2013 03:32:34 +0000 (23:32 -0400)
commitbd86298e60b84b5e6d2da3e75c4ce2f6b70bdeed
tree8da632bbc3acfcc7e7416da820de87d56f2168a4
parent689110098c7df10fab8800d3bf8e727c21f426fb
ext4: introduce ext4_get_group_number()

Currently on many places in ext4 we're using
ext4_get_group_no_and_offset() even though we're only interested in
knowing the block group of the particular block, not the offset within
the block group so we can use more efficient way to compute block
group.

This patch introduces ext4_get_group_number() which computes block
group for a given block much more efficiently. Use this function
instead of ext4_get_group_no_and_offset() everywhere where we're only
interested in knowing the block group.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/balloc.c
fs/ext4/ext4.h
fs/ext4/mballoc.c
fs/ext4/resize.c