Commit 70bbb3e0 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ext4: rename logic_sb_block

I assume this means "logical sb block".  So call it that.

I still don't understand the name though.  A block is a block.  What's
different about this one?

Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent f4e5bc24
...@@ -1423,8 +1423,7 @@ static loff_t ext4_max_size(int bits) ...@@ -1423,8 +1423,7 @@ static loff_t ext4_max_size(int bits)
} }
static ext4_fsblk_t descriptor_loc(struct super_block *sb, static ext4_fsblk_t descriptor_loc(struct super_block *sb,
ext4_fsblk_t logic_sb_block, ext4_fsblk_t logical_sb_block, int nr)
int nr)
{ {
struct ext4_sb_info *sbi = EXT4_SB(sb); struct ext4_sb_info *sbi = EXT4_SB(sb);
unsigned long bg, first_meta_bg; unsigned long bg, first_meta_bg;
...@@ -1434,7 +1433,7 @@ static ext4_fsblk_t descriptor_loc(struct super_block *sb, ...@@ -1434,7 +1433,7 @@ static ext4_fsblk_t descriptor_loc(struct super_block *sb,
if (!EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_META_BG) || if (!EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_META_BG) ||
nr < first_meta_bg) nr < first_meta_bg)
return (logic_sb_block + nr + 1); return logical_sb_block + nr + 1;
bg = sbi->s_desc_per_block * nr; bg = sbi->s_desc_per_block * nr;
if (ext4_bg_has_super(sb, bg)) if (ext4_bg_has_super(sb, bg))
has_super = 1; has_super = 1;
...@@ -1449,7 +1448,7 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent) ...@@ -1449,7 +1448,7 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent)
struct ext4_sb_info *sbi; struct ext4_sb_info *sbi;
ext4_fsblk_t block; ext4_fsblk_t block;
ext4_fsblk_t sb_block = get_sb_block(&data); ext4_fsblk_t sb_block = get_sb_block(&data);
ext4_fsblk_t logic_sb_block; ext4_fsblk_t logical_sb_block;
unsigned long offset = 0; unsigned long offset = 0;
unsigned int journal_inum = 0; unsigned int journal_inum = 0;
unsigned long journal_devnum = 0; unsigned long journal_devnum = 0;
...@@ -1484,13 +1483,13 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent) ...@@ -1484,13 +1483,13 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent)
* block sizes. We need to calculate the offset from buffer start. * block sizes. We need to calculate the offset from buffer start.
*/ */
if (blocksize != EXT4_MIN_BLOCK_SIZE) { if (blocksize != EXT4_MIN_BLOCK_SIZE) {
logic_sb_block = sb_block * EXT4_MIN_BLOCK_SIZE; logical_sb_block = sb_block * EXT4_MIN_BLOCK_SIZE;
offset = do_div(logic_sb_block, blocksize); offset = do_div(logical_sb_block, blocksize);
} else { } else {
logic_sb_block = sb_block; logical_sb_block = sb_block;
} }
if (!(bh = sb_bread(sb, logic_sb_block))) { if (!(bh = sb_bread(sb, logical_sb_block))) {
printk (KERN_ERR "EXT4-fs: unable to read superblock\n"); printk (KERN_ERR "EXT4-fs: unable to read superblock\n");
goto out_fail; goto out_fail;
} }
...@@ -1590,9 +1589,9 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent) ...@@ -1590,9 +1589,9 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent)
brelse (bh); brelse (bh);
sb_set_blocksize(sb, blocksize); sb_set_blocksize(sb, blocksize);
logic_sb_block = sb_block * EXT4_MIN_BLOCK_SIZE; logical_sb_block = sb_block * EXT4_MIN_BLOCK_SIZE;
offset = do_div(logic_sb_block, blocksize); offset = do_div(logical_sb_block, blocksize);
bh = sb_bread(sb, logic_sb_block); bh = sb_bread(sb, logical_sb_block);
if (!bh) { if (!bh) {
printk(KERN_ERR printk(KERN_ERR
"EXT4-fs: Can't read superblock on 2nd try.\n"); "EXT4-fs: Can't read superblock on 2nd try.\n");
...@@ -1711,7 +1710,7 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent) ...@@ -1711,7 +1710,7 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent)
bgl_lock_init(&sbi->s_blockgroup_lock); bgl_lock_init(&sbi->s_blockgroup_lock);
for (i = 0; i < db_count; i++) { for (i = 0; i < db_count; i++) {
block = descriptor_loc(sb, logic_sb_block, i); block = descriptor_loc(sb, logical_sb_block, i);
sbi->s_group_desc[i] = sb_bread(sb, block); sbi->s_group_desc[i] = sb_bread(sb, block);
if (!sbi->s_group_desc[i]) { if (!sbi->s_group_desc[i]) {
printk (KERN_ERR "EXT4-fs: " printk (KERN_ERR "EXT4-fs: "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment