Message ID | 20200306143137.236478-2-hch@lst.de (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
Series | [1/7] xfs: remove the unused return value from xfs_log_unmount_write | expand |
On Fri, Mar 06, 2020 at 07:31:31AM -0700, Christoph Hellwig wrote: > Remove the ignored return value from xfs_log_unmount_write, and also > remove a rather pointless assert on the return value from xfs_log_force. > > Signed-off-by: Christoph Hellwig <hch@lst.de> > --- I guess there's going to be obvious conflicts with Dave's series and some of these changes. I'm just going to ignore that and you guys can figure it out. :) Reviewed-by: Brian Foster <bfoster@redhat.com> > fs/xfs/xfs_log.c | 15 +++++---------- > 1 file changed, 5 insertions(+), 10 deletions(-) > > diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c > index 796ff37d5bb5..fa499ddedb94 100644 > --- a/fs/xfs/xfs_log.c > +++ b/fs/xfs/xfs_log.c > @@ -953,8 +953,7 @@ xfs_log_write_unmount_record( > * currently architecture converted and "Unmount" is a bit foo. > * As far as I know, there weren't any dependencies on the old behaviour. > */ > - > -static int > +static void > xfs_log_unmount_write(xfs_mount_t *mp) > { > struct xlog *log = mp->m_log; > @@ -962,7 +961,6 @@ xfs_log_unmount_write(xfs_mount_t *mp) > #ifdef DEBUG > xlog_in_core_t *first_iclog; > #endif > - int error; > > /* > * Don't write out unmount record on norecovery mounts or ro devices. > @@ -971,11 +969,10 @@ xfs_log_unmount_write(xfs_mount_t *mp) > if (mp->m_flags & XFS_MOUNT_NORECOVERY || > xfs_readonly_buftarg(log->l_targ)) { > ASSERT(mp->m_flags & XFS_MOUNT_RDONLY); > - return 0; > + return; > } > > - error = xfs_log_force(mp, XFS_LOG_SYNC); > - ASSERT(error || !(XLOG_FORCED_SHUTDOWN(log))); > + xfs_log_force(mp, XFS_LOG_SYNC); > > #ifdef DEBUG > first_iclog = iclog = log->l_iclog; > @@ -1007,7 +1004,7 @@ xfs_log_unmount_write(xfs_mount_t *mp) > iclog = log->l_iclog; > atomic_inc(&iclog->ic_refcnt); > xlog_state_want_sync(log, iclog); > - error = xlog_state_release_iclog(log, iclog); > + xlog_state_release_iclog(log, iclog); > switch (iclog->ic_state) { > case XLOG_STATE_ACTIVE: > case XLOG_STATE_DIRTY: > @@ -1019,9 +1016,7 @@ xfs_log_unmount_write(xfs_mount_t *mp) > break; > } > } > - > - return error; > -} /* xfs_log_unmount_write */ > +} > > /* > * Empty the log for unmount/freeze. > -- > 2.24.1 >
On Fri, Mar 06, 2020 at 11:09:17AM -0500, Brian Foster wrote: > On Fri, Mar 06, 2020 at 07:31:31AM -0700, Christoph Hellwig wrote: > > Remove the ignored return value from xfs_log_unmount_write, and also > > remove a rather pointless assert on the return value from xfs_log_force. > > > > Signed-off-by: Christoph Hellwig <hch@lst.de> > > --- > > I guess there's going to be obvious conflicts with Dave's series and > some of these changes. I'm just going to ignore that and you guys can > figure it out. :) I'm glad to rebase this on top of the parts of his series that I think make sense. Just wanted to send this out for now to show what I have in mind in this area.
On Mon, Mar 09, 2020 at 09:02:52AM +0100, Christoph Hellwig wrote: > On Fri, Mar 06, 2020 at 11:09:17AM -0500, Brian Foster wrote: > > On Fri, Mar 06, 2020 at 07:31:31AM -0700, Christoph Hellwig wrote: > > > Remove the ignored return value from xfs_log_unmount_write, and also > > > remove a rather pointless assert on the return value from xfs_log_force. > > > > > > Signed-off-by: Christoph Hellwig <hch@lst.de> > > > --- > > > > I guess there's going to be obvious conflicts with Dave's series and > > some of these changes. I'm just going to ignore that and you guys can > > figure it out. :) > > I'm glad to rebase this on top of the parts of his series that I think > make sense. Just wanted to send this out for now to show what I have > in mind in this area. FWIW, I'm typing limited at the moment because of a finger injury. I was planning to rebase mine on the first 6 patches of this series (i.e. all but the IOERROR removal patch) a couple of days ago, but I'm really slow at getting stuff done at the moment. So if Darrick is happy with this patchset, don't let my cleanup hold it up. Cheers, Dave.
On Wed, Mar 11, 2020 at 09:28:56AM +1100, Dave Chinner wrote: > On Mon, Mar 09, 2020 at 09:02:52AM +0100, Christoph Hellwig wrote: > > On Fri, Mar 06, 2020 at 11:09:17AM -0500, Brian Foster wrote: > > > On Fri, Mar 06, 2020 at 07:31:31AM -0700, Christoph Hellwig wrote: > > > > Remove the ignored return value from xfs_log_unmount_write, and also > > > > remove a rather pointless assert on the return value from xfs_log_force. > > > > > > > > Signed-off-by: Christoph Hellwig <hch@lst.de> > > > > --- > > > > > > I guess there's going to be obvious conflicts with Dave's series and > > > some of these changes. I'm just going to ignore that and you guys can > > > figure it out. :) > > > > I'm glad to rebase this on top of the parts of his series that I think > > make sense. Just wanted to send this out for now to show what I have > > in mind in this area. > > FWIW, I'm typing limited at the moment because of a finger injury. > > I was planning to rebase mine on the first 6 patches of this series > (i.e. all but the IOERROR removal patch) a couple of days ago, but > I'm really slow at getting stuff done at the moment. So if Darrick > is happy with this patchset, don't let my cleanup hold it up. Ahh, I'd held back to see what would develop. :) I'll have a look then. --D > Cheers, > > Dave. > -- > Dave Chinner > david@fromorbit.com
On Wed, Mar 11, 2020 at 09:28:56AM +1100, Dave Chinner wrote: > FWIW, I'm typing limited at the moment because of a finger injury. > > I was planning to rebase mine on the first 6 patches of this series > (i.e. all but the IOERROR removal patch) a couple of days ago, but > I'm really slow at getting stuff done at the moment. So if Darrick > is happy with this patchset, don't let my cleanup hold it up. Get better soon. I'll resend just the trivial cleanups for now.
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index 796ff37d5bb5..fa499ddedb94 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c @@ -953,8 +953,7 @@ xfs_log_write_unmount_record( * currently architecture converted and "Unmount" is a bit foo. * As far as I know, there weren't any dependencies on the old behaviour. */ - -static int +static void xfs_log_unmount_write(xfs_mount_t *mp) { struct xlog *log = mp->m_log; @@ -962,7 +961,6 @@ xfs_log_unmount_write(xfs_mount_t *mp) #ifdef DEBUG xlog_in_core_t *first_iclog; #endif - int error; /* * Don't write out unmount record on norecovery mounts or ro devices. @@ -971,11 +969,10 @@ xfs_log_unmount_write(xfs_mount_t *mp) if (mp->m_flags & XFS_MOUNT_NORECOVERY || xfs_readonly_buftarg(log->l_targ)) { ASSERT(mp->m_flags & XFS_MOUNT_RDONLY); - return 0; + return; } - error = xfs_log_force(mp, XFS_LOG_SYNC); - ASSERT(error || !(XLOG_FORCED_SHUTDOWN(log))); + xfs_log_force(mp, XFS_LOG_SYNC); #ifdef DEBUG first_iclog = iclog = log->l_iclog; @@ -1007,7 +1004,7 @@ xfs_log_unmount_write(xfs_mount_t *mp) iclog = log->l_iclog; atomic_inc(&iclog->ic_refcnt); xlog_state_want_sync(log, iclog); - error = xlog_state_release_iclog(log, iclog); + xlog_state_release_iclog(log, iclog); switch (iclog->ic_state) { case XLOG_STATE_ACTIVE: case XLOG_STATE_DIRTY: @@ -1019,9 +1016,7 @@ xfs_log_unmount_write(xfs_mount_t *mp) break; } } - - return error; -} /* xfs_log_unmount_write */ +} /* * Empty the log for unmount/freeze.
Remove the ignored return value from xfs_log_unmount_write, and also remove a rather pointless assert on the return value from xfs_log_force. Signed-off-by: Christoph Hellwig <hch@lst.de> --- fs/xfs/xfs_log.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-)