Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251737
b: refs/heads/master
c: 51ce651
h: refs/heads/master
i:
  251735: ecd70a0
v: v3
  • Loading branch information
Lukas Czerner authored and Theodore Ts'o committed May 20, 2011
1 parent 3f7309e commit 52af1d5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 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: e1290b3e62c496ade19939ce036f35bb69306820
refs/heads/master: 51ce65115642b77040f5582b8d2fc8815ac450f9
23 changes: 16 additions & 7 deletions trunk/fs/ext4/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,7 @@ static int ext4_show_options(struct seq_file *seq, struct vfsmount *vfs)

if (!test_opt(sb, INIT_INODE_TABLE))
seq_puts(seq, ",noinit_inode_table");
else if (sbi->s_li_wait_mult)
else if (sbi->s_li_wait_mult != EXT4_DEF_LI_WAIT_MULT)
seq_printf(seq, ",init_inode_table=%u",
(unsigned) sbi->s_li_wait_mult);

Expand Down Expand Up @@ -2704,11 +2704,8 @@ static int ext4_run_li_request(struct ext4_li_request *elr)
ret = ext4_init_inode_table(sb, group,
elr->lr_timeout ? 0 : 1);
if (elr->lr_timeout == 0) {
timeout = jiffies - timeout;
if (elr->lr_sbi->s_li_wait_mult)
timeout *= elr->lr_sbi->s_li_wait_mult;
else
timeout *= 20;
timeout = (jiffies - timeout) *
elr->lr_sbi->s_li_wait_mult;
elr->lr_timeout = timeout;
}
elr->lr_next_sched = jiffies + elr->lr_timeout;
Expand Down Expand Up @@ -2945,8 +2942,14 @@ static int ext4_register_li_request(struct super_block *sb,
ext4_group_t ngroups = EXT4_SB(sb)->s_groups_count;
int ret = 0;

if (sbi->s_li_request != NULL)
if (sbi->s_li_request != NULL) {
/*
* Reset timeout so it can be computed again, because
* s_li_wait_mult might have changed.
*/
sbi->s_li_request->lr_timeout = 0;
return 0;
}

if (first_not_zeroed == ngroups ||
(sb->s_flags & MS_RDONLY) ||
Expand Down Expand Up @@ -3144,6 +3147,12 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
((def_mount_opts & EXT4_DEFM_NODELALLOC) == 0))
set_opt(sb, DELALLOC);

/*
* set default s_li_wait_mult for lazyinit, for the case there is
* no mount option specified.
*/
sbi->s_li_wait_mult = EXT4_DEF_LI_WAIT_MULT;

if (!parse_options((char *) sbi->s_es->s_mount_opts, sb,
&journal_devnum, &journal_ioprio, NULL, 0)) {
ext4_msg(sb, KERN_WARNING,
Expand Down

0 comments on commit 52af1d5

Please sign in to comment.