Lines Matching refs:retval
190 errcode_t retval; in write_undo_indexes() local
205 retval = io_channel_write_blk64(data->undo_file, in write_undo_indexes()
208 if (retval) in write_undo_indexes()
209 return retval; in write_undo_indexes()
224 retval = io_channel_read_blk64(channel, 1, -SUPERBLOCK_SIZE, &super); in write_undo_indexes()
225 if (retval) in write_undo_indexes()
246 retval = io_channel_write_blk64(data->undo_file, 0, in write_undo_indexes()
249 if (retval) in write_undo_indexes()
257 retval = io_channel_write_blk64(data->undo_file, data->super_blk_num, in write_undo_indexes()
259 if (retval) in write_undo_indexes()
263 retval = io_channel_flush(data->undo_file); in write_undo_indexes()
266 return retval; in write_undo_indexes()
272 errcode_t retval; in undo_setup_tdb() local
282 retval = ext2fs_alloc_generic_bmap(&data->fake_fs, in undo_setup_tdb()
287 if (retval) in undo_setup_tdb()
288 return retval; in undo_setup_tdb()
291 retval = ext2fs_get_mem(data->tdb_data_size, &data->keyb); in undo_setup_tdb()
292 if (retval) in undo_setup_tdb()
293 return retval; in undo_setup_tdb()
304 retval = io_channel_read_blk64(data->undo_file, i, 1, in undo_setup_tdb()
306 if (retval) in undo_setup_tdb()
308 retval = io_channel_write_blk64(data->undo_file, i, 1, in undo_setup_tdb()
310 if (retval) in undo_setup_tdb()
311 return retval; in undo_setup_tdb()
312 retval = io_channel_flush(data->undo_file); in undo_setup_tdb()
313 if (retval) in undo_setup_tdb()
314 return retval; in undo_setup_tdb()
326 errcode_t retval = 0; in undo_write_tdb() local
353 retval = undo_setup_tdb(data); in undo_write_tdb()
354 if (retval) in undo_write_tdb()
355 return retval; in undo_write_tdb()
391 retval = ext2fs_get_mem(data->tdb_data_size, &read_ptr); in undo_write_tdb()
392 if (retval) { in undo_write_tdb()
393 return retval; in undo_write_tdb()
402 retval = io_channel_read_blk64(data->real, backing_blk_num, in undo_write_tdb()
404 if (retval) { in undo_write_tdb()
405 if (retval != EXT2_ET_SHORT_READ) { in undo_write_tdb()
407 return retval; in undo_write_tdb()
459 retval = io_channel_write_blk64(data->undo_file, in undo_write_tdb()
461 if (retval) { in undo_write_tdb()
463 return retval; in undo_write_tdb()
469 retval = write_undo_indexes(data, 0); in undo_write_tdb()
470 if (retval) in undo_write_tdb()
471 return retval; in undo_write_tdb()
477 return retval; in undo_write_tdb()
504 errcode_t retval; in check_filesystem() local
507 retval = io_channel_read_blk64(channel, 1, -SUPERBLOCK_SIZE, &super); in check_filesystem()
508 if (retval) in check_filesystem()
509 return retval; in check_filesystem()
515 retval = ext2fs_get_mem(blocksize, &buf); in check_filesystem()
516 if (retval) in check_filesystem()
517 return retval; in check_filesystem()
518 retval = io_channel_read_blk64(undo_file, super_block, in check_filesystem()
520 if (retval) in check_filesystem()
525 retval = -1; in check_filesystem()
530 retval = -1; in check_filesystem()
536 return retval; in check_filesystem()
555 errcode_t retval; in try_reopen_undo_file() local
558 retval = ext2fs_fstat(undo_fd, &statbuf); in try_reopen_undo_file()
559 if (retval) in try_reopen_undo_file()
565 retval = io_channel_read_blk64(data->undo_file, 0, -(int)sizeof(hdr), in try_reopen_undo_file()
567 if (retval) in try_reopen_undo_file()
598 retval = EXT2_ET_UNDO_FILE_WRONG; in try_reopen_undo_file()
604 retval = undo_setup_tdb(data); in try_reopen_undo_file()
605 if (retval) in try_reopen_undo_file()
621 retval = io_channel_read_blk64(data->undo_file, in try_reopen_undo_file()
623 if (retval) in try_reopen_undo_file()
628 retval = EXT2_ET_UNDO_FILE_CORRUPT; in try_reopen_undo_file()
636 retval = EXT2_ET_UNDO_FILE_CORRUPT; in try_reopen_undo_file()
668 return retval; in try_reopen_undo_file()
678 retval = EXT2_ET_UNDO_FILE_CORRUPT; in try_reopen_undo_file()
680 return retval; in try_reopen_undo_file()
699 errcode_t retval; in undo_open() local
703 retval = ext2fs_get_mem(sizeof(struct struct_io_channel), &io); in undo_open()
704 if (retval) in undo_open()
708 retval = ext2fs_get_mem(sizeof(struct undo_private_data), &data); in undo_open()
709 if (retval) in undo_open()
713 retval = ext2fs_get_mem(strlen(name)+1, &io->name); in undo_open()
714 if (retval) in undo_open()
731 retval = undo_io_backing_manager->open(name, flags, in undo_open()
733 if (retval) in undo_open()
744 retval = undo_io_backing_manager->open(data->tdb_file, in undo_open()
747 if (retval) in undo_open()
766 retval = try_reopen_undo_file(undo_fd, data); in undo_open()
767 if (retval) in undo_open()
770 retval = ext2fs_add_exit_fn(undo_atexit, data); in undo_open()
771 if (retval) in undo_open()
777 return retval; in undo_open()
793 return retval; in undo_open()
799 errcode_t err, retval = 0; in undo_close() local
813 retval = io_channel_close(data->real); in undo_close()
828 return retval; in undo_close()
834 errcode_t retval = 0; in undo_set_blksize() local
844 retval = io_channel_set_blksize(data->real, blksize); in undo_set_blksize()
851 return retval; in undo_set_blksize()
857 errcode_t retval = 0; in undo_read_blk64() local
865 retval = io_channel_read_blk64(data->real, block, count, buf); in undo_read_blk64()
867 return retval; in undo_read_blk64()
880 errcode_t retval = 0; in undo_write_blk64() local
888 retval = undo_write_tdb(channel, block, count); in undo_write_blk64()
889 if (retval) in undo_write_blk64()
890 return retval; in undo_write_blk64()
892 retval = io_channel_write_blk64(data->real, block, count, buf); in undo_write_blk64()
894 return retval; in undo_write_blk64()
907 errcode_t retval = 0; in undo_write_byte() local
925 retval = undo_write_tdb(channel, blk_num, count); in undo_write_byte()
926 if (retval) in undo_write_byte()
927 return retval; in undo_write_byte()
929 retval = io_channel_write_byte(data->real, offset, size, buf); in undo_write_byte()
931 return retval; in undo_write_byte()
938 errcode_t retval = 0; in undo_discard() local
952 retval = undo_write_tdb(channel, block, icount); in undo_discard()
953 if (retval) in undo_discard()
954 return retval; in undo_discard()
956 retval = io_channel_discard(data->real, block, count); in undo_discard()
958 return retval; in undo_discard()
965 errcode_t retval = 0; in undo_zeroout() local
979 retval = undo_write_tdb(channel, block, icount); in undo_zeroout()
980 if (retval) in undo_zeroout()
981 return retval; in undo_zeroout()
983 retval = io_channel_zeroout(data->real, block, count); in undo_zeroout()
985 return retval; in undo_zeroout()
993 errcode_t retval = 0; in undo_cache_readahead() local
1000 retval = io_channel_cache_readahead(data->real, block, count); in undo_cache_readahead()
1002 return retval; in undo_cache_readahead()
1010 errcode_t retval = 0; in undo_flush() local
1018 retval = io_channel_flush(data->real); in undo_flush()
1020 return retval; in undo_flush()
1026 errcode_t retval = 0; in undo_set_option() local
1055 retval = data->real->manager->set_option(data->real, in undo_set_option()
1058 if (!retval && !strcmp(option, "offset")) { in undo_set_option()
1067 return retval; in undo_set_option()
1072 errcode_t retval = 0; in undo_get_stats() local
1080 retval = (data->real->manager->get_stats)(data->real, stats); in undo_get_stats()
1082 return retval; in undo_get_stats()