From owner-freebsd-stable@FreeBSD.ORG Sat Mar 3 16:37:30 2012 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 15536106564A for ; Sat, 3 Mar 2012 16:37:30 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) by mx1.freebsd.org (Postfix) with ESMTP id 6CD498FC0C for ; Sat, 3 Mar 2012 16:37:28 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 41AEC1DD5B9; Sat, 3 Mar 2012 17:37:27 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id 1A42B28470; Sat, 3 Mar 2012 17:37:27 +0100 (CET) Date: Sat, 3 Mar 2012 17:37:27 +0100 From: Jilles Tjoelker To: Willem Jan Withagen Message-ID: <20120303163726.GA21464@stack.nl> References: <201202250747.q1P7ldaJ005410@zfs.digiware.nl> <4F4A3639.2080408@digiware.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F4A3639.2080408@digiware.nl> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "stable@freebsd.org" Subject: Re: A problem with MAXPATHLEN on a back X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Mar 2012 16:37:30 -0000 On Sun, Feb 26, 2012 at 02:40:09PM +0100, Willem Jan Withagen wrote: > I'm running into this on a backup-backupserver. > (8.2-STABLE #134: Wed Feb 1 15:05:59 CET 2012 amd64) > Haven't checked which paths are too long. > But is there any "easy" way out? Like making MAXPATHLEN 2048 and > rebuilding locate. > Or is that going to propagate and major impact all and everything. > Rebuilding locate database: > locate: integer out of +-MAXPATHLEN (1024): 1031 > locate: integer out of +-MAXPATHLEN (1024): 1031 It should be possible to replace (sed -i) MAXPATHLEN with something else in the locate source and recompile it. Changing the value of MAXPATHLEN itself is not safe because it defines the size of various buffers in the ABI (such as the one passed to realpath() if its resolved_path parameter is not NULL); in any case, it is a very intrusive change. Locate uses find(1) to generate its list of files, and find's output is not subject to MAXPATHLEN (unless the -L option or the -follow primary is used). Almost any use of the very long pathnames will require a manual split-up though (cd'ing to an initial part shorter than MAXPATHLEN, then repeating the process with relative pathnames until the remaining part is shorter than MAXPATHLEN). -- Jilles Tjoelker