Lines Matching refs:new_range
1219 static bool add_new_range(struct dm_integrity_c *ic, struct dm_integrity_range *new_range, bool che… in add_new_range() argument
1224 BUG_ON((new_range->logical_sector | new_range->n_sectors) & (unsigned)(ic->sectors_per_block - 1)); in add_new_range()
1229 if (unlikely(ranges_overlap(range, new_range))) in add_new_range()
1240 if (new_range->logical_sector + new_range->n_sectors <= range->logical_sector) { in add_new_range()
1242 } else if (new_range->logical_sector >= range->logical_sector + range->n_sectors) { in add_new_range()
1249 rb_link_node(&new_range->node, parent, n); in add_new_range()
1250 rb_insert_color(&new_range->node, &ic->in_progress); in add_new_range()
1283 static void wait_and_add_new_range(struct dm_integrity_c *ic, struct dm_integrity_range *new_range) in wait_and_add_new_range() argument
1285 new_range->waiting = true; in wait_and_add_new_range()
1286 list_add_tail(&new_range->wait_entry, &ic->wait_list); in wait_and_add_new_range()
1287 new_range->task = current; in wait_and_add_new_range()
1293 } while (unlikely(new_range->waiting)); in wait_and_add_new_range()
1296 static void add_new_range_and_wait(struct dm_integrity_c *ic, struct dm_integrity_range *new_range) in add_new_range_and_wait() argument
1298 if (unlikely(!add_new_range(ic, new_range, true))) in add_new_range_and_wait()
1299 wait_and_add_new_range(ic, new_range); in add_new_range_and_wait()