From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Price Date: Mon, 11 Dec 2017 15:32:30 +0000 Subject: [Cluster-devel] [GFS2 PATCH] GFS2: Log the reason for log flushes in every log header In-Reply-To: <671649677.40445923.1512998597014.JavaMail.zimbra@redhat.com> References: <94557090.39942461.1512747048003.JavaMail.zimbra@redhat.com> <5adc2737-1f11-27b1-eb46-733fdd9ab9df@redhat.com> <671649677.40445923.1512998597014.JavaMail.zimbra@redhat.com> Message-ID: List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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