Commit Graph

334 Commits (be6e028b6422878df2e799a74609a03a553c7dad)

Author SHA1 Message Date
Nathan Scott 918ae424e1 [XFS] endianess annotations for xfs_attr_leaf_hdr_t
SGI-PV: 943272
SGI-Modid: xfs-linux-melb:xfs-kern:25497a

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-17 17:28:54 +11:00
Nathan Scott 8f44e047a0 [XFS] remove bogus INT_GET on u8 variables in xfs_dir2_block.c
SGI-PV: 943272
SGI-Modid: xfs-linux-melb:xfs-kern:25496a

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-17 17:28:47 +11:00
Nathan Scott 89da054424 [XFS] endianess annotations for xfs_da_blkinfo_t
SGI-PV: 943272
SGI-Modid: xfs-linux-melb:xfs-kern:25495a

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-17 17:28:40 +11:00
Nathan Scott 3d693c6ed7 [XFS] endianess annotations for XFS_DIR2_DATA_ENTRY_TAG_P
SGI-PV: 943272
SGI-Modid: xfs-linux-melb:xfs-kern:25494a

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-17 17:28:27 +11:00
Nathan Scott 3c1f9c1580 [XFS] endianess annotations for xfs_dir2_leaf_entry_t
SGI-PV: 943272
SGI-Modid: xfs-linux-melb:xfs-kern:25493a

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-17 17:28:18 +11:00
Nathan Scott a818e5de7e [XFS] endianess annotations for xfs_dir2_leaf_hdr_t
SGI-PV: 943272
SGI-Modid: xfs-linux-melb:xfs-kern:25492a

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-17 17:28:07 +11:00
Nathan Scott e922fffa41 [XFS] endianess annotations for xfs_dir2_block_tail_t
SGI-PV: 943272
SGI-Modid: xfs-linux-melb:xfs-kern:25491a

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-17 17:27:56 +11:00
Nathan Scott 1fba9f7fe2 [XFS] endianess annotations for XFS_DIR2_DATA_UNUSED_TAG_P
SGI-PV: 943272
SGI-Modid: xfs-linux-melb:xfs-kern:25490a

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-17 17:27:47 +11:00
Nathan Scott ad354eb34e [XFS] endianess annotations for xfs_dir2_data_unused_t
SGI-PV: 943272
SGI-Modid: xfs-linux-melb:xfs-kern:25489a

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-17 17:27:37 +11:00
Nathan Scott afbcb3f919 [XFS] endianess annotations for xfs_dir2_leaf_tail_t
SGI-PV: 943272
SGI-Modid: xfs-linux-melb:xfs-kern:25487a

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-17 17:27:28 +11:00
Nathan Scott 68b3a1024a [XFS] endianess annotations for XFS_DIR2_LEAF_BESTS_P
SGI-PV: 943272
SGI-Modid: xfs-linux-melb:xfs-kern:25486a

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-17 17:27:19 +11:00
Nathan Scott 0ba962ef71 [XFS] endianess annotations for xfs_dir2_free_hdr_t
SGI-PV: 943272
SGI-Modid: xfs-linux-melb:xfs-kern:25485a

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-17 17:27:07 +11:00
Nathan Scott 70e73f5975 [XFS] endianess annotations for xfs_dir2_data_hdr structure.
SGI-PV: 943272
SGI-Modid: xfs-linux-melb:xfs-kern:25484a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-17 17:26:52 +11:00
Nathan Scott 9cea236492 [XFS] Flush and invalidate dirty pages at the start of a direct read also,
else we can hit a delalloc-extents-via-direct-io BUG.

SGI-PV: 949916
SGI-Modid: xfs-linux-melb:xfs-kern:25483a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-17 17:26:41 +11:00
Nathan Scott ce9d37c257 [XFS] Merge Yingpings fix for a vn_count assert failure during QA -
another ENOSPC condition.

SGI-PV: 950784
SGI-Modid: xfs-linux-melb:xfs-kern:25482a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-17 17:26:34 +11:00
Nathan Scott 238f4c5468 [XFS] Make couple names consitent, be more defensive on releasepage (and
prep for nobh, someday, maybe).

