Date: Fri, 23 Dec 2011 20:59:13 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r228851 - head/sys/cam/scsi Message-ID: <201112232059.pBNKxDpb082946@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Fri Dec 23 20:59:13 2011 New Revision: 228851 URL: http://svn.freebsd.org/changeset/base/228851 Log: Report stripeoffset as zero not stripesize if physical block is zero aligned, same as it is done for ATA. Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Fri Dec 23 20:57:25 2011 (r228850) +++ head/sys/cam/scsi/scsi_da.c Fri Dec 23 20:59:13 2011 (r228851) @@ -2416,7 +2416,8 @@ dasetgeom(struct cam_periph *periph, uin dp->sectors = maxsector + 1; if (lbppbe > 0) { dp->stripesize = block_len << lbppbe; - dp->stripeoffset = dp->stripesize - block_len * lalba; + dp->stripeoffset = (dp->stripesize - block_len * lalba) % + dp->stripesize; } else if (softc->quirks & DA_Q_4K) { dp->stripesize = 4096; dp->stripeoffset = 0;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112232059.pBNKxDpb082946>