Lines Matching defs:insert

85 	 * If this extent tree is supported by an extent map, insert
592 * Tree depth may change during truncate, or insert. If we're
673 * safely removed if we ever need to insert extent block
2031 * - When our insert into the right path leaf is at the leftmost edge
2358 * - In the case that the rotation requires a post-insert update,
2433 "Owner %llu: error during insert of %u "
2453 * before the record insert is that an error
2491 * instead of a real insert, then we have to
3700 * Since the leftright insert always covers the entire
3701 * extent, this call will delete the insert record
3863 struct ocfs2_insert_type *insert)
3865 int i = insert->ins_contig_index;
3871 if (insert->ins_split != SPLIT_NONE) {
3876 insert->ins_split, rec,
3882 * Contiguous insert - either left or right.
3884 if (insert->ins_contig != CONTIG_NONE) {
3886 if (insert->ins_contig == CONTIG_LEFT) {
3896 * Handle insert into an empty leaf.
3907 * Appending insert.
3909 if (insert->ins_appending == APPEND_TAIL) {
3920 "insert.cpos %u, insert.clusters %u\n",
4005 * If our appending insert is at the leftmost edge of a leaf,
4098 * do the later insert there.
4102 * it back for a post-insert update.
4110 * can just do the insert there.
4117 * leaf. The insert will be into the
4134 * Left path is easy - we can just allow the insert to
4153 * right_path is the path we want to do the actual insert
4155 * portion of the tree after an edge insert.
4162 struct ocfs2_insert_type *insert)
4197 if (insert->ins_split != SPLIT_NONE) {
4204 insert_rec, insert->ins_split);
4208 * have a guarantee that the later edge insert will
4216 insert);
4223 * up portions of the tree after the insert.
4295 * left_path to account for an edge insert.
4297 * XXX: When modifying this code, keep in mind that an insert
4479 struct ocfs2_insert_type *insert,
4492 insert->ins_contig_index = i;
4496 insert->ins_contig = contig_type;
4498 if (insert->ins_contig != CONTIG_NONE) {
4500 &el->l_recs[insert->ins_contig_index];
4510 insert->ins_contig = CONTIG_NONE;
4518 * insert at the tail of the rightmost leaf.
4524 static void ocfs2_figure_appending_type(struct ocfs2_insert_type *insert,
4532 insert->ins_appending = APPEND_NONE;
4555 insert->ins_appending = APPEND_TAIL;
4559 * Helper function called at the beginning of an insert.
4565 * - Whether the insert is an appending one.
4575 struct ocfs2_insert_type *insert)
4583 insert->ins_split = SPLIT_NONE;
4586 insert->ins_tree_depth = le16_to_cpu(el->l_tree_depth);
4607 * Unless we have a contiguous insert, we'll need to know if
4617 if (!insert->ins_tree_depth) {
4618 ocfs2_figure_contig_type(et, insert, el, insert_rec);
4619 ocfs2_figure_appending_type(insert, el, insert_rec);
4652 ocfs2_figure_contig_type(et, insert, el, insert_rec);
4655 * The insert code isn't quite ready to deal with all cases of
4656 * left contiguousness. Specifically, if it's an insert into
4663 if (insert->ins_contig == CONTIG_LEFT &&
4664 insert->ins_contig_index == 0)
4665 insert->ins_contig = CONTIG_NONE;
4677 * tree path. This might be an appending insert. There are
4683 ocfs2_figure_appending_type(insert, el, insert_rec);
4712 struct ocfs2_insert_type insert = {0, };
4731 &free_records, &insert);
4737 trace_ocfs2_insert_extent(insert.ins_appending, insert.ins_contig,
4738 insert.ins_contig_index, free_records,
4739 insert.ins_tree_depth);
4741 if (insert.ins_contig == CONTIG_NONE && free_records == 0) {
4743 &insert.ins_tree_depth, &last_eb_bh,
4752 status = ocfs2_do_insert_extent(handle, et, &rec, &insert);
4917 struct ocfs2_insert_type insert;
4946 memset(&insert, 0, sizeof(struct ocfs2_insert_type));
4947 insert.ins_appending = APPEND_NONE;
4948 insert.ins_contig = CONTIG_NONE;
4949 insert.ins_tree_depth = depth;
4957 insert.ins_split = SPLIT_LEFT;
4959 insert.ins_split = SPLIT_RIGHT;
4965 insert.ins_split = SPLIT_RIGHT;
4976 ret = ocfs2_do_insert_extent(handle, et, &split_rec, &insert);
5258 * XXX: This should be fixed up so that we just re-insert the
5284 struct ocfs2_insert_type insert;
5327 memset(&insert, 0, sizeof(struct ocfs2_insert_type));
5328 insert.ins_appending = APPEND_NONE;
5329 insert.ins_contig = CONTIG_NONE;
5330 insert.ins_split = SPLIT_RIGHT;
5331 insert.ins_tree_depth = depth;
5333 ret = ocfs2_do_insert_extent(handle, et, &split_rec, &insert);
7109 * Save two copies, one for insert, and one that can