On 14.04.2010 23:16, Steven Shiau wrote:
>
>
> Lukas Grässlin wrote:
>> On 14.04.2010 16:15, Steven Shiau wrote:
>>
>>> Lukas Grässlin wrote:
>>>
>>>>> There is an option "-f" of partclone which you might be interested to
>>>>> give it try.
>>>>> You can tune it to see if any difference.
>>>>>
>>>> As I understood the code, -f only affects the time the gui itself would
>>>> be refreshed, but the update_pui method which also runs calculate_speed
>>>> anyway is run.
>>>>
>>>>
>>> Thanks. I will check with Thomas,
>>>
>>
>> No problem.
>>
>> You can see it e.g. here in restore.c :
>>
>> /// start restore image file to partition
>> for( block_id = 0; block_id < image_hdr.totalblock; block_id++ ){
>> /* doing things, copying the blocks */
>> update_pui(&prog, copied, done);
>> } // end of for
>>
>>
>> I did a patch for myself within I told it just call update_pui once for
>> 5000 blocks. Don't know if its a good idea, but it worked ;)
>>
> Good, and the performance is?
> Could you please also send us the patch file?
> Thanks.
I got about 20-39 MB/s.
Here is the patch. There are some other changes within:
* I completeley disabled the update_pui on the server side, because
clonezilla anyway doesn't show the output there.
* I changed the display of the speed from */min to */s beaucse I thoght
it's better readable for the most people.
* I implemented that crc32-checks can be disabled. Not an good idea, but
I wanted it for testing and its disabled by default.
Sorry, I had no time to rip off these other changes but it should be ok
anyway I hope.
Regards,
Lukas
>
> Steven.
>>
>>
>>>> If I've time I'll try the older clonezilla live, too.
>>>>
>>>>
>>>>
>>>>
>>>>> BTW, maybe you can also give Clonezilla live 1.2.2-14 a try? It's
>>>>> partclone is older, and we might have a regression somewhere...
>>>>> Please let us know the results.
>>>>> Thanks.
>>>>>
>>>>> Regards,
>>>>> Steven.
>>>>>
>>>>>> On 14.04.2010 10:33, Steven Shiau wrote:
>>>>>>
>>>>>>
>>>>>>> Yes, Thomas Tsai is working on the improvement of partclone.
>>>>>>>
>>>>>>> Lukas,
>>>>>>> Please send us gprof results you have.
>>>>>>> Thanks.
>>>>>>>
>>>>>>> Steven.
>>>>>>>
>>>>>>> On 2010/4/14 下午 02:43, Lukas Grässlin wrote:
>>>>>>>
>>>>>>>> Regarding the perfmance of partclone: Look at the "on-the-fly
>>>>>>>> performance" Thread in this mailing list.
>>>>>>>>
>>>>>>>> Partclone does some odd things which slow down the speed. You can
>>>>>>>> improve this by saying not to use the gui. (I think this is in the
>>>>>>>> expert options). But it stills does stupid things, like
>>>>>>>> calculating the
>>>>>>>> speed too often which resultes in high cpu load.
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>> Lukas
>>>>>>>>
>>>>>>>> On 14.04.2010 06:39, Jorge Fábregas wrote:
>>>>>>>>
>>>>>>>>> Hello Steven,
>>>>>>>>>
>>>>>>>>> I've been using Clonezilla happily for more than 2 years and I
>>>>>>>>> always used the
>>>>>>>>> custom options and specifically partimage as the cloning tool.
>>>>>>>>> Since partimage
>>>>>>>>> seems to be a dead project (and no support for ext4) and
>>>>>>>>> considering that
>>>>>>>>> Clonezilla uses partclone as the default option I decided to use
>>>>>>>>> this.
>>>>>>>>>
>>>>>>>>> My observation was that partclone takes some more time. When it
>>>>>>>>> started
>>>>>>>>> saving the partition, I wasn't sure what it was doing. There was
>>>>>>>>> some
>>>>>>>>> progress indicator (percentage) (Generating bitmap..) and I after
>>>>>>>>> that it
>>>>>>>>> started again another progress indicator (I guess the actual
>>>>>>>>> creation of the
>>>>>>>>> image). I'm a bit confused about these 2 steps as soon as
>>>>>>>>> partclone starts.
>>>>>>>>> Any tip will be appreciated. (just curious).
>>>>>>>>>
>>>>>>>>> Thanks for Clonezillla.
>>>>>>>>>
>>>>>>>>> Best regards,
>>>>>>>>> Jorge
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Download Intel® Parallel Studio Eval
>>>>>>>>> Try the new software tools for yourself. Speed compiling, find
>>>>>>>>> bugs
>>>>>>>>> proactively, and fine-tune applications for parallel performance.
>>>>>>>>> See why Intel Parallel Studio got high marks during beta.
>>>>>>>>> http://p.sf.net/sfu/intel-sw-dev
>>>>>>>>> _______________________________________________
>>>>>>>>> Clonezilla-live mailing list
>>>>>>>>> Clonezilla-live@lists.sourceforge.net
>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/clonezilla-live
>>>>>>>>>
>>>>>>>>
>>>>>>
>>>>
>>
>>
>>
>
--
Lukas Grässlin
Collax GmbH . Basler Str. 115a . 79115 Freiburg . Germany
p: +49 (0) 89-990 157-23
Collax - Simply Linux.
Geschäftsführer: Boris Nalbach
AG München HRB 158898 * Ust.-IdNr: DE 814464942
diff -Nur partclone-0.2.8/src/chkimg.c partclone-0.2.8-cx-patched/src/chkimg.c
--- partclone-0.2.8/src/chkimg.c 2010-03-29 10:25:04.000000000 +0200
+++ partclone-0.2.8-cx-patched/src/chkimg.c 2010-04-13 15:08:00.000000000
+0200
@@ -327,7 +327,7 @@
log_mesg(0, 1, 1, debug, "read errno = %i \n", errno);
/// read crc32 code and check it.
- crc_ck = crc32(crc_ck, buffer, r_size);
+ crc_ck = crc32(crc_ck, buffer, r_size, &opt);
crc_buffer = (char*)malloc(CRC_SIZE); ///alloc a memory to copy
data
if(crc_buffer == NULL){
log_mesg(0, 1, 1, debug, "%s, %i, ERROR:%s", __func__,
__LINE__, strerror(errno));
@@ -347,7 +347,7 @@
memcpy(buffer2+image_hdr.block_size, crc_buffer, CRC_SIZE);
memcpy(buffer, buffer2+CRC_SIZE, image_hdr.block_size);
- crc_ck2 = crc32(crc_ck2, buffer, r_size);
+ crc_ck2 = crc32(crc_ck2, buffer, r_size, &opt);
c_size = read_all(&dfr, crc_buffer, CRC_SIZE, &opt);
if (c_size < CRC_SIZE)
log_mesg(0, 1, 1, debug, "read CRC error: %s, please check
your image file. \n", strerror(errno));
@@ -374,7 +374,7 @@
log_mesg(1, 0, 0, debug, "end\n");
}
- update_pui(&prog, copied, done);
+ //update_pui(&prog, copied, done);
if(done = 1)
break;
} // end of for
diff -Nur partclone-0.2.8/src/ddclone.c partclone-0.2.8-cx-patched/src/ddclone.c
--- partclone-0.2.8/src/ddclone.c 2010-03-29 10:25:04.000000000 +0200
+++ partclone-0.2.8-cx-patched/src/ddclone.c 2010-04-13 15:08:00.000000000
+0200
@@ -257,7 +257,7 @@
log_mesg(0, 1, 1, debug, "read(%i) and write(%i) different\n",
r_size, w_size);
log_mesg(1, 0, 0, debug, "end\n");
block_id++;
- update_pui(&prog, copied, done);
+ //update_pui(&prog, copied, done);
} while (done == 0);/// end of for
sync_data(dfw, &opt);
/// free buffer
diff -Nur partclone-0.2.8/src/extfsclone.c
partclone-0.2.8-cx-patched/src/extfsclone.c
--- partclone-0.2.8/src/extfsclone.c 2010-03-29 10:25:04.000000000 +0200
+++ partclone-0.2.8-cx-patched/src/extfsclone.c 2010-04-13 15:08:00.000000000
+0200
@@ -161,8 +161,10 @@
bitmap[current_block] = 1;
log_mesg(3, 0, 0, fs_opt.debug, "%s: used block %lu at
group %i\n", __FILE__, (current_block), group);
}
+ /* cx don't need pui refreshing on server side
/// update progress
update_pui(&prog, current_block, 0);//keep update
+ */
}
blk_itr += fs->super->s_blocks_per_group;
}
@@ -175,7 +177,7 @@
log_mesg(0, 1, 1, fs_opt.debug, "%s: bitmap free count err, free:%i\n",
__FILE__, free);
fs_close();
/// update progress
- update_pui(&prog, 1, 1);//finish
+ //update_pui(&prog, 1, 1);//finish
}
/// get extfs type
diff -Nur partclone-0.2.8/src/fatclone.c
partclone-0.2.8-cx-patched/src/fatclone.c
--- partclone-0.2.8/src/fatclone.c 2010-03-29 10:25:04.000000000 +0200
+++ partclone-0.2.8-cx-patched/src/fatclone.c 2010-04-13 15:08:00.000000000
+0200
@@ -409,14 +409,14 @@
} else
log_mesg(2, 0, 0, fs_opt.debug, "%s: error fs\n", __FILE__);
/// update progress
- update_pui(&prog, i, 0);//keep update
+ //update_pui(&prog, i, 0);//keep update
}
log_mesg(2, 0, 0, fs_opt.debug, "%s: done\n", __FILE__);
fs_close();
/// update progress
- update_pui(&prog, 1, 1);//finish
+ //update_pui(&prog, 1, 1);//finish
}
/// get_used_block - get FAT used blocks
diff -Nur partclone-0.2.8/src/hfsplusclone.c
partclone-0.2.8-cx-patched/src/hfsplusclone.c
--- partclone-0.2.8/src/hfsplusclone.c 2010-03-29 10:25:04.000000000 +0200
+++ partclone-0.2.8-cx-patched/src/hfsplusclone.c 2010-04-13
15:08:00.000000000 +0200
@@ -174,7 +174,7 @@
}
block++;
/// update progress
- update_pui(&prog, block, 0);
+ //update_pui(&prog, block, 0);
}
free(extent_bitmap);
@@ -190,7 +190,7 @@
fs_close();
/// update progress
- update_pui(&prog, 1, 1);
+ //update_pui(&prog, 1, 1);
}
extern void initial_image_hdr(char* device, image_head* image_hdr)
diff -Nur partclone-0.2.8/src/main.c partclone-0.2.8-cx-patched/src/main.c
--- partclone-0.2.8/src/main.c 2010-03-29 10:25:04.000000000 +0200
+++ partclone-0.2.8-cx-patched/src/main.c 2010-04-13 15:08:00.000000000
+0200
@@ -365,6 +365,7 @@
/// start clone partition to image file
log_mesg(1, 0, 0, debug, "start backup data...\n");
+ unsigned long long remember_block = 0;
for( block_id = 0; block_id < image_hdr.totalblock; block_id++ ){
r_size = 0;
@@ -416,7 +417,7 @@
if(crc_buffer == NULL){
log_mesg(0, 1, 1, debug, "%s, %i, ERROR:%s", __func__,
__LINE__, strerror(errno));
}
- crc = crc32(crc, buffer, w_size);
+ crc = crc32(crc, buffer, w_size, &opt);
memcpy(crc_buffer, &crc, CRC_SIZE);
c_size = write_all(&dfw, crc_buffer, CRC_SIZE, &opt);
@@ -443,7 +444,10 @@
log_mesg(2, 0, 0, debug, "end\n");
#endif
}
- update_pui(&prog, copied, done);
+ if ((block_id - remember_block) == 5000) {
+ remember_block = block_id;
+ update_pui(&prog, copied, done);
+ }
} /// end of for
done = 1;
update_pui(&prog, copied, done);
@@ -469,6 +473,7 @@
/// start restore image file to partition
log_mesg(1, 0, 0, debug, "start restore data...\n");
+ unsigned long long remember_block = 0;
for( block_id = 0; block_id < image_hdr.totalblock; block_id++ ){
r_size = 0;
@@ -495,7 +500,7 @@
log_mesg(0, 1, 1, debug, "read errno = %i \n", errno);
/// read crc32 code and check it.
- crc_ck = crc32(crc_ck, buffer, r_size);
+ crc_ck = crc32(crc_ck, buffer, r_size, &opt);
crc_buffer = (char*)malloc(CRC_SIZE); ///alloc a memory to
copy data
if(crc_buffer == NULL){
log_mesg(0, 1, 1, debug, "%s, %i, ERROR:%s", __func__,
__LINE__, strerror(errno));
@@ -517,7 +522,7 @@
memcpy(buffer2+image_hdr.block_size, crc_buffer, CRC_SIZE);
memcpy(buffer, buffer2+CRC_SIZE, image_hdr.block_size);
- crc_ck2 = crc32(crc_ck2, buffer, r_size);
+ crc_ck2 = crc32(crc_ck2, buffer, r_size, &opt);
c_size = read_all(&dfr, crc_buffer, CRC_SIZE, &opt);
if (c_size < CRC_SIZE)
log_mesg(0, 1, 1, debug, "read CRC error: %s, please
check your image file. \n", strerror(errno));
@@ -559,7 +564,10 @@
log_mesg(2, 0, 0, debug, "end\n");
#endif
}
- update_pui(&prog, copied, done);
+ if ((block_id - remember_block) == 5000) {
+ remember_block = block_id;
+ update_pui(&prog, copied, done);
+ }
} // end of for
done = 1;
update_pui(&prog, copied, done);
@@ -582,6 +590,7 @@
/// start clone partition to image file
log_mesg(1, 0, 0, debug, "start backup data device-to-device...\n");
+ unsigned long long remember_block = 0;
for( block_id = 0; block_id < image_hdr.totalblock; block_id++ ){
r_size = 0;
w_size = 0;
@@ -645,7 +654,10 @@
log_mesg(0, 1, 1, debug, "clone seek error %lli
errno=%i\n", (long long)offset, (int)errno);
#endif
}
- update_pui(&prog, copied, done);
+ if ((block_id - remember_block) == 5000) {
+ remember_block = block_id;
+ update_pui(&prog, copied, done);
+ }
} /// end of for
done = 1;
update_pui(&prog, copied, done);
diff -Nur partclone-0.2.8/src/ntfsclone-ng.c
partclone-0.2.8-cx-patched/src/ntfsclone-ng.c
--- partclone-0.2.8/src/ntfsclone-ng.c 2010-03-29 10:25:04.000000000 +0200
+++ partclone-0.2.8-cx-patched/src/ntfsclone-ng.c 2010-04-13
15:08:00.000000000 +0200
@@ -250,7 +250,7 @@
free_block++;
}
/// update progress
- update_pui(&prog, current_block, 0);
+ //update_pui(&prog, current_block, 0);
}
@@ -272,7 +272,7 @@
}
/// update progress
- update_pui(&prog, 1, 1);
+ //update_pui(&prog, 1, 1);
}
/// read super block and write to image head
diff -Nur partclone-0.2.8/src/partclone.c
partclone-0.2.8-cx-patched/src/partclone.c
--- partclone-0.2.8/src/partclone.c 2010-03-29 10:25:04.000000000 +0200
+++ partclone-0.2.8-cx-patched/src/partclone.c 2010-04-13 15:21:57.000000000
+0200
@@ -95,7 +95,7 @@
*/
extern void usage(void)
{
- fprintf(stderr, "%s v%s http://partclone.org\nUsage: %s [OPTIONS]\n"
+ fprintf(stderr, "%s v%s-cx http://partclone.org\nUsage: %s [OPTIONS]\n"
" Efficiently clone to a image, device or standard output.\n"
"\n"
" -o, --output FILE Output FILE\n"
@@ -116,6 +116,7 @@
" -X, --dialog Output message as Dialog Format\n"
" -I, --ignore_fschk Ignore filesystem check\n"
" --ignore_crc Ignore crc check error\n"
+ " -Q --skip_crc Don't do crc checks\n"
" -F, --force Force progress\n"
" -f, --UI-fresh Fresh times of progress\n"
" -v, --version Display partclone version\n"
@@ -125,13 +126,13 @@
}
extern void print_version(void){
- printf("Partclone : v%s (%s) \n", VERSION, git_version);
+ printf("Partclone : v%s-cx (%s) \n", VERSION, git_version);
exit(0);
}
extern void parse_options(int argc, char **argv, cmd_opt* opt)
{
- static const char *sopt = "-hvd::L:cbro:O:s:f:RCXFINi";
+ static const char *sopt = "-hvd::L:cbro:O:s:f:RCXFINiQ";
static const struct option lopt[] = {
{ "help", no_argument, NULL, 'h' },
{ "print_version", no_argument, NULL, 'v' },
@@ -149,6 +150,7 @@
{ "dialog", no_argument, NULL, 'X' },
{ "ignore_fschk", no_argument, NULL, 'I' },
{ "ignore_crc", no_argument, NULL, 'i' },
+ { "skip_crc", no_argument, NULL, 'Q' },
{ "force", no_argument, NULL, 'F' },
#ifdef HAVE_LIBNCURSESW
{ "ncurses", no_argument, NULL, 'N' },
@@ -221,6 +223,9 @@
case 'i':
opt->ignore_crc = 1;
break;
+ case 'Q':
+ opt->skip_crc = 1;
+ break;
case 'R':
opt->rescue++;
@@ -431,7 +436,7 @@
}
extern void log_mesg(int log_level, int log_exit, int log_stderr, int debug,
const char *fmt, ...){
-
+#ifndef DISABLE_LOGGING
va_list args;
va_start(args, fmt);
extern cmd_opt opt;
@@ -493,6 +498,7 @@
fprintf(stderr, "Partclone fail, please check %s !\n", opt.logfile);
exit(1);
}
+#endif
}
extern void close_log(){
@@ -903,7 +909,9 @@
/// Mail: i...@lammertbies.nl
/// http://www.lammertbies.nl/comm/info/nl_crc-calculation.html
/// generate crc32 code
-extern unsigned long crc32(unsigned long crc, char *buf, int size){
+extern unsigned long crc32(unsigned long crc, char *buf, int size, cmd_opt
*opt){
+ if (opt->skip_crc)
+ return 0;
unsigned long crc_tab32[256];
unsigned long init_crc, init_p;
diff -Nur partclone-0.2.8/src/partclone.h
partclone-0.2.8-cx-patched/src/partclone.h
--- partclone-0.2.8/src/partclone.h 2010-03-29 10:25:04.000000000 +0200
+++ partclone-0.2.8-cx-patched/src/partclone.h 2010-04-13 15:08:01.000000000
+0200
@@ -82,6 +82,7 @@
int force;
int ignore_fschk;
int ignore_crc;
+ int skip_crc;
unsigned long fresh;
};
typedef struct cmd_opt cmd_opt;
@@ -160,7 +161,7 @@
extern int check_mem_size(image_head image_hdr, cmd_opt opt, unsigned long
long *mem_size);
/// generate crc32 code
-extern unsigned long crc32(unsigned long crc, char *buf, int size);
+extern unsigned long crc32(unsigned long crc, char *buf, int size, cmd_opt
*opt);
/// print partclone info
extern void print_partclone_info(cmd_opt opt);
diff -Nur partclone-0.2.8/src/progress.c
partclone-0.2.8-cx-patched/src/progress.c
--- partclone-0.2.8/src/progress.c 2010-03-29 10:25:04.000000000 +0200
+++ partclone-0.2.8-cx-patched/src/progress.c 2010-04-13 15:50:38.000000000
+0200
@@ -122,7 +122,7 @@
elapsed = 1;
speedps = (float)prog->block_size * (float)current / (float)(elapsed);
- speed = (float)(speedps * 60.0);
+ speed = (float)(speedps);
if(prog->block_size == 1){ // don't show bitmap rate, bit_size = 1
speed = 0;
@@ -185,28 +185,32 @@
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
+ fprintf(stderr, "\e[1;32m");
if ((current+1) == prog->stop){
fprintf(stderr, _("\r%80c\rElapsed: %s, Remaining: %s,
Completed:%6.2f%%, Seeking...,"), clear_buf, prog_stat.Eformated,
prog_stat.Rformated, prog_stat.percent, (float)(prog_stat.speed));
} else {
if((int)prog_stat.speed > 0)
- fprintf(stderr, _("\r%80c\rElapsed: %s, Remaining: %s,
Completed:%6.2f%%, Rate: %6.2f%s/min,"), clear_buf, prog_stat.Eformated,
prog_stat.Rformated, prog_stat.percent, (float)(prog_stat.speed),
prog_stat.speed_unit);
+ fprintf(stderr, _("\r%80c\rElapsed: %s, Remaining: %s,
Completed:%6.2f%%, Rate: %6.2f %s/s,"), clear_buf, prog_stat.Eformated,
prog_stat.Rformated, prog_stat.percent, (float)(prog_stat.speed),
prog_stat.speed_unit);
else
fprintf(stderr, _("\r%80c\rElapsed: %s, Remaining: %s,
Completed:%6.2f%%,"), clear_buf, prog_stat.Eformated, prog_stat.Rformated,
prog_stat.percent);
}
+ fprintf(stderr, "\e[0m");
} else {
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
+ fprintf(stderr, "\e[1;32m");
if((int)prog_stat.speed > 0)
- fprintf(stderr, _("\r%80c\rElapsed: %s, Remaining: %s,
Completed:%6.2f%%, Rate: %6.2f%s/min,"), clear_buf, prog_stat.Eformated,
prog_stat.Rformated, prog_stat.percent, (float)(prog_stat.speed),
prog_stat.speed_unit);
+ fprintf(stderr, _("\r%80c\rElapsed: %s, Remaining: %s,
Completed:%6.2f%%, Rate: %6.2f %s/s,"), clear_buf, prog_stat.Eformated,
prog_stat.Rformated, prog_stat.percent, (float)(prog_stat.speed),
prog_stat.speed_unit);
else
fprintf(stderr, _("\r%80c\rElapsed: %s, Remaining: %s,
Completed:%6.2f%%,"), clear_buf, prog_stat.Eformated, prog_stat.Rformated,
prog_stat.percent);
fprintf(stderr, _("\nTotal Time: %s, "), prog_stat.Eformated);
if((int)prog_stat.speed > 0)
- fprintf(stderr, _("Ave. Rate: %6.1f%s/min, "),
(float)(prog_stat.speed), prog_stat.speed_unit);
+ fprintf(stderr, _("Ave. Rate: %6.1f %s/s, "),
(float)(prog_stat.speed), prog_stat.speed_unit);
fprintf(stderr, _("%s"), "100.00%% completed!\n");
+ fprintf(stderr, "\e[0m");
}
}
diff -Nur partclone-0.2.8/src/reiser4clone.c
partclone-0.2.8-cx-patched/src/reiser4clone.c
--- partclone-0.2.8/src/reiser4clone.c 2010-03-29 10:25:04.000000000 +0200
+++ partclone-0.2.8-cx-patched/src/reiser4clone.c 2010-04-13
15:08:01.000000000 +0200
@@ -121,7 +121,7 @@
log_mesg(3, 0, 0, fs_opt.debug, "%s: bitmap is free %lli", block,
__FILE__);
}
/// update progress
- update_pui(&prog, bit, 0);
+ //update_pui(&prog, bit, 0);
}
@@ -130,7 +130,7 @@
fs_close();
/// update progress
- update_pui(&prog, bit, 1);
+ //update_pui(&prog, bit, 1);
}
/// read super block and write to image head
diff -Nur partclone-0.2.8/src/reiserfsclone.c
partclone-0.2.8-cx-patched/src/reiserfsclone.c
--- partclone-0.2.8/src/reiserfsclone.c 2010-03-29 10:25:04.000000000 +0200
+++ partclone-0.2.8-cx-patched/src/reiserfsclone.c 2010-04-13
15:08:01.000000000 +0200
@@ -92,7 +92,7 @@
bitmap[blk] = 0;
}
/// update progress
- update_pui(&bprog, blk, done);
+ //update_pui(&bprog, blk, done);
}
@@ -102,7 +102,7 @@
fs_close();
/// update progress
done = 1;
- update_pui(&bprog, 1, done);
+ //update_pui(&bprog, 1, done);
}
diff -Nur partclone-0.2.8/src/restore.c partclone-0.2.8-cx-patched/src/restore.c
--- partclone-0.2.8/src/restore.c 2010-03-29 10:25:04.000000000 +0200
+++ partclone-0.2.8-cx-patched/src/restore.c 2010-04-13 15:08:01.000000000
+0200
@@ -248,6 +248,7 @@
log_mesg(0, 1, 1, debug, "seek set %lli\n", sf);
/// start restore image file to partition
+ unsigned long long remember_block = 0;
for( block_id = 0; block_id < image_hdr.totalblock; block_id++ ){
r_size = 0;
@@ -274,7 +275,7 @@
log_mesg(0, 1, 1, debug, "read errno = %i \n", errno);
/// read crc32 code and check it.
- crc_ck = crc32(crc_ck, buffer, r_size);
+ crc_ck = crc32(crc_ck, buffer, r_size, &opt);
crc_buffer = (char*)malloc(CRC_SIZE); ///alloc a memory to
copy data
if(crc_buffer == NULL){
log_mesg(0, 1, 1, debug, "%s, %i, ERROR:%s", __func__,
__LINE__, strerror(errno));
@@ -295,7 +296,7 @@
memcpy(buffer2+image_hdr.block_size, crc_buffer, CRC_SIZE);
memcpy(buffer, buffer2+CRC_SIZE, image_hdr.block_size);
- crc_ck2 = crc32(crc_ck2, buffer, r_size);
+ crc_ck2 = crc32(crc_ck2, buffer, r_size, &opt);
c_size = read_all(&dfr, crc_buffer, CRC_SIZE, &opt);
if (c_size < CRC_SIZE)
log_mesg(0, 1, 1, debug, "read CRC error: %s, please
check your image file. \n", strerror(errno));
@@ -340,7 +341,10 @@
log_mesg(2, 0, 0, debug, "end\n");
#endif
}
- update_pui(&prog, copied, done);
+ if ((block_id - remember_block) == 5000) {
+ remember_block = block_id;
+ update_pui(&prog, copied, done);
+ }
} // end of for
done = 1;
update_pui(&prog, copied, done);
diff -Nur partclone-0.2.8/src/ufsclone.c
partclone-0.2.8-cx-patched/src/ufsclone.c
--- partclone-0.2.8/src/ufsclone.c 2010-03-29 10:25:04.000000000 +0200
+++ partclone-0.2.8-cx-patched/src/ufsclone.c 2010-04-13 15:08:01.000000000
+0200
@@ -135,7 +135,7 @@
log_mesg(3, 0, 0, fs_opt.debug, "%s: bitmap is used %lli\n",
__FILE__, block);
}
total_block++;
- update_pui(&bprog, total_block ,done);
+ //update_pui(&bprog, total_block ,done);
}
log_mesg(1, 0, 0, fs_opt.debug, "%s: read bitmap done\n", __FILE__);
@@ -145,7 +145,7 @@
log_mesg(1, 0, 0, fs_opt.debug, "%s: total used = %lli, total free =
%lli\n", __FILE__, bused, bfree);
done = 1;
- update_pui(&bprog, 1, done);
+ //update_pui(&bprog, 1, done);
}
diff -Nur partclone-0.2.8/src/vmfsclone.c
partclone-0.2.8-cx-patched/src/vmfsclone.c
--- partclone-0.2.8/src/vmfsclone.c 2010-03-29 10:25:04.000000000 +0200
+++ partclone-0.2.8-cx-patched/src/vmfsclone.c 2010-04-13 15:08:01.000000000
+0200
@@ -93,10 +93,10 @@
}
log_mesg(2, 0, 0, fs_opt.debug, "%s: Block 0x%8.8x status:", __FILE__,
current, status);
- update_pui(&prog, current, 0);
+ //update_pui(&prog, current, 0);
}
- update_pui(&prog, current, 1);
+ //update_pui(&prog, current, 1);
fs_close();
log_mesg(0, 0, 0, fs_opt.debug, "%s: Used:%u, Free:%u, Status err:%u\n",
__FILE__, used_block, free_block, err_block);
diff -Nur partclone-0.2.8/src/xfsclone.c
partclone-0.2.8-cx-patched/src/xfsclone.c
--- partclone-0.2.8/src/xfsclone.c 2010-03-29 10:25:04.000000000 +0200
+++ partclone-0.2.8-cx-patched/src/xfsclone.c 2010-04-13 15:08:01.000000000
+0200
@@ -46,7 +46,7 @@
bitmap[bit] = 0;
log_mesg(3, 0, 0, fs_opt.debug, "%s: add bit%i\n", __FILE__, bit);
/// update progress
- update_pui(&prog, bit, 0);
+ //update_pui(&prog, bit, 0);
}
@@ -253,7 +253,7 @@
bfree++;
log_mesg(3, 0, 0, fs_opt.debug, "%s: free b= %lli\n", __FILE__,
bit);
}
- update_pui(&prog, (mp->m_sb.sb_dblocks+bit), 0);
+ //update_pui(&prog, (mp->m_sb.sb_dblocks+bit), 0);
}
//log_mesg(0, 0, 0, fs_opt.debug, "used = %i, free = %i\n", bused, bfree);
@@ -268,7 +268,7 @@
fs_close();
// image_hdr->usedblocks = bused;
/// finish
- update_pui(&prog, 1, 1);
+ //update_pui(&prog, 1, 1);
}
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Clonezilla-live mailing list
Clonezilla-live@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/clonezilla-live