Lines Matching defs:input
371 struct ocfs2_new_group_input *input,
384 if (le16_to_cpu(gd->bg_chain) != input->chain)
386 "while input has %u set.\n",
388 le16_to_cpu(gd->bg_chain), input->chain);
389 else if (le16_to_cpu(gd->bg_bits) != input->clusters * cl_bpc)
391 "input has %u clusters set\n",
393 le16_to_cpu(gd->bg_bits), input->clusters);
394 else if (le16_to_cpu(gd->bg_free_bits_count) != input->frees * cl_bpc)
399 input->frees * cl_bpc);
409 struct ocfs2_new_group_input *input,
415 u32 cluster = ocfs2_blocks_to_clusters(inode->i_sb, input->group);
421 else if (input->chain >= cl_count)
422 mlog(ML_ERROR, "input chain exceeds the limit.\n");
423 else if (next_free != cl_count && next_free != input->chain)
426 else if (total_clusters + input->clusters < total_clusters)
428 else if (input->clusters > cl_cpg)
430 else if (input->frees > input->clusters)
435 else if (input->group != ocfs2_which_cluster_group(inode, cluster))
437 else if ((ret = ocfs2_check_new_group(inode, di, input, group_bh)))
446 int ocfs2_group_add(struct inode *inode, struct ocfs2_new_group_input *input)
492 ret = ocfs2_read_blocks_sync(osb, input->group, 1, &group_bh);
495 "from the device.", (unsigned long long)input->group);
501 ret = ocfs2_verify_group_and_input(main_bm_inode, fe, input, group_bh);
507 trace_ocfs2_group_add((unsigned long long)input->group,
508 input->chain, input->clusters, input->frees);
519 cr = &cl->cl_recs[input->chain];
541 if (input->chain == le16_to_cpu(cl->cl_next_free_rec)) {
546 cr->c_blkno = cpu_to_le64(input->group);
547 le32_add_cpu(&cr->c_total, input->clusters * cl_bpc);
548 le32_add_cpu(&cr->c_free, input->frees * cl_bpc);
550 le32_add_cpu(&fe->id1.bitmap1.i_total, input->clusters *cl_bpc);
552 (input->clusters - input->frees) * cl_bpc);
553 le32_add_cpu(&fe->i_clusters, input->clusters);
559 le64_add_cpu(&fe->i_size, (u64)input->clusters << osb->s_clustersize_bits);
563 ocfs2_update_super_and_backups(main_bm_inode, input->clusters);