[Top] [All Lists]

TAKE 964468 - XFS can ENOSPC in bad places

To: sgi.bugs.xfs@xxxxxxxxxxxx
Subject: TAKE 964468 - XFS can ENOSPC in bad places
From: dgc@xxxxxxx (David Chinner)
Date: Fri, 8 Jun 2007 18:44:38 +1000 (EST)
Cc: xfs@xxxxxxxxxxx
Sender: xfs-bounce@xxxxxxxxxxx
Prevent ENOSPC from aborting transactions that need to succeed

During delayed allocation extent conversion or unwritten extent
conversion, we need to reserve some blocks for transactions
reservations. We need to reserve these blocks in case a btree
split occurs and we need to allocate some blocks.

Unfortunately, we've only ever reserved the number of data blocks we
are allocating, so in both the unwritten and delalloc case we can
get ENOSPC to the transaction reservation. This is bad because in
both cases we cannot report the failure to the writing application.

The fix is two-fold:

        1 - leverage the reserved block infrastructure XFS already
        has to reserve a small pool of blocks by default to allow
        specially marked transactions to dip into when we are at

            Default setting is min(5%, 1024 blocks).

        2 - convert critical transaction reservations to be allowed
        to dip into this pool. Spots changed are delalloc
        conversion, unwritten extent conversion and growing a
        filesystem at ENOSPC.

This also allows growing the filesytsem to succeed at ENOSPC.

Date:  Fri Jun  8 18:44:10 AEST 2007
Workarea:  chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs
Inspected by:  tes@xxxxxxx

The following file(s) were checked into:

Modid:  xfs-linux-melb:xfs-kern:28865a
fs/xfs/xfs_mount.c - 1.397 - changed
        - reserve a small amount of disk blocks by default to use in
          emergency ENOSPC situations.

fs/xfs/xfs_fsops.c - 1.126 - changed
        - Allow growfs transaction to use reserved space.

fs/xfs/xfs_iomap.c - 1.53 - changed
        - Allow unwritten extent conversion and delayed allocation tranactions
          to use reserved space instead of silently failing at ENOSPC.

<Prev in Thread] Current Thread [Next in Thread>
  • TAKE 964468 - XFS can ENOSPC in bad places, David Chinner <=