Lines Matching refs:aux
353 struct buffer_aux *aux = dm_bufio_get_aux_data(buf); in dm_block_manager_alloc_callback() local
354 aux->validator = NULL; in dm_block_manager_alloc_callback()
355 bl_init(&aux->lock); in dm_block_manager_alloc_callback()
360 struct buffer_aux *aux = dm_bufio_get_aux_data(buf); in dm_block_manager_write_callback() local
361 if (aux->validator) { in dm_block_manager_write_callback()
362 aux->validator->prepare_for_write(aux->validator, (struct dm_block *) buf, in dm_block_manager_write_callback()
402 struct buffer_aux *aux, in dm_bm_validate_buffer() argument
405 if (unlikely(!aux->validator)) { in dm_bm_validate_buffer()
412 aux->validator = v; in dm_bm_validate_buffer()
414 if (unlikely(aux->validator != v)) { in dm_bm_validate_buffer()
416 aux->validator->name, v ? v->name : "NULL", in dm_bm_validate_buffer()
429 struct buffer_aux *aux; in dm_bm_read_lock() local
437 aux = dm_bufio_get_aux_data(to_buffer(*result)); in dm_bm_read_lock()
438 r = bl_down_read(&aux->lock); in dm_bm_read_lock()
445 aux->write_locked = 0; in dm_bm_read_lock()
447 r = dm_bm_validate_buffer(bm, to_buffer(*result), aux, v); in dm_bm_read_lock()
449 bl_up_read(&aux->lock); in dm_bm_read_lock()
462 struct buffer_aux *aux; in dm_bm_write_lock() local
470 aux = dm_bufio_get_aux_data(to_buffer(*result)); in dm_bm_write_lock()
471 r = bl_down_write(&aux->lock); in dm_bm_write_lock()
478 aux->write_locked = 1; in dm_bm_write_lock()
480 r = dm_bm_validate_buffer(bm, to_buffer(*result), aux, v); in dm_bm_write_lock()
482 bl_up_write(&aux->lock); in dm_bm_write_lock()
495 struct buffer_aux *aux; in dm_bm_read_try_lock() local
505 aux = dm_bufio_get_aux_data(to_buffer(*result)); in dm_bm_read_try_lock()
506 r = bl_down_read_nonblock(&aux->lock); in dm_bm_read_try_lock()
512 aux->write_locked = 0; in dm_bm_read_try_lock()
514 r = dm_bm_validate_buffer(bm, to_buffer(*result), aux, v); in dm_bm_read_try_lock()
516 bl_up_read(&aux->lock); in dm_bm_read_try_lock()
529 struct buffer_aux *aux; in dm_bm_write_lock_zero() local
538 aux = dm_bufio_get_aux_data(to_buffer(*result)); in dm_bm_write_lock_zero()
539 r = bl_down_write(&aux->lock); in dm_bm_write_lock_zero()
545 aux->write_locked = 1; in dm_bm_write_lock_zero()
546 aux->validator = v; in dm_bm_write_lock_zero()
553 struct buffer_aux *aux; in dm_bm_unlock() local
554 aux = dm_bufio_get_aux_data(to_buffer(b)); in dm_bm_unlock()
556 if (aux->write_locked) { in dm_bm_unlock()
558 bl_up_write(&aux->lock); in dm_bm_unlock()
560 bl_up_read(&aux->lock); in dm_bm_unlock()
570 struct buffer_aux *aux; in dm_bm_unlock_move() local
572 aux = dm_bufio_get_aux_data(to_buffer(b)); in dm_bm_unlock_move()
574 if (aux->write_locked) { in dm_bm_unlock_move()
576 bl_up_write(&aux->lock); in dm_bm_unlock_move()
578 bl_up_read(&aux->lock); in dm_bm_unlock_move()