Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 36130
b: refs/heads/master
c: a4e4de3
h: refs/heads/master
v: v3
  • Loading branch information
Dave Kleikamp authored and Linus Torvalds committed Sep 27, 2006
1 parent 6f70be3 commit aacf35e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e9ad5620bfb901df8a7a2603c88689ededeecaf1
refs/heads/master: a4e4de36dc446b2193bdc8ebb96a96e44b69dd94
21 changes: 11 additions & 10 deletions trunk/fs/ext3/resize.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ static int verify_reserved_gdb(struct super_block *sb,
unsigned five = 5;
unsigned seven = 7;
unsigned grp;
__u32 *p = (__u32 *)primary->b_data;
__le32 *p = (__le32 *)primary->b_data;
int gdbackups = 0;

while ((grp = ext3_list_backups(sb, &three, &five, &seven)) < end) {
Expand Down Expand Up @@ -380,7 +380,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode,
struct buffer_head *dind;
int gdbackups;
struct ext3_iloc iloc;
__u32 *data;
__le32 *data;
int err;

if (test_opt(sb, DEBUG))
Expand Down Expand Up @@ -417,7 +417,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode,
goto exit_bh;
}

data = (__u32 *)dind->b_data;
data = (__le32 *)dind->b_data;
if (le32_to_cpu(data[gdb_num % EXT3_ADDR_PER_BLOCK(sb)]) != gdblock) {
ext3_warning(sb, __FUNCTION__,
"new group %u GDT block "E3FSBLK" not reserved",
Expand Down Expand Up @@ -519,7 +519,7 @@ static int reserve_backup_gdb(handle_t *handle, struct inode *inode,
struct buffer_head *dind;
struct ext3_iloc iloc;
ext3_fsblk_t blk;
__u32 *data, *end;
__le32 *data, *end;
int gdbackups = 0;
int res, i;
int err;
Expand All @@ -536,16 +536,17 @@ static int reserve_backup_gdb(handle_t *handle, struct inode *inode,
}

blk = EXT3_SB(sb)->s_sbh->b_blocknr + 1 + EXT3_SB(sb)->s_gdb_count;
data = (__u32 *)dind->b_data + EXT3_SB(sb)->s_gdb_count;
end = (__u32 *)dind->b_data + EXT3_ADDR_PER_BLOCK(sb);
data = (__le32 *)dind->b_data + EXT3_SB(sb)->s_gdb_count;
end = (__le32 *)dind->b_data + EXT3_ADDR_PER_BLOCK(sb);

/* Get each reserved primary GDT block and verify it holds backups */
for (res = 0; res < reserved_gdb; res++, blk++) {
if (le32_to_cpu(*data) != blk) {
ext3_warning(sb, __FUNCTION__,
"reserved block "E3FSBLK
" not at offset %ld",
blk, (long)(data - (__u32 *)dind->b_data));
blk,
(long)(data - (__le32 *)dind->b_data));
err = -EINVAL;
goto exit_bh;
}
Expand All @@ -560,7 +561,7 @@ static int reserve_backup_gdb(handle_t *handle, struct inode *inode,
goto exit_bh;
}
if (++data >= end)
data = (__u32 *)dind->b_data;
data = (__le32 *)dind->b_data;
}

for (i = 0; i < reserved_gdb; i++) {
Expand All @@ -584,7 +585,7 @@ static int reserve_backup_gdb(handle_t *handle, struct inode *inode,
blk = input->group * EXT3_BLOCKS_PER_GROUP(sb);
for (i = 0; i < reserved_gdb; i++) {
int err2;
data = (__u32 *)primary[i]->b_data;
data = (__le32 *)primary[i]->b_data;
/* printk("reserving backup %lu[%u] = %lu\n",
primary[i]->b_blocknr, gdbackups,
blk + primary[i]->b_blocknr); */
Expand Down Expand Up @@ -689,7 +690,7 @@ static void update_backups(struct super_block *sb,
"can't update backup for group %d (err %d), "
"forcing fsck on next reboot", group, err);
sbi->s_mount_state &= ~EXT3_VALID_FS;
sbi->s_es->s_state &= ~cpu_to_le16(EXT3_VALID_FS);
sbi->s_es->s_state &= cpu_to_le16(~EXT3_VALID_FS);
mark_buffer_dirty(sbi->s_sbh);
}
}
Expand Down
4 changes: 1 addition & 3 deletions trunk/fs/ext3/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -2348,10 +2348,8 @@ static int ext3_remount (struct super_block * sb, int * flags, char * data)
*/
ext3_clear_journal_err(sb, es);
sbi->s_mount_state = le16_to_cpu(es->s_state);
if ((ret = ext3_group_extend(sb, es, n_blocks_count))) {
err = ret;
if ((err = ext3_group_extend(sb, es, n_blocks_count)))
goto restore_opts;
}
if (!ext3_setup_super (sb, es, 0))
sb->s_flags &= ~MS_RDONLY;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/jbd/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,7 @@ int journal_load(journal_t *journal)
/*
* Create a slab for this blocksize
*/
err = journal_create_jbd_slab(cpu_to_be32(sb->s_blocksize));
err = journal_create_jbd_slab(be32_to_cpu(sb->s_blocksize));
if (err)
return err;

Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/ext3_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ struct ext3_super_block {
*/
__u8 s_prealloc_blocks; /* Nr of blocks to try to preallocate*/
__u8 s_prealloc_dir_blocks; /* Nr to preallocate for dirs */
__u16 s_reserved_gdt_blocks; /* Per group desc for online growth */
__le16 s_reserved_gdt_blocks; /* Per group desc for online growth */
/*
* Journaling support valid if EXT3_FEATURE_COMPAT_HAS_JOURNAL set.
*/
Expand Down

0 comments on commit aacf35e

Please sign in to comment.