Hello community,
here is the log from the commit of package dd_rescue for openSUSE:Factory checked in at 2012-05-22 08:12:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/dd_rescue (Old)
and /work/SRC/openSUSE:Factory/.dd_rescue.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "dd_rescue", Maintainer is ""
Changes:
--------
--- /work/SRC/openSUSE:Factory/dd_rescue/dd_rescue.changes 2012-03-17 13:20:35.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.dd_rescue.new/dd_rescue.changes 2012-05-22 08:12:42.000000000 +0200
@@ -1,0 +2,12 @@
+Sat May 19 18:49:20 UTC 2012 - asterios.dramis@gmail.com
+
+- Update to version 1.27:
+ * Allow to do 512b direct IO (which is possible in latest Linux kernels).
+ Change posix_memalign() variable assignment. It has a number of fixes; most
+ importantly, when exiting because of an error, it updates the variables
+ that are output. dd_rescue now avoids special characters in the logfile. It
+ handles situations gracefully, where wrong positions resulted in the
+ progress graph causing faults. Some come from illegal input (negative
+ offset ...), which is now detected.
+
+-------------------------------------------------------------------
Old:
----
dd_rescue-1.25.tar.gz
New:
----
dd_rescue-1.27.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ dd_rescue.spec ++++++
--- /var/tmp/diff_new_pack.TYOYOb/_old 2012-05-22 08:12:43.000000000 +0200
+++ /var/tmp/diff_new_pack.TYOYOb/_new 2012-05-22 08:12:43.000000000 +0200
@@ -16,7 +16,7 @@
#
Name: dd_rescue
-Version: 1.25
+Version: 1.27
Release: 0
Summary: Data Copying in the Presence of I/O Errors
License: GPL-2.0 or GPL-3.0
++++++ dd_rescue-1.25.tar.gz -> dd_rescue-1.27.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dd_rescue/Makefile new/dd_rescue/Makefile
--- old/dd_rescue/Makefile 2012-01-22 14:48:54.000000000 +0100
+++ new/dd_rescue/Makefile 2012-04-27 23:16:25.000000000 +0200
@@ -1,8 +1,8 @@
# Makefile for dd_rescue
# (c) garloff@suse.de, 99/10/09, GNU GPL
-# $Id: Makefile,v 1.39 2012/01/22 13:40:34 garloff Exp $
+# $Id: Makefile,v 1.41 2012/04/27 21:08:49 garloff Exp $
-VERSION = 1.25
+VERSION = 1.27
DESTDIR =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dd_rescue/README.dd_rescue new/dd_rescue/README.dd_rescue
--- old/dd_rescue/README.dd_rescue 2010-09-09 01:37:46.000000000 +0200
+++ new/dd_rescue/README.dd_rescue 2012-05-17 21:39:34.000000000 +0200
@@ -50,7 +50,9 @@
result in superior performance, but in case of errors, you want to try
to salvage every single sector. So hardbs is best be set to the hardware
sector size (most often 512 bytes) and softbs to a large value, such as
- the default 64k.
+ the default 64k or even larger. (When doing buffered reads on Linux, you
+ might as well set the hardbs to 4k resp. page size, as the kernel will
+ read that much at a time anyway.)
Does it actually work?
@@ -72,7 +74,8 @@
reallocation procedure might result in the whole disk to be readable again
afterwards (yet the replaced sectors will be filled with 0). If you want
to use dd_rescue for this purpose, please use O_DIRECT and a block size of
-4096.
+4096. (Late 2.6 and 3.x kernels allow a block size of 512b as well, so you
+might be able to recover a few sectors more.)
dd_rhelp from LAB Valentin does automate some of this, so you might want to
give that a try.
@@ -157,4 +160,4 @@
Kurt Garloff , 2000-08-30
-$Id: README.dd_rescue,v 1.12 2010/09/08 14:04:04 garloff Exp $
+$Id: README.dd_rescue,v 1.13 2012/05/17 19:39:34 garloff Exp $
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dd_rescue/dd_rescue.c new/dd_rescue/dd_rescue.c
--- old/dd_rescue/dd_rescue.c 2012-02-04 14:12:53.000000000 +0100
+++ new/dd_rescue/dd_rescue.c 2012-05-17 21:32:02.000000000 +0200
@@ -31,11 +31,15 @@
/*
* TODO:
+ * - Change default block sizes as suggested bz Jan Kara ...
+ * - Provide options to copy ACLs/xattrs as well
* - Use termcap to fetch cursor up/down codes
* - Better handling of write errors: also try sub blocks
* - Optional colors
* - Use dlopen to open libfallocate rather than linking to it ...
* - Display more infos on errors by collecting info from syslog
+ * - Option to use frandom as virtual input device (Thomas)
+ * - Option to avoid overwriting identical output to be nice to SSD (Thomas)
*/
#ifndef VERSION
@@ -45,7 +49,7 @@
# define "(unknown compiler)"
#endif
-#define ID "$Id: dd_rescue.c,v 1.118 2012/02/04 13:12:53 garloff Exp $"
+#define ID "$Id: dd_rescue.c,v 1.129 2012/05/17 19:32:02 garloff Exp $"
#ifndef SOFTBLOCKSIZE
# define SOFTBLOCKSIZE 65536
@@ -164,7 +168,7 @@
(float) (t2->tv_usec - t1->tv_usec) * 1e-6;
}
-/* Write to file and simultaneously log to logfdile, if exsiting */
+/* Write to file and simultaneously log to logfdile, if existing */
int fplog(FILE* const file, const char * const fmt, ...)
{
int ret = 0;
@@ -254,7 +258,7 @@
/* Prepare graph */
static void preparegraph()
{
- if (!ilen)
+ if (!ilen || ipos > ilen)
return;
graph = strdup(":.........................................:");
if (reverse) {
@@ -270,7 +274,7 @@
void updgraph(int err)
{
int off;
- if (!ilen)
+ if (!ilen || ipos > ilen)
return;
off = gpos(ipos);
if (graph[off] == 'x')
@@ -329,6 +333,8 @@
estxfer = ipos;
if (maxxfer && estxfer > maxxfer)
estxfer = maxxfer;
+ if (estxfer < 0)
+ estxfer = 0;
if (!quiet)
fplog(stderr, "dd_rescue: (info) expect to copy %LikB from %s\n",
estxfer/1024, iname);
@@ -459,10 +465,8 @@
static void savebb(unsigned long block)
{
FILE *bbfile;
- fplog(stderr, "%s%s%s%sBad block reading %s: %lu %s%s%s%s\n",
- up, up, up, up,
- iname, block,
- down, down, down, down);
+ fplog(stderr, "Bad block reading %s: %lu \n",
+ iname, block);
if (bbname == NULL)
return;
bbfile = fopen(bbname, "a");
@@ -712,14 +716,7 @@
nrerr++;
fplog(stderr, "dd_rescue: (warning): read %s (%.1fk): %s!\n",
iname, (float)ipos/1024, strerror(eno));
- /* exit if too many errs */
- if (maxerr && nrerr >= maxerr) {
- fplog(stderr, "dd_rescue: (fatal): maxerr reached!\n");
- printreport();
- cleanup(); exit(32);
- }
- fprintf(stderr, "%s%s%s%s", down, down, down, down);
-
+
errno = 0;
if (nosparse ||
(rd > 0 && (!sparse || blockiszero(buf, rd) < rd))) {
@@ -747,6 +744,13 @@
} else {
ipos += toread; opos += toread;
}
+ /* exit if too many errs */
+ if (maxerr && nrerr >= maxerr) {
+ fplog(stderr, "dd_rescue: (fatal): maxerr reached!\n");
+ printreport();
+ cleanup(); exit(32);
+ }
+ fprintf(stderr, "%s%s%s%s", down, down, down, down);
} else {
int err = dowrite(rd);
if (err < 0)
@@ -1046,7 +1050,7 @@
int c;
off_t syncsz = -1;
#ifdef O_DIRECT
- void **mp = (void **) &buf;
+ void *mp;
#endif
/* defaults */
@@ -1127,8 +1131,8 @@
/* sanity checks */
#ifdef O_DIRECT
- if ((o_dir_in || o_dir_out) && hardbs < sysconf(_SC_PAGESIZE)) {
- hardbs = sysconf(_SC_PAGESIZE);
+ if ((o_dir_in || o_dir_out) && hardbs < 512) {
+ hardbs = 512;
fplog(stderr, "dd_rescue: (warning): O_DIRECT requires hardbs of at least %i!\n",
hardbs);
}
@@ -1163,10 +1167,11 @@
ipos = 0;
#ifdef O_DIRECT
- if (posix_memalign(mp, sysconf(_SC_PAGESIZE), softbs)) {
+ if (posix_memalign(&mp, sysconf(_SC_PAGESIZE), softbs)) {
fplog(stderr, "dd_rescue: (fatal): allocation of aligned buffer failed!\n");
cleanup(); exit(18);
}
+ buf = mp;
#else
buf = malloc(softbs);
if (!buf) {
@@ -1289,6 +1294,12 @@
if (opos == (off_t)-1)
opos = ipos;
+ if (ipos < 0 || opos < 0) {
+ fplog(stderr, "dd_rescue: (fatal): negative position requested (%.1fk)\n", (float)ipos/1024);
+ cleanup(); exit(25);
+ }
+
+
if (identical) {
fplog(stderr, "dd_rescue: (warning): infile and outfile are identical!\n");
if (opos > ipos && !reverse && !force) {
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org