SGI-PV: 904196
SGI-Modid: xfs-linux-melb:xfs-kern:25481a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-17 17:26:25 +11:00
Nathan Scott a13828b167 [XFS] Cleanup references to i_sem.
SGI-PV: 904196
SGI-Modid: xfs-linux-melb:xfs-kern:25480a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-17 17:26:14 +11:00
Nathan Scott b12dd34298 [XFS] Fix an infinite loop issue in bulkstat when a corrupt inode is
detected.  Thanks to Roger Willcocks.

SGI-PV: 951054
SGI-Modid: xfs-linux-melb:xfs-kern:25477a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-17 17:26:04 +11:00
Nathan Scott 2ddd5928d0 [XFS] Correct the dquot reservation component for the link transation.
SGI-PV: 904196
SGI-Modid: xfs-linux-melb:xfs-kern:25476a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-17 17:25:46 +11:00
Nathan Scott ec86dc02fd [XFS] Complete transition away from linvfs naming convention, finally.
SGI-PV: 947038
SGI-Modid: xfs-linux-melb:xfs-kern:25474a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-17 17:25:36 +11:00
Mandy Kirkconnell 8867bc9bf0 [XFS] There are a few problems with the new
xfs_bmap_search_multi_extents() wrapper function that I introduced in mod
xfs-linux:xfs-kern:207393a. The function was added as a wrapper around
xfs_bmap_do_search_extents() to avoid breaking the top-of-tree CXFS
interface.  The idea of the function was basically to extract the target
extent buffer (if muli- level extent allocation mode), then call
xfs_bmap_do_search_extents() with either a pointer to the first extent in
the target buffer or a pointer to the first extent in the file, depending
on which extent mode was being used.  However, in addition to locating the
target extent record for block bno, xfs_bmap_do_search_extents() also sets
four parameters needed by the caller: *lastx, *eofp, *gotp, *prevp. 
Passing only the target extent buffer to xfs_bmap_do_search_extents()
causes *eofp to be set incorrectly if the extent is at the end of the
target list but there are actually more extents in the next er_extbuf.
Likewise, if the extent is the first one in the buffer but NOT the first
in the file, *prevp is incorrectly set to NULL.  Adding the needed
functionality to xfs_bmap_search_multi_extents() to re-set any incorrectly
set fields is redundant and makes the call to xfs_bmap_do_search_extents()
not make much sense when multi-level extent allocation mode is being used.
 This mod basically extracts the two functional components from
xfs_bmap_do_search_extents(), with the intent of obsoleting/removing
xfs_bmap_do_search_extents() after the CXFS mult-level in-core extent
changes are checked in.  The two components are:  1) The binary search to
locate the target extent record, and 2) Setting the four parameters needed
by the caller (*lastx, *eofp, *gotp, *prevp).  Component 1: I created a
new function in xfs_inode.c called xfs_iext_bno_to_ext(), which executes
the binary search to find the target extent record.
xfs_bmap_search_multi_extents() has been modified to call
xfs_iext_bno_to_ext() rather than xfs_bmap_do_search_extents().  Component
2: The parameter setting functionality has been added to
xfs_bmap_search_multi_extents(), eliminating the need for
xfs_bmap_do_search_extents().  These changes make the removal of
xfs_bmap_do_search_extents() trival once the CXFS changes are in place. 
They also allow us to maintain the current XFS interface, using the new
search function introduced in mod xfs-linux:xfs-kern:207393a.

SGI-PV: 928864
SGI-Modid: xfs-linux-melb:xfs-kern:207866a

Signed-off-by: Mandy Kirkconnell <alkirkco@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-17 17:25:04 +11:00
Nathan Scott 524fbf5dd1 [XFS] Revert kiocb and vattr stack changes, theory is the AIO rework will
help here and vattr may be small enough.

SGI-PV: 947312
SGI-Modid: xfs-linux-melb:xfs-kern:25423a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-14 14:07:53 +11:00
Nathan Scott f30a121111 [XFS] Dynamically allocate the xfs_dinode_core_t structure to reduce our
stack footprint in xfs_ialloc_ag_alloc.

SGI-PV: 947312
SGI-Modid: xfs-linux-melb:xfs-kern:25420a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-14 14:07:36 +11:00
Mandy Kirkconnell f020b67f3c [XFS] Fix assert to check that in-core extents are inline only.
SGI-PV: 950678
SGI-Modid: xfs-linux-melb:xfs-kern:207634a

