Re: [PATCH 2/9] xfs: XLOG_STATE_IOERROR must die

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 02, 2021 at 09:00:10AM +0100, Christoph Hellwig wrote:
> >  	else
> >  		ASSERT(iclog->ic_state == XLOG_STATE_WANT_SYNC ||
> > -		       iclog->ic_state == XLOG_STATE_IOERROR);
> > +			xlog_is_shutdown(log));
> 
> Nit:  think doing this as:
> 
> 	else if (!xlog_is_shutdown(log))
> 		ASSERT(iclog->ic_state == XLOG_STATE_WANT_SYNC);
> 
> would be a tad cleaner.

I kill a lot of these checks in the near future. Once the log
shutdown doesn't change the iclog state, we no longer need to check
if the log is shutdown when checking state like this because
shutdown doesn't change the iclog state when we have active
references to the iclog....

IOWs, these are all figments of the horrible racy log shutdown that
changes the iclog state regardless of who is using the iclog at the
time. This pattern sucks, it's broken and it goes away soon so
there's not much point in rearranging these asserts...

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux