summaryrefslogtreecommitdiffstats
path: root/fs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* [GFS2] Casts for printing 64bit numbersSteven Whitehouse2006-05-245-24/+27
| | | | Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Cast 64 bit printk args to unsigned long long.David Teigland2006-05-243-22/+26
| | | | | Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Flag up issue in selinux codeSteven Whitehouse2006-05-221-7/+4
| | | | Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] selinux supportRyan O'Hara2006-05-224-6/+69
| | | | | | | | | | This adds support to GFS2 for selinux extended attributes. There is a known bug in gfs2_ea_get() which is believed to be independant of this patch. Further patches will follow once that bug is fixed in order to make GFS2 use as much of the generic eattr infrastructure as possible. Signed-off-by: Ryan O'Hara <rohara@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] setup lock_dlm kobject earlierDavid Teigland2006-05-191-7/+7
| | | | | | | | | Setup the lock_dlm kobject before setting up the dlm lockspace instead of after. We want to use the sysfs files to detect the mount without having to wait for the dlm setup which can take a while. Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] glock debugging and inode cache changesSteven Whitehouse2006-05-186-43/+92
| | | | | | | | | | | | | | | This adds some extra debugging to glock.c and changes inode.c's deallocation code to call the debugging code at a suitable moment. I'm chasing down a particular bug to do with deallocation at the moment and the code can go again once the bug is fixed. Also this includes the first part of some changes to unify the Linux struct inode and GFS2's struct gfs2_inode. This transformation will happen in small parts over the next short period. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Update copyright date to 2006Steven Whitehouse2006-05-1871-71/+71
| | | | Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Remove semaphore.h from C filesSteven Whitehouse2006-05-1833-33/+0
| | | | | | | We no longer use semaphores, everything has been converted to mutex or rwsem, so we don't need to include this header any more. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Drop log lock on I/O error & tidy upSteven Whitehouse2006-05-184-16/+17
| | | | | | | | | This patch drops the log spinlock when an I/O error occurs to avoid any possible problems in case of blocking or recursion in the I/O error routine. It also has a few cosmetic changes to tidy up various other files. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Remove bits.c from the MakefileSteven Whitehouse2006-05-181-1/+1
| | | | Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Make newly moved functions staticSteven Whitehouse2006-05-181-9/+10
| | | | | | The functions moved from bits.c can now be made static. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Merge bits.[ch] into rgrp.cSteven Whitehouse2006-05-183-211/+161
| | | | | | | | Since they are small and will be inlined by the complier, it makes sense to merge the contents of bits.[ch] into rgrp.c Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Fix ref count bug that used to bite us on umountSteven Whitehouse2006-05-161-16/+6
| | | | | | | The ref count of certain glock's got elevated too far during unlink which caused umount to fail. This fixes it. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Fix attributes setting logicSteven Whitehouse2006-05-121-3/+10
| | | | | | | | The attributes logic for immutable was wrong so that there was not way to remove this attribute once set. This fixes the bug. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Remove incorrect initialisation of gh_ownerSteven Whitehouse2006-05-122-6/+0
| | | | | | | | The gh_owner field shouldn't be set or reset outside the glock code. These were left over from when recursive locking was allowed. It isn't any more, so they are not needed. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* [GFS2] Reverse block order in build_heightSteven Whitehouse2006-05-121-56/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The original code ordered the blocks allocated in the build_height routine backwards causing excessive disk seeks during a read of the metadata. This patch reverses the order to try and reduce disk seeks. Example: A five level metadata tree, I = Inode, P = Pointers, D = Data You need to read the blocks in the order: I P5 P4 P3 P2 P1 D in order to read a single data block. The new code now orders the blocks in this way. The old code used to order them as: I P1 P2 P3 P4 P5 D requiring two extra seeks on average. Note that for files which are grown by gradual extension rather than by truncate or by llseek/write at a large offset, this doesn't apply. In the case of writing to a file linearly, this routine will only be called upon to extend the height of the tree by one block at a time, so the ordering is determined by when its called rather than by the internals of the routine itself. Optimising that part of the ordering is a much harder problem. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* Merge branch 'master'Steven Whitehouse2006-05-1211-205/+395
|\
| * Merge git://oss.sgi.com:8090/xfs-2.6Linus Torvalds2006-05-094-20/+26
| |\ | | | | | | | | | | | | | | | | | | * git://oss.sgi.com:8090/xfs-2.6: [XFS] Fix a possible metadata buffer (AGFL) refcount leak when fixing an [XFS] Fix a project quota space accounting leak on rename. [XFS] Fix a possible forced shutdown due to mishandling write barriers
| | * [XFS] Fix a possible metadata buffer (AGFL) refcount leak when fixing anNathan Scott2006-05-081-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | AG freelist. SGI-PV: 952681 SGI-Modid: xfs-linux-melb:xfs-kern:25902a Signed-off-by: Nathan Scott <nathans@sgi.com>
| | * [XFS] Fix a project quota space accounting leak on rename.Nathan Scott2006-05-082-1/+13
| | | | | | | | | | | | | | | | | | | | | SGI-PV: 951636 SGI-Modid: xfs-linux-melb:xfs-kern:25811a Signed-off-by: Nathan Scott <nathans@sgi.com>
| | * [XFS] Fix a possible forced shutdown due to mishandling write barriersNathan Scott2006-05-081-18/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | with remount,ro. SGI-PV: 951944 SGI-Modid: xfs-linux-melb:xfs-kern:25742a Signed-off-by: Nathan Scott <nathans@sgi.com>
| * | [PATCH] fs/locks.c: Fix lease_initTrond Myklebust2006-05-081-9/+12
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | It is insane to be giving lease_init() the task of freeing the lock it is supposed to initialise, given that the lock is not guaranteed to be allocated on the stack. This causes lockups in fcntl_setlease(). Problem diagnosed by Daniel Hokka Zakrisson <daniel@hozac.com> Also fix a slab leak in __setlease() due to an uninitialised return value. Problem diagnosed by Björn Steinbrink. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Tested-by: Daniel Hokka Zakrisson <daniel@hozac.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * [PATCH] compat_sys_vmsplice: one-off in UIO_MAXIOV checkJens Axboe2006-05-041-1/+1
| | | | | | | | | | | | | | | | nr_segs may not be > UIO_MAXIOV, however it may be equal to. This makes the behaviour identical to the real sys_vmsplice(). The other foov syscalls also agree that this is the way to go. Signed-off-by: Jens Axboe <axboe@suse.de>
| * [PATCH] splice: redo page lookup if add_to_page_cache() returns -EEXISTJens Axboe2006-05-041-0/+2
| | | | | | | | | | | | | | | | | | This can happen quite easily, if several processes are trying to splice the same file at the same time. It's not a failure, it just means someone raced with us in allocating this file page. So just dump the allocated page and relookup the original. Signed-off-by: Jens Axboe <axboe@suse.de>
| * [PATCH] splice: rename remaining info variables to pipeJens Axboe2006-05-041-10/+10
| | | | | | | | | | | | | | Same thing was done in fs/pipe.c and most of fs/splice.c, but we had a few missing still. Signed-off-by: Jens Axboe <axboe@suse.de>
| * [PATCH] splice: LRU fixupsJens Axboe2006-05-041-22/+11
| | | | | | | | | | | | | | | | Nick says that the current construct isn't safe. This goes back to the original, but sets PIPE_BUF_FLAG_LRU on user pages as well as they all seem to be on the LRU in the first place. Signed-off-by: Jens Axboe <axboe@suse.de>
| * [PATCH] splice: fix unlocking of page on error ->prepare_write()Jens Axboe2006-05-041-3/+16
| | | | | | | | | | | | | | | | | | Looking at generic_file_buffered_write(), we need to unlock_page() if prepare write fails and it isn't due to racing with truncate(). Also trim the size if ->prepare_write() fails, if we have to. Signed-off-by: Jens Axboe <axboe@suse.de>
| * [PATCH] ext3: multile block allocate little endian fixesMingming Cao2006-05-041-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | Some places in ext3 multiple block allocation code (in 2.6.17-rc3) don't handle the little endian well. This was resulting in *wrong* block numbers being assigned to in-memory block variables and then stored on disk eventually. The following patch has been verified to fix an ext3 filesystem failure when run ltp test on a 64 bit machine. Signed-off-by; Mingming Cao <cmm@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * [PATCH] vmsplice: restrict stealing a little moreJens Axboe2006-05-022-4/+4
| | | | | | | | | | | | | | Apply the same rules as the anon pipe pages, only allow stealing if no one else is using the page. Signed-off-by: Jens Axboe <axboe@suse.de>
| * [PATCH] splice: fix page LRU accountingJens Axboe2006-05-021-10/+21
| | | | | | | | | | | | | | | | | | | | | | | | Currently we rely on the PIPE_BUF_FLAG_LRU flag being set correctly to know whether we need to fiddle with page LRU state after stealing it, however for some origins we just don't know if the page is on the LRU list or not. So remove PIPE_BUF_FLAG_LRU and do this check/add manually in pipe_to_file() instead. Signed-off-by: Jens Axboe <axboe@suse.de>
| * [PATCH] vmsplice: fix badly placed end paranthesisJens Axboe2006-05-021-1/+1
| | | | | | | | | | | | | | | | We need to use the minium of {len, PAGE_SIZE-off}, not {len, PAGE_SIZE}-off. The latter doesn't make any sense, and could cause us to attempt negative length transfers... Signed-off-by: Jens Axboe <axboe@suse.de>
| * Merge branch 'splice' of git://brick.kernel.dk/data/git/linux-2.6-blockLinus Torvalds2006-05-023-122/+230
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'splice' of git://brick.kernel.dk/data/git/linux-2.6-block: [PATCH] vmsplice: allow user to pass in gift pages [PATCH] pipe: enable atomic copying of pipe data to/from user space [PATCH] splice: call handle_ra_miss() on failure to lookup page [PATCH] Add ->splice_read/splice_write to def_blk_fops [PATCH] pipe: introduce ->pin() buffer operation [PATCH] splice: fix bugs in pipe_to_file() [PATCH] splice: fix bugs with stealing regular pipe pages
| | * [PATCH] vmsplice: allow user to pass in gift pagesJens Axboe2006-05-011-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If SPLICE_F_GIFT is set, the user is basically giving this pages away to the kernel. That means we can steal them for eg page cache uses instead of copying it. The data must be properly page aligned and also a multiple of the page size in length. Signed-off-by: Jens Axboe <axboe@suse.de>
| | * [PATCH] pipe: enable atomic copying of pipe data to/from user spaceJens Axboe2006-05-012-25/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pipe ->map() method uses kmap() to virtually map the pages, which is both slow and has known scalability issues on SMP. This patch enables atomic copying of pipe pages, by pre-faulting data and using kmap_atomic() instead. lmbench bw_pipe and lat_pipe measurements agree this is a Good Thing. Here are results from that on a UP machine with highmem (1.5GiB of RAM), running first a UP kernel, SMP kernel, and SMP kernel patched. Vanilla-UP: Pipe bandwidth: 1622.28 MB/sec Pipe bandwidth: 1610.59 MB/sec Pipe bandwidth: 1608.30 MB/sec Pipe latency: 7.3275 microseconds Pipe latency: 7.2995 microseconds Pipe latency: 7.3097 microseconds Vanilla-SMP: Pipe bandwidth: 1382.19 MB/sec Pipe bandwidth: 1317.27 MB/sec Pipe bandwidth: 1355.61 MB/sec Pipe latency: 9.6402 microseconds Pipe latency: 9.6696 microseconds Pipe latency: 9.6153 microseconds Patched-SMP: Pipe bandwidth: 1578.70 MB/sec Pipe bandwidth: 1579.95 MB/sec Pipe bandwidth: 1578.63 MB/sec Pipe latency: 9.1654 microseconds Pipe latency: 9.2266 microseconds Pipe latency: 9.1527 microseconds Signed-off-by: Jens Axboe <axboe@suse.de>
| | * [PATCH] splice: call handle_ra_miss() on failure to lookup pageJens Axboe2006-05-011-0/+6
| | | | | | | | | | | | | | | | | | | | | Notify the readahead logic of the missing page. Suggested by Oleg Nesterov. Signed-off-by: Jens Axboe <axboe@suse.de>
| | * [PATCH] Add ->splice_read/splice_write to def_blk_fopsJens Axboe2006-05-011-0/+2
| | | | | | | | | | | | | | | | | | It can use the generic handlers. Signed-off-by: Jens Axboe <axboe@suse.de>
| | * [PATCH] pipe: introduce ->pin() buffer operationJens Axboe2006-05-012-77/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ->map() function is really expensive on highmem machines right now, since it has to use the slower kmap() instead of kmap_atomic(). Splice rarely needs to access the virtual address of a page, so it's a waste of time doing it. Introduce ->pin() to take over the responsibility of making sure the page data is valid. ->map() is then reduced to just kmap(). That way we can also share a most of the pipe buffer ops between pipe.c and splice.c Signed-off-by: Jens Axboe <axboe@suse.de>
| | * [PATCH] splice: fix bugs in pipe_to_file()Jens Axboe2006-05-012-21/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found by Oleg Nesterov <oleg@tv-sign.ru>, fixed by me. - Only allow full pages to go to the page cache. - Check page != buf->page instead of using PIPE_BUF_FLAG_STOLEN. - Remember to clear 'stolen' if add_to_page_cache() fails. And as a cleanup on that: - Make the bottom fall-through logic a little less convoluted. Also make the steal path hold an extra reference to the page, so we don't have to differentiate between stolen and non-stolen at the end. Signed-off-by: Jens Axboe <axboe@suse.de>
| | * [PATCH] splice: fix bugs with stealing regular pipe pagesJens Axboe2006-04-302-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Check that page has suitable count for stealing in the regular pipes. - pipe_to_file() assumes that the page is locked on succesful steal, so do that in the pipe steal hook - Missing unlock_page() in add_to_page_cache() failure. Signed-off-by: Jens Axboe <axboe@suse.de>
| * | [PATCH] x86_64: Add compat_sys_vmsplice and use it in x86-64Andi Kleen2006-05-021-0/+20
| |/ | | | | | | | | | | Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * [PATCH] powerpc: Wire up *at syscallsAndreas Schwab2006-04-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | Wire up *at syscalls. This patch has been tested on ppc64 (using glibc's testsuite, both 32bit and 64bit), and compile-tested for ppc32 (I have currently no ppc32 system available, but I expect no problems). Signed-off-by: Andreas Schwab <schwab@suse.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
| * [PATCH] splice: make the read-side do batched page lookupsJens Axboe2006-04-271-30/+65
| | | | | | | | | | | | | | | | Use the new find_get_pages_contig() to potentially look up the entire splice range in one single call. This speeds up generic_file_splice_read() quite a bit. Signed-off-by: Jens Axboe <axboe@suse.de>
| * [PATCH] splice: switch to using page_cache_readahead()Jens Axboe2006-04-271-2/+2
| | | | | | | | | | | | Avoids doing useless work, when the file is fully cached. Signed-off-by: Jens Axboe <axboe@suse.de>
* | [GFS2] Readpages supportSteven Whitehouse2006-05-0513-129/+254
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds readpages support (and also corrects a small bug in the readpage error path at the same time). Hopefully this will improve performance by allowing GFS to submit larger lumps of I/O at a time. In order to simplify the setting of BH_Boundary, it currently gets set when we hit the end of a indirect pointer block. There is always a boundary at this point with the current allocation code. It doesn't get all the boundaries right though, so there is still room for improvement in this. See comments in fs/gfs2/ops_address.c for further information about readpages with GFS2. Signed-off-by: Steven Whitehouse
* | [GFS2] Set d_ops for root inodeRobert S Peterson2006-05-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Well, I managed to track down the bug in gfs2 that was causing my grief. Below is a patch for the problem. Please incorporate as you see fit. Or should I say: as you see git. The problem was basically that you never set d_ops for the root inode, so the wrong hash algorithm was being used. But only for the root directory. Turns out that if I used subdirectories, it used the proper hash and my files were found just fine. Signed-off-by: Robert S Peterson <rpeterso@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* | [DLM] fix grant_after_purge softlockupDavid Teigland2006-05-023-15/+30
| | | | | | | | | | | | | | | | | | | | | | In dlm_grant_after_purge() we were holding a hash table read_lock while calling put_rsb() which potentially removes the rsb from the hash table, taking the same lock in write. Fix this by flagging rsb's ahead of time that have been purged. Then iteratively read_lock the hash table, find a flagged rsb, unlock, process rsb. Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* | [GFS2] Fix bug in writepage()Steven Whitehouse2006-05-021-1/+1
| | | | | | | | | | | | | | | | | | As pointed out by Wendy Cheng, the logic in GFS2's writepage() function wasn't quite right with respect to invalidating pages when a file has been truncated. This patch fixes that. CC: Wendy Cheng <wcheng@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* | [GFS2] Remove some unused codeSteven Whitehouse2006-04-285-315/+0
| | | | | | | | | | | | | | Remove some of the unused code flagged up by Adrian Bunk. Cc: Adrian Bunk <bunk@stusta.de> Signed-off-by: Steven Whitehouse
* | [GFS2] [-mm patch] fs/gfs2/: possible cleanupsAdrian Bunk2006-04-2822-63/+79
| | | | | | | | | | | | | | | | | | | | | | | | This patch contains the following possible cleanups: - make needlessly global code static - #if 0 unused functions - remove the following global function that was both unused and unimplemented: - super.c: gfs2_do_upgrade() Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* | [DLM] PATCH 3/3 dlm: show recover stateDavid Teigland2006-04-281-0/+13
| | | | | | | | | | | | | | Expose the current recovery state in sysfs to help in debugging. Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>