[Cluster-devel] [GFS2 PATCH] GFS2: Log the reason for log flushes in every log header
Andrew Price
anprice at redhat.com
Mon Dec 11 15:32:30 UTC 2017
On 11/12/17 13:23, Bob Peterson wrote:
> Hi,
>
> ----- Original Message -----
> | > + LHF_SHUTDOWN = 0,
> | Should 0 be used for "unknown"?
>
> Good idea. I'll add that.
> (snip)
> | > + /* Constants reserved for user space / gfs2-utils */
> | > + LHF_GFS2_CONVERT = 26,
> | > + LHF_GFS2_EDIT = 27,
> | > + LHF_GFS2_FSCK = 28,
> | > + LHF_GFS2_FSCK_JREPLAY = 29,
> | > + LHF_GFS2_MKFS = 30,
> | > + LHF_GFS2_JADD = 31
> |
> | Would it be better to have values for the purposes that the utils would
> | need to touch the log header, e.g. LHF_UTIL_REPLAY, LHF_UTIL_FIX or
> | LHF_UTIL_CREATE. That way, if a util is renamed or a new util is written
> | (even some third party tool that we don't know about) they would still
> | have a sensible value to use.
> |
> | Cheers,
> | Andy
>
> Actually, yes, I was kind of hoping you would suggest some useful
> values for user space. I didn't go over how gfs2-utils works with log
> headers because I didn't want to delay posting a prototype further.
>
> I only allocated one 32-bit set of flags, with some space in the middle
> carved out for user space, but it seems a bit confining. Obviously this
> is still just a prototype, so we can add another 32-bit flag (one for
> kernel space and one for user space?) or improve it any other way that
> would be useful. I'm open to suggestions.
Well I like Steve's suggestion of switching to bit flags assuming it's
generally practical.
It might be useful to move the definitions of the values/flags into the
same patch as the new log header struct is defined.
Cheers,
Andy
More information about the Cluster-devel
mailing list