Signed-off-by: Mandy Kirkconnell <alkirkco@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-14 14:07:24 +11:00
Nathan Scott a50cd26926 [XFS] Switch over from linvfs names for sb/quotactl operations for
consistent naming.

SGI-PV: 950556
SGI-Modid: xfs-linux-melb:xfs-kern:25382a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-14 14:06:18 +11:00
Nathan Scott 416c6d5bcf [XFS] Switch over from linvfs names for inode operations for consistent
naming.

SGI-PV: 950556
SGI-Modid: xfs-linux-melb:xfs-kern:25381a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-14 14:00:51 +11:00
Nathan Scott 3562fd4565 [XFS] Switch over from linvfs names for file operations for consistent
naming.

SGI-PV: 950556
SGI-Modid: xfs-linux-melb:xfs-kern:25379a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-14 14:00:35 +11:00
Nathan Scott e4c573bb6a [XFS] Switch over from linvfs names for address space ops for consistent
naming.

SGI-PV: 950556
SGI-Modid: xfs-linux-melb:xfs-kern:25378a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-14 13:54:26 +11:00
Nathan Scott b8b0f54656 [XFS] Remove a couple of no-longer-used macros/types from XFS.
SGI-PV: 950556
SGI-Modid: xfs-linux-melb:xfs-kern:25377a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-14 13:47:32 +11:00
Nathan Scott a365bdd5e8 [XFS] Reduce stack usage within xfs_bmapi by rearranging some code,
splitting realtime/btree allocators apart.  Based on Glens original
patches.

SGI-PV: 947312
SGI-Modid: xfs-linux-melb:xfs-kern:25372a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-14 13:34:16 +11:00
Nathan Scott 39269e29d4 [XFS] Reduce xfs_bmapi stack use by removing some local state variables,
and directly testing flags instead.

SGI-PV: 947312
SGI-Modid: xfs-linux-melb:xfs-kern:25370a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-14 13:33:50 +11:00
Nathan Scott 220b528413 [XFS] Dynamically allocate vattr in places it makes sense to do so, to
reduce stack use.  Also re-use vattr in some places so that multiple
copies are not held on-stack.

SGI-PV: 947312
SGI-Modid: xfs-linux-melb:xfs-kern:25369a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-14 13:33:36 +11:00
Nathan Scott 9b94c2eddf [XFS] Take a dentry structure off the stack into the data segment.
SGI-PV: 947312
SGI-Modid: xfs-linux-melb:xfs-kern:25361a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-14 13:32:54 +11:00
Nathan Scott 8f79405527 [XFS] Reduce complexity in xfs_trans_init by pushing complex macros out
into functions and hence reduce the stack footprint there.

SGI-PV: 947312
SGI-Modid: xfs-linux-melb:xfs-kern:25360a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-14 13:32:41 +11:00
Nathan Scott f6d75cbed9 [XFS] Dynamically allocate xfs_dir2_put_args_t structure to reduce stack
pressure in xfs_dir2_leaf_getdents routine.

SGI-PV: 947312
SGI-Modid: xfs-linux-melb:xfs-kern:25359a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-14 13:32:24 +11:00
Nathan Scott 1f6553f9f9 [XFS] Dynamically allocate local kiocb structures in readv/writev routines
to reduce stack footprint.

SGI-PV: 947312
SGI-Modid: xfs-linux-melb:xfs-kern:25358a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-14 13:30:48 +11:00
Mandy Kirkconnell 0293ce3a9f [XFS] 929045 567344 This mod introduces multi-level in-core file extent
functionality, building upon the new layout introduced in mod
xfs-linux:xfs-kern:207390a.  The new multi-level extent allocations are
only required for heavily fragmented files, so the old-style linear extent
list is used on files until the extents reach a pre-determined size of 4k.
4k buffers are used because this is the system page size on Linux i386 and
systems with larger page sizes don't seem to gain much, if anything, by
using their native page size as the extent buffer size. Also, using 4k
extent buffers everywhere provides a consistent interface for CXFS across
different platforms.  The 4k extent buffers are managed by an indirection
array (xfs_ext_irec_t) which is basically just a pointer array with a bit
of extra information to keep track of the number of extents in each buffer
as well as the extent offset of each buffer.  Major changes include:  -
Add multi-level in-core file extent functionality to the xfs_iext_  
subroutines introduced in mod:	xfs-linux:xfs-kern:207390a  - Introduce 13
new subroutines which add functionality for multi-level   in-core file
extents:	 xfs_iext_add_indirect_multi()	      
xfs_iext_remove_indirect()	   xfs_iext_realloc_indirect()	      
xfs_iext_indirect_to_direct()	      xfs_iext_bno_to_irec()	    
xfs_iext_idx_to_irec()	       xfs_iext_irec_init()	   
xfs_iext_irec_new()	    xfs_iext_irec_remove()	  
xfs_iext_irec_compact() 	xfs_iext_irec_compact_pages()	     
xfs_iext_irec_compact_full()	     xfs_iext_irec_update_extoffs()

