Date: Mon, 25 Feb 2013 08:14:08 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247254 - in stable: 8/sbin/recoverdisk 9/sbin/recoverdisk Message-ID: <201302250814.r1P8E87j088801@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302250814.r1P8E87j088801>