From owner-svn-src-all@FreeBSD.ORG Fri Jan 17 16:29:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 28483533; Fri, 17 Jan 2014 16:29:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ED97E1316; Fri, 17 Jan 2014 16:29:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0HGTveZ065525; Fri, 17 Jan 2014 16:29:57 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0HGTv0r065524; Fri, 17 Jan 2014 16:29:57 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201401171629.s0HGTv0r065524@svn.freebsd.org> From: Kirk McKusick Date: Fri, 17 Jan 2014 16:29:57 +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: r260829 - 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-all@freebsd.org X-Mailman-Version: 2.1.17 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, 17 Jan 2014 16:29:58 -0000 Author: mckusick Date: Fri Jan 17 16:29:57 2014 New Revision: 260829 URL: http://svnweb.freebsd.org/changeset/base/260829 Log: MFC of 260088: Fine tune filesystem block allocations under low free-space conditions (-r254995) based on further operational experience. Submitted by: Dmitry Sivachenko Fix Tested by: Dmitry Sivachenko Modified: stable/9/sys/ufs/ffs/ffs_alloc.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- stable/9/sys/ufs/ffs/ffs_alloc.c Fri Jan 17 16:22:10 2014 (r260828) +++ stable/9/sys/ufs/ffs/ffs_alloc.c Fri Jan 17 16:29:57 2014 (r260829) @@ -517,12 +517,12 @@ ffs_reallocblks_ufs1(ap) fs = ip->i_fs; ump = ip->i_ump; /* - * If we are not tracking block clusters or if we have less than 2% + * If we are not tracking block clusters or if we have less than 4% * free blocks left, then do not attempt to cluster. Running with * less than 5% free block reserve is not recommended and those that * choose to do so do not expect to have good file layout. */ - if (fs->fs_contigsumsize <= 0 || freespace(fs, 2) < 0) + if (fs->fs_contigsumsize <= 0 || freespace(fs, 4) < 0) return (ENOSPC); buflist = ap->a_buflist; len = buflist->bs_nchildren; @@ -743,12 +743,12 @@ ffs_reallocblks_ufs2(ap) fs = ip->i_fs; ump = ip->i_ump; /* - * If we are not tracking block clusters or if we have less than 2% + * If we are not tracking block clusters or if we have less than 4% * free blocks left, then do not attempt to cluster. Running with * less than 5% free block reserve is not recommended and those that * choose to do so do not expect to have good file layout. */ - if (fs->fs_contigsumsize <= 0 || freespace(fs, 2) < 0) + if (fs->fs_contigsumsize <= 0 || freespace(fs, 4) < 0) return (ENOSPC); buflist = ap->a_buflist; len = buflist->bs_nchildren;