SGI-PV: 928864
SGI-Modid: xfs-linux-melb:xfs-kern:207393a

Signed-off-by: Mandy Kirkconnell <alkirkco@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-14 13:30:23 +11:00
Mandy Kirkconnell 4eea22f01b [XFS] 929045 567344 This mod re-organizes some of the in-core file extent
code to prepare for an upcoming mod which will introduce multi-level
in-core extent allocations. Although the in-core extent management is
using a new code path in this mod, the functionality remains the same. 
Major changes include:	- Introduce 10 new subroutines which re-orgainze
the existing code but	do NOT change functionality:	    
xfs_iext_get_ext()	   xfs_iext_insert()	     xfs_iext_add()	  
 xfs_iext_remove()	   xfs_iext_remove_inline()	   
xfs_iext_remove_direct()	 xfs_iext_realloc_direct()	  
xfs_iext_direct_to_inline()	    xfs_iext_inline_to_direct()        
xfs_iext_destroy() - Remove 2 subroutines (functionality moved to new
subroutines above):	    xfs_iext_realloc() -replaced by xfs_iext_add()
and xfs_iext_remove()	      xfs_bmap_insert_exlist() - replaced by
xfs_iext_insert()	  xfs_bmap_delete_exlist() - replaced by
xfs_iext_remove() - Replace all hard-coded (indexed) extent assignments
with a call to	 xfs_iext_get_ext() - Replace all extent record pointer
arithmetic (ep++, ep--, base + lastx,..)   with calls to
xfs_iext_get_ext() - Update comments to remove the idea of a single
"extent list" and   introduce "extent record" terminology instead

SGI-PV: 928864
SGI-Modid: xfs-linux-melb:xfs-kern:207390a

Signed-off-by: Mandy Kirkconnell <alkirkco@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-14 13:29:52 +11:00
Nathan Scott 9f989c9455 [XFS] Additional mount time superblock validation checks.
SGI-PV: 950491
SGI-Modid: xfs-linux-melb:xfs-kern:25354a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-14 13:29:32 +11:00
David Chinner 01e1b69cfc [XFS] using a spinlock per cpu for superblock counter exclusion results in
a preēmpt counter overflow at 256p and above. Change the exclusion
mechanism to use atomic bit operations and busy wait loops to emulate the
spin lock exclusion mechanism but without the preempt count issues.

SGI-PV: 950027
SGI-Modid: xfs-linux-melb:xfs-kern:25338a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-14 13:29:16 +11:00
Nathan Scott 87cbc49cd4 [XFS] Add xfs_map_buffer helper, use it in a couple of places.
SGI-PV: 950211
SGI-Modid: xfs-linux-melb:xfs-kern:25312a

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-14 13:26:43 +11:00
Nathan Scott f51623b21f [XFS] Move some code around to avoid prototypes and prep for future
writepages code. 

SGI-PV: 950211
SGI-Modid: xfs-linux-melb:xfs-kern:25311a

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-14 13:26:27 +11:00
Nathan Scott 02d7c92334 [XFS] Use XFS_VFSTOM in more places instead of open coding it.
SGI-PV: 947206
SGI-Modid: xfs-linux-melb:xfs-kern:25310a

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-14 13:26:09 +11:00
Tim Shimmin fcce0f1f9a [XFS] forgot a couple of calls to XLOG_VEC_SET_TYPE when porting from irix
to linux.

SGI-PV: 931456
SGI-Modid: xfs-linux-melb:xfs-kern:25238a

Signed-off-by: Tim Shimmin <tes@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-14 13:25:02 +11:00
Nathan Scott a780143ea5 [XFS] UUID endianess fix. uu_timelow is a 32bit field and needs to be
swapped with be32_to_cpu. 

