On Wed, May 03, 2017 at 12:15:10PM -0400, Brian Foster wrote: > On Wed, May 03, 2017 at 08:53:35AM -0700, Darrick J. Wong wrote: > > On Wed, May 03, 2017 at 10:10:32AM -0400, Brian Foster wrote: > > > the caller. Hmm, thinking more about it, I suppose we could just add > > > another similar helper since we'd presumably want to process the list of > > > items again if the reservation is overrun. Thoughts? > > > > Process them again how? I think I'm missing something here; are you > > saying that we could (try to) get more reservation if allocating the > > shadow buffer shows that we've run over? > > > > No, poor choice of words.. s/process/iterate/. > > I just mean that we may want another helper since we'd have to iterate > the list of tp items potentially twice: first to calculate the total > size, again to dump whatever info we want if the total overruns the > reservation. xlog_cil_insert_format_items() already calculates the total size when doing the formatting of the log items into log vectors (i.e. the returned len value) - we use it later in xlog_cil_insert_items() to do the ticket reservation accounting. So there's no additional overhead for detecting an overrun earlier than we already do, and we don't care about the overhead of dumping the transaction info if an overrun is detected... Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html