"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "fsremap/src/io/io_null.cc" between
fstransform-0.9.3-src.tar.gz and fstransform-0.9.4.tar.gz

About: fstransform is a tool to change a file-system from one format to another, for example from jfs, xfs, or reiser to ext2, ext3, or ext4, in-place and without the need for backup.

io_null.cc  (fstransform-0.9.3-src):io_null.cc  (fstransform-0.9.4)
skipping to change at line 34 skipping to change at line 34
*/ */
#include "../first.hh" #include "../first.hh"
#include "../log.hh" // for ff_log() #include "../log.hh" // for ff_log()
#include "../misc.hh" // for ff_pretty_size() #include "../misc.hh" // for ff_pretty_size()
#include "io_null.hh" // for ft_io_null #include "io_null.hh" // for ft_io_null
FT_IO_NAMESPACE_BEGIN FT_IO_NAMESPACE_BEGIN
char const * const ft_io_null::extents_label[ft_io_null::FC_FILE_COUNT] = { "DEV char const * const ft_io_null::extents_label[ft_io_null::FC_EXTENTS_FILE_COUNT]
ICE-LENGTH", "LOOP-EXTENTS", "FREE-SPACE-EXTENTS" }; = {
"DEVICE-LENGTH", "LOOP-EXTENTS", "FREE-SPACE-EXTENTS", "TO-ZERO-E
XTENTS"
};
char const * const ft_io_null::sim_msg = "(simulated) "; char const * const ft_io_null::sim_msg = "(simulated) ";
/** constructor */ /** constructor */
ft_io_null::ft_io_null(fr_persist & persist) ft_io_null::ft_io_null(fr_persist & persist)
: super_type(persist) : super_type(persist)
{ {
/* tell job that we're a simulation */ /* tell job that we're a simulation */
job().simulate_run(true); job().simulate_run(true);
} }
skipping to change at line 59 skipping to change at line 61
/** /**
* retrieve LOOP-FILE extents and FREE-SPACE extents and append them into * retrieve LOOP-FILE extents and FREE-SPACE extents and append them into
* the vectors loop_file_extents and free_space_extents. * the vectors loop_file_extents and free_space_extents.
* the vectors will be ordered by extent ->logical. * the vectors will be ordered by extent ->logical.
* *
* return 0 for success, else error (and vectors contents will be UNDEFINED). * return 0 for success, else error (and vectors contents will be UNDEFINED).
* *
* implementation: does nothing. * implementation: does nothing.
*/ */
int ft_io_null::read_extents(fr_vector<ft_uoff> & loop_file_extents, int ft_io_null::read_extents(fr_vector<ft_uoff> & FT_ARG_UNUSED(loop_file_extent
fr_vector<ft_uoff> & free_space_extents, s),
ft_uoff & ret_block_size_bitmask) fr_vector<ft_uoff> & FT_ARG_UNUSED(free_space_exten
ts),
fr_vector<ft_uoff> & FT_ARG_UNUSED(to_zero_extents)
,
ft_uoff & FT_ARG_UNUSED(ret_block_size_bitmask))
{ {
return 0; return 0;
} }
/** /**
* close the file descriptors for LOOP-FILE and ZERO-FILE * close the file descriptors for LOOP-FILE and ZERO-FILE
* *
* implementation: do nothing and return success * implementation: do nothing and return success
*/ */
void ft_io_null::close_extents() void ft_io_null::close_extents()
skipping to change at line 111 skipping to change at line 114
} }
/** /**
* actually copy a list of fragments from DEVICE or FREE-STORAGE, to STORAGE to FREE-DEVICE. * actually copy a list of fragments from DEVICE or FREE-STORAGE, to STORAGE to FREE-DEVICE.
* must be implemented by sub-classes. * must be implemented by sub-classes.
* note: parameters are in bytes! * note: parameters are in bytes!
* return 0 if success, else error. * return 0 if success, else error.
* *
* implementation: do nothing and return success * implementation: do nothing and return success
*/ */
int ft_io_null::flush_copy_bytes(fr_dir dir, fr_vector<ft_uoff> & request_vec) int ft_io_null::flush_copy_bytes(fr_dir FT_ARG_UNUSED(dir),
fr_vector<ft_uoff> & FT_ARG_UNUSED(request_vec)
)
{ {
return 0; return 0;
} }
/** /**
* flush any pending copy, i.e. actually perform all queued copies. * flush any pending copy, i.e. actually perform all queued copies.
* return 0 if success, else error * return 0 if success, else error
* *
* implementation: do nothing and return success * implementation: do nothing and return success
*/ */
skipping to change at line 133 skipping to change at line 137
{ {
return 0; return 0;
} }
/** /**
* write zeroes to device (or to storage). * write zeroes to device (or to storage).
* used to remove device-renumbered blocks once remapping is finished * used to remove device-renumbered blocks once remapping is finished
* *
* implementation: do nothing and return success * implementation: do nothing and return success
*/ */
int ft_io_null::zero_bytes(fr_to to, ft_uoff offset, ft_uoff length) int ft_io_null::zero_bytes(fr_to FT_ARG_UNUSED(to), ft_uoff FT_ARG_UNUSED(offset ), ft_uoff FT_ARG_UNUSED(length))
{ {
return 0; return 0;
} }
/** /**
* write zeroes to primary storage. * write zeroes to primary storage.
* used to remove primary-storage once remapping is finished * used to remove primary-storage once remapping is finished
* and clean the remaped file-system * and clean the remaped file-system
* *
* implementation: do nothing and return success * implementation: do nothing and return success
 End of changes. 4 change blocks. 
7 lines changed or deleted 16 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)