Lines Matching refs:elr
3413 static int ext4_run_li_request(struct ext4_li_request *elr)
3416 struct super_block *sb = elr->lr_super;
3418 ext4_group_t group = elr->lr_next_group;
3423 if (elr->lr_mode == EXT4_LI_MODE_PREFETCH_BBITMAP) {
3424 elr->lr_next_group = ext4_mb_prefetch(sb, group,
3427 ext4_mb_prefetch_fini(sb, elr->lr_next_group,
3429 trace_ext4_prefetch_bitmaps(sb, group, elr->lr_next_group,
3431 if (group >= elr->lr_next_group) {
3433 if (elr->lr_first_not_zeroed != ngroups &&
3435 elr->lr_next_group = elr->lr_first_not_zeroed;
3436 elr->lr_mode = EXT4_LI_MODE_ITABLE;
3460 elr->lr_timeout ? 0 : 1);
3462 if (elr->lr_timeout == 0) {
3463 elr->lr_timeout = nsecs_to_jiffies((ktime_get_real_ns() - start_time) *
3464 EXT4_SB(elr->lr_super)->s_li_wait_mult);
3466 elr->lr_next_sched = jiffies + elr->lr_timeout;
3467 elr->lr_next_group = group + 1;
3476 static void ext4_remove_li_request(struct ext4_li_request *elr)
3478 if (!elr)
3481 list_del(&elr->lr_request);
3482 EXT4_SB(elr->lr_super)->s_li_request = NULL;
3483 kfree(elr);
3515 struct ext4_li_request *elr;
3533 elr = list_entry(pos, struct ext4_li_request,
3536 if (time_before(jiffies, elr->lr_next_sched)) {
3537 if (time_before(elr->lr_next_sched, next_wakeup))
3538 next_wakeup = elr->lr_next_sched;
3541 if (down_read_trylock(&elr->lr_super->s_umount)) {
3542 if (sb_start_write_trylock(elr->lr_super)) {
3550 err = ext4_run_li_request(elr);
3551 sb_end_write(elr->lr_super);
3555 up_read((&elr->lr_super->s_umount));
3559 ext4_remove_li_request(elr);
3563 elr->lr_next_sched = jiffies +
3567 if (time_before(elr->lr_next_sched, next_wakeup))
3568 next_wakeup = elr->lr_next_sched;
3616 struct ext4_li_request *elr;
3620 elr = list_entry(pos, struct ext4_li_request,
3622 ext4_remove_li_request(elr);
3692 struct ext4_li_request *elr;
3694 elr = kzalloc(sizeof(*elr), GFP_KERNEL);
3695 if (!elr)
3698 elr->lr_super = sb;
3699 elr->lr_first_not_zeroed = start;
3701 elr->lr_mode = EXT4_LI_MODE_PREFETCH_BBITMAP;
3703 elr->lr_mode = EXT4_LI_MODE_ITABLE;
3704 elr->lr_next_group = start;
3712 elr->lr_next_sched = jiffies + (prandom_u32() %
3714 return elr;
3721 struct ext4_li_request *elr = NULL;
3740 elr = ext4_li_request_new(sb, first_not_zeroed);
3741 if (!elr) {
3753 list_add(&elr->lr_request, &ext4_li_info->li_request_list);
3756 sbi->s_li_request = elr;
3758 * set elr to NULL here since it has been inserted to
3762 elr = NULL;
3772 kfree(elr);