CVS log for xfs-linux/xfs_dir2.c

[BACK] Up to [Development] / xfs-linux

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: HEAD


Revision 1.70 / (download) - annotate - [select for diffs], Wed Oct 15 15:39:14 2008 UTC (9 years ago) by lachlan.longdrop.melbourne.sgi.com
Branch: MAIN
CVS Tags: HEAD
Changes since 1.69: +6 -0 lines
Diff to previous 1.69 (colored)

Account for allocated blocks when expanding directories

When we create a directory, we reserve a number of blocks for
the maximum possible expansion of of the directory due to
various btree splits, freespace allocation, etc. Unfortunately,
each allocation is not reflected in the total number of blocks
still available to the transaction, so the maximal reservation
is used over and over again.

This leads to problems where an allocation group has only
enough blocks for *some* of the allocations required for the
directory modification. After the first N allocations, the
remaining blocks in the allocation group drops below the total
reservation, and subsequent allocations fail because the allocator
will not allow the allocation to proceed if the AG does not have
the enough blocks available for the entire allocation total.

This results in an ENOSPC occurring after an allocation has
already occurred. This results in aborting the directory
operation (leaving the directory in an inconsistent state)
and cancelling a dirty transaction, which results in a filesystem
shutdown.

Avoid the problem by reflecting the number of blocks allocated in
any directory expansion in the total number of blocks available to
the modification in progress. This prevents a directory modification
from being aborted part way through with an ENOSPC.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Merge of xfs-linux-melb:xfs-kern:32340a by kenmcd.

  Account for allocated blocks when expanding directories

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>