linux/fs/xfs/linux-2.6
David Chinner 33a266dda9 [PATCH] Make BH_Unwritten a first class bufferhead flag V2
Currently, XFS uses BH_PrivateStart for flagging unwritten extent state in a
bufferhead.  Recently, I found the long standing mmap/unwritten extent
conversion bug, and it was to do with partial page invalidation not clearing
the unwritten flag from bufferheads attached to the page but beyond EOF.  See
here for a full explaination:

http://oss.sgi.com/archives/xfs/2006-12/msg00196.html

The solution I have checked into the XFS dev tree involves duplicating code
from block_invalidatepage to clear the unwritten flag from the bufferhead(s),
and then calling block_invalidatepage() to do the rest.

Christoph suggested that this would be better solved by pushing the unwritten
flag into the common buffer head flags and just adding the call to
discard_buffer():

http://oss.sgi.com/archives/xfs/2006-12/msg00239.html

The following patch makes BH_Unwritten a first class citizen.

Signed-off-by: Dave Chinner <dgc@sgi.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:27 -08:00
..
kmem.c
kmem.h
mrlock.h [XFS] mraccessf & mrupdatef are supposed to be the "flags" versions of the 2007-02-10 18:35:40 +11:00
mutex.h
sema.h
spin.h
sv.h
time.h
xfs_aops.c [XFS] Fix sub-block zeroing for buffered writes into unwritten extents. 2007-02-10 18:36:35 +11:00
xfs_aops.h
xfs_buf.c [XFS] Keep stack usage down for 4k stacks by using noinline. 2007-02-10 18:34:56 +11:00
xfs_buf.h [XFS] Current usage of buftarg flags is incorrect. 2007-02-10 18:34:49 +11:00
xfs_cred.h
xfs_dmapi_priv.h
xfs_export.c [XFS] Keep stack usage down for 4k stacks by using noinline. 2007-02-10 18:34:56 +11:00
xfs_export.h
xfs_file.c [XFS] Keep stack usage down for 4k stacks by using noinline. 2007-02-10 18:34:56 +11:00
xfs_fs_subr.c
xfs_fs_subr.h
xfs_globals.c
xfs_globals.h
xfs_ioctl32.c
xfs_ioctl32.h
xfs_ioctl.c [XFS] Remove unused header files for MAC and CAP checking functionality. 2007-02-10 18:37:28 +11:00
xfs_iops.c [XFS] Remove unused header files for MAC and CAP checking functionality. 2007-02-10 18:37:28 +11:00
xfs_iops.h
xfs_linux.h [PATCH] Make BH_Unwritten a first class bufferhead flag V2 2007-02-12 09:48:27 -08:00
xfs_lrw.c [XFS] Don't use kmap in xfs_iozero. 2007-02-10 18:37:46 +11:00
xfs_lrw.h [XFS] Fix callers of xfs_iozero() to zero the correct range. 2007-02-10 18:36:47 +11:00
xfs_stats.c
xfs_stats.h
xfs_super.c [XFS] Remove unused header files for MAC and CAP checking functionality. 2007-02-10 18:37:28 +11:00
xfs_super.h
xfs_sysctl.c [XFS] XFS sysctl cleanups 2007-02-10 18:36:59 +11:00
xfs_sysctl.h
xfs_version.h
xfs_vfs.c
xfs_vfs.h [XFS] Make freeze code a little cleaner. 2007-02-10 18:37:22 +11:00
xfs_vnode.c [XFS] Keep stack usage down for 4k stacks by using noinline. 2007-02-10 18:34:56 +11:00
xfs_vnode.h [XFS] Keep stack usage down for 4k stacks by using noinline. 2007-02-10 18:34:56 +11:00