On Mon, Mar 08, 2021 at 05:48:00PM -0800, Darrick J. Wong wrote: > On Tue, Mar 09, 2021 at 12:19:56PM +1100, Dave Chinner wrote: > > On Mon, Mar 08, 2021 at 04:21:34PM -0800, Darrick J. Wong wrote: > > > On Fri, Mar 05, 2021 at 04:11:21PM +1100, Dave Chinner wrote: > > > > static xlog_op_header_t * > > > > xlog_write_setup_ophdr( > > > > - struct xlog *log, > > > > struct xlog_op_header *ophdr, > > > > - struct xlog_ticket *ticket, > > > > - uint flags) > > > > + struct xlog_ticket *ticket) > > > > { > > > > ophdr->oh_tid = cpu_to_be32(ticket->t_tid); > > > > - ophdr->oh_clientid = ticket->t_clientid; > > > > + ophdr->oh_clientid = XFS_TRANSACTION; > > > > ophdr->oh_res2 = 0; > > > > - > > > > - /* are we copying a commit or unmount record? */ > > > > - ophdr->oh_flags = flags; > > > > - > > > > - /* > > > > - * We've seen logs corrupted with bad transaction client ids. This > > > > - * makes sure that XFS doesn't generate them on. Turn this into an EIO > > > > - * and shut down the filesystem. > > > > - */ > > > > - switch (ophdr->oh_clientid) { > > > > - case XFS_TRANSACTION: > > > > - case XFS_VOLUME: > > > > > > Reading between the lines, I'm guessing this clientid is some > > > now-vestigial organ from the Irix days, where there was some kind of > > > volume manager (in addition to the filesystem + log)? And between the > > > three, there was a need to dispatch recovered log ops to the correct > > > subsystem? > > > > I guess that was the original thought. It was included in the > > initial commit of the log code to XFS in 1993 and never, ever used > > in any code anywhere. So it's never been written to an XFS log, > > ever. > > In that case, can you get rid of the #define too, please? Done. -- Dave Chinner david@xxxxxxxxxxxxx