commit a97721894a6dc0f9ebfe1dbaa4bb112eaf399273 Author: Joel Becker Date: Tue Dec 16 18:10:18 2008 -0800 ocfs2: Add JBD2 compat feature bit. Define the OCFS2_FEATURE_COMPAT_JBD2 bit in the filesystem header. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 83099bc647688d816c2f7fac8e51921bdfe8db73 Author: Tao Ma Date: Fri Dec 5 09:14:10 2008 +0800 ocfs2: Always update xattr search when creating bucket. When we create xattr bucket during the process of xattr set, we always need to update the ocfs2_xattr_search since even if the bucket size is the same as block size, the offset will change because of the removal of the ocfs2_xattr_block header. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit d6b58f89f7257c8099c2260e2bea042a917d6cdf Author: Mark Fasheh Date: Fri Nov 21 14:06:55 2008 -0800 ocfs2: fix regression in ocfs2_read_blocks_sync() We're panicing in ocfs2_read_blocks_sync() if a jbd-managed buffer is seen. At first glance, this seems ok but in reality it can happen. My test case was to just run 'exorcist'. A struct inode is being pushed out of memory but is then re-read at a later time, before the buffer has been checkpointed by jbd. This causes a BUG to be hit in ocfs2_read_blocks_sync(). Reviewed-by: Joel Becker Signed-off-by: Mark Fasheh commit 07d9a3954a68764aefe16855bcd0f86deeb5c825 Author: Coly Li Date: Mon Nov 17 12:38:22 2008 +0800 ocfs2: fix return value set in init_dlmfs_fs() In init_dlmfs_fs(), if calling kmem_cache_create() failed, the code will use return value from calling bdi_init(). The correct behavior should be set status as -ENOMEM before going to "bail:". Signed-off-by: Coly Li Acked-by: Sunil Mushran Signed-off-by: Mark Fasheh commit 07f9eebcdfaeefc8f807fa1bcce1d7c3ae6661b1 Author: David Teigland Date: Mon Nov 17 12:28:48 2008 -0600 ocfs2: fix wake_up in unlock_ast In ocfs2_unlock_ast(), call wake_up() on lockres before releasing the spin lock on it. As soon as the spin lock is released, the lockres can be freed. Signed-off-by: David Teigland Signed-off-by: Mark Fasheh commit 66f502a416f18cd36179290746aa53736c6b2828 Author: David Teigland Date: Mon Nov 10 16:24:57 2008 -0600 ocfs2: initialize stack_user lvbptr The locking_state dump, ocfs2_dlm_seq_show, reads the lvb on locks where it has not yet been initialized by a lock call. Signed-off-by: David Teigland Acked-by: Joel Becker Signed-off-by: Mark Fasheh commit 3b5da0189c93160e44b878d2c72e9552d642497c Author: Coly Li Date: Wed Nov 5 15:16:24 2008 +0800 ocfs2: comments typo fix This patch fixes two typos in comments of ocfs2. Signed-off-by: Coly Li Signed-off-by: Mark Fasheh commit 6c1e183e12dbd78a897a859f13220406296fee31 Author: Tiger Yang Date: Sun Nov 2 19:04:21 2008 +0800 ocfs2: Check search result in ocfs2_xattr_block_get() ocfs2_xattr_block_get() calls ocfs2_xattr_search() to find an external xattr, but doesn't check the search result that is passed back via struct ocfs2_xattr_search. Add a check for search result, and pass back -ENODATA if the xattr search failed. This avoids a later NULL pointer error. Signed-off-by: Tiger Yang Signed-off-by: Mark Fasheh commit de29c08528bae45e3fa1171d190f1340e37e0f70 Author: Mark Fasheh Date: Wed Oct 29 14:45:30 2008 -0700 ocfs2: fix printk related build warnings in xattr.c Signed-off-by: Mark Fasheh commit c435400140d24fbcb3da6b1e006be831f9056cb6 Author: Dmitri Monakhov Date: Mon Oct 27 13:01:49 2008 -0700 ocfs2: truncate outstanding block after direct io failure Signed-off-by: Dmitri Monakhov Cc: Jeff Moyer Cc: Mark Fasheh Cc: Joel Becker Cc: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Mark Fasheh commit 80bcaf3469b8aefd316d4ceb27d9af7cfbb0b913 Author: Tao Ma Date: Mon Oct 27 06:06:24 2008 +0800 ocfs2/xattr: Proper hash collision handle in bucket division In ocfs2/xattr, we must make sure the xattrs which have the same hash value exist in the same bucket so that the search schema can work. But in the old implementation, when we want to extend a bucket, we just move half number of xattrs to the new bucket. This works in most cases, but if we are lucky enough we will move 2 xattrs into 2 different buckets. This means that an xattr from the previous bucket cannot be found anymore. This patch fix this problem by finding the right position during extending the bucket and extend an empty bucket if needed. Signed-off-by: Tao Ma Cc: Joel Becker Signed-off-by: Mark Fasheh commit 4c1bbf1ba631d7db61ce3462349a3f5d14ae3009 Author: Tao Ma Date: Mon Oct 6 16:59:55 2008 +0800 ocfs2: return 0 in page_mkwrite to let VFS retry. In ocfs2_page_mkwrite, we return -EINVAL when we found the page mapping isn't updated, and it will cause the user space program get SIGBUS and exit. The reason is that during race writeable mmap, we will do unmap_mapping_range in ocfs2_data_downconvert_worker. The good thing is that if we reuturn 0 in page_mkwrite, VFS will retry fault and then call page_mkwrite again, so it is safe to return 0 here. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit ae0dff683076b2798763288c7ac2f09a18c4a998 Author: Sunil Mushran Date: Wed Oct 22 13:24:29 2008 -0700 ocfs2: Set journal descriptor to NULL after journal shutdown Patch sets journal descriptor to NULL after the journal is shutdown. This ensures that jbd2_journal_release_jbd_inode(), which removes the jbd2 inode from txn lists, can be called safely from ocfs2_clear_inode() even after the journal has been shutdown. Signed-off-by: Sunil Mushran Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit d32647993c211901fc4819ef3327f62d1859241b Author: Tao Ma Date: Fri Oct 24 07:57:28 2008 +0800 ocfs2: Fix check of return value of ocfs2_start_trans() in xattr.c. On failure, ocfs2_start_trans() returns values like ERR_PTR(-ENOMEM), so we should check whether handle is NULL. Fix them to use IS_ERR(). Jan has made the patch for other part in ocfs2(thank Jan for it), so this is just the fix for fs/ocfs2/xattr.c. Signed-off-by: Tao Ma Cc: Jan Kara Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit b99835c1684918b9975851d71455c5c007d1715b Author: Jan Kara Date: Mon Oct 20 19:23:54 2008 +0200 ocfs2: Let inode be really deleted when ocfs2_mknod_locked() fails We forgot to set i_nlink to 0 when returning due to error from ocfs2_mknod_locked() and thus inode was not properly released via ocfs2_delete_inode() (e.g. claimed space was not released). Fix it. Signed-off-by: Jan Kara Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 87cfa004321c62aec681713ea48e0b846336d9f4 Author: Jan Kara Date: Mon Oct 20 19:23:53 2008 +0200 ocfs2: Fix checking of return value of new_inode() new_inode() does not return ERR_PTR() but NULL in case of failure. Correct checking of the return value. Signed-off-by: Jan Kara Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit fa38e92cb34e27e60d0faf1035934eb9b44aa1d4 Author: Jan Kara Date: Mon Oct 20 19:23:51 2008 +0200 ocfs2: Fix check of return value of ocfs2_start_trans() On failure, ocfs2_start_trans() returns values like ERR_PTR(-ENOMEM). Thus checks for !handle are wrong. Fix them to use IS_ERR(). Signed-off-by: Jan Kara Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 8573f79d30077875e2b6e83849b5245bfbb08685 Author: Tao Ma Date: Fri Oct 24 22:24:17 2008 +0800 ocfs2: Fix some typos in xattr annotations. Fix some typos in the xattr annotations. Signed-off-by: Tao Ma Reported-by: Coly Li Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 63fd77573723841d5d44a79471258f1b261f4482 Author: Tao Ma Date: Fri Oct 17 12:44:36 2008 +0800 ocfs2: Remove unused ocfs2_restore_xattr_block(). Since now ocfs2 supports empty xattr buckets, we will never remove the xattr index tree even if all the xattrs are removed, so this function will never be called. So remove it. Signed-off-by: Tao Ma Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 54f443f4e7265a1333886dbace31cb6eb1991c72 Author: Joel Becker Date: Mon Oct 20 18:43:07 2008 -0700 ocfs2: Don't repeat ocfs2_xattr_block_find() ocfs2_xattr_block_get() looks up the xattr in a startlingly familiar way; it's identical to the function ocfs2_xattr_block_find(). Let's just use the later in the former. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit eb6ff2397d1fdfc6a7629c99896338e5b5c508e5 Author: Joel Becker Date: Mon Oct 20 18:32:48 2008 -0700 ocfs2: Specify appropriate journal access for new xattr buckets. There are a couple places that get an xattr bucket that may be reading an existing one or may be allocating a new one. They should specify the correct journal access mode depending. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit bd60bd37ade4321ecce4ed4442f68c88febd76d5 Author: Joel Becker Date: Mon Oct 20 18:25:56 2008 -0700 ocfs2: Check errors from ocfs2_xattr_update_xattr_search() The ocfs2_xattr_update_xattr_search() function can return an error when trying to read blocks off of disk. The caller needs to check this error before using those (possibly invalid) blocks. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit b37c4d84e9d16fd5b6f31197f02ea0a112fc9e99 Author: Joel Becker Date: Mon Oct 20 18:24:03 2008 -0700 ocfs2: Don't return -EFAULT from a corrupt xattr entry. If the xattr disk structures are corrupt, return -EIO, not -EFAULT. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit f6087fb799e097e7c9d912daa75701de9d62dc53 Author: Joel Becker Date: Mon Oct 20 18:20:43 2008 -0700 ocfs2: Check xattr block signatures properly. The xattr.c code is currently memcmp()ing naking buffer pointers. Create the OCFS2_IS_VALID_XATTR_BLOCK() macro to match its peers and use that. In addition, failed signature checks were returning -EFAULT, which is completely wrong. Return -EIO. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit c988fd045f1195e62c0970384903ab9da26a9359 Author: Tiger Yang Date: Thu Oct 23 16:34:44 2008 +0800 ocfs2: add handler_map array bounds checking Make the handler_map array as large as the possible value range to avoid a fencepost error. [ Utilize alternate method -- Joel ] Signed-off-by: Tiger Yang Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit ceb1eba3dc2ad94b25764785ff7d2082c6094115 Author: Tiger Yang Date: Thu Oct 23 16:34:13 2008 +0800 ocfs2: remove duplicate definition in xattr Include/linux/xattr.h already has the definition about xattr prefix, so remove the duplicate definitions in xattr.c. Signed-off-by: Tiger Yang Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 0030e001505d2d1503c083c917a747c033eaf8cd Author: Tiger Yang Date: Thu Oct 23 16:33:33 2008 +0800 ocfs2: fix function declaration and definition in xattr Because we merged the xattr sources into one file, some functions no longer belong in the header file. Signed-off-by: Tiger Yang Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit c3cb6827353102fee62f3b9401a03ee29b297e5b Author: Tiger Yang Date: Thu Oct 23 16:33:03 2008 +0800 ocfs2: fix license in xattr This patch fixes the license in xattr.c and xattr.h. Signed-off-by: Tiger Yang Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 4e02ed4b4a2fae34aae766a5bb93ae235f60adb8 Author: Nick Piggin Date: Wed Oct 29 14:00:55 2008 -0700 fs: remove prepare_write/commit_write Nothing uses prepare_write or commit_write. Remove them from the tree completely. [akpm@linux-foundation.org: schedule simple_prepare_write() for unexporting] Signed-off-by: Nick Piggin Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 22484856402bfa1ff3defe47f6029ab0418240d9 Merge: 5ed487b... 56b26ad... Author: Linus Torvalds Date: Thu Oct 23 10:23:07 2008 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/viro/bdev * git://git.kernel.org/pub/scm/linux/kernel/git/viro/bdev: (66 commits) [PATCH] kill the rest of struct file propagation in block ioctls [PATCH] get rid of struct file use in blkdev_ioctl() BLKBSZSET [PATCH] get rid of blkdev_locked_ioctl() [PATCH] get rid of blkdev_driver_ioctl() [PATCH] sanitize blkdev_get() and friends [PATCH] remember mode of reiserfs journal [PATCH] propagate mode through swsusp_close() [PATCH] propagate mode through open_bdev_excl/close_bdev_excl [PATCH] pass fmode_t to blkdev_put() [PATCH] kill the unused bsize on the send side of /dev/loop [PATCH] trim file propagation in block/compat_ioctl.c [PATCH] end of methods switch: remove the old ones [PATCH] switch sr [PATCH] switch sd [PATCH] switch ide-scsi [PATCH] switch tape_block [PATCH] switch dcssblk [PATCH] switch dasd [PATCH] switch mtd_blkdevs [PATCH] switch mmc ... commit 440037287c5ebb07033ab927ca16bb68c291d309 Author: Christoph Hellwig Date: Mon Aug 11 15:49:04 2008 +0200 [PATCH] switch all filesystems over to d_obtain_alias Switch all users of d_alloc_anon to d_obtain_alias. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 572c48921574dbe6dceb958cf965aa962baefde4 Author: Al Viro Date: Mon Oct 8 13:24:05 2007 -0400 [PATCH] sanitize blkdev_get() and friends * get rid of fake struct file/struct dentry in __blkdev_get() * merge __blkdev_get() and do_open() * get rid of flags argument of blkdev_get() Signed-off-by: Al Viro commit 9a1c3542768b5a58e45a9216921cd10a3bae1205 Author: Al Viro Date: Fri Feb 22 20:40:24 2008 -0500 [PATCH] pass fmode_t to blkdev_put() Signed-off-by: Al Viro commit 1efd47f87317030cb7e37821b8562a8162c1223f Author: Mark Fasheh Date: Tue Oct 14 18:31:46 2008 -0700 ocfs2: fix build error I merged the latest ocfs2_read_blocks() changes in xattr.c wrong. This makes Ocfs2 compile again. Signed-off-by: Mark Fasheh commit d4a8c93c8248534bdedb07f83c9aebd6f7d1d579 Author: Joel Becker Date: Thu Oct 9 17:20:34 2008 -0700 ocfs2: Make cached block reads the common case. ocfs2_read_blocks() currently requires the CACHED flag for cached I/O. However, that's the common case. Let's flip it around and provide an IGNORE_CACHE flag for the special users. This has the added benefit of cleaning up the code some (ignore_cache takes on its special meaning earlier in the loop). Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 5e0b3dec0107540244ba343f983ef4f972db20de Author: Joel Becker Date: Thu Oct 9 17:20:33 2008 -0700 ocfs2: Kill the last naked wait_on_buffer() for cached reads. ocfs2's cached buffer I/O goes through ocfs2_read_block(s)(). dir.c had a naked wait_on_buffer() to wait for some readahead, but it should use ocfs2_read_block() instead. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 07446dc72cffcc6e2672d0e54061dcd1858725ba Author: Joel Becker Date: Thu Oct 9 17:20:32 2008 -0700 ocfs2: Move ocfs2_bread() into dir.c dir.c is the only place using ocfs2_bread(), so let's make it static to that file. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 0fcaa56a2a020dd6f90c202b7084e6f4cbedb6c2 Author: Joel Becker Date: Thu Oct 9 17:20:31 2008 -0700 ocfs2: Simplify ocfs2_read_block() More than 30 callers of ocfs2_read_block() pass exactly OCFS2_BH_CACHED. Only six pass a different flag set. Rather than have every caller care, let's make ocfs2_read_block() take no flags and always do a cached read. The remaining six places can call ocfs2_read_blocks() directly. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 31d33073ca38603dea705dae45e094a64ca062d6 Author: Joel Becker Date: Thu Oct 9 17:20:30 2008 -0700 ocfs2: Require an inode for ocfs2_read_block(s)(). Now that synchronous readers are using ocfs2_read_blocks_sync(), all callers of ocfs2_read_blocks() are passing an inode. Use it unconditionally. Since it's there, we don't need to pass the ocfs2_super either. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit da1e90985a0e767e44397c9db0937e236033fa58 Author: Joel Becker Date: Thu Oct 9 17:20:29 2008 -0700 ocfs2: Separate out sync reads from ocfs2_read_blocks() The ocfs2_read_blocks() function currently handles sync reads, cached, reads, and sometimes cached reads. We're going to add some functionality to it, so first we should simplify it. The uncached, synchronous reads are much easer to handle as a separate function, so we instroduce ocfs2_read_blocks_sync(). Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 936b8834366ec05f2a6993f73afd8348cac9718e Author: Tao Ma Date: Thu Oct 9 23:06:14 2008 +0800 ocfs2: Refactor xattr list and remove ocfs2_xattr_handler(). According to Christoph Hellwig's advice, we really don't need a ->list to handle one xattr's list. Just a map from index to xattr prefix is enough. And I also refactor the old list method with the reference from fs/xfs/linux-2.6/xfs_xattr.c and the xattr list method in btrfs. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit 2057e5c6780d86939a199031cdbafb81e6f88aac Author: Tao Ma Date: Thu Oct 9 23:06:13 2008 +0800 ocfs2: Calculate EA hash only by its suffix. According to Christoph Hellwig's advice, the hash value of EA is only calculated by its suffix. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit 99219aea68b5bff4f182858372b43181ad3bdb34 Author: Mark Fasheh Date: Tue Oct 7 14:52:59 2008 -0700 ocfs2: Move trusted and user attribute support into xattr.c Per Christoph Hellwig's suggestion - don't split these up. It's not like we gained much by having the two tiny files around. Signed-off-by: Mark Fasheh commit 40daa16a3441abe822bfcc748150116a77aee2ea Author: Mark Fasheh Date: Tue Oct 7 14:31:42 2008 -0700 ocfs2: Uninline ocfs2_xattr_name_hash() This is too big to be inlined. Signed-off-by: Mark Fasheh commit a81cb88b64a479b78c6dd5666678d50171865db8 Author: Mark Fasheh Date: Tue Oct 7 14:25:16 2008 -0700 ocfs2: Don't check for NULL before brelse() This is pointless as brelse() already does the check. Signed-off-by: Mark Fasheh commit fd8351f83d413b41da956109cf429c15881886e2 Author: Mark Fasheh Date: Tue Oct 7 12:50:46 2008 -0700 ocfs2: use smaller counters in ocfs2_remove_xattr_clusters_from_cache i and b_len don't really need to be u64's. Xattr extent lengths should be limited by the VFS, and then the size of our on-disk length field. Signed-off-by: Mark Fasheh commit 4cc8124584610fbe087ea2bed29ca52d2d0aa84a Author: Mark Fasheh Date: Tue Oct 7 11:02:04 2008 -0700 ocfs2: make la_debug_mutex static It can also be moved into ocfs2_la_debug_read(). Signed-off-by: Mark Fasheh commit 009d37502a7b9fc89741e66b4454afca4edc1c26 Author: Mark Fasheh Date: Mon Oct 6 16:16:08 2008 -0700 ocfs2: Remove pointless !! ocfs2_stack_supports_plocks() doesn't need this to properly return a zero or one value. Signed-off-by: Mark Fasheh commit 5a09561199e7f8d3feaaa01c39372050e140b775 Author: Tao Ma Date: Fri Sep 19 22:17:41 2008 +0800 ocfs2: Add empty bucket support in xattr. As Mark mentioned, it may be time-consuming when we remove the empty xattr bucket, so this patch try to let empty bucket exist in xattr operation. The modification includes: 1. Remove the functin of bucket and extent record deletion during xattr delete. 2. In xattr set: 1) Don't clean the last entry so that if the bucket is empty, the hash value of the bucket is the hash value of the entry which is deleted last. 2) During insert, if we meet with an empty bucket, just use the 1st entry. 3. In binary search of xattr bucket, use the bucket hash value(which stored in the 1st xattr entry) to find the right place. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit 06b240d8af21ddee4cfec3b0f02b81d9f168a98a Author: Tao Ma Date: Fri Sep 19 22:16:34 2008 +0800 ocfs2/xattr.c: Fix a bug when inserting xattr. During the process of xatt insertion, we use binary search to find the right place and "low" is set to it. But when there is one xattr which has the same name hash as the inserted one, low is the wrong value. So set it to the right position. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit b0f73cfc36ed62decdd3f78e943bbfd00ee80e49 Author: Sunil Mushran Date: Fri Sep 5 11:29:14 2008 -0700 ocfs2: Add xattr mount option in ocfs2_show_options() Patch adds check for [no]user_xattr in ocfs2_show_options() that completes the list of all mount options. Signed-off-by: Sunil Mushran Signed-off-by: Mark Fasheh commit 2b4e30fbde425828b17f0e9c8f8e3fd3ecb2bc75 Author: Joel Becker Date: Wed Sep 3 20:03:41 2008 -0700 ocfs2: Switch over to JBD2. ocfs2 wants JBD2 for many reasons, not the least of which is that JBD is limiting our maximum filesystem size. It's a pretty trivial change. Most functions are just renamed. The only functional change is moving to Jan's inode-based ordered data mode. It's better, too. Because JBD2 reads and writes JBD journals, this is compatible with any existing filesystem. It can even interact with JBD-based ocfs2 as long as the journal is formated for JBD. We provide a compatibility option so that paranoid people can still use JBD for the time being. This will go away shortly. [ Moved call of ocfs2_begin_ordered_truncate() from ocfs2_delete_inode() to ocfs2_truncate_for_delete(). --Mark ] Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 12462f1d9f0b96389497438dc2730c6f7410be82 Author: Joel Becker Date: Wed Sep 3 20:03:40 2008 -0700 ocfs2: Add the 'inode64' mount option. Now that ocfs2 limits inode numbers to 32bits, add a mount option to disable the limit. This parallels XFS. 64bit systems can handle the larger inode numbers. [ Added description of inode64 mount option in ocfs2.txt. --Mark ] Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 1187c968852e3c668f3b9376083851f81f6eee22 Author: Joel Becker Date: Wed Sep 3 20:03:39 2008 -0700 ocfs2: Limit inode allocation to 32bits. ocfs2 inode numbers are block numbers. For any filesystem with less than 2^32 blocks, this is not a problem. However, when ocfs2 starts using JDB2, it will be able to support filesystems with more than 2^32 blocks. This would result in inode numbers higher than 2^32. The problem is that stat(2) can't handle those numbers on 32bit machines. The simple solution is to have ocfs2 allocate all inodes below that boundary. The suballoc code is changed to honor an optional block limit. Only the inode suballocator sets that limit - all other allocations stay unlimited. The biggest trick is to grow the inode suballocator beneath that limit. There's no point in allocating block groups that are above the limit, then rejecting their elements later on. We want to prevent the inode allocator from ever having block groups above the limit. This involves a little gyration with the local alloc code. If the local alloc window is above the limit, it signals the caller to try the global bitmap but does not disable the local alloc file (which can be used for other allocations). [ Minor cleanup - removed an ML_NOTICE comment. --Mark ] Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 08413899db89d8d636c2a2d4ba5c356ab587d7ef Author: Tao Ma Date: Fri Aug 29 09:00:19 2008 +0800 ocfs2: Resolve deadlock in ocfs2_xattr_free_block. In ocfs2_xattr_free_block, we take a cluster lock on xb_alloc_inode while we have a transaction open. This will deadlock the downconvert thread, so fix it. We can clean up how xattr blocks are removed while here - this patch also moves the mechanism of releasing xattr block (including both value, xattr tree and xattr block) into this function. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit 28b8ca0b7f70b1b048d03dc0b9d87f58619e9791 Author: Tao Ma Date: Mon Sep 1 08:45:18 2008 +0800 ocfs2: bug-fix for journal extend in xattr. In ocfs2_extend_trans, when we can't extend the current transaction, it will commit current transaction and restart a new one. So if the previous credits we have allocated aren't used(the block isn't dirtied before our extend), we will not have enough credits for any future operation(it will cause jbd complain and bug out). So check this and re-extend it. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit 8d6220d6a74a33552cf877bcea25503d7f6a59e6 Author: Joel Becker Date: Fri Aug 22 12:46:09 2008 -0700 ocfs2: Change ocfs2_get_*_extent_tree() to ocfs2_init_*_extent_tree() The original get/put_extent_tree() functions held a reference on et_root_bh. However, every single caller already has a safe reference, making the get/put cycle irrelevant. We change ocfs2_get_*_extent_tree() to ocfs2_init_*_extent_tree(). It no longer gets a reference on et_root_bh. ocfs2_put_extent_tree() is removed. Callers now have a simpler init+use pattern. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 1625f8ac151743e452ec062c2989669c508ffa48 Author: Joel Becker Date: Thu Aug 21 17:11:10 2008 -0700 ocfs2: Comment struct ocfs2_extent_tree_operations. struct ocfs2_extent_tree_operations provides methods for the different on-disk btrees in ocfs2. Describing what those methods do is probably a good idea. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit f99b9b7ccf6a691f653cec45f36bfdd1e94769c7 Author: Joel Becker Date: Wed Aug 20 19:36:33 2008 -0700 ocfs2: Make ocfs2_extent_tree the first-class representation of a tree. We now have three different kinds of extent trees in ocfs2: inode data (dinode), extended attributes (xattr_tree), and extended attribute values (xattr_value). There is a nice abstraction for them, ocfs2_extent_tree, but it is hidden in alloc.c. All the calling functions have to pick amongst a varied API and pass in type bits and often extraneous pointers. A better way is to make ocfs2_extent_tree a first-class object. Everyone converts their object to an ocfs2_extent_tree() via the ocfs2_get_*_extent_tree() calls, then uses the ocfs2_extent_tree for all tree calls to alloc.c. This simplifies a lot of callers, making for readability. It also provides an easy way to add additional extent tree types, as they only need to be defined in alloc.c with a ocfs2_get__extent_tree() function. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 1e61ee79e2a96f62c007486677319814ce621c3c Author: Joel Becker Date: Wed Aug 20 18:32:45 2008 -0700 ocfs2: Add an insertion check to ocfs2_extent_tree_operations. A couple places check an extent_tree for a valid inode. We move that out to add an eo_insert_check() operation. It can be called from ocfs2_insert_extent() and elsewhere. We also have the wrapper calls ocfs2_et_insert_check() and ocfs2_et_sanity_check() ignore NULL ops. That way we don't have to provide useless operations for xattr types. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 1a09f556e5415a29cdddaf9a6ebf474194161cf3 Author: Joel Becker Date: Wed Aug 20 17:44:24 2008 -0700 ocfs2: Create specific get_extent_tree functions. A caller knows what kind of extent tree they have. There's no reason they have to call ocfs2_get_extent_tree() with a NULL when they could just as easily call a specific function to their type of extent tree. Introduce ocfs2_dinode_get_extent_tree(), ocfs2_xattr_tree_get_extent_tree(), and ocfs2_xattr_value_get_extent_tree(). They only take the necessary arguments, calling into the underlying __ocfs2_get_extent_tree() to do the real work. __ocfs2_get_extent_tree() is the old ocfs2_get_extent_tree(), but without needing any switch-by-type logic. ocfs2_get_extent_tree() is now a wrapper around the specific calls. It exists because a couple alloc.c functions can take et_type. This will go later. Another benefit is that ocfs2_xattr_value_get_extent_tree() can take a struct ocfs2_xattr_value_root* instead of void*. This gives us typechecking where we didn't have it before. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 943cced39ee45ed2db25efd25eee8ba49cf2dfc4 Author: Joel Becker Date: Wed Aug 20 17:31:10 2008 -0700 ocfs2: Determine an extent tree's max_leaf_clusters in an et_op. Provide an optional extent_tree_operation to specify the max_leaf_clusters of an ocfs2_extent_tree. If not provided, the value is 0 (unlimited). Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 1c25d93a4a27c90c3ae33f9e724f7b67783d68d1 Author: Joel Becker Date: Wed Aug 20 17:09:42 2008 -0700 ocfs2: Use struct ocfs2_extent_tree in ocfs2_num_free_extents(). ocfs2_num_free_extents() re-implements the logic of ocfs2_get_extent_tree(). Now that ocfs2_get_extent_tree() does not allocate, let's use it in ocfs2_num_free_extents() to simplify the code. The inode validation code in ocfs2_num_free_extents() is not needed. All callers are passing in pre-validated inodes. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 0ce1010f1a4319e02574b856d50dfdc0ed855f40 Author: Joel Becker Date: Wed Aug 20 17:19:50 2008 -0700 ocfs2: Provide the get_root_el() method to ocfs2_extent_tree_operations. The root_el of an ocfs2_extent_tree needs to be calculated from et->et_object. Make it an operation on et->et_ops. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit ea5efa151265a743f48e3d371992a0100d73a0eb Author: Joel Becker Date: Wed Aug 20 16:57:27 2008 -0700 ocfs2: Make 'private' into 'object' on ocfs2_extent_tree. The 'private' pointer was a way to store off xattr values, which don't live at a set place in the bh. But the concept of "the object containing the extent tree" is much more generic. For an inode it's the struct ocfs2_dinode, for an xattr value its the value. Let's save off the 'object' at all times. If NULL is passed to ocfs2_get_extent_tree(), 'object' is set to bh->b_data; Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit dc0ce61af418305afa7e0d05d86ab334e0daabf7 Author: Joel Becker Date: Wed Aug 20 16:48:35 2008 -0700 ocfs2: Make ocfs2_extent_tree get/put instead of alloc. Rather than allocating a struct ocfs2_extent_tree, just put it on the stack. Fill it with ocfs2_get_extent_tree() and drop it with ocfs2_put_extent_tree(). Now the callers don't have to ENOMEM, yet still safely ref the root_bh. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit ce1d9ea621291ed5e985d6677278c6bb20d96a40 Author: Joel Becker Date: Wed Aug 20 16:30:07 2008 -0700 ocfs2: Prefix the ocfs2_extent_tree structure. The members of the ocfs2_extent_tree structure gain a prefix of 'et_'. All users are updated. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 35dc0aa3c5e7391319754e0c19cdfc0a28eb5b25 Author: Joel Becker Date: Wed Aug 20 16:25:06 2008 -0700 ocfs2: Prefix the extent tree operations structure. The ocfs2_extent_tree_operations structure gains a field prefix on its members. The ->eo_sanity_check() operation gains a wrapper function for completeness. All of the extent tree operation wrappers gain a consistent name (ocfs2_et_*()). Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit ff1ec20ef65d51cc3466e86912cdeaac16f3aaa0 Author: Mark Fasheh Date: Tue Aug 19 10:54:29 2008 -0700 ocfs2: fix printk format warnings This patch fixes the following build warnings: fs/ocfs2/xattr.c: In function 'ocfs2_half_xattr_bucket': fs/ocfs2/xattr.c:3282: warning: format '%d' expects type 'int', but argument 7 has type 'long int' fs/ocfs2/xattr.c:3282: warning: format '%d' expects type 'int', but argument 8 has type 'long int' fs/ocfs2/xattr.c:3282: warning: format '%d' expects type 'int', but argument 7 has type 'long int' fs/ocfs2/xattr.c:3282: warning: format '%d' expects type 'int', but argument 8 has type 'long int' fs/ocfs2/xattr.c:3282: warning: format '%d' expects type 'int', but argument 7 has type 'long int' fs/ocfs2/xattr.c:3282: warning: format '%d' expects type 'int', but argument 8 has type 'long int' fs/ocfs2/xattr.c: In function 'ocfs2_xattr_set_entry_in_bucket': fs/ocfs2/xattr.c:4092: warning: format '%d' expects type 'int', but argument 6 has type 'size_t' fs/ocfs2/xattr.c:4092: warning: format '%d' expects type 'int', but argument 6 has type 'size_t' fs/ocfs2/xattr.c:4092: warning: format '%d' expects type 'int', but argument 6 has type 'size_t' Signed-off-by: Mark Fasheh commit 8154da3d2114241cf3edb108b43e2172be86d483 Author: Tiger Yang Date: Mon Aug 18 17:11:46 2008 +0800 ocfs2: Add incompatible flag for extended attribute This patch adds the s_incompat flag for extended attribute support. This helps us ensure that older versions of Ocfs2 or ocfs2-tools will not be able to mount a volume with xattr support. Signed-off-by: Tiger Yang Signed-off-by: Mark Fasheh commit a394425643e1e9c3a624d629fc8ba5633d8474c6 Author: Tao Ma Date: Mon Aug 18 17:38:54 2008 +0800 ocfs2: Delete all xattr buckets during inode removal In inode removal, we need to iterate all the buckets, remove any externally-stored EA values and delete the xattr buckets. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit 012255961c9ecfe22b7a1df47ac26ab37818cb1e Author: Tao Ma Date: Mon Aug 18 17:38:53 2008 +0800 ocfs2: Enable xattr set in index btree Where the previous patches added the ability of list/get xattr in buckets for ocfs2, this patch enables ocfs2 to store large numbers of EAs. The original design doc is written by Mark Fasheh, and it can be found in http://oss.oracle.com/osswiki/OCFS2/DesignDocs/IndexedEATrees. I only had to make small modifications to it. First, because the bucket size is 4K, a new field named xh_free_start is added in ocfs2_xattr_header to indicate the next valid name/value offset in a bucket. It is used when we store new EA name/value. With this field, we can find the place more quickly and what's more, we don't need to sort the name/value every time to let the last entry indicate the next unused space. This makes the insert operation more efficient for blocksizes smaller than 4k. Because of the new xh_free_start, another field named as xh_name_value_len is also added in ocfs2_xattr_header. It records the total length of all the name/values in the bucket. We need this so that we can check it and defragment the bucket if there is not enough contiguous free space. An xattr insertion looks like this: 1. xattr_index_block_find: find the right bucket by the name_hash, say bucketA. 2. check whether there is enough space in bucketA. If yes, insert it directly and modify xh_free_start and xh_name_value_len accordingly. If not, check xh_name_value_len to see whether we can store this by defragment the bucket. If yes, defragment it and go on insertion. 3. If defragement doesn't work, check whether there is new empty bucket in the clusters within this extent record. If yes, init the new bucket and move all the buckets after bucketA one by one to the next bucket. Move half of the entries in bucketA to the next bucket and go on insertion. 4. If there is no new bucket, grow the extent tree. As for xattr deletion, we will delete an xattr bucket when all it's xattrs are removed and move all the buckets after it to the previous one. When all the xattr buckets in an extend record are freed, free this extend records from ocfs2_xattr_tree. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit ca12b7c48942d21b2e7890b820db9d578bc291cd Author: Tao Ma Date: Mon Aug 18 17:38:52 2008 +0800 ocfs2: Optionally limit extent size in ocfs2_insert_extent() In xattr bucket, we want to limit the maximum size of a btree leaf, otherwise we'll lose the benefits of hashing because we'll have to search large leaves. So add a new field in ocfs2_extent_tree which indicates the maximum leaf cluster size we want so that we can prevent ocfs2_insert_extent() from merging the leaf record even if it is contiguous with an adjacent record. Other btree types are not affected by this change. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit 589dc2602f2a1b7fa5e59b90f548af189f128d77 Author: Tao Ma Date: Mon Aug 18 17:38:51 2008 +0800 ocfs2: Add xattr lookup code xattr btrees Add code to lookup a given extended attribute in the xattr btree. Lookup follows this general scheme: 1. Use ocfs2_xattr_get_rec to find the xattr extent record 2. Find the xattr bucket within the extent which may contain this xattr 3. Iterate the bucket to find the xattr. In ocfs2_xattr_block_get(), we need to recalcuate the block offset and name offset for the right position of name/value. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit 0c044f0b24b9128ba8c297149d88bd81f2e36af3 Author: Tao Ma Date: Mon Aug 18 17:38:50 2008 +0800 ocfs2: Add xattr bucket iteration for large numbers of EAs Ocfs2 breaks up xattr index tree leaves into 4k regions, called buckets. Attributes are stored within a given bucket, depending on hash value. After a discussion with Mark, we decided that the per-bucket index (xe_entry[]) would only exist in the 1st block of a bucket. Likewise, name/value pairs will not straddle more than one block. This allows the majority of operations to work directly on the buffer heads in a leaf block. This patch adds code to iterate the buckets in an EA. A new abstration of ocfs2_xattr_bucket is added. It records the bhs in this bucket and ocfs2_xattr_header. This keeps the code neat, improving readibility. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit ba492615f0d32d0210b02c14b24512b4372b13d6 Author: Tao Ma Date: Mon Aug 18 17:38:49 2008 +0800 ocfs2: Add xattr index tree operations When necessary, an ocfs2_xattr_block will embed an ocfs2_extent_list to store large numbers of EAs. This patch adds a new type in ocfs2_extent_tree_type and adds the implementation so that we can re-use the b-tree code to handle the storage of many EAs. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit cf1d6c763fbcb115263114302485ad17e7933d87 Author: Tiger Yang Date: Mon Aug 18 17:11:00 2008 +0800 ocfs2: Add extended attribute support This patch implements storing extended attributes both in inode or a single external block. We only store EA's in-inode when blocksize > 512 or that inode block has free space for it. When an EA's value is larger than 80 bytes, we will store the value via b-tree outside inode or block. Signed-off-by: Tiger Yang Signed-off-by: Mark Fasheh commit fdd77704a8b4666a32120fcd1e4a9fedaf3263d8 Author: Tiger Yang Date: Mon Aug 18 17:08:55 2008 +0800 ocfs2: reserve inline space for extended attribute Add the structures and helper functions we want for handling inline extended attributes. We also update the inline-data handlers so that they properly function in the event that we have both inline data and inline attributes sharing an inode block. Signed-off-by: Tiger Yang Signed-off-by: Mark Fasheh commit f56654c435c06f2b2bd5751889b1a08a3add7d6c Author: Tao Ma Date: Mon Aug 18 17:38:48 2008 +0800 ocfs2: Add extent tree operation for xattr value btrees Add some thin wrappers around ocfs2_insert_extent() for each of the 3 different btree types, ocfs2_inode_insert_extent(), ocfs2_xattr_value_insert_extent() and ocfs2_xattr_tree_insert_extent(). The last is for the xattr index btree, which will be used in a followup patch. All the old callers in file.c etc will call ocfs2_dinode_insert_extent(), while the other two handle the xattr issue. And the init of extent tree are handled by these functions. When storing xattr value which is too large, we will allocate some clusters for it and here ocfs2_extent_list and ocfs2_extent_rec will also be used. In order to re-use the b-tree operation code, a new parameter named "private" is added into ocfs2_extent_tree and it is used to indicate the root of ocfs2_exent_list. The reason is that we can't deduce the root from the buffer_head now. It may be in an inode, an ocfs2_xattr_block or even worse, in any place in an ocfs2_xattr_bucket. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit ac11c827192272eabb68b8f4cf844066461d9690 Author: Tao Ma Date: Mon Aug 18 17:38:47 2008 +0800 ocfs2: Add helper function in uptodate.c for removing xattr clusters The old uptodate only handles the issue of removing one buffer_head from ocfs2 inode's buffer cache. With xattr clusters, we may need to remove multiple buffer_head's at a time. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit 5a7bc8eb29b8c759df374d97b6189e03d4ea71c5 Author: Tao Ma Date: Mon Aug 18 17:38:46 2008 +0800 ocfs2: Add the basic xattr disk layout in ocfs2_fs.h Ocfs2 uses a very flexible structure for storing extended attributes on disk. Small amount of attributes are stored directly in the inode block - up to 256 bytes worth. If that fills up, attributes are also stored in an external block, linked to from the inode block. That block can in turn expand to a btree, capable of storing large numbers of attributes. Individual attribute values are stored inline if they're small enough (currently about 80 bytes, this can be changed though), and otherwise are expanded to a btree. The theoretical limit to the size of an individual attribute is about the same as an inode, though the kernel's upper bound on the size of an attributes data is far smaller. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit 0eb8d47e69a2211a36643b180f1843ef45f6017d Author: Tao Ma Date: Mon Aug 18 17:38:45 2008 +0800 ocfs2: Make high level btree extend code generic Factor out the non-inode specifics of ocfs2_do_extend_allocation() into a more generic function, ocfs2_do_cluster_allocation(). ocfs2_do_extend_allocation calls ocfs2_do_cluster_allocation() now, but the latter can be used for other btree types as well. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit e7d4cb6bc19658646357eeff134645cd9bc3479f Author: Tao Ma Date: Mon Aug 18 17:38:44 2008 +0800 ocfs2: Abstract ocfs2_extent_tree in b-tree operations. In the old extent tree operation, we take the hypothesis that we are using the ocfs2_extent_list in ocfs2_dinode as the tree root. As xattr will also use ocfs2_extent_list to store large value for a xattr entry, we refactor the tree operation so that xattr can use it directly. The refactoring includes 4 steps: 1. Abstract set/get of last_eb_blk and update_clusters since they may be stored in different location for dinode and xattr. 2. Add a new structure named ocfs2_extent_tree to indicate the extent tree the operation will work on. 3. Remove all the use of fe_bh and di, use root_bh and root_el in extent tree instead. So now all the fe_bh is replaced with et->root_bh, el with root_el accordingly. 4. Make ocfs2_lock_allocators generic. Now it is limited to be only used in file extend allocation. But the whole function is useful when we want to store large EAs. Note: This patch doesn't touch ocfs2_commit_truncate() since it is not used for anything other than truncate inode data btrees. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit 811f933df1e55615fd0bb4818f31e3868a8e6e23 Author: Tao Ma Date: Mon Aug 18 17:38:43 2008 +0800 ocfs2: Use ocfs2_extent_list instead of ocfs2_dinode. ocfs2_extend_meta_needed(), ocfs2_calc_extend_credits() and ocfs2_reserve_new_metadata() are all useful for extent tree operations. But they are all limited to an inode btree because they use a struct ocfs2_dinode parameter. Change their parameter to struct ocfs2_extent_list (the part of an ocfs2_dinode they actually use) so that the xattr btree code can use these functions. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit 231b87d10920e024efaf0f9e86e1bab7bced1620 Author: Tao Ma Date: Mon Aug 18 17:38:42 2008 +0800 ocfs2: Modify ocfs2_num_free_extents for future xattr usage. ocfs2_num_free_extents() is used to find the number of free extent records in an inode btree. Hence, it takes an "ocfs2_dinode" parameter. We want to use this for extended attribute trees in the future, so genericize the interface the take a buffer head. A future patch will allow that buffer_head to contain any structure rooting an ocfs2 btree. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit 9a8ff578fb430a8816dfbc73c77e5e09c6d9c343 Author: Mark Fasheh Date: Tue Jul 29 18:29:18 2008 -0700 ocfs2: track local alloc state via debugfs A per-mount debugfs file, "local_alloc" is created which when read will expose live state of the nodes local alloc file. Performance impact is minimal, only a bit of memory overhead per mount point. Still, the code is hidden behind CONFIG_OCFS2_FS_STATS. This feature will help us debug local alloc performance problems on a live system. Signed-off-by: Mark Fasheh commit 9c7af40b210e87f8fddd97b0badc0a352862234a Author: Mark Fasheh Date: Mon Jul 28 18:02:53 2008 -0700 ocfs2: throttle back local alloc when low on disk space Ocfs2's local allocator disables itself for the duration of a mount point when it has trouble allocating a large enough area from the primary bitmap. That can cause performance problems, especially for disks which were only temporarily full or fragmented. This patch allows for the allocator to shrink it's window first, before being disabled. Later, it can also be re-enabled so that any performance drop is minimized. To do this, we allow the value of osb->local_alloc_bits to be shrunk when needed. The default value is recorded in a mostly read-only variable so that we can re-initialize when required. Locking had to be updated so that we could protect changes to local_alloc_bits. Mostly this involves protecting various local alloc values with the osb spinlock. A new state is also added, OCFS2_LA_THROTTLED, which is used when the local allocator is has shrunk, but is not disabled. If the available space dips below 1 megabyte, the local alloc file is disabled. In either case, local alloc is re-enabled 30 seconds after the event, or when an appropriate amount of bits is seen in the primary bitmap. Signed-off-by: Mark Fasheh commit ebcee4b5c9136096f64ee6f691a013d7c0a4bc34 Author: Mark Fasheh Date: Mon Jul 28 14:55:20 2008 -0700 ocfs2: Track local alloc bits internally Do this instead of tracking absolute local alloc size. This avoids needless re-calculatiion of bits from bytes in localalloc.c. Additionally, the value is now in a more natural unit for internal file system bitmap work. Signed-off-by: Mark Fasheh commit 53da4939f349d4edd283b043219221ca5b78e4d4 Author: Mark Fasheh Date: Mon Jul 21 14:29:16 2008 -0700 ocfs2: POSIX file locks support This is actually pretty easy since fs/dlm already handles the bulk of the work. The Ocfs2 userspace cluster stack module already uses fs/dlm as the underlying lock manager, so I only had to add the right calls. Cluster-aware POSIX locks ("plocks") can be turned off by the same means at UNIX locks - mount with 'noflocks', or create a local-only Ocfs2 volume. Internally, the file system uses two sets of file_operations, depending on whether cluster aware plocks is required. This turns out to be easier than implementing local-only versions of ->lock. Signed-off-by: Mark Fasheh commit a447c0932445f92ce6f4c1bd020f62c5097a7842 Author: Steven Whitehouse Date: Mon Oct 13 10:46:57 2008 +0100 vfs: Use const for kernel parser table This is a much better version of a previous patch to make the parser tables constant. Rather than changing the typedef, we put the "const" in all the various places where its required, allowing the __initconst exception for nfsroot which was the cause of the previous trouble. This was posted for review some time ago and I believe its been in -mm since then. Signed-off-by: Steven Whitehouse Cc: Alexander Viro Signed-off-by: Linus Torvalds commit 00dc417fa3e763345b34ccb6034d72de76eea0a1 Author: Mark Fasheh Date: Fri Oct 3 17:32:11 2008 -0400 ocfs2: fiemap support Plug ocfs2 into ->fiemap. Some portions of ocfs2_get_clusters() had to be refactored so that the extent cache can be skipped in favor of going directly to the on-disk records. This makes it easier for us to determine which extent is the last one in the btree. Also, I'm not sure we want to be caching fiemap lookups anyway as they're not directly related to data read/write. Signed-off-by: Mark Fasheh Signed-off-by: "Theodore Ts'o" Cc: ocfs2-devel@oss.oracle.com Cc: linux-fsdevel@vger.kernel.org