Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Oct 2018 14:51:27 +0000
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        "gljennjohn@gmail.com" <gljennjohn@gmail.com>
Cc:        "freebsd-current@FreeBSD.org" <freebsd-current@FreeBSD.org>, Josh Paetzel <josh@tcbug.org>
Subject:   Re: which way to update export_args structure?
Message-ID:  <YTOPR0101MB1820E3D8B3587FF3218E771CDDE90@YTOPR0101MB1820.CANPRD01.PROD.OUTLOOK.COM>
In-Reply-To: <20181003090751.68d23005@ernst.home>
References:  <YTOPR0101MB182021549F8CF8277477A4C5DDE90@YTOPR0101MB1820.CANPRD01.PROD.OUTLOOK.COM>, <20181003090751.68d23005@ernst.home>

next in thread | previous in thread | raw e-mail | index | archive | help
Gary Jennejohn wrote:
[stuff snipped]
>In B, shouldn't ex_flags become uint32_t if all 32 bits can contain
>flag bits?
You could. For B) my intent was to leave the structure exactly the same as =
the
old versions and only add new fields at the end.  The current compatibility=
 code in head does bcopy() of the structure, which means a change to uint32=
_t would require that to be re-written. (For A) it gets re-written anyhow.)

> And why make ex_flagshighbits a uint64_t?  You could
>make it uint32_t and simply shift the high bits around.
Again, you could. I didn't do that, since the code then does require bit sh=
ifts
every time you test a flag and I thought that would look messy.
I also get worried that compilers will do weird things like truncate the co=
nstant
to 32bits before the shift and drop the flag. (I do test cases for these in=
 a little
program, but can only test i386.)
(The flags are constants defined in mount.h as MNT_xx for 64bits.)

Since I figured out a way that I think allows A) to be MFC'd, I'm leaning t=
owards
A) anyhow.


rick




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YTOPR0101MB1820E3D8B3587FF3218E771CDDE90>