From owner-freebsd-fs@freebsd.org Sat Mar 5 21:24:56 2016 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86470A920E8 for ; Sat, 5 Mar 2016 21:24:56 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: from mail-wm0-x22e.google.com (mail-wm0-x22e.google.com [IPv6:2a00:1450:400c:c09::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 338BA2FF for ; Sat, 5 Mar 2016 21:24:56 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: by mail-wm0-x22e.google.com with SMTP id n186so35773380wmn.1 for ; Sat, 05 Mar 2016 13:24:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=qlJDNlfs9rVdWJIWxqIuEqamECdZPBTYqc5V/IVod9Y=; b=1yUNsAjyvf1fIzoaHGsZjlhkM/AaaPfF2a2B621vYemTmbpLkpLYZu7GyufI8jjPfv KA4XnW5hdrSTMhV1a3ZCMFfN98ZRuXBJvKWMD3R1FnzXxjxmQBqMiHA2hv61p3BsF0YM n20jVTLlhKIpKvy58f4jg8AB/omiQVBAj2FUxpt4z7uJUYMw/zxcypCxAj7F9abNrcrj Za84JZugb/Qi7kQLH4ZxJIfDx0itp7yvAD3Yjz16aj+Cog51NefkMFUfKoGUE1qX0FkW 4/gGhmwiVnxOrB+axiYGcadrCkp8R0TOG6buecgOMhAGZ9486kXq4+XHOa2cefVz8uKV 4CpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=qlJDNlfs9rVdWJIWxqIuEqamECdZPBTYqc5V/IVod9Y=; b=TTt7bAy99FkbAMTUPnwZZyORuOKz7ugez1El9W5UUpT9dTAKheY7Jygt24MuZlliXH kqxq5ItmV+SrPPoNkTupw6fqE8vcJYi+gh7DXU1yUx7OZZGWw+qNydjrANUzSVyW2ExF 9dS0kvWfNMtQHyV3IgM7l0sGddf0wjrfHZE/G4HSOws6qbnutxgIUXXb6o2qsylaHRmY wc+quCEhSeTLBPDLKiiTUXvKU233QdfXy1olftbXPMZCXW2ErMuvIHnX816gsQBPaUAU 3PWx+YQIVEYj61tZhAxjFdiJ9KCAJw3eBy3IA60HvQlByRkrleYUjLVd1ri30hf/XRm3 FX3w== X-Gm-Message-State: AD7BkJL+OMIt5Yt1CJoIhhBoqobSuJQlqjpjlJk7+umasQHO+ssbjNaFWqHJNMarcL8RdNDz X-Received: by 10.194.123.102 with SMTP id lz6mr16884574wjb.2.1457213094536; Sat, 05 Mar 2016 13:24:54 -0800 (PST) Received: from [10.10.1.58] (liv3d.labs.multiplay.co.uk. [82.69.141.171]) by smtp.gmail.com with ESMTPSA id gt7sm9837044wjc.1.2016.03.05.13.24.53 for (version=TLSv1/SSLv3 cipher=OTHER); Sat, 05 Mar 2016 13:24:53 -0800 (PST) Subject: Re: zfs and st_nlink limit at 32767 To: freebsd-fs@freebsd.org References: <56DB377F.9020205@fsn.hu> From: Steven Hartland Message-ID: <56DB4EA7.7050002@multiplay.co.uk> Date: Sat, 5 Mar 2016 21:24:55 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <56DB377F.9020205@fsn.hu> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Mar 2016 21:24:56 -0000 Correct stat st_nlink is a nlink_t which is defined as uint16_t, its not clear why its clamping at what looks like int16_t max. It looks like the kernel version in nstat is a uint32_t so internally it should be correct. You may have some joy changing it to uint32_t but is likely everything will rebuilding and even then there may be some edge cases which break one that sticks out is linux compat support which doesn't use nlink_t. Regards Steve On 05/03/2016 19:46, Nagy, Attila wrote: > Hi, > > If I create a million hard links to a file, stat -s says it has 32767: > $ stat -s 900402.24.t > st_dev=1709683738 st_ino=719745 st_mode=0100644 st_nlink=32767 > st_uid=1001 st_gid=0 st_rdev=4294967295 st_size=81688 > st_atime=1455881393 st_mtime=1455881393 st_ctime=1457206643 > st_birthtime=1457206536 st_blksize=81920 st_blocks=67 st_flags=2048 > > Is this a limitation somewhere which is hard to remove, or just an > easily fixable "legacy" from the times, when all filesystems contained > this limit? > _______________________________________________ > freebsd-fs@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org"