]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: log tickets don't need log client id
authorDave Chinner <dchinner@redhat.com>
Thu, 21 Apr 2022 00:34:33 +0000 (10:34 +1000)
committerDave Chinner <david@fromorbit.com>
Thu, 21 Apr 2022 00:34:33 +0000 (10:34 +1000)
commit1a83b5fba9ac5b1f8e7caf9acea8c7439393f83a
treef849e0cae5f9e72330b61b8f1a190c5f226bc4da
parente9e4aac454715e6c01daaa951fde3aa434b3a209
xfs: log tickets don't need log client id

We currently set the log ticket client ID when we reserve a
transaction. This client ID is only ever written to the log by
a CIL checkpoint or unmount records, and so anything using a high
level transaction allocated through xfs_trans_alloc() does not need
a log ticket client ID to be set.

For the CIL checkpoint, the client ID written to the journal is
always XFS_TRANSACTION, and for the unmount record it is always
XFS_LOG, and nothing else writes to the log. All of these operations
tell xlog_write() exactly what they need to write to the log (the
optype) and build their own opheaders for start, commit and unmount
records. Hence we no longer need to set the client id in either the
log ticket or the xfs_trans.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Chandan Babu R <chandan.babu@oracle.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/libxfs/xfs_log_format.h
fs/xfs/xfs_log.c
fs/xfs/xfs_log.h
fs/xfs/xfs_log_cil.c
fs/xfs/xfs_log_priv.h
fs/xfs/xfs_trans.c