Lines Matching defs:insert
83 * If this extent tree is supported by an extent map, insert
590 * Tree depth may change during truncate, or insert. If we're
671 * safely removed if we ever need to insert extent block
2029 * - When our insert into the right path leaf is at the leftmost edge
2356 * - In the case that the rotation requires a post-insert update,
2431 "Owner %llu: error during insert of %u "
2451 * before the record insert is that an error
2489 * instead of a real insert, then we have to
3698 * Since the leftright insert always covers the entire
3699 * extent, this call will delete the insert record
3861 struct ocfs2_insert_type *insert)
3863 int i = insert->ins_contig_index;
3869 if (insert->ins_split != SPLIT_NONE) {
3874 insert->ins_split, rec,
3880 * Contiguous insert - either left or right.
3882 if (insert->ins_contig != CONTIG_NONE) {
3884 if (insert->ins_contig == CONTIG_LEFT) {
3894 * Handle insert into an empty leaf.
3905 * Appending insert.
3907 if (insert->ins_appending == APPEND_TAIL) {
3918 "insert.cpos %u, insert.clusters %u\n",
4003 * If our appending insert is at the leftmost edge of a leaf,
4096 * do the later insert there.
4100 * it back for a post-insert update.
4108 * can just do the insert there.
4115 * leaf. The insert will be into the
4132 * Left path is easy - we can just allow the insert to
4151 * right_path is the path we want to do the actual insert
4153 * portion of the tree after an edge insert.
4160 struct ocfs2_insert_type *insert)
4195 if (insert->ins_split != SPLIT_NONE) {
4202 insert_rec, insert->ins_split);
4206 * have a guarantee that the later edge insert will
4214 insert);
4221 * up portions of the tree after the insert.
4293 * left_path to account for an edge insert.
4295 * XXX: When modifying this code, keep in mind that an insert
4477 struct ocfs2_insert_type *insert,
4490 insert->ins_contig_index = i;
4494 insert->ins_contig = contig_type;
4496 if (insert->ins_contig != CONTIG_NONE) {
4498 &el->l_recs[insert->ins_contig_index];
4508 insert->ins_contig = CONTIG_NONE;
4516 * insert at the tail of the rightmost leaf.
4522 static void ocfs2_figure_appending_type(struct ocfs2_insert_type *insert,
4530 insert->ins_appending = APPEND_NONE;
4553 insert->ins_appending = APPEND_TAIL;
4557 * Helper function called at the beginning of an insert.
4563 * - Whether the insert is an appending one.
4573 struct ocfs2_insert_type *insert)
4581 insert->ins_split = SPLIT_NONE;
4584 insert->ins_tree_depth = le16_to_cpu(el->l_tree_depth);
4605 * Unless we have a contiguous insert, we'll need to know if
4615 if (!insert->ins_tree_depth) {
4616 ocfs2_figure_contig_type(et, insert, el, insert_rec);
4617 ocfs2_figure_appending_type(insert, el, insert_rec);
4650 ocfs2_figure_contig_type(et, insert, el, insert_rec);
4653 * The insert code isn't quite ready to deal with all cases of
4654 * left contiguousness. Specifically, if it's an insert into
4661 if (insert->ins_contig == CONTIG_LEFT &&
4662 insert->ins_contig_index == 0)
4663 insert->ins_contig = CONTIG_NONE;
4675 * tree path. This might be an appending insert. There are
4681 ocfs2_figure_appending_type(insert, el, insert_rec);
4710 struct ocfs2_insert_type insert = {0, };
4729 &free_records, &insert);
4735 trace_ocfs2_insert_extent(insert.ins_appending, insert.ins_contig,
4736 insert.ins_contig_index, free_records,
4737 insert.ins_tree_depth);
4739 if (insert.ins_contig == CONTIG_NONE && free_records == 0) {
4741 &insert.ins_tree_depth, &last_eb_bh,
4750 status = ocfs2_do_insert_extent(handle, et, &rec, &insert);
4915 struct ocfs2_insert_type insert;
4944 memset(&insert, 0, sizeof(struct ocfs2_insert_type));
4945 insert.ins_appending = APPEND_NONE;
4946 insert.ins_contig = CONTIG_NONE;
4947 insert.ins_tree_depth = depth;
4955 insert.ins_split = SPLIT_LEFT;
4957 insert.ins_split = SPLIT_RIGHT;
4963 insert.ins_split = SPLIT_RIGHT;
4974 ret = ocfs2_do_insert_extent(handle, et, &split_rec, &insert);
5256 * XXX: This should be fixed up so that we just re-insert the
5282 struct ocfs2_insert_type insert;
5325 memset(&insert, 0, sizeof(struct ocfs2_insert_type));
5326 insert.ins_appending = APPEND_NONE;
5327 insert.ins_contig = CONTIG_NONE;
5328 insert.ins_split = SPLIT_RIGHT;
5329 insert.ins_tree_depth = depth;
5331 ret = ocfs2_do_insert_extent(handle, et, &split_rec, &insert);
7114 * Save two copies, one for insert, and one that can