svn commit: r247254 - in stable: 8/sbin/recoverdisk 9/sbin/recoverdisk
Xin LI
delphij at FreeBSD.org
Mon Feb 25 08:14:08 UTC 2013
Author: delphij
Date: Mon Feb 25 08:14:07 2013
New Revision: 247254
URL: http://svnweb.freebsd.org/changeset/base/247254
Log:
MFC r246329:
Use stripesize as smallest block size if it's available.
Modified:
stable/9/sbin/recoverdisk/recoverdisk.c
Directory Properties:
stable/9/sbin/recoverdisk/ (props changed)
Changes in other areas also in this revision:
Modified:
stable/8/sbin/recoverdisk/recoverdisk.c
Directory Properties:
stable/8/sbin/recoverdisk/ (props changed)
Modified: stable/9/sbin/recoverdisk/recoverdisk.c
==============================================================================
--- stable/9/sbin/recoverdisk/recoverdisk.c Mon Feb 25 08:08:13 2013 (r247253)
+++ stable/9/sbin/recoverdisk/recoverdisk.c Mon Feb 25 08:14:07 2013 (r247254)
@@ -156,6 +156,7 @@ main(int argc, char * const argv[])
int error, state;
u_char *buf;
u_int sectorsize;
+ u_int stripesize;
time_t t1, t2;
struct stat sb;
u_int n, snapshot = 60;
@@ -201,6 +202,10 @@ main(int argc, char * const argv[])
if (error < 0)
err(1, "DIOCGSECTORSIZE failed");
+ error = ioctl(fdr, DIOCGSTRIPESIZE, &stripesize);
+ if (error == 0 && stripesize > sectorsize)
+ sectorsize = stripesize;
+
minsize = sectorsize;
bigsize = (bigsize / sectorsize) * sectorsize;
More information about the svn-src-stable-9
mailing list