From owner-freebsd-fs@freebsd.org Wed Oct 31 02:23:32 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 28098107418E for ; Wed, 31 Oct 2018 02:23:32 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-TO1-obe.outbound.protection.outlook.com (mail-eopbgr670063.outbound.protection.outlook.com [40.107.67.63]) (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 BCEA4860BE; Wed, 31 Oct 2018 02:23:31 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YTOPR0101MB1162.CANPRD01.PROD.OUTLOOK.COM (52.132.50.155) by YTOPR0101MB1004.CANPRD01.PROD.OUTLOOK.COM (52.132.47.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1273.25; Wed, 31 Oct 2018 02:23:30 +0000 Received: from YTOPR0101MB1162.CANPRD01.PROD.OUTLOOK.COM ([fe80::9c71:6eb6:1bff:727b]) by YTOPR0101MB1162.CANPRD01.PROD.OUTLOOK.COM ([fe80::9c71:6eb6:1bff:727b%3]) with mapi id 15.20.1294.021; Wed, 31 Oct 2018 02:23:29 +0000 From: Rick Macklem To: Konstantin Belousov CC: FreeBSD Filesystems , Josh Paetzel , Andriy Gapon Subject: Re: How to fill in the fsid for file systems? Thread-Topic: How to fill in the fsid for file systems? Thread-Index: AQHUb557F1RNqdJl0kuwS+F5J/DjsKU2/twAgAGdwkI= Date: Wed, 31 Oct 2018 02:23:29 +0000 Message-ID: References: , <20181030012240.GM5335@kib.kiev.ua> In-Reply-To: <20181030012240.GM5335@kib.kiev.ua> 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; YTOPR0101MB1004; 6:uyE/UoXnm8xAHgdMUXqOdgmmFgj31cvP5zXEEEOszKUuSRO0ADRmwTnkOBxCqIrygmmtiePBlbe1gxvou/WupIqf0wsQcGdEdpHZz3m8kePeBs6SHXzE8goGMZz+I2UFsiMQ0nWCaLA8BmeV0Ays8HbJfmV6hdJK6hXWWcZZuH7TNs5L8q7o4HUFu6WmF264/ST9XR55xtI83IHIDeN5k7efTRMWNmPkOCdEOHb8fYSZeWZhoB7C7Nn+fpUAcn2Ri2zCpiyHXzb8/1nXhtK4dxyhWN+4xIFY3rPGWGiIz1ZnmDXUgFGLX4ptaNd5QjnFbDeRp+3wvM+TwE0qpEvX0a/ZeK6iZGiqG+kUihcYcCXV8IbnTjWo23bGp3pULoL1fXoEF72w5OagjPCGvRFdsJSdKX/Fxl4Xi5OTyf9+TqAZJYxyNkUEeUV+I9qIzm2RmT5xKEfcet+T+zF0klxn8g==; 5:tWd5rXZpVL1JgPGDw4AkRBhUgKh4raYTaaemHUezAlV5YBuq/y9/7UloOt5S53nwnIChjbkrZMM3jyv2eb+22cAu13y6u4oWjgJ3qPEyIG5QkR6KBOENo6Rzd2KG3u6wYLsWoegZyt5eNSJJvlROqeqjTDqQdrMA4fNIJDmwdoA=; 7:/+O7GgLKEzWergTfjpHLd4IYIuAXnlFzdw2WzIwMkMI4gnt0JqmrEy5LMTzB1M8qjL9CD83QY/6E8Y6RsdLblB+14Z2q/a0VIYGbujq/Bndcr6y3oixKSITPo2618WKLKe54Bu1X+Io/AHkBjlJ3WA== x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: ea4fd4d8-d3f8-490e-f472-08d63ed7d90b x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:YTOPR0101MB1004; x-ms-traffictypediagnostic: YTOPR0101MB1004: 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)(3002001)(10201501046)(93006095)(93001095)(3231382)(944501410)(52105095)(148016)(149066)(150057)(6041310)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281529075)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095); SRVR:YTOPR0101MB1004; BCL:0; PCL:0; RULEID:; SRVR:YTOPR0101MB1004; x-forefront-prvs: 084285FC5C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(346002)(396003)(136003)(376002)(39860400002)(199004)(189003)(305945005)(74316002)(81156014)(81166006)(8676002)(39060400002)(25786009)(486006)(2900100001)(11346002)(4326008)(476003)(106356001)(5660300001)(446003)(14444005)(256004)(229853002)(54906003)(316002)(86362001)(786003)(68736007)(6916009)(478600001)(33656002)(71200400001)(53936002)(76176011)(74482002)(9686003)(5250100002)(14454004)(2906002)(6246003)(6506007)(71190400001)(55016002)(99286004)(1411001)(46003)(8936002)(105586002)(7696005)(102836004)(6436002)(97736004)(186003); DIR:OUT; SFP:1101; SCL:1; SRVR:YTOPR0101MB1004; 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: 73Pgk4cLY9E+M5vXxfkQfMoxGFx6dyf9PpN80PiF/+cDWUW7lEuYx15wXcyIb+ZTsSK2KmJKJeQabIi8iSED1QTSOp4vyMsuK3FSep+jpI/uG8Rj1dT3tPzUV91K6J56qugZnVZRHyFtDoBJuHbODntNaMOLfps4N/oF2LyR4y/7QTt0vM5GSGP/Eg039Q81PshOcClstK0RshpdfNHWH+xHAKD6VJYUchWNwBBK21x6rcQTNI1BCRSSXrFUcOiYiluIswzc8K2xB4wLGMXdLCQroXLNnrDjOzZeQBHsyjEUovWdexeaZH5cecyBUoZMbUMwU74BoHDRqOMsmyQ/9jy5gfIvejnoBQT6VtKqV5I= 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: ea4fd4d8-d3f8-490e-f472-08d63ed7d90b X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Oct 2018 02:23:29.8740 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTOPR0101MB1004 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: Wed, 31 Oct 2018 02:23:32 -0000 Konstantin Belousov wrote: >On Mon, Oct 29, 2018 at 03:56:02PM +0000, Rick Macklem wrote: >> Hi, >> >> I have been working with Josh Paetzel on a patch to add support for >> the "fsid=3DN" option (like what Linux has) to /etc/exports. (It is used >> to ensure that the fsid for a file system doesn't change when migrated >> to a different machine, so that file handles don't change.) >Why do you consider this an option for exports file and not for nmount(2) >and fstab ? Do you intend to mangle fsid for mount protocol only ? Well, Josh Paetzel proposed this. I believe it was because "that's how Linu= x does it" (but I can't speak for Josh). The kernel code currently sets this via an nmount(2) option called "export.= fsid". Although Josh's patch has this done in mountd.c, it could simply be used as a mount option in /etc/fstab or manual mounting. (The code currently proces= ses this option in vfs_domount_update(), so it would need to be moved to where options are processed during mounting, but that wouldn't be hard.) This would actually avoid patching mountd.c. It would also avoid the fact t= hat the "export fsid option" applies to all clients and is not per-host or per-= net. (Doing it only for "exports" requires a moderate amount of code change, suc= h as a new function to be used instead of vfs_busyfs() to busy the file syste= m after looking up the fsid in the export stuff. I haven't coded this, so I'm= not sure how much work that would be?) I actually think making it a generic nmount(2) option and not an export spe= cific one sounds like a good idea. What do others think of making "fsid=3DN" a generic mount option for overriding the selection of fsid done by the file system? rick ps: Although I don't try to be "Linux incompatible", I don't see why we sho= uld be compatible when doing it a slightly different way seems more logic= al.