Lines Matching refs:r
88 int r; in userspace_do_request() local
96 r = dm_consult_userspace(uuid, lc->luid, request_type, data, in userspace_do_request()
99 if (r != -ESRCH) in userspace_do_request()
100 return r; in userspace_do_request()
107 r = dm_consult_userspace(uuid, lc->luid, DM_ULOG_CTR, in userspace_do_request()
111 if (!r) in userspace_do_request()
115 r = dm_consult_userspace(uuid, lc->luid, DM_ULOG_RESUME, NULL, in userspace_do_request()
117 if (!r) in userspace_do_request()
120 DMERR("Error trying to resume userspace log: %d", r); in userspace_do_request()
158 int r; in do_flush() local
163 r = userspace_do_request(lc, lc->uuid, DM_ULOG_FLUSH, NULL, 0, NULL, NULL); in do_flush()
165 if (r) in do_flush()
193 int r = 0; in userspace_ctr() local
248 r = -ENOMEM; in userspace_ctr()
256 r = -ENOMEM; in userspace_ctr()
263 r = dm_consult_userspace(lc->uuid, lc->luid, DM_ULOG_CTR, in userspace_ctr()
267 if (r < 0) { in userspace_ctr()
268 if (r == -ESRCH) in userspace_ctr()
277 r = dm_consult_userspace(lc->uuid, lc->luid, DM_ULOG_GET_REGION_SIZE, in userspace_ctr()
280 if (r) { in userspace_ctr()
291 r = -EINVAL; in userspace_ctr()
294 r = dm_get_device(ti, devices_rdata, in userspace_ctr()
296 if (r) in userspace_ctr()
305 r = -ENOMEM; in userspace_ctr()
315 if (r) { in userspace_ctr()
325 return r; in userspace_ctr()
356 int r; in userspace_presuspend() local
359 r = dm_consult_userspace(lc->uuid, lc->luid, DM_ULOG_PRESUSPEND, in userspace_presuspend()
362 return r; in userspace_presuspend()
367 int r; in userspace_postsuspend() local
376 r = dm_consult_userspace(lc->uuid, lc->luid, DM_ULOG_POSTSUSPEND, in userspace_postsuspend()
379 return r; in userspace_postsuspend()
384 int r; in userspace_resume() local
388 r = dm_consult_userspace(lc->uuid, lc->luid, DM_ULOG_RESUME, in userspace_resume()
391 return r; in userspace_resume()
411 int r; in userspace_is_clean() local
418 r = userspace_do_request(lc, lc->uuid, DM_ULOG_IS_CLEAN, in userspace_is_clean()
422 return (r) ? 0 : (int)is_clean; in userspace_is_clean()
439 int r; in userspace_in_sync() local
462 r = userspace_do_request(lc, lc->uuid, DM_ULOG_IN_SYNC, in userspace_in_sync()
465 return (r) ? 0 : (int)in_sync; in userspace_in_sync()
470 int r = 0; in flush_one_by_one() local
474 r = userspace_do_request(lc, lc->uuid, fe->type, in flush_one_by_one()
478 if (r) in flush_one_by_one()
482 return r; in flush_one_by_one()
488 int r = 0; in flush_by_group() local
513 r = userspace_do_request(lc, lc->uuid, DM_ULOG_FLUSH, in flush_by_group()
520 if (r) in flush_by_group()
523 r = userspace_do_request(lc, lc->uuid, type, in flush_by_group()
527 if (r) { in flush_by_group()
532 r = flush_one_by_one(lc, flush_list); in flush_by_group()
544 return r; in flush_by_group()
566 int r = 0; in userspace_flush() local
587 r = flush_by_group(lc, &clear_list, 0); in userspace_flush()
588 if (r) in userspace_flush()
592 r = flush_by_group(lc, &mark_list, 0); in userspace_flush()
593 if (r) in userspace_flush()
595 r = userspace_do_request(lc, lc->uuid, DM_ULOG_FLUSH, in userspace_flush()
603 r = flush_by_group(lc, &mark_list, 1); in userspace_flush()
604 if (r) in userspace_flush()
638 if (r) in userspace_flush()
641 return r; in userspace_flush()
716 int r; in userspace_get_resync_work() local
721 region_t r; in userspace_get_resync_work() member
728 r = userspace_do_request(lc, lc->uuid, DM_ULOG_GET_RESYNC_WORK, in userspace_get_resync_work()
731 *region = pkg.r; in userspace_get_resync_work()
732 return (r) ? r : (int)pkg.i; in userspace_get_resync_work()
746 region_t r; in userspace_set_region_sync() member
750 pkg.r = region; in userspace_set_region_sync()
773 int r; in userspace_get_sync_count() local
779 r = userspace_do_request(lc, lc->uuid, DM_ULOG_GET_SYNC_COUNT, in userspace_get_sync_count()
782 if (r) in userspace_get_sync_count()
799 int r = 0; in userspace_status() local
806 r = userspace_do_request(lc, lc->uuid, DM_ULOG_STATUS_INFO, in userspace_status()
809 if (r) { in userspace_status()
826 return (r) ? 0 : (int)sz; in userspace_status()
837 int r; in userspace_is_remote_recovering() local
860 r = userspace_do_request(lc, lc->uuid, DM_ULOG_IS_REMOTE_RECOVERING, in userspace_is_remote_recovering()
863 if (r) in userspace_is_remote_recovering()
894 int r = 0; in userspace_dirty_log_init() local
902 r = dm_ulog_tfr_init(); in userspace_dirty_log_init()
903 if (r) { in userspace_dirty_log_init()
906 return r; in userspace_dirty_log_init()
909 r = dm_dirty_log_type_register(&_userspace_type); in userspace_dirty_log_init()
910 if (r) { in userspace_dirty_log_init()
914 return r; in userspace_dirty_log_init()