From owner-freebsd-fs@freebsd.org Mon Oct 29 15:56:08 2018 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE15710DE2FD for ; Mon, 29 Oct 2018 15:56:07 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-TO1-obe.outbound.protection.outlook.com (mail-eopbgr670050.outbound.protection.outlook.com [40.107.67.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "GlobalSign Organization Validation CA - SHA256 - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7B778765BE for ; Mon, 29 Oct 2018 15:56:07 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YTOPR0101MB1162.CANPRD01.PROD.OUTLOOK.COM (52.132.50.155) by YTOPR0101MB1145.CANPRD01.PROD.OUTLOOK.COM (52.132.50.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1273.21; Mon, 29 Oct 2018 15:56:02 +0000 Received: from YTOPR0101MB1162.CANPRD01.PROD.OUTLOOK.COM ([fe80::a086:adbc:2b38:1018]) by YTOPR0101MB1162.CANPRD01.PROD.OUTLOOK.COM ([fe80::a086:adbc:2b38:1018%2]) with mapi id 15.20.1273.027; Mon, 29 Oct 2018 15:56:02 +0000 From: Rick Macklem To: FreeBSD Filesystems Subject: How to fill in the fsid for file systems? Thread-Topic: How to fill in the fsid for file systems? Thread-Index: AQHUb557F1RNqdJl0kuwS+F5J/DjsA== Date: Mon, 29 Oct 2018 15:56:02 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=rmacklem@uoguelph.ca; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; YTOPR0101MB1145; 6:q3QBZ/oeSR+lC3J3OF5m8mtUD6UR/egl61Fz1AAXjlHAi1mEox81Xgn3FYSFmtxeAQvGpQ/Z0dDGhvZRSglof9uKeDv76f2KaF+urVTS/Bxyc2OWZfeM4VpwLnYd06Dp5gP2BHfv+GeNGeogzo3qvyUHSu7ObIfPZ8LAO/ocaKLcyc42tWAUVVQgH4HPUpuNAeJHJ0JRV6vh7zNHkEXgWLhfEAXa5Y2S/VBo5tItlgWb/702jrpDaw9pHaU05H7GeBvkSX24/DPxzsodb3UP9nN+rAwWFceX37BQ1BBH11dlwDFDGfeVd4DgBFFS3vtOBrE0+b9fVS1YCmkonLb/OFWzKf87c9G9xLVQytlmDXaEs09jqSBQX6oXrA3cjj6dV6YCYfjtJ5e88QozMIXMnrb77dJ/T9vCjXm23anX8HPkm5PVw1egQ1NrW7E0L+vgllunBPHbYS3sy5BxVPzueQ==; 5:C3NyiX8qxt3khF1mIC8jPVmE2wWvhzntzFZ794czp8DNJarsZfqS8eraz+5eJfpxutYkxohl9rpvr9rom9x6z7ZLv5TpVe2xE1nz2scRZyI3agxm//4AmJK9q2I/NYbFgvKa6Zjbo4nSm5ma8W6QCyR5JS28MulRSOkIAxO0BfQ=; 7:MItGkTrjmrb3gBkl2R3UFrho3QPCERe710FCW6Pb4yJ8KMmSA13jEELFa3/qkPFFHQSaDFaivJLbGAP+RB0KleowUGvAs/4vcZhHksxveSSbiYBzJ1/sG5+eOvRClgXeN6MHCbLtiQhfKM2qDKEfPA== x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 33f7ef66-eb3e-4ef0-eecd-08d63db706ec x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:YTOPR0101MB1145; x-ms-traffictypediagnostic: YTOPR0101MB1145: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93001095)(3231382)(944501410)(52105095)(148016)(149066)(150057)(6041310)(201703131423095)(201702281529075)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(201708071742011)(7699051)(76991095); SRVR:YTOPR0101MB1145; BCL:0; PCL:0; RULEID:; SRVR:YTOPR0101MB1145; x-forefront-prvs: 084080FC15 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(136003)(376002)(366004)(39860400002)(396003)(199004)(189003)(6916009)(71200400001)(71190400001)(105586002)(6506007)(5660300001)(186003)(74316002)(486006)(86362001)(97736004)(786003)(2906002)(14454004)(316002)(305945005)(14444005)(106356001)(25786009)(81166006)(81156014)(476003)(53936002)(102836004)(256004)(5250100002)(2900100001)(6436002)(7696005)(74482002)(55016002)(8676002)(9686003)(68736007)(33656002)(8936002)(478600001)(46003)(99286004); DIR:OUT; SFP:1101; SCL:1; SRVR:YTOPR0101MB1145; H:YTOPR0101MB1162.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: uoguelph.ca does not designate permitted sender hosts) x-microsoft-antispam-message-info: NciE+ta5uilk++/COCUClpwd+hNlc+o65vjjTvZp8CDrJYqw3FPm0PPL/Nn+J5b37WLEHWJ8m4HxRlAfqUCxburfSB10wYhsLWEYLLyZ5AwxCQg76JMv2bO6qHa8vz8QeUOu9TDXwO3+fzWCdXvXvtL1obv4gwtfMRV0RFI/XLFT3DsUdU1KLPSCsTwdYbXraoYMg8xMnfPnIvvz1EnAb2KSeFKMknALRa05ZCyfebR4AwmfuNx6x8ZHTnueHD43wuoj3zwdyz/g4Lht1U3HZ8ow1yUaQ9PwRiAZoAlAzHiab6CoPrUkbZBqyKaqUB653ei9rh2fFheDkh1252QIDKlTXEUD0XJdJlcoHKLmbes= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-Network-Message-Id: 33f7ef66-eb3e-4ef0-eecd-08d63db706ec X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Oct 2018 15:56:02.3379 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTOPR0101MB1145 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2018 15:56:08 -0000 Hi, I have been working with Josh Paetzel on a patch to add support for the "fs= id=3DN" option (like what Linux has) to /etc/exports. (It is used to ensure that th= e fsid for a file system doesn't change when migrated to a different machine, so t= hat file handles don't change.) We have code that seems to work, but it is not obvious what should be fille= d in to f_fsid.val[1]? - cd9660 and msdosfs just set it to vfc_typenum - ZFS sets the low order 8bits to vfc_typenum and the high order 24 bits to= the high order bits of its "56bit objset unique ID" - UFS uses a value fs_id[1] in the superblock that appears to be filled in = with a random value at fs creation time by newnfs(8). It seems "fsid=3DN" does need to set f_fsid.val[1]. I can think of two poss= ibilities: 1 - Do what ZFS does and set the low order 8bits to vfc_typenum and the hig= h order 24bits from bits 32->55 of "N". or 2 - Just fill the 32bits in with the high order (32->63) bits of "N" and fo= rget about vfc_typenum. The only reason I can see for using vfc_typenum is to avoid collisions (sam= e fsid value) with fsids for mounts of other file system types. What do others think? rick