SGI-PV: 943272
SGI-Modid: xfs-linux-melb:xfs-kern:25232a

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-14 13:24:46 +11:00
David Chinner e8234a6871 [XFS] Add support for hotplug CPUs to the per-CPU superblock counters by
registering a notifier callback that listens to CPU up/down events to
modify the counters appropriately.

SGI-PV: 949726
SGI-Modid: xfs-linux-melb:xfs-kern:25214a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-14 13:23:52 +11:00
Nathan Scott 2d0f864be3 [XFS] Make headers compile for more compiler variants; minor cleanup.
SGI-PV: 949432
SGI-Modid: xfs-linux-melb:xfs-kern:25184a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-14 13:20:33 +11:00
Nathan Scott d2c32edf64 [XFS] When compiling with gcc 4.0 and CONFIG_SMP unset, there are many
warnings along the lines: xfs_linux.h:103:5: warning: "CONFIG_SMP" is not
defined. 

SGI-PV: 946630
SGI-Modid: xfs-linux-melb:xfs-kern:25171a

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-14 13:20:13 +11:00
Nathan Scott e0cc2325d1 [XFS] Flag the XFS inode cache as in need of spreading also.
SGI-PV: 949073
SGI-Modid: xfs-linux-melb:xfs-kern:25170a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-14 13:19:55 +11:00
Nathan Scott 20722a9192 [XFS] Fix a mutex_destroy diagnostic about a locked-mutex-on-destroy from
quota code.

SGI-PV: 949149
SGI-Modid: xfs-linux-melb:xfs-kern:25123a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-14 13:19:08 +11:00
Nathan Scott 8758280fcc [XFS] Cleanup the use of zones/slabs, more consistent and allows flags to
be passed.

SGI-PV: 949073
SGI-Modid: xfs-linux-melb:xfs-kern:25122a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-14 13:18:19 +11:00
David Chinner 8d280b98cf [XFS] On machines with more than 8 cpus, when running parallel I/O
threads, the incore superblock lock becomes the limiting factor for
buffered write throughput. Make the contended fields in the incore
superblock use per-cpu counters so that there is no global lock to limit
scalability.

SGI-PV: 946630
SGI-Modid: xfs-linux-melb:xfs-kern:25106a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-14 13:13:09 +11:00
Nathan Scott 9f4cbecd7e [XFS] XFS propagates MS_NOATIME through two levels internally but doesn't
actually use it.  Kill this dead code.	Signed-off-by: Christoph Hellwig
<hch@lst.de>

SGI-PV: 904196
SGI-Modid: xfs-linux-melb:xfs-kern:25086a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-14 13:05:30 +11:00
David Chinner 0c9512d746 [XFS] find_exported_dentry(). XFS does not need to use this symbol as it
is provided by a vector through the superblock export operations when the
filesystem is exported by NFS. The fix is to call that vector instead of
using the exported symbol directly.

SGI-PV: 948858
SGI-Modid: xfs-linux-melb:xfs-kern:25062a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-03-14 13:02:13 +11:00
Eric Sandeen 2353e8e9b6 [XFS] Don't map non-uptodate buffers in xfs_probe_cluster; also fixes
obscure corruption case

SGI-PV: 942658
SGI-Modid: xfs-linux-melb:xfs-kern:207119a

Signed-off-by: Eric Sandeen <sandeen@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-02-28 12:30:30 +11:00
Nathan Scott dae81d4774 [XFS] Reduce stack use during quota mounts (caused a panic). This
regressed recently via the fix for inherited quota inode attributes.

SGI-PV: 947312
SGI-Modid: xfs-linux-melb:xfs-kern:25318a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-02-28 12:30:13 +11:00
Nathan Scott 07ff2fa8fc [XFS] Fix a realtime allocator regression introduced by an old iget race
fix.  Noticed by Roger Willcocks.

SGI-PV: 949821
SGI-Modid: xfs-linux-melb:xfs-kern:25257a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-02-28 12:29:51 +11:00
Nathan Scott 9bd6f13dfd [XFS] Fix missing inode atime update from the utime syscall.
SGI-PV: 949214
SGI-Modid: xfs-linux-melb:xfs-kern:25136a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-02-07 20:27:44 +11:00
David Chinner 9fddaca229 [XFS] Account for the page we just wrote when we detect congestion during
the clustering of extra pages in a buffered write.

