diff options
author | Andrew Morton <akpm@osdl.org> | 2006-10-11 04:21:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-11 14:14:18 -0400 |
commit | 72b64b594081ef0a0717f6aad77e891c72ed4afa (patch) | |
tree | 50fdb2b2743a95066ee83f58bed9c44daf707506 | |
parent | 8fadc14323684c547f74cf2f4d13517c6c264731 (diff) |
[PATCH] ext4 uninline ext4_get_group_no_and_offset()
Way too big to inline.
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | fs/ext4/balloc.c | 18 | ||||
-rw-r--r-- | include/linux/ext4_fs.h | 22 |
2 files changed, 20 insertions, 20 deletions
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c index 3e85886a6382..402475a6f3df 100644 --- a/fs/ext4/balloc.c +++ b/fs/ext4/balloc.c | |||
@@ -25,6 +25,24 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | /* | 27 | /* |
28 | * Calculate the block group number and offset, given a block number | ||
29 | */ | ||
30 | void ext4_get_group_no_and_offset(struct super_block *sb, ext4_fsblk_t blocknr, | ||
31 | unsigned long *blockgrpp, ext4_grpblk_t *offsetp) | ||
32 | { | ||
33 | struct ext4_super_block *es = EXT4_SB(sb)->s_es; | ||
34 | ext4_grpblk_t offset; | ||
35 | |||
36 | blocknr = blocknr - le32_to_cpu(es->s_first_data_block); | ||
37 | offset = sector_div(blocknr, EXT4_BLOCKS_PER_GROUP(sb)); | ||
38 | if (offsetp) | ||
39 | *offsetp = offset; | ||
40 | if (blockgrpp) | ||
41 | *blockgrpp = blocknr; | ||
42 | |||
43 | } | ||
44 | |||
45 | /* | ||
28 | * The free blocks are managed by bitmaps. A file system contains several | 46 | * The free blocks are managed by bitmaps. A file system contains several |
29 | * blocks groups. Each group contains 1 bitmap block for blocks, 1 bitmap | 47 | * blocks groups. Each group contains 1 bitmap block for blocks, 1 bitmap |
30 | * block for inodes, N blocks for the inode table and data blocks. | 48 | * block for inodes, N blocks for the inode table and data blocks. |
diff --git a/include/linux/ext4_fs.h b/include/linux/ext4_fs.h index 296609b9242d..498503ee613d 100644 --- a/include/linux/ext4_fs.h +++ b/include/linux/ext4_fs.h | |||
@@ -769,26 +769,8 @@ ext4_group_first_block_no(struct super_block *sb, unsigned long group_no) | |||
769 | */ | 769 | */ |
770 | #define ERR_BAD_DX_DIR -75000 | 770 | #define ERR_BAD_DX_DIR -75000 |
771 | 771 | ||
772 | /* | 772 | void ext4_get_group_no_and_offset(struct super_block *sb, ext4_fsblk_t blocknr, |
773 | * This function calculate the block group number and offset, | 773 | unsigned long *blockgrpp, ext4_grpblk_t *offsetp); |
774 | * given a block number | ||
775 | */ | ||
776 | |||
777 | static inline void ext4_get_group_no_and_offset(struct super_block * sb, | ||
778 | ext4_fsblk_t blocknr, unsigned long* blockgrpp, | ||
779 | ext4_grpblk_t *offsetp) | ||
780 | { | ||
781 | struct ext4_super_block *es = EXT4_SB(sb)->s_es; | ||
782 | ext4_grpblk_t offset; | ||
783 | |||
784 | blocknr = blocknr - le32_to_cpu(es->s_first_data_block); | ||
785 | offset = sector_div(blocknr, EXT4_BLOCKS_PER_GROUP(sb)); | ||
786 | if (offsetp) | ||
787 | *offsetp = offset; | ||
788 | if (blockgrpp) | ||
789 | *blockgrpp = blocknr; | ||
790 | |||
791 | } | ||
792 | 774 | ||
793 | /* | 775 | /* |
794 | * Function prototypes | 776 | * Function prototypes |