Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Oct 2018 10:18:00 +0200
From:      Andriy Gapon <avg@FreeBSD.org>
To:        Rick Macklem <rmacklem@uoguelph.ca>, FreeBSD Filesystems <freebsd-fs@freebsd.org>
Subject:   Re: How to fill in the fsid for file systems?
Message-ID:  <d8acf192-8ad8-eed2-cf28-fb412d125c26@FreeBSD.org>
In-Reply-To: <YTOPR0101MB11620BAF0E206EE36E927A5ADDF30@YTOPR0101MB1162.CANPRD01.PROD.OUTLOOK.COM>
References:  <YTOPR0101MB11620BAF0E206EE36E927A5ADDF30@YTOPR0101MB1162.CANPRD01.PROD.OUTLOOK.COM>

next in thread | previous in thread | raw e-mail | index | archive | help
On 29/10/2018 17:56, Rick Macklem wrote:
> It seems "fsid=N" does need to set f_fsid.val[1]. I can think of two possibilities:
> 1 - Do what ZFS does and set the low order 8bits to vfc_typenum and the high
>       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 forget about
>      vfc_typenum.
> The only reason I can see for using vfc_typenum is to avoid collisions (same fsid value)
> with fsids for mounts of other file system types.

I have come up with an option #3 :-)
Fill f_fsid.val[1] with some constant magic value that signals that val[0] is
manually set.
Some possible magic values: 0x0, 0xffffffff.

-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d8acf192-8ad8-eed2-cf28-fb412d125c26>