Lines Matching refs:aux
356 struct buffer_aux *aux = dm_bufio_get_aux_data(buf); in dm_block_manager_alloc_callback() local
357 aux->validator = NULL; in dm_block_manager_alloc_callback()
358 bl_init(&aux->lock); in dm_block_manager_alloc_callback()
363 struct buffer_aux *aux = dm_bufio_get_aux_data(buf); in dm_block_manager_write_callback() local
364 if (aux->validator) { in dm_block_manager_write_callback()
365 aux->validator->prepare_for_write(aux->validator, (struct dm_block *) buf, in dm_block_manager_write_callback()
430 struct buffer_aux *aux, in dm_bm_validate_buffer() argument
433 if (unlikely(!aux->validator)) { in dm_bm_validate_buffer()
443 aux->validator = v; in dm_bm_validate_buffer()
445 if (unlikely(aux->validator != v)) { in dm_bm_validate_buffer()
447 aux->validator->name, v ? v->name : "NULL", in dm_bm_validate_buffer()
459 struct buffer_aux *aux; in dm_bm_read_lock() local
467 aux = dm_bufio_get_aux_data(to_buffer(*result)); in dm_bm_read_lock()
468 r = bl_down_read(&aux->lock); in dm_bm_read_lock()
475 aux->write_locked = 0; in dm_bm_read_lock()
477 r = dm_bm_validate_buffer(bm, to_buffer(*result), aux, v); in dm_bm_read_lock()
479 bl_up_read(&aux->lock); in dm_bm_read_lock()
492 struct buffer_aux *aux; in dm_bm_write_lock() local
503 aux = dm_bufio_get_aux_data(to_buffer(*result)); in dm_bm_write_lock()
504 r = bl_down_write(&aux->lock); in dm_bm_write_lock()
511 aux->write_locked = 1; in dm_bm_write_lock()
513 r = dm_bm_validate_buffer(bm, to_buffer(*result), aux, v); in dm_bm_write_lock()
515 bl_up_write(&aux->lock); in dm_bm_write_lock()
528 struct buffer_aux *aux; in dm_bm_read_try_lock() local
538 aux = dm_bufio_get_aux_data(to_buffer(*result)); in dm_bm_read_try_lock()
539 r = bl_down_read_nonblock(&aux->lock); in dm_bm_read_try_lock()
545 aux->write_locked = 0; in dm_bm_read_try_lock()
547 r = dm_bm_validate_buffer(bm, to_buffer(*result), aux, v); in dm_bm_read_try_lock()
549 bl_up_read(&aux->lock); in dm_bm_read_try_lock()
562 struct buffer_aux *aux; in dm_bm_write_lock_zero() local
574 aux = dm_bufio_get_aux_data(to_buffer(*result)); in dm_bm_write_lock_zero()
575 r = bl_down_write(&aux->lock); in dm_bm_write_lock_zero()
581 aux->write_locked = 1; in dm_bm_write_lock_zero()
582 aux->validator = v; in dm_bm_write_lock_zero()
590 struct buffer_aux *aux; in dm_bm_unlock() local
591 aux = dm_bufio_get_aux_data(to_buffer(b)); in dm_bm_unlock()
593 if (aux->write_locked) { in dm_bm_unlock()
595 bl_up_write(&aux->lock); in dm_bm_unlock()
597 bl_up_read(&aux->lock); in dm_bm_unlock()