On Mon, 31 Jul 2023, Chuck Lever wrote: > On Tue, Jul 18, 2023 at 09:37:58AM -0400, Chuck Lever wrote: > > On Tue, Jul 18, 2023 at 04:38:08PM +1000, NeilBrown wrote: > > > When a sequence of numbers are needed for internal-use only, an enum is > > > typically best. The sequence will inevitably need to be changed one > > > day, and having an enum means the developer doesn't need to think about > > > renumbering after insertion or deletion. The patch will be easier to > > > review. > > > > Last sentence needs to define the antecedant of "The patch". > > I've changed the last sentence in the description to "Such patches > will be easier ..." > > I've applied 1/5 through 5/5, with a few cosmetic changes, to the > SUNRPC threads topic branch. 6/6 needed more work: > > I've split this into one patch for each new enum. I don't see this in topic-sunrpc-thread-scheduling Commit 11a5027fd416 ("SUNRPC: change various server-side #defines to enum") contains 3 new enums, and the XPT_ and SVC_GARBAGE improvements you mention below cannot be found. Thanks, NeilBrown > > The XPT_ flags change needed TRACE_DEFINE_ENUM macros to make > show_svc_xprt_flags() work properly. Added. > > The new enum for SVC_GARBAGE and friends... those aren't bit flags. > So I've made that a named enum so that it can be used for type- > checking function return values properly. > > I dropped the hunk that changes XPRT_SOCK_CONNECTING and friends. > That should be submitted separately to Anna and Trond. > > All this will appear in the nfsd repo later today.