Thread (8 messages) 8 messages, 3 authors, 2011-06-23

Re: [PATCH 2/3] xfs: clear XFS_IDIRTY_RELEASE on truncate down

From: Alex Elder <hidden>
Date: 2011-06-23 21:59:41

On Thu, 2011-06-23 at 11:35 +1000, Dave Chinner wrote:
From: Dave Chinner <redacted>

When an inode is truncated down, speculative preallocation is
removed from the inode. This should also reset the state bits for
controlling whether preallocation is subsequently removed when the
file is next closed. The flag is not being cleared, so repeated
operations on a file that first involve a truncate (e.g. multiple
repeated dd invocations on a file) give different file layouts for
the second and subsequent invocations.

Fix this by clearing the XFS_IDIRTY_RELEASE state bit when the
XFS_ITRUNCATED bit is detected in xfs_release() and hence ensure
that speculative delalloc is removed on files that have been
truncated down.

Signed-off-by: Dave Chinner <redacted>
Looks good.

Reviewed-by: Alex Elder <redacted>


_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help