commit e2057c5a63821e17c8a54dab6db680c77ce7ee6c Author: Mark Fasheh Date: Tue Oct 3 17:53:05 2006 -0700 ocfs2: cond_resched() in ocfs2_zero_extend() The loop within ocfs2_zero_extend() can execute for a long time, causing spurious soft lockup warnings. Signed-off-by: Mark Fasheh commit 0effef776ff95b7a6d6e48a2ef407ecaa8c21f96 Author: Mark Fasheh Date: Tue Oct 3 17:44:42 2006 -0700 ocfs2: fix page zeroing during simple extends 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 commit 711a40fcaa83bfad87736544b69f6fdd6527482d Author: Sunil Mushran Date: Wed Oct 11 12:23:02 2006 -0700 ocfs2: remove spurious d_count check in ocfs2_rename() This was causing some folks to incorrectly get -EBUSY during rename. Signed-off-by: Sunil Mushran Signed-off-by: Mark Fasheh commit 79cd22d3ac921b9209bf813c7e75e6b69e74896c Author: Akinobu Mita Date: Thu Oct 12 14:29:33 2006 +0900 ocfs2: delete redundant memcmp() This patch deletes redundant memcmp() while looking up in rb tree. Signed-off-by: Akinbou Mita Signed-off-by: Mark Fasheh commit 2ecd05ae68a903761e736e9e0aca40d6ace4319e Author: Alexey Dobriyan Date: Wed Oct 11 01:22:05 2006 -0700 [PATCH] fs/*: use BUILD_BUG_ON Signed-off-by: Alexey Dobriyan Cc: David Woodhouse Cc: David Howells Cc: Mark Fasheh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 17ff785691503f63ec648df82a7fdaece7695561 Author: Mark Fasheh Date: Sat Sep 30 23:29:05 2006 -0700 [PATCH] r/o bind mounts: clean up OCFS2 nlink handling 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 Signed-off-by: Mark Fasheh Cc: Christoph Hellwig Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d8c76e6f45c111c32a4b3e50a2adc9210737b0d8 Author: Dave Hansen Date: Sat Sep 30 23:29:04 2006 -0700 [PATCH] r/o bind mount prepwork: inc_nlink() helper 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 Acked-by: Christoph Hellwig Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9a53c3a783c2fa9b969628e65695c11c3e51e673 Author: Dave Hansen Date: Sat Sep 30 23:29:03 2006 -0700 [PATCH] r/o bind mounts: unlink: monitor i_nlink 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 Acked-by: Christoph Hellwig Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 027445c37282bc1ed26add45e573ad2d3e4860a5 Author: Badari Pulavarty Date: Sat Sep 30 23:28:46 2006 -0700 [PATCH] Vectorize aio_read/aio_write fileop methods 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 Signed-off-by: Christoph Hellwig Cc: Michael Holzheu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ba52de123d454b57369f291348266d86f4b35070 Author: Theodore Ts'o Date: Wed Sep 27 01:50:49 2006 -0700 [PATCH] inode-diet: Eliminate i_blksize from the inode structure 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" Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8e18e2941c53416aa219708e7dcad21fb4bd6794 Author: Theodore Ts'o Date: Wed Sep 27 01:50:46 2006 -0700 [PATCH] inode_diet: Replace inode.u.generic_ip with inode.i_private 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" Signed-off-by: Judith Lebzelter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1a1d92c10dd24bbdc28b3d6e2d03ec199dd3a65b Author: Alexey Dobriyan Date: Wed Sep 27 01:49:40 2006 -0700 [PATCH] Really ignore kmem_cache_destroy return value * 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0d5dc6c2dd7a3cd2b2f505b0625c4ec9c0e5b4f0 Author: Mark Fasheh Date: Thu Sep 14 14:44:51 2006 -0700 ocfs2: Teach ocfs2_drop_lock() to use ->set_lvb() callback 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 commit b5e500e23e532795fbf79a3cdbcb014f207fdb2a Author: Mark Fasheh Date: Wed Sep 13 22:01:16 2006 -0700 ocfs2: Remove ->unblock lockres operation 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 commit cc567d89b3af4294580c9c97610d2c1018032e33 Author: Mark Fasheh Date: Wed Sep 13 21:52:21 2006 -0700 ocfs2: move downconvert worker to lockres ops This way lock types don't have to manually pass it to ocfs2_generic_unblock_lock(). Signed-off-by: Mark Fasheh commit 08280f11de91beac2f5234ce5fc2ed246dfe6a86 Author: Mark Fasheh Date: Wed Sep 13 21:41:56 2006 -0700 ocfs2: Remove unused dlmglue functions 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 commit 810d5aeba18825c754cf47db59eb83814a54bb27 Author: Mark Fasheh Date: Wed Sep 13 21:39:52 2006 -0700 ocfs2: Have the metadata lock use generic dlmglue functions 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 commit 5ef0d4ea087740908f4fb57606f6c09e3b90c477 Author: Mark Fasheh Date: Wed Sep 13 21:21:52 2006 -0700 ocfs2: Add ->set_lvb callback in dlmglue This allows a lock type to set the value block before downconvert. Signed-off-by: Mark Fasheh commit 16d5b9567ad5241b5c6e0cc4778c1af6c04bb801 Author: Mark Fasheh Date: Wed Sep 13 21:10:12 2006 -0700 ocfs2: Add ->check_downconvert callback in dlmglue This will allow lock types to force a requeue of a lock downconvert. Signed-off-by: Mark Fasheh commit f7fbfdd1fc91543253ba742a926a29c289f8e6ca Author: Mark Fasheh Date: Wed Sep 13 21:02:29 2006 -0700 ocfs2: Check for refreshing locks in generic unblock function Tidy up the exit path a bit too. Signed-off-by: Mark Fasheh commit b80fc012e03f8f207911b5eafe6916b000e03c8b Author: Mark Fasheh Date: Tue Sep 12 22:08:14 2006 -0700 ocfs2: don't unconditionally pass LVB flags 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 commit aa2623ad80577b37637914e809bafa36994ccdf1 Author: Mark Fasheh Date: Tue Sep 12 21:58:23 2006 -0700 ocfs2: combine inode and generic blocking AST functions 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 commit 54a7e7552e484c08db221e49c4519ccdeb8882d0 Author: Mark Fasheh Date: Tue Sep 12 21:49:13 2006 -0700 ocfs2: Add ->get_osb() dlmglue locking operation Will be used to find the ocfs2_super structure from a given lockres. Signed-off-by: Mark Fasheh commit 2a45f2d13e1dd91bc110801f5818379f2699509c Author: Mark Fasheh Date: Tue Sep 12 21:36:58 2006 -0700 ocfs2: remove ->unlock_ast() callback from ocfs2_lock_res_ops 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 commit e92d57df273a3a7e57688e1d4f5a894870d550d2 Author: Mark Fasheh Date: Tue Sep 12 21:34:35 2006 -0700 ocfs2: combine inode and generic AST functions 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 commit f625c9793b6cc64aeb1b6387039d09019c214352 Author: Mark Fasheh Date: Tue Sep 12 21:24:53 2006 -0700 ocfs2: Clean up lock resource refresh flags 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 commit 24c19ef40474c3930597f31ae233dc06319bd881 Author: Mark Fasheh Date: Fri Sep 22 17:28:19 2006 -0700 ocfs2: Remove i_generation from inode lock names 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 commit f9e2d82e6395cfa0802446b54b63cc412089d82c Author: Mark Fasheh Date: Tue Sep 12 15:35:49 2006 -0700 ocfs2: Encode i_generation in the meta data lvb 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 commit 4d3b83f7364269b66cdda271f680bd99e77afd96 Author: Mark Fasheh Date: Tue Sep 12 15:22:18 2006 -0700 ocfs2: Free up some space in the lvb 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 commit 0027dd5bc213bc639e09dd002a4ab56bd18317c3 Author: Mark Fasheh Date: Thu Sep 21 16:51:28 2006 -0700 ocfs2: Remove special casing for inode creation in ocfs2_dentry_attach_lock() 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 commit 1ba9da2ffa54b56a6346746248bfa38124d499a6 Author: Mark Fasheh Date: Fri Sep 8 14:22:54 2006 -0700 ocfs2: manually d_move() during ocfs2_rename() 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 commit 1390334b4c697b7588d5661fcf6acaeec409cf4c Author: Mark Fasheh Date: Fri Sep 8 14:21:43 2006 -0700 ocfs2: Remove the dentry vote This is unused now. Signed-off-by: Mark Fasheh commit 379dfe9d0db99ed33fb089fcb9c07f5f92566e9e Author: Mark Fasheh Date: Fri Sep 8 14:21:03 2006 -0700 ocfs2: Hook rest of the file system into dentry locking API Actually replace the vote calls with the new dentry operations. Make any necessary adjustments to get the scheme to work. Signed-off-by: Mark Fasheh commit 80c05846f604bab6d61e9732c262420ee9f5f358 Author: Mark Fasheh Date: Fri Sep 8 14:43:18 2006 -0700 ocfs2: Add dentry tracking API Replace the dentry vote mechanism with a cluster lock which covers a set of dentries. This allows us to force d_delete() only on nodes which actually care about an unlink. Every node that does a ->lookup() gets a read only lock on the dentry, until an unlink during which the unlinking node, will request an exclusive lock, forcing the other nodes who care about that dentry to d_delete() it. The effect is that we retain a very lightweight ->d_revalidate(), and at the same time get to make large improvements to the average case performance of the ocfs2 unlink and rename operations. This patch adds the higher level API and the dentry manipulation code. Signed-off-by: Mark Fasheh commit d680efe9d8fe0eb99d9dd063a4def6b362cdb40d Author: Mark Fasheh Date: Fri Sep 8 14:14:34 2006 -0700 ocfs2: Add new cluster lock type Replace the dentry vote mechanism with a cluster lock which covers a set of dentries. This allows us to force d_delete() only on nodes which actually care about an unlink. Every node that does a ->lookup() gets a read only lock on the dentry, until an unlink during which the unlinking node, will request an exclusive lock, forcing the other nodes who care about that dentry to d_delete() it. The effect is that we retain a very lightweight ->d_revalidate(), and at the same time get to make large improvements to the average case performance of the ocfs2 unlink and rename operations. This patch adds the cluster lock type which OCFS2 can attach to dentries. A small number of fs/ocfs2/dcache.c functions are stubbed out so that this change can compile. Signed-off-by: Mark Fasheh commit f0681062b8e369d9fb6f3ce10f4e3fc8cea5f910 Author: Mark Fasheh Date: Fri Sep 8 11:40:10 2006 -0700 ocfs2: Update dlmglue for new dlmlock() API File system lock names are very regular right now, so we really only need to pass an extra parameter to dlmlock(). Signed-off-by: Mark Fasheh commit ea5b3a187e2724fa9d08b2fbd3898c149ed95c6b Author: Mark Fasheh Date: Fri Sep 8 11:39:27 2006 -0700 ocfs2: Update dlmfs for new dlmlock() API We just need to add a namelen field to the user_lock_res structure, and update a few debug prints. Instead of updating all debug prints, I took the opportunity to remove a few that are likely unnecessary these days. Signed-off-by: Mark Fasheh commit 3384f3df5ed939a25135e1b2734fb7cdee1720a8 Author: Mark Fasheh Date: Fri Sep 8 11:38:29 2006 -0700 ocfs2: Allow binary names in the DLM The OCFS2 DLM uses strlen() to determine lock name length, which excludes the possibility of putting binary values in the name string. Fix this by requiring that string length be passed in as a parameter. Signed-off-by: Mark Fasheh commit e2c73698af3dac89328eef2b55f6746e0507d2bc Author: Mark Fasheh Date: Fri Sep 8 11:37:32 2006 -0700 ocfs2: Silence dlm error print An AST can be delivered via the network after a lock has been removed, so no need to print an error when we see that. Signed-off-by: Mark Fasheh commit eb35746ca5e2211569b91ebb44d55b88ec91f3b0 Author: Mark Fasheh Date: Wed Aug 9 13:23:08 2006 -0700 ocfs2: Remove overzealous BUG_ON() The truncate code was never supposed to BUG() on an allocator it doesn't know about, but rather to ignore it. Right now, this does nothing, but when we change our allocation paths to use all suballocator files, this will allow current versions of the fs module to work fine. Signed-off-by: Mark Fasheh commit f12033d206ea48928d8124cdd5d35d8008c18935 Author: Mark Fasheh Date: Wed Sep 13 18:57:57 2006 -0700 ocfs2: Don't print on unknown remote blocking call Signed-off-by: Mark Fasheh commit aa9588741db907785e4d92c8b768dd6c9077e6f0 Author: Mark Fasheh Date: Fri Apr 21 13:49:02 2006 -0700 ocfs2: implement directory read-ahead Uptodate.c now knows about read-ahead buffers. Use some more aggressive logic in ocfs2_readdir(). The two functions which currently use directory read-ahead are ocfs2_find_entry() and ocfs2_readdir(). Signed-off-by: Mark Fasheh commit e0b4096d34fbd6b30838c417100c9d0ef73c71f2 Author: Mark Fasheh Date: Tue Jul 11 14:38:54 2006 -0700 ocfs2: properly update i_mtime on buffered write We weren't always updating i_mtime on writes, so fix ocfs2_commit_write() to handle this. Signed-off-by: Mark Fasheh Acked-by: Zach Brown commit 0f62de2c9ca60a35f63122e7ea992cee8aae4bef Author: Tiger Yang Date: Thu Aug 31 20:39:47 2006 -0700 ocfs2: Fix directory link count checks in ocfs2_link() Remove the redundant "i_nlink >= OCFS2_LINK_MAX" check and adds an unlinked directory check in ocfs2_link(). Signed-off-by: Tiger Yang Signed-off-by: Mark Fasheh commit a663e30513d7ecc77dd71d474e7646bf78c0ba62 Author: Mark Fasheh Date: Wed Aug 9 11:45:07 2006 -0700 ocfs2: move nlink check in ocfs2_mknod() The dir nlink check in ocfs2_mknod() was being done outside of the cluster lock, which means we could have been checking against a stale version of the inode. Fix this by doing the check after the cluster lock instead. Signed-off-by: Mark Fasheh commit 471e3f57286da7ce8820ad42c77d5f5f49d56a41 Author: Mathieu Avila Date: Wed Sep 13 11:11:27 2006 -0700 ocfs2: Fix heartbeat sector calculation This fixes things for devices which set max_sectors to 8. Signed-off-by: Mark Fasheh commit 2d5625181fac18f572cbbd18878d28f5eebf4733 Author: Adrian Bunk Date: Mon Jul 10 01:32:51 2006 +0200 [PATCH] fs/ocfs2/ioctl.c should #include "ioctl.h" Every file should #include the headers containing the prototypes for its global functions. Signed-off-by: Adrian Bunk Signed-off-by: Mark Fasheh commit ca4d147e62df370c334898464023aa7f9126abe1 Author: Herbert Poetzl Date: Mon Jul 3 17:27:12 2006 -0700 ocfs2: add ext2 attributes Support immutable, and other attributes. Some renaming and other minor fixes done by myself. Signed-off-by: Herbert Poetzl Signed-off-by: Mark Fasheh