SGI-PV: 949210
SGI-Modid: xfs-linux-melb:xfs-kern:25130a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-02-07 20:27:24 +11:00
Christoph Lameter e965f9630c [PATCH] Direct Migration V9: Avoid writeback / page_migrate() method
Migrate a page with buffers without requiring writeback

This introduces a new address space operation migratepage() that may be used
by a filesystem to implement its own version of page migration.

A version is provided that migrates buffers attached to pages.  Some
filesystems (ext2, ext3, xfs) are modified to utilize this feature.

The swapper address space operation are modified so that a regular
migrate_page() will occur for anonymous pages without writeback (migrate_pages
forces every anonymous page to have a swap entry).

Signed-off-by: Mike Kravetz <kravetz@us.ibm.com>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-01 08:53:17 -08:00
Nathan Scott fad3aa1e8e [XFS] Fix regression in xfs_buf_rele dealing with non-hashed buffers, as
occur during log replay.  Novell bug 145204, Fedora bug 177848.

SGI-PV: 948860
SGI-Modid: xfs-linux-melb:xfs-kern:25064a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-02-01 12:14:52 +11:00
Yingping Lu 3a69c7dc6f [XFS] Interim solution for attribute insertion failure during file
creation due to ENOSPC. The current solution removes the inode when the
attribute insertion fails. Long term solution would be to make the inode
creation and attribute insertion atomic.

SGI-PV: 947610
SGI-Modid: xfs-linux-melb:xfs-kern:205193a

Signed-off-by: Yingping Lu <yingping@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-02-01 12:14:34 +11:00
David Chinner d88992f660 [XFS] Fix a race in xfs_submit_ioend() where we can be completing I/O for
a page while we are still submitting other buffers on the same page for
I/O.

SGI-PV: 948197
SGI-Modid: xfs-linux-melb:xfs-kern:25004a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-18 13:38:12 +11:00
Linus Torvalds 4a8e4a270b Merge git://oss.sgi.com:8090/oss/git/xfs-2.6 2006-01-15 22:18:04 -08:00
Nathan Scott 107a09c44b [XFS] remove no-longer-needed IS_NOATIME macro, twas just a build workaround
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-16 16:28:07 +11:00
Nathan Scott c2e8143220 [XFS] mutex fallout - fix debug builds and remove no-longer-useful comment.
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-16 16:21:34 +11:00
Nathan Scott 54245702ab [XFS] Fix symlink creation too, with respect to initialising SELinux
context.

SGI-PV: 946762
SGI-Modid: xfs-linux-melb:xfs-kern:24983a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-16 15:54:05 +11:00
Jesper Juhl 014c2544e6 return statement cleanup - kill pointless parentheses
This patch removes pointless parentheses from return statements.

Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-01-15 02:37:08 +01:00
Linus Torvalds 9f5974c873 Merge git://oss.sgi.com:8090/oss/git/xfs-2.6 2006-01-12 09:10:34 -08:00
Randy Dunlap 16f7e0fe2e [PATCH] capable/capability.h (fs/)
fs: Use <linux/capability.h> where capable() is used.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Tim Schmielau <tim@physik3.uni-rostock.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-11 18:42:13 -08:00
Randy.Dunlap c59ede7b78 [PATCH] move capable() to capability.h
- Move capable() from sched.h to capability.h;

- Use <linux/capability.h> where capable() is used
	(in include/, block/, ipc/, kernel/, a few drivers/,
	mm/, security/, & sound/;
	many more drivers/ to go)

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-11 18:42:13 -08:00
Nathan Scott ddae9c2ea7 Merge HEAD from oss.sgi.com:/oss/git/linux-2.6.git 2006-01-12 13:34:47 +11:00
Nathan Scott 0d1335b310 [XFS] Fix follow_link when dealing with symlinks larger than 256 bytes.
Thanks to Yamamoto Takashi.

SGI-PV: 947953
SGI-Modid: xfs-linux-melb:xfs-kern:24962a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-12 10:32:51 +11:00
Nathan Scott 3762ec6bf7 [XFS] Merge in trivial changes, sync up headers with userspace
equivalents.

SGI-PV: 907752
SGI-Modid: xfs-linux-melb:xfs-kern:24961a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-12 10:29:53 +11:00
Nathan Scott 6ab65429b4 [XFS] Fix compiler warnings from older gcc versions wrt printfalike
arguments.

