From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 20:59:14 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27DD7106566B; Fri, 23 Dec 2011 20:59:14 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 169B78FC08; Fri, 23 Dec 2011 20:59:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBNKxDuq082948; Fri, 23 Dec 2011 20:59:13 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBNKxDpb082946; Fri, 23 Dec 2011 20:59:13 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201112232059.pBNKxDpb082946@svn.freebsd.org> From: Alexander Motin Date: Fri, 23 Dec 2011 20:59:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228851 - head/sys/cam/scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 20:59:14 -0000 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;