Lines Matching defs:input
373 struct ocfs2_new_group_input *input,
386 if (le16_to_cpu(gd->bg_chain) != input->chain)
388 "while input has %u set.\n",
390 le16_to_cpu(gd->bg_chain), input->chain);
391 else if (le16_to_cpu(gd->bg_bits) != input->clusters * cl_bpc)
393 "input has %u clusters set\n",
395 le16_to_cpu(gd->bg_bits), input->clusters);
396 else if (le16_to_cpu(gd->bg_free_bits_count) != input->frees * cl_bpc)
401 input->frees * cl_bpc);
411 struct ocfs2_new_group_input *input,
417 u32 cluster = ocfs2_blocks_to_clusters(inode->i_sb, input->group);
423 else if (input->chain >= cl_count)
424 mlog(ML_ERROR, "input chain exceeds the limit.\n");
425 else if (next_free != cl_count && next_free != input->chain)
428 else if (total_clusters + input->clusters < total_clusters)
430 else if (input->clusters > cl_cpg)
432 else if (input->frees > input->clusters)
437 else if (input->group != ocfs2_which_cluster_group(inode, cluster))
439 else if ((ret = ocfs2_check_new_group(inode, di, input, group_bh)))
448 int ocfs2_group_add(struct inode *inode, struct ocfs2_new_group_input *input)
494 ret = ocfs2_read_blocks_sync(osb, input->group, 1, &group_bh);
497 "from the device.", (unsigned long long)input->group);
503 ret = ocfs2_verify_group_and_input(main_bm_inode, fe, input, group_bh);
509 trace_ocfs2_group_add((unsigned long long)input->group,
510 input->chain, input->clusters, input->frees);
521 cr = &cl->cl_recs[input->chain];
543 if (input->chain == le16_to_cpu(cl->cl_next_free_rec)) {
548 cr->c_blkno = cpu_to_le64(input->group);
549 le32_add_cpu(&cr->c_total, input->clusters * cl_bpc);
550 le32_add_cpu(&cr->c_free, input->frees * cl_bpc);
552 le32_add_cpu(&fe->id1.bitmap1.i_total, input->clusters *cl_bpc);
554 (input->clusters - input->frees) * cl_bpc);
555 le32_add_cpu(&fe->i_clusters, input->clusters);
561 le64_add_cpu(&fe->i_size, (u64)input->clusters << osb->s_clustersize_bits);
565 ocfs2_update_super_and_backups(main_bm_inode, input->clusters);