SGI-PV: 907752
SGI-Modid: xfs-linux-melb:xfs-kern:24901a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 21:03:28 +11:00
Nathan Scott ca5ccbf98d [XFS] Fix some build fallout from atime changes.
SGI-PV: 946679
SGI-Modid: xfs-linux-melb:xfs-kern:24899a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 21:03:04 +11:00
Tim Shimmin 1259845d3f [XFS] remove XFS_LOG_RES_DEBUG and turn on the res history all the time to
get more useful error info on space for trans items

SGI-PV: 947110
SGI-Modid: xfs-linux-melb:xfs-kern:24886a

Signed-off-by: Tim Shimmin <tes@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 21:02:47 +11:00
Yingping Lu 71df099dc3 [XFS] xfssyncd is responsible for flushing inode or device's data by
extracting the work from its queue. In addition, this processing also
decrement the inode's i_count. If there are any remaining works in queue
before this process terminates, we have unbalanced increment and decrement
of i_count. Thus it can cause assertion failure of vn_count. The fix
allows xyssyncd to process any remaining work before it is shutdown. 

SGI-PV: 945935
SGI-Modid: xfs-linux-melb:xfs-kern:203970a

Signed-off-by: Yingping Lu <yingping@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 21:02:29 +11:00
Christoph Hellwig 75e17b3caf [XFS] add helper to get xfs_inode from vnode
SGI-PV: 947206
SGI-Modid: xfs-linux-melb:xfs-kern:203960a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 20:58:44 +11:00
Nathan Scott 204ab25f36 [XFS] Fix up offset type inconsistencies and gcc warnings from earlier
changes.

SGI-PV: 947038
SGI-Modid: xfs-linux-melb:xfs-kern:24875a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 20:50:22 +11:00
Christoph Hellwig da7f93e9ee [XFS] fix up per-device xfsbufd
SGI-PV: 947098
SGI-Modid: xfs-linux-melb:xfs-kern:203831a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 20:49:57 +11:00
Christoph Hellwig f5e596bbef [XFS] fix writeback control handling fix a reversed condition on where to
trylock and deal with block layer congestion properly.	Patch from David
Chinner and Christoph Hellwig.

SGI-PV: 947118
SGI-Modid: xfs-linux-melb:xfs-kern:203830a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 20:49:42 +11:00
Christoph Hellwig 6c4fe19f66 [XFS] cluster rewrites We can cluster mapped pages aswell, this improves
performances on rewrites since we can reduce the number of allocator
calls.

SGI-PV: 947118
SGI-Modid: xfs-linux-melb:xfs-kern:203829a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 20:49:28 +11:00
Christoph Hellwig 7336cea8c2 [XFS] pass full 64bit offsets to xfs_add_to_ioend
SGI-PV: 947118
SGI-Modid: xfs-linux-melb:xfs-kern:203828a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 20:49:16 +11:00
Christoph Hellwig d5cb48aaac [XFS] consolidate some code in xfs_page_state_convert The unmapped buffer
case is very similar to delayed and unwritten extends. Reorganize the code
to share some code for these cases.

SGI-PV: 947118
SGI-Modid: xfs-linux-melb:xfs-kern:203827a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 20:49:02 +11:00
Christoph Hellwig 9260dc6b2e [XFS] various fixes for xfs_convert_page fix various bogusities in
handling offets  From David Chinner and Christoph Hellwig

SGI-PV: 947118
SGI-Modid: xfs-linux-melb:xfs-kern:203826a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 20:48:47 +11:00
Christoph Hellwig 1defeac9d4 [XFS] clean up the xfs_offset_to_map interface Currently we pass a struct
page and a relative offset into that page around, and returns the current
xfs_iomap_t if the block at the specified offset fits into it, or a NULL
pointer otherwise.  This patch passed the full 64bit offset into the inode
that all callers have anyway, and changes the return value to a simple
boolean.  Also the function gets a more descriptive name: xfs_iomap_valid.

SGI-PV: 947118
SGI-Modid: xfs-linux-melb:xfs-kern:203825a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 20:48:33 +11:00
Christoph Hellwig 10ce444428 [XFS] use pagevec lookups This reduces the time spend in the radix tree
lookups and avoids unessecary look roundtrips.

