Hi Linus,
Please pull from the for-linus branch:
git pull git://oss.sgi.com:8090/xfs/xfs-2.6.git for-linus
This includes mainly XFS bug fixes, some cleanup,
and a feature called filestreams,
which requires an update to lib/radix-tree.c to
export radix_tree_preload() so xfs can continue
to work as a module if desired.
This will update the following files:
fs/xfs/Makefile-linux-2.6 | 2 +
fs/xfs/linux-2.6/kmem.h | 19 -
fs/xfs/linux-2.6/xfs_aops.c | 43 ++-
fs/xfs/linux-2.6/xfs_buf.c | 59 ++--
fs/xfs/linux-2.6/xfs_buf.h | 2 +-
fs/xfs/linux-2.6/xfs_file.c | 11 -
fs/xfs/linux-2.6/xfs_globals.c | 1 +
fs/xfs/linux-2.6/xfs_ioctl.c | 2 +-
fs/xfs/linux-2.6/xfs_ioctl32.c | 321 +++++++++++++++--
fs/xfs/linux-2.6/xfs_linux.h | 1 +
fs/xfs/linux-2.6/xfs_super.c | 5 +-
fs/xfs/linux-2.6/xfs_sysctl.c | 11 +
fs/xfs/linux-2.6/xfs_sysctl.h | 2 +
fs/xfs/linux-2.6/xfs_vfs.h | 15 +
fs/xfs/linux-2.6/xfs_vnode.h | 5 -
fs/xfs/quota/xfs_qm.c | 9 +-
fs/xfs/xfs.h | 1 +
fs/xfs/xfs_ag.h | 9 +-
fs/xfs/xfs_alloc.c | 101 +++---
fs/xfs/xfs_alloc.h | 6 +-
fs/xfs/xfs_alloc_btree.c | 20 +-
fs/xfs/xfs_bit.c | 91 +-----
fs/xfs/xfs_bit.h | 4 +-
fs/xfs/xfs_bmap.c | 369 ++++++++++----------
fs/xfs/xfs_bmap.h | 6 +-
fs/xfs/xfs_bmap_btree.c | 88 +----
fs/xfs/xfs_btree.h | 32 +--
fs/xfs/xfs_buf_item.c | 4 +-
fs/xfs/xfs_clnt.h | 2 +
fs/xfs/xfs_dinode.h | 4 +-
fs/xfs/xfs_dir2.c | 12 +-
fs/xfs/xfs_dir2_block.c | 98 +++---
fs/xfs/xfs_dir2_block.h | 2 -
fs/xfs/xfs_dir2_data.c | 54 ++--
fs/xfs/xfs_dir2_data.h | 12 +-
fs/xfs/xfs_dir2_leaf.c | 106 +++---
fs/xfs/xfs_dir2_leaf.h | 29 +--
fs/xfs/xfs_dir2_node.c | 66 ++--
fs/xfs/xfs_dir2_node.h | 4 +-
fs/xfs/xfs_dir2_sf.c | 204 ++++++------
fs/xfs/xfs_dir2_sf.h | 20 +-
fs/xfs/xfs_filestream.c | 771 ++++++++++++++++++++++++++++++++++++++++
fs/xfs/xfs_filestream.h | 136 +++++++
fs/xfs/xfs_fs.h | 2 +
fs/xfs/xfs_fsops.c | 17 +-
fs/xfs/xfs_ialloc.c | 28 ++-
fs/xfs/xfs_ialloc.h | 10 +
fs/xfs/xfs_inode.c | 39 ++-
fs/xfs/xfs_inode.h | 16 +-
fs/xfs/xfs_iomap.c | 41 +--
fs/xfs/xfs_itable.c | 42 ++-
fs/xfs/xfs_itable.h | 20 +-
fs/xfs/xfs_log.c | 41 ++-
fs/xfs/xfs_log_recover.c | 8 +
fs/xfs/xfs_mount.c | 237 +++++++++++-
fs/xfs/xfs_mount.h | 15 +-
fs/xfs/xfs_mru_cache.c | 608 +++++++++++++++++++++++++++++++
fs/xfs/xfs_mru_cache.h | 57 +++
fs/xfs/xfs_rtalloc.c | 4 +-
fs/xfs/xfs_rw.h | 36 ++-
fs/xfs/xfs_sb.h | 16 +-
fs/xfs/xfs_trans.c | 125 +++++---
fs/xfs/xfs_trans.h | 3 +-
fs/xfs/xfs_vfsops.c | 159 +++++----
fs/xfs/xfs_vnodeops.c | 119 ++++---
lib/radix-tree.c | 1 +
66 files changed, 3263 insertions(+), 1140 deletions(-)
through these commits:
commit 0f1145cc18e970ebe37da114fc34c297f135e062
Author: David Chinner <dgc@xxxxxxx>
Date: Fri Jun 29 17:26:09 2007 +1000
[XFS] Fix lockdep annotations for xfs_lock_inodes
SGI-PV: 967035
SGI-Modid: xfs-linux-melb:xfs-kern:29026a
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
commit d7f0923d83dcabfc063257a281529cdbcd5eedb5
Author: David Chinner <dgc@xxxxxxx>
Date: Sat Jul 14 16:05:04 2007 +1000
[LIB]: export radix_tree_preload()
XFS filestreams functionality uses radix trees and the preload
functions. XFS can be built as a module and hence we need
radix_tree_preload() exported. radix_tree_preload_end() is a
static inline, so it doesn't need exporting.
Signed-Off-By: Dave Chinner <dgc@xxxxxxx>
Signed-Off-By: Tim Shimmin <tes@xxxxxxx>
commit faa63e9584df41020440756b8b90b7b63f95e4f6
Author: Michal Marek <mmarek@xxxxxxx>
Date: Wed Jul 11 11:10:19 2007 +1000
[XFS] Fix XFS_IOC_FSBULKSTAT{,_SINGLE} & XFS_IOC_FSINUMBERS in compat mode
* 32bit struct xfs_fsop_bulkreq has different size and layout of
members, no matter the alignment. Move the code out of the #else
branch (why was it there in the first place?). Define _32 variants of
the ioctl constants.
* 32bit struct xfs_bstat is different because of time_t and on
i386 because of different padding. Make xfs_bulkstat_one() accept a
custom "output formatter" in the private_data argument which takes care
of the xfs_bulkstat_one_compat() that takes care of the different
layout in the compat case.
* i386 struct xfs_inogrp has different padding.
Add a similar "output formatter" mecanism to xfs_inumbers().
SGI-PV: 967354
SGI-Modid: xfs-linux-melb:xfs-kern:29102a
Signed-off-by: Michal Marek <mmarek@xxxxxxx>
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
commit 1fa503df66f7bffc0ff62662626897eec79446c2
Author: Michal Marek <mmarek@xxxxxxx>
Date: Wed Jul 11 11:10:09 2007 +1000
[XFS] Compat ioctl handler for handle operations
32bit struct xfs_fsop_handlereq has different size and offsets (due to
pointers). TODO: case XFS_IOC_{FSSETDM,ATTRLIST,ATTRMULTI}_BY_HANDLE still
not handled.
SGI-PV: 967354
SGI-Modid: xfs-linux-melb:xfs-kern:29101a
Signed-off-by: Michal Marek <mmarek@xxxxxxx>
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
commit 547e00c3c681265b1fe5e34c7643f3ddac748ba0
Author: Michal Marek <mmarek@xxxxxxx>
Date: Wed Jul 11 11:09:57 2007 +1000
[XFS] Compat ioctl handler for XFS_IOC_FSGEOMETRY_V1.
i386 struct xfs_fsop_geom_v1 has no padding after the last member, so the
size is different.
SGI-PV: 967354
SGI-Modid: xfs-linux-melb:xfs-kern:29100a
Signed-off-by: Michal Marek <mmarek@xxxxxxx>
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
commit 3a59c94c4b48878c6af047cdfc8c137d0fa7a0f0
Author: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Wed Jul 11 11:09:47 2007 +1000
[XFS] Clean up function name handling in tracing code
Remove the hardcoded "fnames" for tracing, and just embed them in tracing
macros via __FUNCTION__. Kills a lot of #ifdefs too.
SGI-PV: 967353
SGI-Modid: xfs-linux-melb:xfs-kern:29099a
Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxxx>
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
commit b11f94d537e6b69f13770143fd7ded3d09fdbaab
Author: David Chinner <dgc@xxxxxxx>
Date: Wed Jul 11 11:09:33 2007 +1000
[XFS] Quota inode has no parent.
Avoid using a special "zero inode" as the parent of the quota inode as
this can confuse the filestreams code into thinking the quota inode has a
parent. We do not want the quota inode to follow filestreams allocation
rules, so pass a NULL as the parent inode and detect this condition when
doing stream associations.
SGI-PV: 964469
SGI-Modid: xfs-linux-melb:xfs-kern:29098a
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
commit 2a82b8be8a8dacb48cb7371449a7a9daa558b4a8
Author: David Chinner <dgc@xxxxxxx>
Date: Wed Jul 11 11:09:12 2007 +1000
[XFS] Concurrent Multi-File Data Streams
In media spaces, video is often stored in a frame-per-file format. When
dealing with uncompressed realtime HD video streams in this format, it is
crucial that files do not get fragmented and that multiple files a placed
contiguously on disk.
When multiple streams are being ingested and played out at the same time,
it is critical that the filesystem does not cross the streams and
interleave them together as this creates seek and readahead cache miss
latency and prevents both ingest and playout from meeting frame rate
targets.
This patch set creates a "stream of files" concept into the allocator to
place all the data from a single stream contiguously on disk so that RAID
array readahead can be used effectively. Each additional stream gets
placed in different allocation groups within the filesystem, thereby
ensuring that we don't cross any streams. When an AG fills up, we select a
new AG for the stream that is not in use.
The core of the functionality is the stream tracking - each inode that we
create in a directory needs to be associated with the directories' stream.
Hence every time we create a file, we look up the directories' stream
object and associate the new file with that object.
Once we have a stream object for a file, we use the AG that the stream
object point to for allocations. If we can't allocate in that AG (e.g. it
is full) we move the entire stream to another AG. Other inodes in the same
stream are moved to the new AG on their next allocation (i.e. lazy
update).
Stream objects are kept in a cache and hold a reference on the inode.
Hence the inode cannot be reclaimed while there is an outstanding stream
reference. This means that on unlink we need to remove the stream
association and we also need to flush all the associations on certain
events that want to reclaim all unreferenced inodes (e.g. filesystem
freeze).
SGI-PV: 964469
SGI-Modid: xfs-linux-melb:xfs-kern:29096a
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Barry Naujok <bnaujok@xxxxxxx>
Signed-off-by: Donald Douwsma <donaldd@xxxxxxx>
Signed-off-by: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
Signed-off-by: Vlad Apostolov <vapo@xxxxxxx>
commit 0892ccd6fe13e08ad9e57007afbb78fe02d66005
Author: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Date: Thu Jun 28 16:46:56 2007 +1000
[XFS] Use uninitialized_var macro to stop warning about rtx
Appease gcc in regards to "warning: 'rtx' is used uninitialized in
this function".
SGI-PV: 907752
SGI-Modid: xfs-linux-melb:xfs-kern:29007a
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
commit fbf3ce8d8ec508f6bd99b36de034d2ae3e1ae7ac
Author: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Thu Jun 28 16:46:47 2007 +1000
[XFS] XFS should not be looking at filp reference counts
A check for file_count is always a bad idea. Linux has the ->release
method to deal with cleanups on last close and ->flush is only for the
very rare case where we want to perform an operation on every drop of a
reference to a file struct.
This patch gets rid of vop_close and surrounding code in favour of simply
doing the page flushing from ->release.
SGI-PV: 966562
SGI-Modid: xfs-linux-melb:xfs-kern:28952a
Signed-off-by: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
commit 16a087d8e1af9b974125870dceb9e4a35249ad1d
Author: Vignesh Babu <vignesh.babu@xxxxxxxxx>
Date: Thu Jun 28 16:46:37 2007 +1000
[XFS] Use is_power_of_2 instead of open coding checks
SGI-PV: 966576
SGI-Modid: xfs-linux-melb:xfs-kern:28950a
Signed-off-by: Vignesh Babu <vignesh.babu@xxxxxxxxx>
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
commit bbaaf53808c778bda24f8245a440c5ceacc1a37d
Author: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Thu Jun 28 16:43:50 2007 +1000
[XFS] Reduce shouting by removing unnecessary macros from dir2 code.
SGI-PV: 966505
SGI-Modid: xfs-linux-melb:xfs-kern:28947a
Signed-off-by: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
commit 54aa8e26e90da882b145fcd33ed752431d6b318b
Author: David Chinner <dgc@xxxxxxx>
Date: Thu Jun 28 16:43:39 2007 +1000
[XFS] Simplify XFS min/max macros.
SGI-PV: 964547
SGI-Modid: xfs-linux-melb:xfs-kern:28945a
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Nathan Scott <nscott@xxxxxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
commit 24ad33ff714bd117cab30e71e2ad41e4e1185108
Author: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Thu Jun 28 16:43:30 2007 +1000
[XFS] Kill off xfs_count_bits
xfs_count_bits is only called once, and is then compared to 0. IOW, what
it really wants to know is, is the bitmap empty. This can be done more
simply, certainly.
SGI-PV: 966503
SGI-Modid: xfs-linux-melb:xfs-kern:28944a
Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxxx>
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
commit 87ae3c2411cfd280e8289e232b718fae9f63950b
Author: Jesper Juhl <jesper.juhl@xxxxxxxxx>
Date: Thu Jun 28 16:43:14 2007 +1000
[XFS] Cancel transactions on xfs_itruncate_start error.
SGI-PV: 966502
SGI-Modid: xfs-linux-melb:xfs-kern:28943a
Signed-off-by: Jesper Juhl <jesper.juhl@xxxxxxxxx>
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
commit 39726be2a2e6e61f352852da2c3a807773e33346
Author: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Mon Jun 18 17:57:45 2007 +1000
[XFS] Use do_div() on 64 bit types.
SGI-PV: 966145
SGI-Modid: xfs-linux-melb:xfs-kern:28889a
Signed-off-by: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
commit 516b2e7c2661615ba5d5ad9fb584f068363502d3
Author: David Chinner <dgc@xxxxxxx>
Date: Mon Jun 18 16:50:48 2007 +1000
[XFS] Fix remount,readonly path to flush everything correctly.
The remount readonly path can fail to writeback properly because we still
have active transactions after calling xfs_quiesce_fs(). Further
investigation shows that this path is broken in the same ways that the xfs
freeze path was broken so fix it the same way.
SGI-PV: 964464
SGI-Modid: xfs-linux-melb:xfs-kern:28869a
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
commit 957d0ebed04239b734552c7da3fae9094b6f090c
Author: David Chinner <dgc@xxxxxxx>
Date: Mon Jun 18 16:50:37 2007 +1000
[XFS] Cleanup inode extent size hint extraction
SGI-PV: 966004
SGI-Modid: xfs-linux-melb:xfs-kern:28866a
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
commit 84e1e99f112dead8f9ba036c02d24a9f5ce7f544
Author: David Chinner <dgc@xxxxxxx>
Date: Mon Jun 18 16:50:27 2007 +1000
[XFS] 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
ENOSPC.
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.
SGI-PV: 964468
SGI-Modid: xfs-linux-melb:xfs-kern:28865a
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
commit 641c56fbfeae85d5ec87fee90a752f7b7224f236
Author: David Chinner <dgc@xxxxxxx>
Date: Mon Jun 18 16:50:17 2007 +1000
[XFS] Prevent deadlock when flushing inodes on unmount
When we are unmounting the filesystem, we flush all the inodes to disk.
Unfortunately, if we have an inode cluster that has just been freed and
marked stale sitting in an incore log buffer (i.e. hasn't been flushed to
disk), it will be holding all the flush locks on the inodes in that
cluster.
xfs_iflush_all() which is called during unmount walks all the inodes
trying to reclaim them, and it doing so calls xfs_finish_reclaim() on each
inode. If the inode is dirty, if grabs the flush lock and flushes it.
Unfortunately, find dirty inodes that already have their flush lock held
and so we sleep.
At this point in the unmount process, we are running single-threaded.
There is nothing more that can push on the log to force the transaction
holding the inode flush locks to disk and hence we deadlock.
The fix is to issue a log force before flushing the inodes on unmount so
that all the flush locks will be released before we start flushing the
inodes.
SGI-PV: 964538
SGI-Modid: xfs-linux-melb:xfs-kern:28862a
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
commit 0164af51cedf46e1d58fd53854373f544150c597
Author: Tim Shimmin <tes@xxxxxxx>
Date: Mon Jun 18 16:50:08 2007 +1000
[XFS] Log the agf_length change in xfs_growfs_data_private().
SGI-PV: 963528
SGI-Modid: xfs-linux-melb:xfs-kern:28856a
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Christoph Hellwig <hch@xxxxxxxxxxxxx>
commit effd120edb7609069cca9f3d1cb4bfae464b2f85
Author: David Chinner <dgc@xxxxxxx>
Date: Mon Jun 18 16:49:58 2007 +1000
[XFS] Map unwritten extents correctly for I/o completion processing
If we have multiple unwritten extents within a single page, we fail to
tell the I/o completion construction handlers we need a new handle for the
second and subsequent blocks in the page. While we still issue the I/O
correctly, we do not have the correct ranges recorded in the ioend
structures and hence when we go to convert the unwritten extents we screw
it up.
Make sure we start a new ioend every time the mapping changes so that we
convert the correct ranges on I/O completion.
SGI-PV: 964647
SGI-Modid: xfs-linux-melb:xfs-kern:28797a
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
commit 45c34141126a89da07197d5b89c04c6847f1171a
Author: David Chinner <dgc@xxxxxxx>
Date: Mon Jun 18 16:49:44 2007 +1000
[XFS] Apply transaction delta counts atomically to incore counters
With the per-cpu superblock counters, batch updates are no longer atomic
across the entire batch of changes. This is not an issue if each
individual change in the batch is applied atomically. Unfortunately, free
block count changes are not applied atomically, and they are applied in a
manner guaranteed to cause problems.
Essentially, the free block count reservation that the transaction took
initially is returned to the in core counters before a second delta takes
away what is used. because these two operations are not atomic, we can
race with another thread that can use the returned transaction reservation
before the transaction takes the space away again and we can then get
ENOSPC being reported in a spot where we don't have an ENOSPC condition,
nor should we ever see one there.
Fix it up by rolling the two deltas into the one so it can be applied
safely (i.e. atomically) to the incore counters.
SGI-PV: 964465
SGI-Modid: xfs-linux-melb:xfs-kern:28796a
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
commit b2826136a1fc3ea451bcbb73a75ca50b3231aa8f
Author: David Chinner <dgc@xxxxxxx>
Date: Tue Jun 5 16:24:44 2007 +1000
[XFS] Handle null returned from xfs_vtoi() in xfs_setfilesize().
SGI-PV: 965636
SGI-Modid: xfs-linux-melb:xfs-kern:28777a
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Olaf Weber <olaf@xxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
commit e927af90aaa7d75543edbbd9c2810e6963d0443f
Author: David Chinner <dgc@xxxxxxx>
Date: Tue Jun 5 16:24:36 2007 +1000
[XFS] Block on unwritten extent conversion during synchronous direct I/O.
Currently we do not wait on extent conversion to occur, and hence we can
return to userspace from a synchronous direct I/O write without having
completed all the actions in the write. Hence a read after the write may
see zeroes (unwritten extent) rather than the data that was written.
Block the I/O completion by triggering a synchronous workqueue flush to
ensure that the conversion has occurred before we return to userspace.
SGI-PV: 964092
SGI-Modid: xfs-linux-melb:xfs-kern:28775a
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
commit f4a9f28a909debe97cd3f6ca30e82e5811125bff
Author: David Chinner <dgc@xxxxxxx>
Date: Tue Jun 5 16:24:27 2007 +1000
[XFS] Flush the block device before closing it on unmount.
SGI-PV: 965630
SGI-Modid: xfs-linux-melb:xfs-kern:28774a
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
commit 4e5ae8386b55677bde05bbd38b8fc82c67ad4564
Author: David Chinner <dgc@xxxxxxx>
Date: Tue Jun 5 16:24:15 2007 +1000
[XFS] xfs_bmapi fails to update the previous extent pointer
When processing multiple extent maps, xfs_bmapi needs to keep track of the
extent behind the one it is currently working on to be able to trim extent
ranges correctly. Failing to update the previous pointer can result in
corrupted extent lists in memory and this will result in panics or assert
failures.
Update the previous pointer correctly when we move to the next extent to
process.
SGI-PV: 965631
SGI-Modid: xfs-linux-melb:xfs-kern:28773a
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Vlad Apostolov <vapo@xxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
commit 210c6f1caa451623e14a7cd71000d2c2e0d9cc43
Author: David Chinner <dgc@xxxxxxx>
Date: Thu May 24 15:26:51 2007 +1000
[XFS] Fix the transaction flags to make lazy superblock counters work.
SGI-PV: 964999
SGI-Modid: xfs-linux-melb:xfs-kern:28653a
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
commit 92821e2ba4ae26887223326fb0b95cdab963b768
Author: David Chinner <dgc@xxxxxxx>
Date: Thu May 24 15:26:31 2007 +1000
[XFS] Lazy Superblock Counters
When we have a couple of hundred transactions on the fly at once, they all
typically modify the on disk superblock in some way.
create/unclink/mkdir/rmdir modify inode counts, allocation/freeing modify
free block counts.
When these counts are modified in a transaction, they must eventually lock
the superblock buffer and apply the mods. The buffer then remains locked
until the transaction is committed into the incore log buffer. The result
of this is that with enough transactions on the fly the incore superblock
buffer becomes a bottleneck.
The result of contention on the incore superblock buffer is that
transaction rates fall - the more pressure that is put on the superblock
buffer, the slower things go.
The key to removing the contention is to not require the superblock fields
in question to be locked. We do that by not marking the superblock dirty
in the transaction. IOWs, we modify the incore superblock but do not
modify the cached superblock buffer. In short, we do not log superblock
modifications to critical fields in the superblock on every transaction.
In fact we only do it just before we write the superblock to disk every
sync period or just before unmount.
This creates an interesting problem - if we don't log or write out the
fields in every transaction, then how do the values get recovered after a
crash? the answer is simple - we keep enough duplicate, logged information
in other structures that we can reconstruct the correct count after log
recovery has been performed.
It is the AGF and AGI structures that contain the duplicate information;
after recovery, we walk every AGI and AGF and sum their individual
counters to get the correct value, and we do a transaction into the log to
correct them. An optimisation of this is that if we have a clean unmount
record, we know the value in the superblock is correct, so we can avoid
the summation walk under normal conditions and so mount/recovery times do
not change under normal operation.
One wrinkle that was discovered during development was that the blocks
used in the freespace btrees are never accounted for in the AGF counters.
This was once a valid optimisation to make; when the filesystem is full,
the free space btrees are empty and consume no space. Hence when it
matters, the "accounting" is correct. But that means the when we do the
AGF summations, we would not have a correct count and xfs_check would
complain. Hence a new counter was added to track the number of blocks used
by the free space btrees. This is an *on-disk format change*.
As a result of this, lazy superblock counters are a mkfs option and at the
moment on linux there is no way to convert an old filesystem. This is
possible - xfs_db can be used to twiddle the right bits and then
xfs_repair will do the format conversion for you. Similarly, you can
convert backwards as well. At some point we'll add functionality to
xfs_admin to do the bit twiddling easily....
SGI-PV: 964999
SGI-Modid: xfs-linux-melb:xfs-kern:28652a
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
commit 3260f78ad6d5b788e78ea709d377f58e569bee41
Author: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Date: Thu May 24 15:25:42 2007 +1000
[XFS] Use generic shrinker interfaces in XFS.
SGI-PV: 964986
SGI-Modid: xfs-linux-melb:xfs-kern:28642a
Signed-Off-By: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
commit 92dfe8d266eaf35a50607a0e0dcf525e1d367c80
Author: David Chinner <dgc@xxxxxxx>
Date: Thu May 24 15:22:19 2007 +1000
[XFS] Make hole punching at EOF atomic.
If hole punching at EOF is done as two steps (i.e. truncate then extend)
the file is in a transient state between the two steps where an
application can see the incorrect file size. Punching a hole to EOF needs
to be treated in teh same way as all other hole punching cases so that the
file size is never seen to change.
SGI-PV: 962012
SGI-Modid: xfs-linux-melb:xfs-kern:28641a
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Vlad Apostolov <vapo@xxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
commit 511105b3d7c2440ee84fc3f90d200569aac88162
Author: David Chinner <dgc@xxxxxxx>
Date: Thu May 24 15:21:57 2007 +1000
[XFS] Fix vmalloc leak on mount/unmount.
When setting the length of the iclogbuf to write out we should just be
changing the desired byte count rather completely reassociating the buffer
memory with the buffer. Reassociating the buffer memory changes the
apparent length of the buffer and hence when we free the buffer, we don't
free all the vmap()d space we originally allocated.
SGI-PV: 964983
SGI-Modid: xfs-linux-melb:xfs-kern:28640a
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
commit ca165b88927e41ad18908d7b37f08ef81eae0bf8
Author: Christoph Hellwig <hch@xxxxxx>
Date: Thu May 24 15:21:11 2007 +1000
[XFS] Fix double free in xfs_buf_get_noaddr error handling path
SGI-PV: 964983
SGI-Modid: xfs-linux-melb:xfs-kern:28639a
Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
commit 3db296f341b5902c4f9317022ae5d4da2d59d598
Author: David Chinner <dgc@xxxxxxx>
Date: Mon May 14 18:24:16 2007 +1000
[XFS] Fix use-after-free during log unmount.
Don't reference the log buffer after running the callbacks as the callback
can trigger the log buffers to be freed during unmount.
SGI-PV: 964545
SGI-Modid: xfs-linux-melb:xfs-kern:28567a
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
commit 40095b64f5da601a8ab61fbe4b40feb46830052e
Author: David Chinner <dgc@xxxxxxx>
Date: Mon May 14 18:24:09 2007 +1000
[XFS] Sleeping with the ilock waiting for I/O completion is Bad.
Recent fixes to the filesystem freezing code introduced a vn_iowait call
in the middle of the sync code. Unfortunately, at the point where this
call was added we are holding the ilock. The ilock is needed by I/O
completion for unwritten extent conversion and now updating the file size.
Hence I/o cannot complete if we hold the ilock while waiting for I/O
completion.
Fix up the bug and clean the code up around it.
SGI-PV: 963674
SGI-Modid: xfs-linux-melb:xfs-kern:28566a
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
commit 4cc929ee305c69573cb842aade059dbe2a93940c
Author: Nathan Scott <nscott@xxxxxxxxxx>
Date: Mon May 14 18:24:02 2007 +1000
[XFS] Don't grow filesystems past the size they can index.
When growing a filesystem we don't check to see if the new size overflows
the page cache index range, so we can do silly things like grow a
filesystem page 16TB on a 32bit. Check new filesystem sizes against the
limits the kernel can support.
SGI-PV: 957886
SGI-Modid: xfs-linux-melb:xfs-kern:28563a
Signed-Off-By: Nathan Scott <nscott@xxxxxxxxxx>
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
commit 1fa40b01ae4d1b00e366d4949edcc230f5cd6d99
Author: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Mon May 14 18:23:50 2007 +1000
[XFS] Only use refcounted pages for I/O
Many block drivers (aoe, iscsi) really want refcountable pages in bios,
which is what almost everyone send down. XFS unfortunately has a few
places where it sends down buffers that may come from kmalloc, which
breaks them.
Fix the places that use kmalloc()d buffers.
SGI-PV: 964546
SGI-Modid: xfs-linux-melb:xfs-kern:28562a
Signed-Off-By: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Signed-off-by: David Chinner <dgc@xxxxxxx>
Signed-off-by: Tim Shimmin <tes@xxxxxxx>
--Tim
|