Re: [PATCH v3 04/13] xfs: ensure EFD trans aborts on log recovery extent free failure

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

 



On Wed, Aug 19, 2015 at 09:23:23AM +1000, Dave Chinner wrote:
> On Mon, Aug 10, 2015 at 03:01:40PM -0400, Brian Foster wrote:
> > Log recovery attempts to free extents with leftover EFIs in the AIL
> > after initial processing. If the extent free fails (e.g., due to
> > unrelated fs corruption), the transaction is cancelled, though it might
> > not be dirtied at the time. If this is the case, the EFD does not abort
> > and thus does not release the EFI. This can lead to hangs as the EFI
> > pins the AIL.
> > 
> > Update xlog_recover_process_efi() to log the EFD in the transaction
> > before xfs_free_extent() errors are handled to ensure the transaction is
> > dirty, aborts the EFD and releases the EFI on error. Since this is a
> > requirement for EFD processing (and consistent with xfs_bmap_finish()),
> > update the EFD logging helper to do the extent free and unconditionally
> > log the EFD. This encodes the required EFD logging behavior into the
> > helper and reduces the likelihood of errors down the road.
> > 
> > Signed-off-by: Brian Foster <bfoster@xxxxxxxxxx>
> ....
> > diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
> > index 9d8f242..c77dfb5 100644
> > --- a/fs/xfs/xfs_log_recover.c
> > +++ b/fs/xfs/xfs_log_recover.c
> > @@ -34,7 +34,6 @@
> >  #include "xfs_inode_item.h"
> >  #include "xfs_extfree_item.h"
> >  #include "xfs_trans_priv.h"
> > -#include "xfs_alloc.h"
> >  #include "xfs_ialloc.h"
> >  #include "xfs_quota.h"
> >  #include "xfs_cksum.h"
> 
> Causes compilation failure:
> 
> fs/xfs/xfs_log_recover.c: In function ¿xlog_recover_check_summary¿:
> fs/xfs/xfs_log_recover.c:4635:3: error: implicit declaration of function ¿xfs_read_agf¿ [-Werror=implicit-function-declaration]
>    error = xfs_read_agf(mp, NULL, agno, 0, &agfbp);
>    ^
> 
> I reinstated the include.
> 

Oops, I thought I had built this with debug mode. Sorry about that...

Brian

> Cheers,
> 
> Dave.
> -- 
> Dave Chinner
> david@xxxxxxxxxxxxx
> 
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs




[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux