From owner-freebsd-fs@FreeBSD.ORG Tue Apr 5 16:31:10 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D1A9106566C for ; Tue, 5 Apr 2011 16:31:10 +0000 (UTC) (envelope-from gljennjohn@googlemail.com) Received: from mail-ww0-f42.google.com (mail-ww0-f42.google.com [74.125.82.42]) by mx1.freebsd.org (Postfix) with ESMTP id 0C8C18FC1B for ; Tue, 5 Apr 2011 16:31:08 +0000 (UTC) Received: by wwk4 with SMTP id 4so2946931wwk.1 for ; Tue, 05 Apr 2011 09:31:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:date:from:to:cc:subject:message-id:in-reply-to :references:reply-to:x-mailer:mime-version:content-type :content-transfer-encoding; bh=Q+4FxFFb7rXzILS+LVevj7XGUDnDdAs0Gpj00Q9r6yg=; b=uxAVAC/An3qO7OwrF6CL6B2OOiUR0Wpl3sJ4wqmDhaZtwcbCjxuCU6d3W7/m2Sivhh kC5VYxhf+LMH3bQEvn0QP9Ur3/+lzvVuswIn04DMXZChde3zEF6WVugHw4gzO8ksbjZZ CdKstdK1e8NhrDAnhfbfkfYjF2iyiNh3eGjgk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :x-mailer:mime-version:content-type:content-transfer-encoding; b=Rovom1K9b04ETPoPScnqzH467kJ7VwokbpplcKNrYF0LPoE85tmjvJyXVeVRU/H0VL Q3/fRnrOkU9i8uldb1nHpGy28FlWDeGDpzX1AjXOWEO+eK0HqeSLF6lydR1DZ4Y6HDeo pzQBO5zD7ppg/2NuWB+y9pGHlbTN8soIDjv3A= Received: by 10.227.39.88 with SMTP id f24mr1085507wbe.88.1302021068034; Tue, 05 Apr 2011 09:31:08 -0700 (PDT) Received: from ernst.jennejohn.org (p578E33EC.dip.t-dialin.net [87.142.51.236]) by mx.google.com with ESMTPS id g7sm3670325wby.65.2011.04.05.09.31.06 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 05 Apr 2011 09:31:07 -0700 (PDT) Date: Tue, 5 Apr 2011 18:31:04 +0200 From: Gary Jennejohn To: Kostik Belousov Message-ID: <20110405183104.2304d94e@ernst.jennejohn.org> In-Reply-To: <20110405154002.GD78089@deviant.kiev.zoral.com.ua> References: <20110405141631.GA78089@deviant.kiev.zoral.com.ua> <20110405172746.4a02fe42@ernst.jennejohn.org> <20110405154002.GD78089@deviant.kiev.zoral.com.ua> X-Mailer: Claws Mail 3.7.8 (GTK+ 2.18.7; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-fs@freebsd.org Subject: Re: Knob to turn off _POSIX_NO_TRUNC X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gljennjohn@googlemail.com List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Apr 2011 16:31:10 -0000 On Tue, 5 Apr 2011 18:40:02 +0300 Kostik Belousov wrote: > On Tue, Apr 05, 2011 at 05:27:46PM +0200, Gary Jennejohn wrote: > > On Tue, 5 Apr 2011 17:16:31 +0300 > > Kostik Belousov wrote: > > > @@ -514,8 +519,14 @@ dirloop: > > > continue; > > > cnp->cn_namelen = cp - cnp->cn_nameptr; > > > if (cnp->cn_namelen > NAME_MAX) { > > > - error = ENAMETOOLONG; > > > - goto bad; > > > + if (!lookup_trim) { > > > > I would intuitively expect trimming to be enabled when the sysctl is set > > to 1, but this is exactly the opposite of that. I personally would > > initialize it to 1. > Trimming is indeed enabled when lookup_trim is set to 1. > If lookup_trim is 0, you get ENAMETOOLONG. OK, but trimming to me as a native english speaker means returning ENAMETOOLONG rather than allowing names longer than NAME_MAX. That is, after all, what trimming means - cutting off. -- Gary Jennejohn