aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs (follow)
AgeCommit message (Collapse)AuthorFilesLines
2006-09-07[XFS] Fix a bad pointer dereference in the quota statvfs handling.Nathan Scott1-1/+1
SGI-PV: 955993 SGI-Modid: xfs-linux-melb:xfs-kern:26934a Signed-off-by: Nathan Scott <nathans@sgi.com> Signed-off-by: David Chatterton <chatz@sgi.com>
2006-09-07[XFS] Fix xfs_splice_write() so appended data gets to disk.David Chinner1-0/+16
xfs_splice_write() failed to update the on disk inode size when extending the so when the file was closed the range extended by splice was truncated off. Hence any region of a file written to by splice would end up as a hole full of zeros. SGI-PV: 955939 SGI-Modid: xfs-linux-melb:xfs-kern:26920a Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: David Chatterton <chatz@sgi.com>
2006-09-07[XFS] Fix ABBA deadlock between i_mutex and iolock. Avoid callingLachlan McIlroy2-10/+19
__blockdev_direct_IO for the DIO_OWN_LOCKING case for direct I/O reads since it drops and reacquires the i_mutex while holding the iolock and this violates the locking order. SGI-PV: 955696 SGI-Modid: xfs-linux-melb:xfs-kern:26898a Signed-off-by: Lachlan McIlroy <lachlan@sgi.com> Signed-off-by: David Chatterton <chatz@sgi.com>
2006-09-07[XFS] Prevent free space oversubscription and xfssyncd looping.David Chinner4-31/+40
The fix for recent ENOSPC deadlocks introduced certain limitations on allocations. The fix could cause xfssyncd to loop endlessly if we did not leave some space free for the allocator to work correctly. Basically, we needed to ensure that we had at least 4 blocks free for an AG free list and a block for the inode bmap btree at all times. However, this did not take into account the fact that each AG has a free list that needs 4 blocks. Hence any filesystem with more than one AG could cause oversubscription of free space and make xfssyncd spin forever trying to allocate space needed for AG freelists that was not available in the AG. The following patch reserves space for the free lists in all AGs plus the inode bmap btree which prevents oversubscription. It also prevents those blocks from being reported as free space (as they can never be used) and makes the SMP in-core superblock accounting code and the reserved block ioctl respect this requirement. SGI-PV: 955674 SGI-Modid: xfs-linux-melb:xfs-kern:26894a Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: David Chatterton <chatz@sgi.com>
2006-08-30[XFS] Fix char size overflow in bmap_alloc call for unwritten extentAdrian Bunk1-1/+1
conversion. Since bma.conv is a char and XFS_BMAPI_CONVERT is 0x1000, bma.conv was always assigned zero. Spotted by the GNU C compiler (SVN version). SGI-PV: 947312 SGI-Modid: xfs-linux-melb:xfs-kern:26887a Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-08-10[XFS] Fix xfs_free_extent related NULL pointer dereference.Nathan Scott1-49/+54
We recently fixed an out-of-space deadlock in XFS, and part of that fix involved the addition of the XFS_ALLOC_FLAG_FREEING flag to some of the space allocator calls to indicate they're freeing space, not allocating it. There was a missed xfs_alloc_fix_freelist condition test that did not correctly test "flags". The same test would also test an uninitialised structure field (args->userdata) and depending on its value either would or would not return early with a critical buffer pointer set to NULL. This fixes that up, adds asserts to several places to catch future botches of this nature, and skips sections of xfs_alloc_fix_freelist that are irrelevent for the space-freeing case. SGI-PV: 955303 SGI-Modid: xfs-linux-melb:xfs-kern:26743a Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-07-28[XFS] Ensure bulkstat from an invalid inode number gets caught always withNathan Scott1-7/+10
EINVAL. SGI-PV: 953819 SGI-Modid: xfs-linux-melb:xfs-kern:26629a Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-07-28[XFS] Fix a barrier related forced shutdown on mounts with quota enabled.Nathan Scott2-1/+8
SGI-PV: 912426 SGI-Modid: xfs-linux-melb:xfs-kern:26622a Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-07-28[XFS] Fix remount vs no/barrier options by ensuring we clear unwantedNathan Scott2-8/+8
flags from iclog buffers before submitting them for writing. SGI-PV: 954772 SGI-Modid: xfs-linux-melb:xfs-kern:26605a Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-07-28[XFS] All xfs_disk_dquot_t values are (as the name says) disk endian.Christoph Hellwig1-6/+13
Before putting them into struct statfs they should be endian-swapped. SGI-PV: 954580 SGI-Modid: xfs-linux-melb:xfs-kern:26550a Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-07-10[PATCH] FDPIC: Move roundup() into linux/kernel.hDavid Howells1-1/+0
Move the roundup() macro from binfmt_elf.c into linux/kernel.h as it's generally useful. [akpm@osdl.org: nuke all the other implementations] Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-30Remove obsolete #include <linux/config.h>Jörn Engel3-3/+0
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-28[PATCH] mark address_space_operations constChristoph Hellwig3-3/+3
Same as with already do with the file operations: keep them in .rodata and prevents people from doing runtime patching. Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Steven French <sfrench@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27Merge git://oss.sgi.com:8090/nathans/xfs-2.6Linus Torvalds11-25/+21
* git://oss.sgi.com:8090/nathans/xfs-2.6: [XFS] Fixup whitespace damage in log_write, remove final warning. [XFS] Rework code snippets slightly to remove remaining recent-gcc [XFS] Fix realtime subvolume expansion, a porting bug b0rked it. Coverity [XFS] Remove a race condition where a linked inode could BUG_ON in [XFS] Remove redundant directory checks from inode link operation. [XFS] Remove a couple of no-longer-used macros. [XFS] Reduce size of xfs_trans_t structure. * remove ->t_forw, ->t_back -- [XFS] remove unused behaviour lock - shrink XFS vnode as a side effect. [XFS] * There is trivial "inode => vnode => inode" conversion, but only [XFS] link(2) on directory is banned in VFS.
2006-06-28[XFS] Fixup whitespace damage in log_write, remove final warning.Nathan Scott1-2/+2
SGI-PV: 904196 SGI-Modid: xfs-linux-melb:xfs-kern:26366a Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-06-27[PATCH] cpu hotplug: use hotplug version of cpu notifier in appropriate placesChandra Seetharaman1-8/+10
Make use the of newly defined hotplug version of cpu_notifier functionality wherever appropriate. Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com> Cc: Ashok Raj <ashok.raj@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-28[XFS] Rework code snippets slightly to remove remaining recent-gccNathan Scott3-3/+6
warnings. SGI-PV: 904196 SGI-Modid: xfs-linux-melb:xfs-kern:26364a Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-06-28[XFS] Fix realtime subvolume expansion, a porting bug b0rked it. CoverityEric Sesterhenn1-1/+1
made me look at this code (bug id #344). We only return with XFS_ERROR(EINVAL) if mp->m_rtdev_targp is valid and pass it otherwise to xfs_read_buf() where some function calls later it gets dereferenced by an assert. SGI-PV: 954266 SGI-Modid: xfs-linux-melb:xfs-kern:26363a Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-06-27[XFS] Remove a race condition where a linked inode could BUG_ON inNathan Scott1-2/+4
d_instantiate, due to fast transaction committal removing the last remaining reference before we were all done. SGI-PV: 953287 SGI-Modid: xfs-linux-melb:xfs-kern:26347a Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-06-27[XFS] Remove redundant directory checks from inode link operation.Alexey Dobriyan1-3/+0
SGI-PV: 904196 SGI-Modid: xfs-linux-melb:xfs-kern:26343a Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-06-27[XFS] Remove a couple of no-longer-used macros.Nathan Scott1-2/+0
SGI-PV: 904196 SGI-Modid: xfs-linux-melb:xfs-kern:26339a Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-06-27[XFS] Reduce size of xfs_trans_t structure. * remove ->t_forw, ->t_back --Alexey Dobriyan1-2/+2
unused * ->t_ag_freeblks_delta, ->t_ag_flist_delta, ->t_ag_btree_delta are debugging aid -- wrap them in everyone's favourite way. As a result, cut "xfs_trans" slab object size from 592 to 572 bytes here. SGI-PV: 904196 SGI-Modid: xfs-linux-melb:xfs-kern:26319a Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-06-27[XFS] remove unused behaviour lock - shrink XFS vnode as a side effect.Alexey Dobriyan1-3/+0
SGI-PV: 904196 SGI-Modid: xfs-linux-melb:xfs-kern:26299a Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-06-27[XFS] * There is trivial "inode => vnode => inode" conversion, but onlyAlexey Dobriyan1-1/+1
flags and mode of final inode are looked at. Pass original inode instead. * Two occurences of bhv_vnode_t go out. SGI-PV: 904196 SGI-Modid: xfs-linux-melb:xfs-kern:26298a Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-06-27[XFS] link(2) on directory is banned in VFS.Alexey Dobriyan1-6/+5
SGI-PV: 904196 SGI-Modid: xfs-linux-melb:xfs-kern:26293a Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-06-25[PATCH] xfs: update ->flush method protoAlexey Dobriyan1-1/+2
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Nathan Scott <nathans@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-23[PATCH] for_each_possible_cpu: xfsKAMEZAWA Hiroyuki2-3/+3
for_each_cpu() actually iterates across all possible CPUs. We've had mistakes in the past where people were using for_each_cpu() where they should have been iterating across only online or present CPUs. This is inefficient and possibly buggy. We're renaming for_each_cpu() to for_each_possible_cpu() to avoid this in the future. This patch replaces for_each_cpu with for_each_possible_cpu. in xfs. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Acked-by: Nathan Scott <nathans@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-23[PATCH] XFS: Use the dentry passed to statfs() to limit the scope of the resultsDavid Howells1-1/+2
Enable XFS to limit the statfs() results to the project quota covering the dentry used as a base for call. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Nathan Scott <nathans@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-23[PATCH] VFS: Permit filesystem to perform statfs with a known root dentryDavid Howells1-2/+2
Give the statfs superblock operation a dentry pointer rather than a superblock pointer. This complements the get_sb() patch. That reduced the significance of sb->s_root, allowing NFS to place a fake root there. However, NFS does require a dentry to use as a target for the statfs operation. This permits the root in the vfsmount to be used instead. linux/mount.h has been added where necessary to make allyesconfig build successfully. Interest has also been expressed for use with the FUSE and XFS filesystems. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Al Viro <viro@zeniv.linux.org.uk> Cc: Nathan Scott <nathans@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-23[PATCH] VFS: Permit filesystem to override root dentry on mountDavid Howells1-3/+5
Extend the get_sb() filesystem operation to take an extra argument that permits the VFS to pass in the target vfsmount that defines the mountpoint. The filesystem is then required to manually set the superblock and root dentry pointers. For most filesystems, this should be done with simple_set_mnt() which will set the superblock pointer and then set the root dentry to the superblock's s_root (as per the old default behaviour). The get_sb() op now returns an integer as there's now no need to return the superblock pointer. This patch permits a superblock to be implicitly shared amongst several mount points, such as can be done with NFS to avoid potential inode aliasing. In such a case, simple_set_mnt() would not be called, and instead the mnt_root and mnt_sb would be set directly. The patch also makes the following changes: (*) the get_sb_*() convenience functions in the core kernel now take a vfsmount pointer argument and return an integer, so most filesystems have to change very little. (*) If one of the convenience function is not used, then get_sb() should normally call simple_set_mnt() to instantiate the vfsmount. This will always return 0, and so can be tail-called from get_sb(). (*) generic_shutdown_super() now calls shrink_dcache_sb() to clean up the dcache upon superblock destruction rather than shrink_dcache_anon(). This is required because the superblock may now have multiple trees that aren't actually bound to s_root, but that still need to be cleaned up. The currently called functions assume that the whole tree is rooted at s_root, and that anonymous dentries are not the roots of trees which results in dentries being left unculled. However, with the way NFS superblock sharing are currently set to be implemented, these assumptions are violated: the root of the filesystem is simply a dummy dentry and inode (the real inode for '/' may well be inaccessible), and all the vfsmounts are rooted on anonymous[*] dentries with child trees. [*] Anonymous until discovered from another tree. (*) The documentation has been adjusted, including the additional bit of changing ext2_* into foo_* in the documentation. [akpm@osdl.org: convert ipath_fs, do other stuff] Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Al Viro <viro@zeniv.linux.org.uk> Cc: Nathan Scott <nathans@sgi.com> Cc: Roland Dreier <rolandd@cisco.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-20[XFS] Remove files from the build that are now unused.Nathan Scott6-2/+0
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-06-20[XFS] Fix a Makefile issue related to exports.o handling.Nathan Scott1-1/+1
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-06-20[XFS] Remove version 1 directory code. Never functioned on Linux, justNathan Scott71-4595/+285
pure bloat. SGI-PV: 952969 SGI-Modid: xfs-linux-melb:xfs-kern:26251a Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-06-20[XFS] Map EFSCORRUPTED to an actual error code, not just a made up oneNathan Scott1-18/+2
(990). Turns out some ye-olde unices used EUCLEAN as Filesystem-needs-cleaning, so now we use that too. SGI-PV: 953954 SGI-Modid: xfs-linux-melb:xfs-kern:26286a Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-06-19[XFS] Kill direct access to ->count in valusema(); all we ever use it forAl Viro6-19/+20
is check if semaphore is actually locked, which can be trivially done in portable way. Code gets more reabable, while we are at it... SGI-PV: 953915 SGI-Modid: xfs-linux-melb:xfs-kern:26274a Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-06-19[XFS] Remove unneeded conditional code on NFS export interface relatedNathan Scott2-9/+1
code paths. SGI-PV: 904196 SGI-Modid: xfs-linux-melb:xfs-kern:26250a Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-06-19[XFS] Remove an incorrect use of unlikely() on a relatively likely codeNathan Scott1-1/+1
path. SGI-PV: 904196 SGI-Modid: xfs-linux-melb:xfs-kern:26249a Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-06-19[XFS] Push some common code out of write path into core XFS code forNathan Scott3-75/+90
sharing. SGI-PV: 904196 SGI-Modid: xfs-linux-melb:xfs-kern:26248a Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-06-19[XFS] Remove unnecessary local from open_exec dmapi path.Nathan Scott1-14/+9
SGI-PV: 904196 SGI-Modid: xfs-linux-melb:xfs-kern:26247a Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-06-13[XFS] Minor XFS documentation updates.Nathan Scott1-10/+11
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-06-09[XFS] Fix broken const use inside local suffix_strtoul routine.Nathan Scott1-3/+3
SGI-PV: 904196 SGI-Modid: xfs-linux-melb:xfs-kern:26201a Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-06-09[XFS] Fix nused counter. It's currently getting set to -1 rather thanMandy Kirkconnell1-1/+1
getting decremented by 1. Since nused never reaches 0, the "if (!free->hdr.nused)" check in xfs_dir2_leafn_remove() fails every time and xfs_dir2_shrink_inode() doesn't get called when it should. This causes extra blocks to be left on an empty directory and the directory in unable to be converted back to inline extent mode. SGI-PV: 951958 SGI-Modid: xfs-linux-melb:xfs-kern:211382a Signed-off-by: Mandy Kirkconnell <alkirkco@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-06-09[XFS] Fix mismerge of the fs_writable cleanup patch causing a freeze/thawNathan Scott1-5/+4
test hang. SGI-PV: 953563 SGI-Modid: xfs-linux-melb:xfs-kern:26182a Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-06-09[XFS] Fix up debug code so that bulkstat wont generate thousands ofNathan Scott2-10/+15
fsstress warnings. SGI-PV: 904196 SGI-Modid: xfs-linux-melb:xfs-kern:26111a Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-06-09[XFS] Remove unused parameter from di2xflags routine.Nathan Scott1-5/+4
SGI-PV: 904192 SGI-Modid: xfs-linux-melb:xfs-kern:26110a Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-06-09[XFS] Cleanup a missed porting conversion, and freezing.Nathan Scott4-19/+11
SGI-PV: 953338 SGI-Modid: xfs-linux-melb:xfs-kern:26109a Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-06-09[XFS] Resolve a namespace collision on remaining vtypes for FreeBSDNathan Scott17-93/+94
porters. SGI-PV: 953338 SGI-Modid: xfs-linux-melb:xfs-kern:26108a Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-06-09[XFS] Resolve a namespace collision on vnode/vnodeops for FreeBSD porters.Nathan Scott36-636/+496
SGI-PV: 953338 SGI-Modid: xfs-linux-melb:xfs-kern:26107a Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-06-09[XFS] Resolve a namespace collision on vfs/vfsops for FreeBSD porters.Nathan Scott19-224/+183
SGI-PV: 9533338 SGI-Modid: xfs-linux-melb:xfs-kern:26106a Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-06-09[XFS] statvfs component of directory/project quota support, codeNathan Scott1-1/+57
originally by Glen. SGI-PV: 932952 SGI-Modid: xfs-linux-melb:xfs-kern:26105a Signed-off-by: Nathan Scott <nathans@sgi.com>