From owner-svn-src-stable@FreeBSD.ORG Fri Jul 19 05:32:09 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 528E5386; Fri, 19 Jul 2013 05:32:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 44DCAFF0; Fri, 19 Jul 2013 05:32:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6J5W9Kt025464; Fri, 19 Jul 2013 05:32:09 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6J5W9Ft025463; Fri, 19 Jul 2013 05:32:09 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201307190532.r6J5W9Ft025463@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 19 Jul 2013 05:32:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r253465 - stable/9/sys/ufs/ffs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jul 2013 05:32:09 -0000 Author: kib Date: Fri Jul 19 05:32:08 2013 New Revision: 253465 URL: http://svnweb.freebsd.org/changeset/base/253465 Log: MFC r253280: Only copy as much bytes as there in superblock, instead of the full block copy, when copying the superblock into the snapshot. UFS1 does not align superblock on the block boundary, and bcopy runs off the end of the buffer. Approved by: re (hrs) Modified: stable/9/sys/ufs/ffs/ffs_snapshot.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ufs/ffs/ffs_snapshot.c ============================================================================== --- stable/9/sys/ufs/ffs/ffs_snapshot.c Fri Jul 19 05:28:47 2013 (r253464) +++ stable/9/sys/ufs/ffs/ffs_snapshot.c Fri Jul 19 05:32:08 2013 (r253465) @@ -790,7 +790,7 @@ out1: brelse(nbp); } else { loc = blkoff(fs, fs->fs_sblockloc); - bcopy((char *)copy_fs, &nbp->b_data[loc], fs->fs_bsize); + bcopy((char *)copy_fs, &nbp->b_data[loc], (u_int)fs->fs_sbsize); bawrite(nbp); } /*