summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2
Commit message (Collapse)AuthorAgeFilesLines
* ocfs2: remove unused handle argument from ocfs2_meta_lock_full()Mark Fasheh2006-12-0114-51/+41
| | | | | | Now that this is unused and all callers pass NULL, we can safely remove it. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: make ocfs2_alloc_handle() staticMark Fasheh2006-12-012-7/+1
| | | | | | This is no longer used outside of journal.c Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: remove unused ocfs2_handle_add_lock()Mark Fasheh2006-12-014-117/+2
| | | | | | | | | | This gets us rid of a slab we no longer need, as well as removing the majority of what's left on ocfs2_journal_handle. ocfs2_commit_unstarted_handle() has no more real work to do, so remove that function too. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: remove unused ocfs2_handle_add_inode()Mark Fasheh2006-12-015-67/+0
| | | | | | | | We can also delete the unused infrastructure which was once in place to support this functionality. ocfs2_inode_private loses ip_handle and ip_handle_list. ocfs2_journal_handle loses handle_list. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: Don't allocate handle early in ocfs2_rename()Mark Fasheh2006-12-011-8/+1
| | | | | | It isn't used until ocfs2_start_trans() anyway. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: don't use handle for locking in allocation functionsMark Fasheh2006-12-017-152/+72
| | | | | | | | | Instead we record our state on the allocation context structure which all callers already know about and lifetime correctly. This means the reservation functions don't need a handle passed in any more, and we can also take it off the alloc context. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: don't pass handle to ocfs2_meta_lock in ocfs2_rename()Mark Fasheh2006-12-011-19/+37
| | | | | | Take and drop the locks directly. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: don't pass handle to ocfs2_meta_lock in ocfs2_symlink()Mark Fasheh2006-12-011-9/+12
| | | | | | Take and drop the locks directly. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: don't pass handle to ocfs2_meta_lock in ocfs2_unlink()Mark Fasheh2006-12-011-13/+12
| | | | | | Take and drop the locks directly. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: don't pass handle to ocfs2_meta_lock() in orphan dir codeMark Fasheh2006-12-011-27/+39
| | | | | | Take and drop the locks directly. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: don't pass handle to ocfs2_meta_lock() in ocfs2_link()Mark Fasheh2006-12-011-28/+26
| | | | | | Take and drop the locks directly. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: don't pass handle to ocfs2_meta_lock() in ocfs2_mknod()Mark Fasheh2006-12-011-7/+9
| | | | | | Take and drop the locks directly. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: don't pass handle to ocfs2_meta_lock() in __ocfs2_flush_truncate_log()Mark Fasheh2006-12-011-27/+19
| | | | | | Take and drop the locks directly. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: don't pass handle to ocfs2_meta_lock() in localalloc.cMark Fasheh2006-12-011-44/+40
| | | | | | Take and drop the locks directly. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: remove ocfs2_journal_handle flags fieldMark Fasheh2006-12-014-32/+4
| | | | | | | | Callers can set h_sync directly on the handle_t, whether a transaction has been started or not can be determined via the existence of the handle_t on the struct ocfs2_journal_handle. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: have ocfs2_extend_trans() take handle_tMark Fasheh2006-12-014-10/+6
| | | | | | | | | | No reason to use our wrapper struct in this function, so take the handle_t directly. Also fixes a bug where we were incorrectly setting the handle to NULL in case of a failure from journal_restart() Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: remove unused ocfs2_journal_handle fieldMark Fasheh2006-12-012-7/+1
| | | | | | max_buffs was just being set and not actually used. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: fix format warnings in dlm_alloc_pagevec()Mark Fasheh2006-12-011-1/+2
| | | | Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* [2.6 patch] make ocfs2_create_new_lock() staticAdrian Bunk2006-12-012-6/+4
| | | | | | | This patch makes the needlessly global ocfs2_create_new_lock() static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: cond_resched() in ocfs2_zero_extend()Mark Fasheh2006-10-201-0/+7
| | | | | | | The loop within ocfs2_zero_extend() can execute for a long time, causing spurious soft lockup warnings. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: fix page zeroing during simple extendsMark Fasheh2006-10-201-20/+24
| | | | | | | | The page zeroing code was missing the region between old i_size and new i_size for those extends that didn't actually require a change in space allocation. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: remove spurious d_count check in ocfs2_rename()Sunil Mushran2006-10-201-8/+0
| | | | | | | This was causing some folks to incorrectly get -EBUSY during rename. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: delete redundant memcmp()Akinobu Mita2006-10-201-4/+6
| | | | | | | This patch deletes redundant memcmp() while looking up in rb tree. Signed-off-by: Akinbou Mita <akinobu.mita@gmail.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* [PATCH] fs/*: use BUILD_BUG_ONAlexey Dobriyan2006-10-111-1/+1
| | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: David Howells <dhowells@redhat.com> Cc: Mark Fasheh <mark.fasheh@oracle.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] r/o bind mounts: clean up OCFS2 nlink handlingMark Fasheh2006-10-011-20/+19
| | | | | | | | | | | | | | | | | | | | | | OCFS2 does some operations on i_nlink, then reverts them if some of its operations fail to complete. This does not fit in well with the drop_nlink() logic where we expect i_nlink to stay at zero once it gets there. So, delay all of the nlink operations until we're sure that the operations have completed. Also, introduce a small helper to check whether an inode has proper "unlinkable" i_nlink counts no matter whether it is a directory or regular inode. This patch is broken out from the others because it does contain some logical changes. Signed-off-by: Dave Hansen <haveblue@us.ibm.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] r/o bind mount prepwork: inc_nlink() helperDave Hansen2006-10-012-7/+7
| | | | | | | | | | | This is mostly included for parity with dec_nlink(), where we will have some more hooks. This one should stay pretty darn straightforward for now. Signed-off-by: Dave Hansen <haveblue@us.ibm.com> Acked-by: Christoph Hellwig <hch@lst.de> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] r/o bind mounts: unlink: monitor i_nlinkDave Hansen2006-10-011-2/+2
| | | | | | | | | | | | | | | | | When a filesystem decrements i_nlink to zero, it means that a write must be performed in order to drop the inode from the filesystem. We're shortly going to have keep filesystems from being remounted r/o between the time that this i_nlink decrement and that write occurs. So, add a little helper function to do the decrements. We'll tie into it in a bit to note when i_nlink hits zero. Signed-off-by: Dave Hansen <haveblue@us.ibm.com> Acked-by: Christoph Hellwig <hch@lst.de> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Vectorize aio_read/aio_write fileop methodsBadari Pulavarty2006-10-011-15/+13
| | | | | | | | | | | | This patch vectorizes aio_read() and aio_write() methods to prepare for collapsing all aio & vectored operations into one interface - which is aio_read()/aio_write(). Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Michael Holzheu <HOLZHEU@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] inode-diet: Eliminate i_blksize from the inode structureTheodore Ts'o2006-09-272-6/+0
| | | | | | | | | | | | | | | | This eliminates the i_blksize field from struct inode. Filesystems that want to provide a per-inode st_blksize can do so by providing their own getattr routine instead of using the generic_fillattr() function. Note that some filesystems were providing pretty much random (and incorrect) values for i_blksize. [bunk@stusta.de: cleanup] [akpm@osdl.org: generic_fillattr() fix] Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] inode_diet: Replace inode.u.generic_ip with inode.i_privateTheodore Ts'o2006-09-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The following patches reduce the size of the VFS inode structure by 28 bytes on a UP x86. (It would be more on an x86_64 system). This is a 10% reduction in the inode size on a UP kernel that is configured in a production mode (i.e., with no spinlock or other debugging functions enabled; if you want to save memory taken up by in-core inodes, the first thing you should do is disable the debugging options; they are responsible for a huge amount of bloat in the VFS inode structure). This patch: The filesystem or device-specific pointer in the inode is inside a union, which is pretty pointless given that all 30+ users of this field have been using the void pointer. Get rid of the union and rename it to i_private, with a comment to explain who is allowed to use the void pointer. This is just a cleanup, but it allows us to reuse the union 'u' for something something where the union will actually be used. [judith@osdl.org: powerpc build fix] Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Judith Lebzelter <judith@osdl.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Really ignore kmem_cache_destroy return valueAlexey Dobriyan2006-09-271-3/+1
| | | | | | | | | | | | | | | | * Rougly half of callers already do it by not checking return value * Code in drivers/acpi/osl.c does the following to be sure: (void)kmem_cache_destroy(cache); * Those who check it printk something, however, slab_error already printed the name of failed cache. * XFS BUGs on failed kmem_cache_destroy which is not the decision low-level filesystem driver should make. Converted to ignore. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* ocfs2: Teach ocfs2_drop_lock() to use ->set_lvb() callbackMark Fasheh2006-09-241-31/+28
| | | | | | | | With this, we don't need to pass an additional struct with function pointer. Now that the callbacks are fully used, comment the remaining API. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: Remove ->unblock lockres operationMark Fasheh2006-09-241-146/+6
| | | | | | | | | | | Have ocfs2_process_blocked_lock() call ocfs2_generic_unblock_lock(), which gets to be ocfs2_unblock_lock() now that it's the only possible unblock function. Remove the ->unblock() callback from the structure, and all lock type specific unblock functions. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: move downconvert worker to lockres opsMark Fasheh2006-09-241-18/+32
| | | | | | | This way lock types don't have to manually pass it to ocfs2_generic_unblock_lock(). Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: Remove unused dlmglue functionsMark Fasheh2006-09-241-103/+0
| | | | | | | The meta data unblocking code no longer needs ocfs2_do_unblock_meta() or ocfs2_can_downconvert_meta_lock(), so remove them. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: Have the metadata lock use generic dlmglue functionsMark Fasheh2006-09-241-1/+31
| | | | | | | | Fill in the ->check_downconvert and ->set_lvb callbacks with meta data specific operations and switch ocfs2_unblock_meta() to call ocfs2_generic_unblock_lock() Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: Add ->set_lvb callback in dlmglueMark Fasheh2006-09-241-2/+29
| | | | | | This allows a lock type to set the value block before downconvert. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: Add ->check_downconvert callback in dlmglueMark Fasheh2006-09-241-1/+18
| | | | | | This will allow lock types to force a requeue of a lock downconvert. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: Check for refreshing locks in generic unblock functionMark Fasheh2006-09-241-12/+19
| | | | | | Tidy up the exit path a bit too. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: don't unconditionally pass LVB flagsMark Fasheh2006-09-241-3/+15
| | | | | | | | | Allow a lock type to specifiy whether it makes use of the LVB. The only type which does this right now is the meta data lock. This should save us some space on network messages since they won't have to needlessly transmit value blocks. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: combine inode and generic blocking AST functionsMark Fasheh2006-09-241-112/+11
| | | | | | | There is extremely little difference between the two now. We can remove the callback from ocfs2_lock_res_ops as well. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: Add ->get_osb() dlmglue locking operationMark Fasheh2006-09-241-0/+33
| | | | | | Will be used to find the ocfs2_super structure from a given lockres. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: remove ->unlock_ast() callback from ocfs2_lock_res_opsMark Fasheh2006-09-241-13/+3
| | | | | | | This was always defined to the same function in all locks, so clean things up by removing and passing ocfs2_unlock_ast() directly to the DLM. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: combine inode and generic AST functionsMark Fasheh2006-09-241-110/+10
| | | | | | | There is extremely little difference between the two now. We can remove the callback from ocfs2_lock_res_ops as well. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: Clean up lock resource refresh flagsMark Fasheh2006-09-241-14/+35
| | | | | | | Use of the refresh mechanism is lock-type wide, so move knowledge of that to the ocfs2_lock_res_ops structure. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: Remove i_generation from inode lock namesMark Fasheh2006-09-2410-53/+170
| | | | | | | | | | | | | | | | | | | | | | | OCFS2 puts inode meta data in the "lock value block" provided by the DLM. Typically, i_generation is encoded in the lock name so that a deleted inode on and a new one in the same block don't share the same lvb. Unfortunately, that scheme means that the read in ocfs2_read_locked_inode() is potentially thrown away as soon as the meta data lock is taken - we cannot encode the lock name without first knowing i_generation, which requires a disk read. This patch encodes i_generation in the inode meta data lvb, and removes the value from the inode meta data lock name. This way, the read can be covered by a lock, and at the same time we can distinguish between an up to date and a stale LVB. This will help cold-cache stat(2) performance in particular. Since this patch changes the protocol version, we take the opportunity to do a minor re-organization of two of the LVB fields. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: Encode i_generation in the meta data lvbMark Fasheh2006-09-242-7/+12
| | | | | | | | When i_generation is removed from the lockname, this will help us determine whether a meta data lvb has information that is in sync with the local struct inode. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: Free up some space in the lvbMark Fasheh2006-09-242-4/+6
| | | | | | | | lvb_version doesn't need to be a whole 32 bits. Make it an 8 bit field to free up some space. This should be backwards compatible until we use one of the fields, in which case we'd bump the lvb version anyway. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: Remove special casing for inode creation in ocfs2_dentry_attach_lock()Mark Fasheh2006-09-243-37/+14
| | | | | | | | We can't use LKM_LOCAL for new dentry locks because an unlink and subsequent re-create of a name/inode pair may result in the lock still being mastered somewhere in the cluster. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* ocfs2: manually d_move() during ocfs2_rename()Mark Fasheh2006-09-242-2/+5
| | | | | | | | | | Make use of FS_RENAME_DOES_D_MOVE to avoid a race condition that can occur during ->rename() if we d_move() outside of the parent directory cluster locks, and another node discovers the new name (created during the rename) and unlinks it. d_move() will unconditionally rehash a dentry - which will leave stale data in the system. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
OpenPOWER on IntegriCloud