From owner-freebsd-bugs@FreeBSD.ORG Wed Jun 18 21:29:18 2014 Return-Path: Delivered-To: freebsd-bugs@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 2E65CC67 for ; Wed, 18 Jun 2014 21:29:18 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 169B02232 for ; Wed, 18 Jun 2014 21:29:18 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s5ILTHkX044372 for ; Wed, 18 Jun 2014 22:29:17 +0100 (BST) (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 161481] [libc] mount(2) fails with ENAMETOOLONG with path shorter than 255 // 1023 characters Date: Wed, 18 Jun 2014 21:29:18 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: n_hibma@FreeBSD.org X-Bugzilla-Status: In Discussion X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jun 2014 21:29:18 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=161481 Nick Hibma changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |n_hibma@FreeBSD.org --- Comment #3 from Nick Hibma --- In our NanoBSD builds we use nullfs to provide a dir with packages to install. I changed the MAKEOBJDIR to include the full path to working directory to provide a means to separate multiple images and versions of images. nullfs couldn't handle the length of that path. I am -very- surprised that nullfs is not able to handle MAX_PATH length paths. Our workaround is the use the MD5 of the full path instead of the path itself: # XXX Take the MD5 of the path as mount_nullfs (for packages) does not handle long paths. See # FreeBSD PR kern/161481. p="$(echo "$PWD" | sed -Ee 's#^/((usr)?/home|Users)/##' | md5)" NANO_OBJ=${NANO_OBJ:-"/usr/obj/nanobsd/$p"} I do understand that this is actually a rather complex little bug, as it goes across a number of APIs. -- You are receiving this mail because: You are the assignee for the bug.