SGI-PV: 947118
SGI-Modid: xfs-linux-melb:xfs-kern:203823a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 20:48:14 +11:00
Christoph Hellwig f6d6d4fcd1 [XFS] Initial pass at going directly-to-bio on the buffered IO path. This
allows us to submit much larger I/Os instead of sending down lots of small
buffer_heads.  To do this we need to have a rather complicated I/O
submission and completion tracking infrastructure.  Part of the latter has
been merged already a long time ago for direct I/O support. Part of the
problem is that we need to track sub-pagesize regions and for that we
still need buffer_heads for the time beeing.  Long-term I hope we can move
to better data strucutures and/or maybe move this to fs/mpage.c instead of
having it in XFS.  Original patch from Nathan Scott with various updates
from David Chinner and Christoph Hellwig.

SGI-PV: 947118
SGI-Modid: xfs-linux-melb:xfs-kern:203822a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:40:13 +11:00
Nathan Scott ce8e922c0e [XFS] Complete the pagebuf -> xfs_buf naming convention transition,
finally.

SGI-PV: 947038
SGI-Modid: xfs-linux-melb:xfs-kern:24866a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:39:08 +11:00
Yingping Lu 68bdb6eabc [XFS] Fixed delayed_blks assert failure during umount. The delayed_blks
was caused by ENOSPC but not Rreclaimed by xfs_release or xfs_inactive.
The fix changed the condition in xfs_release and xfs_inactive to invoke
xfs_inactive_free_eofblocks for this special case, changed
xfs_inactive_free_eofblocks to clean the delayed blks after eof. It also
changed xfs_write to set correct eof when ENOSPC occurs.

SGI-PV: 946267
SGI-Modid: xfs-linux-melb:xfs-kern:203788a

Signed-off-by: Yingping Lu <yingping@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:38:31 +11:00
David Chinner a6867a6815 [XFS] Introduce per-filesystem delwri pagebuf flushing to reduce
contention between filesystems and prevent deadlocks between filesystems
when a flush dependency exists between them.

SGI-PV: 947098
SGI-Modid: xfs-linux-melb:xfs-kern:24844a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:37:58 +11:00
Tim Shimmin 216d3b2acb [XFS] take out the call to vn_mark_bad() used when acl inherit fails and
it needs to back out the inode creation. Tested by xfs_tests/077.

SGI-PV: 930841
SGI-Modid: xfs-linux-melb:xfs-kern:24842a

Signed-off-by: Tim Shimmin <tes@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:37:38 +11:00
Christoph Hellwig 794fe2dc65 [XFS] endianess annotations and tidying for the uuid code
SGI-PV: 943272
SGI-Modid: xfs-linux-melb:xfs-kern:203709a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:37:17 +11:00
Nathan Scott 60a204f096 [XFS] Fix a thinko when generating a forced shutdown stack trace.
SGI-PV: 929558
SGI-Modid: xfs-linux-melb:xfs-kern:203817a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:37:00 +11:00
Ryan Hankins 0733af213f [XFS] Add a stack trace in the case of xfs_forced_shutdown.
SGI-PV: 929558
SGI-Modid: xfs-linux-melb:xfs-kern:203701a

Signed-off-by: Ryan Hankins <hankins@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:36:44 +11:00
Nathan Scott 77a7cce425 [XFS] Fix quotaoff logitem for project quota, affects log recovery only.
SGI-PV: 946444
SGI-Modid: xfs-linux-melb:xfs-kern:24768a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:35:57 +11:00
Nathan Scott 446ada4a03 [XFS] Add an XFS callout to security_inode_init_security; SE Linux is not
functional with XFS without this change.

SGI-PV: 946762
SGI-Modid: xfs-linux-melb:xfs-kern:24766a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:35:44 +11:00
Nathan Scott c2cd255060 [XFS] Fix v2 log bufsize reporting in /proc/mounts.
SGI-PV: 946760
SGI-Modid: xfs-linux-melb:xfs-kern:24765a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:35:32 +11:00
Christoph Hellwig 42fe2b1f7f [XFS] fix, speedup and simplify atime handling let the VFS handle atime
updates and only sync back to the xfs inode when nessecary

SGI-PV: 946679
SGI-Modid: xfs-linux-melb:xfs-kern:203362a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 15:35:17 +11:00