Message ID | 20200316144233.900390-12-hch@lst.de (mailing list archive) |
---|---|
State | Deferred, archived |
Headers | show |
Series | [01/14] xfs: merge xlog_cil_push into xlog_cil_push_work | expand |
On Mon, Mar 16, 2020 at 03:42:30PM +0100, Christoph Hellwig wrote: > Merge xlog_state_clean_iclog into its only caller, which makes the iclog > I/O completion handling a little easier to follow. > > Signed-off-by: Christoph Hellwig <hch@lst.de> Looks ok, Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> --D > --- > fs/xfs/xfs_log.c | 25 ++++++++----------------- > 1 file changed, 8 insertions(+), 17 deletions(-) > > diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c > index a38d495b6e81..899c324d07e2 100644 > --- a/fs/xfs/xfs_log.c > +++ b/fs/xfs/xfs_log.c > @@ -2625,22 +2625,6 @@ xlog_covered_state( > return XLOG_STATE_COVER_NEED; > } > > -STATIC void > -xlog_state_clean_iclog( > - struct xlog *log, > - struct xlog_in_core *dirty_iclog) > -{ > - int iclogs_changed = 0; > - > - dirty_iclog->ic_state = XLOG_STATE_DIRTY; > - > - xlog_state_activate_iclogs(log, &iclogs_changed); > - wake_up_all(&dirty_iclog->ic_force_wait); > - > - if (iclogs_changed) > - log->l_covered_state = xlog_covered_state(log, iclogs_changed); > -} > - > STATIC xfs_lsn_t > xlog_get_lowest_lsn( > struct xlog *log) > @@ -2744,6 +2728,7 @@ xlog_state_iodone_process_iclog( > struct xlog_in_core *iclog) > { > xfs_lsn_t header_lsn, lowest_lsn; > + int iclogs_changed = 0; > > /* > * Now that we have an iclog that is in the DONE_SYNC state, do one more > @@ -2758,7 +2743,13 @@ xlog_state_iodone_process_iclog( > > xlog_state_set_callback(log, iclog, header_lsn); > xlog_state_do_iclog_callbacks(log, iclog); > - xlog_state_clean_iclog(log, iclog); > + > + iclog->ic_state = XLOG_STATE_DIRTY; > + xlog_state_activate_iclogs(log, &iclogs_changed); > + > + wake_up_all(&iclog->ic_force_wait); > + if (iclogs_changed) > + log->l_covered_state = xlog_covered_state(log, iclogs_changed); > return true; > } > > -- > 2.24.1 >
On Mon, Mar 16, 2020 at 03:42:30PM +0100, Christoph Hellwig wrote: > Merge xlog_state_clean_iclog into its only caller, which makes the iclog > I/O completion handling a little easier to follow. > > Signed-off-by: Christoph Hellwig <hch@lst.de> > --- Reviewed-by: Brian Foster <bfoster@redhat.com> > fs/xfs/xfs_log.c | 25 ++++++++----------------- > 1 file changed, 8 insertions(+), 17 deletions(-) > > diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c > index a38d495b6e81..899c324d07e2 100644 > --- a/fs/xfs/xfs_log.c > +++ b/fs/xfs/xfs_log.c > @@ -2625,22 +2625,6 @@ xlog_covered_state( > return XLOG_STATE_COVER_NEED; > } > > -STATIC void > -xlog_state_clean_iclog( > - struct xlog *log, > - struct xlog_in_core *dirty_iclog) > -{ > - int iclogs_changed = 0; > - > - dirty_iclog->ic_state = XLOG_STATE_DIRTY; > - > - xlog_state_activate_iclogs(log, &iclogs_changed); > - wake_up_all(&dirty_iclog->ic_force_wait); > - > - if (iclogs_changed) > - log->l_covered_state = xlog_covered_state(log, iclogs_changed); > -} > - > STATIC xfs_lsn_t > xlog_get_lowest_lsn( > struct xlog *log) > @@ -2744,6 +2728,7 @@ xlog_state_iodone_process_iclog( > struct xlog_in_core *iclog) > { > xfs_lsn_t header_lsn, lowest_lsn; > + int iclogs_changed = 0; > > /* > * Now that we have an iclog that is in the DONE_SYNC state, do one more > @@ -2758,7 +2743,13 @@ xlog_state_iodone_process_iclog( > > xlog_state_set_callback(log, iclog, header_lsn); > xlog_state_do_iclog_callbacks(log, iclog); > - xlog_state_clean_iclog(log, iclog); > + > + iclog->ic_state = XLOG_STATE_DIRTY; > + xlog_state_activate_iclogs(log, &iclogs_changed); > + > + wake_up_all(&iclog->ic_force_wait); > + if (iclogs_changed) > + log->l_covered_state = xlog_covered_state(log, iclogs_changed); > return true; > } > > -- > 2.24.1 >
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index a38d495b6e81..899c324d07e2 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c @@ -2625,22 +2625,6 @@ xlog_covered_state( return XLOG_STATE_COVER_NEED; } -STATIC void -xlog_state_clean_iclog( - struct xlog *log, - struct xlog_in_core *dirty_iclog) -{ - int iclogs_changed = 0; - - dirty_iclog->ic_state = XLOG_STATE_DIRTY; - - xlog_state_activate_iclogs(log, &iclogs_changed); - wake_up_all(&dirty_iclog->ic_force_wait); - - if (iclogs_changed) - log->l_covered_state = xlog_covered_state(log, iclogs_changed); -} - STATIC xfs_lsn_t xlog_get_lowest_lsn( struct xlog *log) @@ -2744,6 +2728,7 @@ xlog_state_iodone_process_iclog( struct xlog_in_core *iclog) { xfs_lsn_t header_lsn, lowest_lsn; + int iclogs_changed = 0; /* * Now that we have an iclog that is in the DONE_SYNC state, do one more @@ -2758,7 +2743,13 @@ xlog_state_iodone_process_iclog( xlog_state_set_callback(log, iclog, header_lsn); xlog_state_do_iclog_callbacks(log, iclog); - xlog_state_clean_iclog(log, iclog); + + iclog->ic_state = XLOG_STATE_DIRTY; + xlog_state_activate_iclogs(log, &iclogs_changed); + + wake_up_all(&iclog->ic_force_wait); + if (iclogs_changed) + log->l_covered_state = xlog_covered_state(log, iclogs_changed); return true; }
Merge xlog_state_clean_iclog into its only caller, which makes the iclog I/O completion handling a little easier to follow. Signed-off-by: Christoph Hellwig <hch@lst.de> --- fs/xfs/xfs_log.c | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-)