linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* xfs: clean up log tickets and record writes v3
@ 2020-03-24 17:44 Christoph Hellwig
  2020-03-24 17:44 ` [PATCH 1/8] xfs: don't try to write a start record into every iclog Christoph Hellwig
                   ` (7 more replies)
  0 siblings, 8 replies; 26+ messages in thread
From: Christoph Hellwig @ 2020-03-24 17:44 UTC (permalink / raw)
  To: linux-xfs; +Cc: david

This series follows up on conversions about relogging infrastructure
and the way xfs_log_done() does two things but only one of several
callers uses both of those functions. It also pointed out that
xfs_trans_commit() never writes to the log anymore, so only
checkpoints pass a ticket to xlog_write() with this flag set and
no transaction makes multiple calls to xlog_write() calls on the
same ticket. Hence there's no real need for XLOG_TIC_INITED to track
whether a ticket has written a start record to the log anymore.

A lot of further cleanups fell out of this. Once we no longer use
XLOG_TIC_INITED to carry state inside the write loop, the logic
can be simplified in both xlog_write and xfs_log_done. xfs_log_done
can be split up, and then the call chain can be flattened because
xlog_write_done() and xlog_commit_record() are basically the same.

This then leads to cleanups writing both commit and unmount records.

Finally, to complete what started all this, the XLOG_TIC_INITED flag
is removed.

A git tree is avaiblable here:

    git://git.infradead.org/users/hch/xfs.git xlog-ticket-cleanup.3

Gitweb:

    http://git.infradead.org/users/hch/xfs.git/shortlog/refs/heads/xlog-ticket-cleanup.3

Changes since v2:
 - fix a commit message typo
 - move the XLOG_TIC_INITED earlier, and move another hunk to this patch
 - keep checking for XLOG_FORCED_SHUTDOWN and skip regrants
 - merge the two patches for refactoring and renaming the log unmount
   record handling

Changes since v1:
 - taking this over from Dave (for now) as he is still injured, an it
   interacts closely with my log error handling bits
 - rebased on top of for-next + the "more log cleanups" series
 - fix an accounting error in xlog_write
 - use a bool for the ticket header in xlog_write
 - add a new patch to split xlog_ticket_done

^ permalink raw reply	[flat|nested] 26+ messages in thread
* xfs: clean up log tickets and record writes v4
@ 2020-03-25 18:42 Christoph Hellwig
  2020-03-25 18:42 ` [PATCH 1/8] xfs: don't try to write a start record into every iclog Christoph Hellwig
  0 siblings, 1 reply; 26+ messages in thread
From: Christoph Hellwig @ 2020-03-25 18:42 UTC (permalink / raw)
  To: linux-xfs; +Cc: david

This series follows up on conversions about relogging infrastructure
and the way xfs_log_done() does two things but only one of several
callers uses both of those functions. It also pointed out that
xfs_trans_commit() never writes to the log anymore, so only
checkpoints pass a ticket to xlog_write() with this flag set and
no transaction makes multiple calls to xlog_write() calls on the
same ticket. Hence there's no real need for XLOG_TIC_INITED to track
whether a ticket has written a start record to the log anymore.

A lot of further cleanups fell out of this. Once we no longer use
XLOG_TIC_INITED to carry state inside the write loop, the logic
can be simplified in both xlog_write and xfs_log_done. xfs_log_done
can be split up, and then the call chain can be flattened because
xlog_write_done() and xlog_commit_record() are basically the same.

This then leads to cleanups writing both commit and unmount records.

Finally, to complete what started all this, the XLOG_TIC_INITED flag
is removed.

A git tree is avaiblable here:

    git://git.infradead.org/users/hch/xfs.git xlog-ticket-cleanup.4

Gitweb:

    http://git.infradead.org/users/hch/xfs.git/shortlog/refs/heads/xlog-ticket-cleanup.4

Changes since v3:
 - pass an explicit need_start_rec to xlog_write()
 - rename xlog_ticket_done to xfs_log_ticket_ungrant and
   xlog_ticket_regrant to xfs_log_ticket_regrant
 - rename xlog_write_done to xlog_commit_record

Changes since v2:
 - fix a commit message typo
 - move the XLOG_TIC_INITED earlier, and move another hunk to this patch
 - keep checking for XLOG_FORCED_SHUTDOWN and skip regrants
 - merge the two patches for refactoring and renaming the log unmount
   record handling

Changes since v1:
 - taking this over from Dave (for now) as he is still injured, an it
   interacts closely with my log error handling bits
 - rebased on top of for-next + the "more log cleanups" series
 - fix an accounting error in xlog_write
 - use a bool for the ticket header in xlog_write
 - add a new patch to split xlog_ticket_done

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2020-03-26 15:42 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-24 17:44 xfs: clean up log tickets and record writes v3 Christoph Hellwig
2020-03-24 17:44 ` [PATCH 1/8] xfs: don't try to write a start record into every iclog Christoph Hellwig
2020-03-24 20:39   ` Darrick J. Wong
2020-03-25 12:33   ` Brian Foster
2020-03-25 23:25     ` Dave Chinner
2020-03-26 11:08       ` Brian Foster
2020-03-26 15:41         ` Darrick J. Wong
2020-03-24 17:44 ` [PATCH 2/8] xfs: re-order initial space accounting checks in xlog_write Christoph Hellwig
2020-03-24 20:39   ` Darrick J. Wong
2020-03-24 17:44 ` [PATCH 3/8] xfs: refactor and split xfs_log_done() Christoph Hellwig
2020-03-24 20:39   ` Darrick J. Wong
2020-03-25 12:33   ` Brian Foster
2020-03-24 17:44 ` [PATCH 4/8] xfs: kill XLOG_TIC_INITED Christoph Hellwig
2020-03-24 20:40   ` Darrick J. Wong
2020-03-24 17:44 ` [PATCH 5/8] xfs: split xlog_ticket_done Christoph Hellwig
2020-03-24 20:41   ` Darrick J. Wong
2020-03-25 12:34   ` Brian Foster
2020-03-24 17:44 ` [PATCH 6/8] xfs: merge xlog_commit_record with xlog_write_done() Christoph Hellwig
2020-03-24 20:41   ` Darrick J. Wong
2020-03-24 17:44 ` [PATCH 7/8] xfs: refactor unmount record writing Christoph Hellwig
2020-03-24 20:41   ` Darrick J. Wong
2020-03-24 17:44 ` [PATCH 8/8] xfs: remove some stale comments from the log code Christoph Hellwig
2020-03-24 20:42   ` Darrick J. Wong
2020-03-25 18:42 xfs: clean up log tickets and record writes v4 Christoph Hellwig
2020-03-25 18:42 ` [PATCH 1/8] xfs: don't try to write a start record into every iclog Christoph Hellwig
2020-03-26  4:49   ` Darrick J. Wong
2020-03-26 11:09   ` Brian Foster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).