commit 712e53e46a1da35fcd88c05aa0c675b10f7c0e9d Author: Tao Ma Date: Thu Mar 12 08:37:34 2009 +0800 ocfs2: Use xs->bucket to set xattr value outside A long time ago, xs->base is allocated a 4K size and all the contents in the bucket are copied to the it. Now we use ocfs2_xattr_bucket to abstract xattr bucket and xs->base is initialized to the start of the bu_bhs[0]. So xs->base + offset will overflow when the value root is stored outside the first block. Then why we can survive the xattr test by now? It is because we always read the bucket contiguously now and kernel mm allocate continguous memory for us. We are lucky, but we should fix it. So just get the right value root as other callers do. Signed-off-by: Tao Ma Acked-by: Joel Becker Signed-off-by: Mark Fasheh commit 74e77eb30d0ecbb12964d005b439c8b84a505b84 Author: Tao Ma Date: Thu Mar 12 06:24:23 2009 +0800 ocfs2: Fix a bug found by sparse check. We need to use le32_to_cpu to test rec->e_cpos in ocfs2_dinode_insert_check. Signed-off-by: Tao Ma Acked-by: Joel Becker Signed-off-by: Mark Fasheh commit d9ae49d6e2b1ac9166e58ae3c9345135604beaa6 Author: Tiger Yang Date: Thu Mar 5 11:06:15 2009 +0800 ocfs2: tweak to get the maximum inline data size with xattr Replace max_inline_data with max_inline_data_with_xattr to ensure it correct when xattr inlined. Signed-off-by: Tiger Yang Acked-by: Joel Becker Signed-off-by: Mark Fasheh commit 6c9fd1dc0a597e575617a7de7086c8a3efa8f524 Author: Tiger Yang Date: Fri Mar 6 10:19:30 2009 +0800 ocfs2: reserve xattr block for new directory with inline data If this is a new directory with inline data, we choose to reserve the entire inline area for directory contents and force an external xattr block. Signed-off-by: Tiger Yang Acked-by: Joel Becker Signed-off-by: Mark Fasheh commit 28d57d437786eb3e44f1ca3f0f41e7cfe29c6dd4 Author: wengang wang Date: Fri Feb 13 10:11:47 2009 +0800 ocfs2: add IO error check in ocfs2_get_sector() Check for IO error in ocfs2_get_sector(). Signed-off-by: Wengang Wang Signed-off-by: Mark Fasheh commit 4442f518269c6b3686fcbcadad22dc4475309b16 Author: Tiger Yang Date: Fri Feb 20 11:11:50 2009 +0800 ocfs2: set gap to seperate entry and value when xattr in bucket This patch set a gap (4 bytes) between xattr entry and name/value when xattr in bucket. This gap use to seperate entry and name/value when a bucket is full. It had already been set when xattr in inode/block. Signed-off-by: Tiger Yang Signed-off-by: Mark Fasheh commit c8b9cf9a7cd25ba65166116d0a958f0bc709f0a7 Author: Tao Ma Date: Tue Feb 24 17:40:26 2009 -0800 ocfs2: lock the metaecc process for xattr bucket For other metadata in ocfs2, metaecc is checked in ocfs2_read_blocks with io_mutex held. While for xattr bucket, it is calculated by the whole buckets. So we have to add a spin_lock to prevent multiple processes calculating metaecc. Signed-off-by: Tao Ma Tested-by: Tristan Ye Signed-off-by: Mark Fasheh commit 89a907afe073b8971a83d0ad54f391542b64d327 Author: Tao Ma Date: Tue Feb 17 04:39:28 2009 +0800 ocfs2: Use the right access_* method in ctime update of xattr. In ctime updating of xattr, it use the wrong type of access for inode, so use ocfs2_journal_access_di instead. Reported-and-Tested-by: Tristan Ye Signed-off-by: Tao Ma Acked-by: Joel Becker Signed-off-by: Mark Fasheh commit 53ecd25e148615e0ed2a72635cc76f4773f97f90 Author: Sunil Mushran Date: Tue Feb 3 12:37:16 2009 -0800 ocfs2/dlm: Make dlm_assert_master_handler() kill itself instead of the asserter In dlm_assert_master_handler(), if we get an incorrect assert master from a node that, we reply with EINVAL asking the asserter to die. The problem is that an assert is sent after so many hoops, it is invariably the node that thinks the asserter is wrong, is actually wrong. So instead of killing the asserter, this patch kills the assertee. This patch papers over a race that is still being addressed. Signed-off-by: Sunil Mushran Acked-by: Joel Becker Signed-off-by: Mark Fasheh commit dabc47de7a23f57522dc762d9d2ad875700d3497 Author: Sunil Mushran Date: Tue Feb 3 12:37:15 2009 -0800 ocfs2/dlm: Use ast_lock to protect ast_list The code was using dlm->spinlock instead of dlm->ast_lock to protect the ast_list. This patch fixes the issue. Signed-off-by: Sunil Mushran Acked-by: Joel Becker Signed-off-by: Mark Fasheh commit c74ff8bb2235d848beb67fcfddae71ecbe3f92b1 Author: Sunil Mushran Date: Tue Feb 3 12:37:14 2009 -0800 ocfs2: Cleanup the lockname print in dlmglue.c The dentry lock has a different format than other locks. This patch fixes ocfs2_log_dlm_error() macro to make it print the dentry lock correctly. Signed-off-by: Sunil Mushran Acked-by: Joel Becker Signed-off-by: Mark Fasheh commit 7dc102b737e9f49dac426161294cb2d326a97d8e Author: Sunil Mushran Date: Tue Feb 3 12:37:13 2009 -0800 ocfs2/dlm: Retract fix for race between purge and migrate Mainline commit d4f7e650e55af6b235871126f747da88600e8040 attempts to delay the dlm_thread from sending the drop ref message if the lockres is being migrated. The problem is that we make the dlm_thread wait for the migration to complete. This causes a deadlock as dlm_thread also participates in the lockres migration process. A better fix for the original oss bugzilla#1012 is in testing. Signed-off-by: Sunil Mushran Acked-by: Joel Becker Signed-off-by: Mark Fasheh commit 47be12e4eec84c1846f29af64fe25a396b57a026 Author: Tao Ma Date: Fri Jan 9 07:32:48 2009 +0800 ocfs2: Access and dirty the buffer_head in mark_written. In __ocfs2_mark_extent_written, when we meet with the situation of c_split_covers_rec, the old solution just replace the extent record and forget to access and dirty the buffer_head. This will cause a problem when the unwritten extent is in an extent block. So access and dirty it. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit 7f5aa215088b817add9c71914b83650bdd49f8a9 Author: Jan Kara Date: Tue Feb 10 11:15:34 2009 -0500 jbd2: Avoid possible NULL dereference in jbd2_journal_begin_ordered_truncate() If we race with commit code setting i_transaction to NULL, we could possibly dereference it. Proper locking requires the journal pointer (to access journal->j_list_lock), which we don't have. So we have to change the prototype of the function so that filesystem passes us the journal pointer. Also add a more detailed comment about why the function jbd2_journal_begin_ordered_truncate() does what it does and how it should be used. Thanks to Dan Carpenter for pointing to the suspitious code. Signed-off-by: Jan Kara Signed-off-by: "Theodore Ts'o" Acked-by: Joel Becker CC: linux-ext4@vger.kernel.org CC: ocfs2-devel@oss.oracle.com CC: mfasheh@suse.de CC: Dan Carpenter commit fd4ef231962ab44fd1004e87f9d7c6809f00cd64 Author: Mark Fasheh Date: Thu Jan 29 15:06:21 2009 -0800 ocfs2: add quota call to ocfs2_remove_btree_range() We weren't reclaiming the clusters which get free'd from this function, so any user punching holes in a file would still have those bytes accounted against him/her. Add the call to vfs_dq_free_space_nodirty() to fix this. Interestingly enough, the journal credits calculation already took this into account. Signed-off-by: Mark Fasheh Acked-by: Jan Kara commit a4b91965d39d5d53b470d6aa62cba155a6f3ffe1 Author: Sunil Mushran Date: Thu Jan 29 17:12:31 2009 -0800 ocfs2: Wakeup the downconvert thread after a successful cancel convert When two nodes holding PR locks on a resource concurrently attempt to upconvert the locks to EX, the master sends a BAST to one of the nodes. This message tells that node to first cancel convert the upconvert request, followed by downconvert to a NL. Only when this lock is downconverted to NL, can the master upconvert the first node's lock to EX. While the fs was doing the cancel convert, it was forgetting to wake up the dc thread after a successful cancel, leading to a deadlock. Reported-and-Tested-by: David Teigland Signed-off-by: Sunil Mushran Signed-off-by: Mark Fasheh commit 554e7f9e043e29da79c044f7a55efe4fad40701e Author: Tao Ma Date: Thu Jan 8 08:21:43 2009 +0800 ocfs2: Access the xattr bucket only before modifying it. In ocfs2_xattr_value_truncate, we may call b-tree codes which will extend the journal transaction. It has a potential problem that it may let the already-accessed-but-not-dirtied buffers gone. So we'd better access the bucket after we call ocfs2_xattr_value_truncate. And as for the root buffer for the xattr value, b-tree code will acess and dirty it, so we don't need to worry about it. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit f8afead7169f0f28a4b421bcbdb510e52a2d094d Author: Jan Kara Date: Mon Jan 12 23:20:32 2009 +0100 ocfs2: Fix possible deadlock in ocfs2_write_dquot() It could happen that some limit has been set via quotactl() and in parallel ->mark_dirty() is called from another thread doing e.g. dquot_alloc_space(). In such case ocfs2_write_dquot() must not try to sync the dquot because that needs global quota lock but that ranks above transaction start. Signed-off-by: Jan Kara Signed-off-by: Mark Fasheh commit ea455f8ab68338ba69f5d3362b342c115bea8e13 Author: Jan Kara Date: Mon Jan 12 23:20:31 2009 +0100 ocfs2: Push out dropping of dentry lock to ocfs2_wq Dropping of last reference to dentry lock is a complicated operation involving dropping of reference to inode. This can get complicated and quota code in particular needs to obtain some quota locks which leads to potential deadlock. Thus we defer dropping of inode reference to ocfs2_wq. Signed-off-by: Jan Kara Signed-off-by: Mark Fasheh commit cc597bc3d31468596af6b8ad2b1d1b593e308957 Merge: ed80386 c475146 Author: Linus Torvalds Date: Mon Jan 26 10:41:00 2009 -0800 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-quota-2.6 * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-quota-2.6: ocfs2: Remove ocfs2_dquot_initialize() and ocfs2_dquot_drop() quota: Improve locking commit 2fe4371dff3f1a5a1f7d91f1b090076954f4d17e Author: Alexey Dobriyan Date: Thu Jan 22 10:26:11 2009 +0300 fs/Kconfig: move ocfs2 out Signed-off-by: Alexey Dobriyan commit c475146d8f3b97e79f9ef88521e28ad40ac07de6 Author: Jan Kara Date: Mon Jan 12 17:44:34 2009 +0100 ocfs2: Remove ocfs2_dquot_initialize() and ocfs2_dquot_drop() Since ->acquire_dquot and ->release_dquot callbacks aren't called under dqptr_sem anymore, we don't have to start a transaction and obtain locks so early. So we can just remove all this complicated stuff. Signed-off-by: Jan Kara Acked-by: Mark Fasheh commit 73ac36ea14fd18ea3dc057e41b16ff31a3c0bd5a Author: Coly Li Date: Wed Jan 7 18:09:16 2009 -0800 fix similar typos to successfull When I review ocfs2 code, find there are 2 typos to "successfull". After doing grep "successfull " in kernel tree, 22 typos found totally -- great minds always think alike :) This patch fixes all the similar typos. Thanks for Randy's ack and comments. Signed-off-by: Coly Li Acked-by: Randy Dunlap Acked-by: Roland Dreier Cc: Jeremy Kerr Cc: Jeff Garzik Cc: Heiko Carstens Cc: Martin Schwidefsky Cc: Theodore Ts'o Cc: Mark Fasheh Cc: Vlad Yasevich Cc: Sridhar Samudrala Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c19a28e1193a6c854738d609ae9b2fe2f6e6bea4 Author: Fernando Carrijo Date: Wed Jan 7 18:09:08 2009 -0800 remove lots of double-semicolons Cc: Ingo Molnar Cc: Thomas Gleixner Acked-by: Theodore Ts'o Acked-by: Mark Fasheh Acked-by: David S. Miller Cc: James Morris Acked-by: Casey Schaufler Acked-by: Takashi Iwai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 025dfdafe77f20b3890981a394774baab7b9c827 Author: Frederik Schwarzer Date: Thu Oct 16 19:02:37 2008 +0200 trivial: fix then -> than typos in comments and documentation - (better, more, bigger ...) then -> (...) than Signed-off-by: Frederik Schwarzer Signed-off-by: Jiri Kosina commit 10cc04f5a01041ffff068b3f9b195bfdc5290c45 Merge: 520c853 9047bea Author: Linus Torvalds Date: Mon Jan 5 18:32:43 2009 -0800 Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2 * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2: (138 commits) ocfs2: Access the right buffer_head in ocfs2_merge_rec_left. ocfs2: use min_t in ocfs2_quota_read() ocfs2: remove unneeded lvb casts ocfs2: Add xattr support checking in init_security ocfs2: alloc xattr bucket in ocfs2_xattr_set_handle ocfs2: calculate and reserve credits for xattr value in mknod ocfs2/xattr: fix credits calculation during index create ocfs2/xattr: Always updating ctime during xattr set. ocfs2/xattr: Remove extend_trans call and add its credits from the beginning ocfs2/dlm: Fix race during lockres mastery ocfs2/dlm: Fix race in adding/removing lockres' to/from the tracking list ocfs2/dlm: Hold off sending lockres drop ref message while lockres is migrating ocfs2/dlm: Clean up errors in dlm_proxy_ast_handler() ocfs2/dlm: Fix a race between migrate request and exit domain ocfs2: One more hamming code optimization. ocfs2: Another hamming code optimization. ocfs2: Don't hand-code xor in ocfs2_hamming_encode(). ocfs2: Enable metadata checksums. ocfs2: Validate superblock with checksum and ecc. ocfs2: Checksum and ECC for directory blocks. ... commit 56ff5efad96182f4d3cb3dc6b07396762c658f16 Author: Al Viro Date: Tue Dec 9 09:34:39 2008 -0500 zero i_uid/i_gid on inode allocation ... and don't bother in callers. Don't bother with zeroing i_blocks, while we are at it - it's already been zeroed. i_mode is not worth the effort; it has no common default value. Signed-off-by: Al Viro commit 9047beabb8a396f0b18de1e4a9ab920cf92054af Author: Tao Ma Date: Mon Jan 5 14:45:24 2009 +0800 ocfs2: Access the right buffer_head in ocfs2_merge_rec_left. In commit "ocfs2: Use metadata-specific ocfs2_journal_access_*() functions", the wrong buffer_head is accessed. So change it to the right buffer_head. Signed-off-by: Tao Ma Acked-by: Joel Becker Signed-off-by: Mark Fasheh commit dad7d975e4bd893c79fd122105b37b9a1776816a Author: Mark Fasheh Date: Wed Dec 24 16:33:08 2008 -0800 ocfs2: use min_t in ocfs2_quota_read() This is preferred to min(). Signed-off-by: Mark Fasheh commit a641dc2a5a1445eb4cb491080dfc41c42a9eb37d Author: Mark Fasheh Date: Wed Dec 24 16:03:48 2008 -0800 ocfs2: remove unneeded lvb casts dlmglue.c has lots of code which casts the return value of ocfs2_dlm_lvb(). This is pointless however, as ocfs2_dlm_lvb() returns void *. Signed-off-by: Mark Fasheh commit 38d59ef61c11cafc50a66787bdbbe80d58bbd9c0 Author: Tiger Yang Date: Wed Dec 17 10:22:56 2008 +0800 ocfs2: Add xattr support checking in init_security We must check whether ocfs2 volume support xattr in init_security, if not support xattr and security is enable, would cause failure of mknod. Signed-off-by: Tiger Yang Signed-off-by: Mark Fasheh commit 008aafaf0b4aa0476da483e3c6e3edbe951811ff Author: Tiger Yang Date: Tue Dec 9 16:43:08 2008 +0800 ocfs2: alloc xattr bucket in ocfs2_xattr_set_handle In extreme situation, may need xattr bucket for setting security entry and acl entries during mknod. This only happens when block size is too small. Signed-off-by: Tiger Yang Signed-off-by: Mark Fasheh commit 0e445b6fe93c723fe8093fd04ddfeb11ae2de082 Author: Tiger Yang Date: Tue Dec 9 16:42:51 2008 +0800 ocfs2: calculate and reserve credits for xattr value in mknod We extend the credits for xattr's large value in set_value_outside before, this can give rise to a credits issue when we set one security entry and two acl entries duing mknod. As we remove extend_trans form set_value_outside, we must calculate and reserve the credits for xattr's large value in mknod. Signed-off-by: Tiger Yang Signed-off-by: Mark Fasheh commit 90cb546cada68bb8c2278afdb4b65c2ac11f2877 Author: Tao Ma Date: Fri Dec 5 06:20:56 2008 +0800 ocfs2/xattr: fix credits calculation during index create When creating a xattr index block, the old calculation forget to add credits for the meta change of the alloc file. So add more credits and more comments to explain it. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit 4b3f6209bf9eec46fe5ebb168718fef5c443c157 Author: Tao Ma Date: Fri Dec 5 06:20:55 2008 +0800 ocfs2/xattr: Always updating ctime during xattr set. In xattr set, we should always update ctime if the operation goes sucessfully. The old one mistakenly put it in ocfs2_xattr_set_entry which is only called when we set xattr in inode or xattr block. The side benefit is that it resolve the bug 1052 since in that scenario, ocfs2_calc_xattr_set_need only calc out the xattr set credits while ocfs2_xattr_set_entry update the inode also which isn't concerned with the process of xattr set. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit 71d548a6af36fe98c95fbd0522147f842bd5f054 Author: Tao Ma Date: Fri Dec 5 06:20:54 2008 +0800 ocfs2/xattr: Remove extend_trans call and add its credits from the beginning Actually, when setting a new xattr value, we know it from the very beginning, and it isn't like the extension of bucket in which case we can't figure it out. So remove ocfs2_extend_trans in that function and calculate it before the transaction. It also relieve acl operation from the worry about the side effect of ocfs2_extend_trans. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit 7b791d68562e4ce5ab57cbacb10a1ad4ee33956e Author: Sunil Mushran Date: Tue Dec 16 15:49:23 2008 -0800 ocfs2/dlm: Fix race during lockres mastery dlm_get_lock_resource() is supposed to return a lock resource with a proper master. If multiple concurrent threads attempt to lookup the lockres for the same lockid while the lock mastery in underway, one or more threads are likely to return a lockres without a proper master. This patch makes the threads wait in dlm_get_lock_resource() while the mastery is underway, ensuring all threads return the lockres with a proper master. This issue is known to be limited to users using the flock() syscall. For all other fs operations, the ocfs2 dlmglue layer serializes the dlm op for each lockid. Users encountering this bug will see flock() return EINVAL and dmesg have the following error: ERROR: Dlm error "DLM_BADARGS" while calling dlmlock on resource : bad api args Reported-by: Coly Li Signed-off-by: Sunil Mushran Signed-off-by: Mark Fasheh commit b0d4f817ba5de8adb875ace594554a96d7737710 Author: Sunil Mushran Date: Tue Dec 16 15:49:22 2008 -0800 ocfs2/dlm: Fix race in adding/removing lockres' to/from the tracking list This patch adds a new lock, dlm->tracking_lock, to protect adding/removing lockres' to/from the dlm->tracking_list. We were previously using dlm->spinlock for the same, but that proved inadequate as we could be freeing a lockres from a context that did not hold that lock. As the new lock only protects this list, we can explicitly take it when removing the lockres from the tracking list. This bug was exposed when testing multiple processes concurrently flock() the same file. Signed-off-by: Sunil Mushran Signed-off-by: Mark Fasheh commit d4f7e650e55af6b235871126f747da88600e8040 Author: Sunil Mushran Date: Tue Dec 16 15:49:21 2008 -0800 ocfs2/dlm: Hold off sending lockres drop ref message while lockres is migrating During lockres purge, o2dlm sends a drop reference message to the lockres master. This patch delays the message if the lockres is being migrated. Fixes oss bugzilla#1012 http://oss.oracle.com/bugzilla/show_bug.cgi?id=1012 Signed-off-by: Sunil Mushran Signed-off-by: Mark Fasheh commit 57dff2676eb68d805883a2204faaa5339ac44e03 Author: Sunil Mushran Date: Tue Dec 16 15:49:20 2008 -0800 ocfs2/dlm: Clean up errors in dlm_proxy_ast_handler() Patch cleans printed errors in dlm_proxy_ast_handler(). The errors now includes the node number that sent the (b)ast. Also it reduces the number of endian swaps of the cookie. Signed-off-by: Sunil Mushran Signed-off-by: Mark Fasheh commit 2b83256407687613e906bee93d98a25339128a4d Author: Sunil Mushran Date: Tue Dec 16 15:49:19 2008 -0800 ocfs2/dlm: Fix a race between migrate request and exit domain Patch address a racing migrate request message and an exit domain message. Instead of blocking exit domains for the duration of the migrate, we ignore failure to deliver that message. This is because an exiting domain should not have any active locks and thus has no role to play in the migration. Signed-off-by: Sunil Mushran Signed-off-by: Mark Fasheh commit 58896c4d0e5868360ea0693c607d5bf74f79da6b Author: Joel Becker Date: Tue Dec 16 13:54:40 2008 -0800 ocfs2: One more hamming code optimization. The previous optimization used a fast find-highest-bit-set operation to give us a good starting point in calc_code_bit(). This version lets the caller cache the previous code buffer bit offset. Thus, the next call always starts where the last one left off. This reduces the calculation another 39%, for a total 80% reduction from the original, naive implementation. At least, on my machine. This also brings the parity calculation to within an order of magnitude of the crc32 calculation. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 7bb458a58588f397068e4166c615e9fcc7480c16 Author: Joel Becker Date: Mon Dec 15 18:24:33 2008 -0800 ocfs2: Another hamming code optimization. In the calc_code_bit() function, we must find all powers of two beneath the code bit number, *after* it's shifted by those powers of two. This requires a loop to see where it ends up. We can optimize it by starting at its most significant bit. This shaves 32% off the time, for a total of 67.6% shaved off of the original, naive implementation. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit e798b3f8a920c82a8e556dd54df97f0d3d0f9144 Author: Joel Becker Date: Mon Dec 15 17:13:48 2008 -0800 ocfs2: Don't hand-code xor in ocfs2_hamming_encode(). When I wrote ocfs2_hamming_encode(), I was following documentation of the algorithm and didn't have quite the (possibly still imperfect) grasp of it I do now. As part of this, I literally hand-coded xor. I would test a bit, and then add that bit via xor to the parity word. I can, of course, just do a single xor of the parity word and the source word (the code buffer bit offset). This cuts CPU usage by 53% on a mostly populated buffer (an inode containing utmp.h inline). Joel Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 9d28cfb73f3abccce001daf2d247b16bf20e2248 Author: Joel Becker Date: Thu Oct 16 17:53:29 2008 -0700 ocfs2: Enable metadata checksums. Add OCFS2_FEATURE_INCOMPAT_META_ECC to the list of supported features. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit d030cc978e9e636dc39ce9a9e8282d48698a3b30 Author: Joel Becker Date: Thu Dec 11 15:04:14 2008 -0800 ocfs2: Validate superblock with checksum and ecc. The superblock is read via a raw call. Validate it after we find it from its signature. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit c175a518b4a1d514483abf61813ce5d855917164 Author: Joel Becker Date: Wed Dec 10 17:58:22 2008 -0800 ocfs2: Checksum and ECC for directory blocks. Use the db_check field of ocfs2_dir_block_trailer to crc/ecc the dirblocks. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 87d35a74b15ec703910a63e0667692fb5e267be0 Author: Mark Fasheh Date: Wed Dec 10 17:36:25 2008 -0800 ocfs2: Add directory block trailers. Future ocfs2 features metaecc and indexed directories need to store a little bit of data in each dirblock. For compatibility, we place this in a trailer at the end of the dirblock. The trailer plays itself as an empty dirent, so that if the features are turned off, it can be reused without requiring a tunefs scan. This code adds the trailer and validates it when the block is read in. [ Mark is the original author, but I reinserted this code before his dir index work. -- Joel ] Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 84008972491ca91b240f106191519781dabb8016 Author: Joel Becker Date: Tue Dec 9 16:11:49 2008 -0800 ocfs2: Use proper journal_access function in xattr.c Change the rest of the naked ocfs2_journal_access() calls in fs/ocfs2/xattr.c to use the appropriate ocfs2_journal_access_*() call for their metadata type. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 4311901daabe1d0f22cfcf86c57ad450f14b4e9f Author: Joel Becker Date: Tue Dec 9 16:24:43 2008 -0800 ocfs2: Pass value buf to ocfs2_remove_value_outside(). ocfs2_remove_value_outside() needs to know the type of buffer it is looking at. Pass in an ocfs2_xattr_value_buf. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 512620f44df85df87348fc9a6fc54fcaa254b8d3 Author: Joel Becker Date: Tue Dec 9 15:58:35 2008 -0800 ocfs2: Use ocfs2_xattr_value_buf in ocfs2_xattr_set_entry(). ocfs2_xattr_set_entry is the function that knows what type of block it is setting into. This is what we wanted from ocfs2_xattr_value_buf. Plus, moving the value buf up into ocfs2_xattr_set_entry() allows us to pass it into ocfs2_xattr_set_value_outside() and ocfs2_xattr_cleanup(). Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 0c748e95327d00e9eb19d0f34b32147ecbc02137 Author: Joel Becker Date: Tue Dec 9 15:46:15 2008 -0800 ocfs2: Pass value buf to ocfs2_xattr_update_entry(). ocfs2_xattr_update_entry() updates the entry portion of an xattr buffer. This can be part of multiple metadata block types, so pass the buffer in via an ocfs2_xattr_value_buf. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit b3e5d37905730dc5ddff717f55ed830caa80ea0e Author: Joel Becker Date: Tue Dec 9 15:01:04 2008 -0800 ocfs2: Pass ocfs2_xattr_value_buf into ocfs2_xattr_value_truncate(). The callers of ocfs2_xattr_value_truncate() now pass in ocfs2_xattr_value_bufs. These callers are the ones that calculated the xv location, so they are the right starting point. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 19b801f45fa5e4840b9be3dcf1e73b08f35b04d9 Author: Joel Becker Date: Tue Dec 9 14:36:50 2008 -0800 ocfs2: Pull ocfs2_xattr_value_buf up into ocfs2_xattr_value_truncate(). Place an ocfs2_xattr_value_buf in ocfs2_xattr_value_truncate() and pass it down to ocfs2_xattr_shrink_size(). We can also pass it into ocfs2_xattr_extend_allocation(), replacing its ocfs2_xattr_value_buf. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit d72cc72d57ecaf9047da51269dabd6880c1399ac Author: Joel Becker Date: Tue Dec 9 14:30:41 2008 -0800 ocfs2: Pull ocfs2_xattr_value_buf up from __ocfs2_remove_xattr_range(). Place an ocfs2_xattr_value_buf in __ocfs2_xattr_shrink_size() and pass it down to __ocfs2_remove_xattr_range(). Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 2a50a743bdaab104155bd9e988d2ba3bb4177263 Author: Joel Becker Date: Tue Dec 9 14:24:33 2008 -0800 ocfs2: Create ocfs2_xattr_value_buf. When an ocfs2 extended attribute is large enough to require its own allocation tree, we root it with an ocfs2_xattr_value_root. However, these roots can be a part of inodes, xattr blocks, or xattr buckets. Thus, they need a different journal access function for each container. We wrap the bh, its journal access function, and the value root (xv) in a structure called ocfs2_xattr_valu_buf. This is a package that can be passed around. In this first pass, we simply pass it to the extent tree code. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 4d0e214ee83185fcaa2cb97cd026d32bdc5c994a Author: Joel Becker Date: Fri Dec 5 11:19:37 2008 -0800 ocfs2: Add ecc and checksums to ocfs2 xattr buckets. The xattr bucket can span multiple blocks on disk. We have wrappers for this structure in the code. We use the new multi-block ecc calls to calculate and validate the bucket. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 13723d00e374c2a6d6ccb5af6de965e89c3e1b01 Author: Joel Becker Date: Fri Oct 17 19:25:01 2008 -0700 ocfs2: Use metadata-specific ocfs2_journal_access_*() functions. The per-metadata-type ocfs2_journal_access_*() functions hook up jbd2 commit triggers and allow us to compute metadata ecc right before the buffers are written out. This commit provides ecc for inodes, extent blocks, group descriptors, and quota blocks. It is not safe to use extened attributes and metaecc at the same time yet. The ocfs2_extent_tree and ocfs2_path abstractions in alloc.c both hide the type of block at their root. Before, it didn't matter, but now the root block must use the appropriate ocfs2_journal_access_*() function. To keep this abstract, the structures now have a pointer to the matching journal_access function and a wrapper call to call it. A few places use naked ocfs2_write_block() calls instead of adding the blocks to the journal. We make sure to calculate their checksum and ecc before the write. Since we pass around the journal_access functions. Let's typedef them in ocfs2.h. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit ffdd7a54631f07918b75e324d86713a08c11ec06 Author: Joel Becker Date: Fri Oct 17 22:32:01 2008 -0700 ocfs2: Wrap up the common use cases of ocfs2_new_path(). The majority of ocfs2_new_path() calls are: ocfs2_new_path(path_root_bh(otherpath), path_root_el(otherpath)); Let's call that ocfs2_new_path_from_path(). The rest do similar things from struct ocfs2_extent_tree. Let's call those ocfs2_new_path_from_et(). This will make the next change easier. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 50655ae9e91d272d48997bada59efe166aa5e343 Author: Joel Becker Date: Thu Sep 11 15:53:07 2008 -0700 ocfs2: Add journal_access functions with jbd2 triggers. We create wrappers for ocfs2_journal_access() that are specific to the type of metadata block. This allows us to associate jbd2 commit triggers with the block. The triggers will compute metadata ecc in a future commit. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit d6b32bbb3eae3fb787f1c33bf9f767ca1ddeb208 Author: Joel Becker Date: Fri Oct 17 14:55:01 2008 -0700 ocfs2: block read meta ecc. Add block check calls to the read_block validate functions. This is the almost all of the read-side checking of metaecc. xattr buckets are not checked yet. Writes are also unchecked, and so a read-write mount will quickly fail. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 684ef278377725d505aa23259ee673dab9b11851 Author: Joel Becker Date: Tue Dec 2 17:44:05 2008 -0800 ocfs2: Add a validation hook for quota block reads. Add a currently-returns-success hook for quota block reads. We'll be adding checks to this. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 70ad1ba7b48364d758a112df0823edc5ca6632aa Author: Joel Becker Date: Thu Oct 16 17:54:25 2008 -0700 ocfs2: Add the underlying blockcheck code. This is the code that computes crc32 and ecc for ocfs2 metadata blocks. There are high-level functions that check whether the filesystem has the ecc feature, mid-level functions that work on a single block or array of buffer_heads, and the low-level ecc hamming code that can handle multiple buffers like crc32_le(). It's not hooked up to the filesystem yet. Signed-off-by: Joel Becker Cc: Christoph Hellwig Signed-off-by: Mark Fasheh commit ab552d54673f262d7f70014003d3928d29270f22 Author: Joel Becker Date: Thu Oct 16 17:50:30 2008 -0700 ocfs2: Add the on-disk structures for metadata checksums. Define struct ocfs2_block_check, an 8-byte structure containing a 32bit crc32_le and a 16bit hamming code ecc. This will be used for metadata checksums. Add the structure to free spaces in the various metadata structures. Add the OCFS2_FEATURE_INCOMPAT_META_ECC bit. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 754938c142ae0c28360426c43f965ddc5164b21e Author: Tao Ma Date: Mon Dec 15 06:03:41 2008 +0800 ocfs2/quota: Add QUOTA in mlog_attribute. A new mlog mask has to be added into mlog_attribute before it can be really used in mlog. ML_QUOTA is only added in masklog.h, so add it to the array to enable it. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit 91f2033fa997aa92607470ed1ef90685b9d77a8c Author: Joel Becker Date: Wed Nov 26 15:25:41 2008 -0800 ocfs2: Pass xs->bucket into ocfs2_add_new_xattr_bucket(). Pass the actual target bucket for insert through to ocfs2_add_new_xattr_bucket(). Now growing a bucket has no buffer_head knowledge. ocfs2_add_new_xattr_bucket() leavs xs->bucket in the proper state for insert. However, it doesn't update the rest of the search fields in xs, so we still have to relse() and re-find. That's OK, because everything is cached. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit ed29c0ca14871021fc8aced74650648dcb2c6e81 Author: Joel Becker Date: Wed Nov 26 15:08:44 2008 -0800 ocfs2: Move buckets up into ocfs2_add_new_xattr_bucket(). Lift the buckets from ocfs2_add_new_xattr_cluster() up into ocfs2_add_new_xattr_bucket(). Now ocfs2_add_new_xattr_cluster() doesn't deal with buffer_heads. In fact, we no longer have to play get_bh() tricks at all. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 012ee910876e251621705e8dea7c353fd4914e19 Author: Joel Becker Date: Wed Nov 26 14:43:31 2008 -0800 ocfs2: Move buckets up into ocfs2_add_new_xattr_cluster(). Lift the buckets from ocfs2_adjust_xattr_cross_cluster() up into ocfs2_add_new_xattr_cluster(). Now ocfs2_adjust_xattr_cross_cluster() doesn't deal with buffer_heads. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 41cb814866110b6e35dad7569ecf96163c3bb824 Author: Joel Becker Date: Wed Nov 26 14:25:21 2008 -0800 ocfs2: Pass buckets into ocfs2_mv_xattr_bucket_cross_cluster(). Now that ocfs2_adjust_xattr_cross_cluster() has buckets, it can pass them into ocfs2_mv_xattr_bucket_cross_cluster(). It no longer has to care about buffer_heads. The manipulation of first_bh and header_bh moves up to ocfs2_adjust_xattr_cross_cluster(). Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 92cf3adf48097b7561a3c83f800ed3b2b25b18d4 Author: Joel Becker Date: Wed Nov 26 14:12:09 2008 -0800 ocfs2: Start using buckets in ocfs2_adjust_xattr_cross_cluster(). We want to be passing around buckets instead of buffer_heads. Let's get them into ocfs2_adjust_xattr_cross_cluster. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit c58b6032f93358871361a92d7743dbc85d27084e Author: Joel Becker Date: Wed Nov 26 13:36:24 2008 -0800 ocfs2: Use ocfs2_mv_xattr_buckets() in ocfs2_mv_xattr_bucket_cross_cluster(). Now that ocfs2_mv_xattr_buckets() can move a partial cluster's worth of buckets, ocfs2_mv_xattr_bucket_cross_cluster() can use it. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 54ecb6b6df54bf72befb359b21f3759b2952f9d9 Author: Joel Becker Date: Wed Nov 26 13:18:31 2008 -0800 ocfs2: ocfs2_mv_xattr_buckets() can handle a partial cluster now. If you look at ocfs2_mv_xattr_bucket_cross_cluster(), you'll notice that two-thirds of the code is almost identical to ocfs2_mv_xattr_buckets(). The only difference is that ocfs2_mv_xattr_buckets() moves a whole cluster's worth, while ocfs2_mv_xattr_bucket_cross_cluster() moves half the cluster. We change ocfs2_mv_xattr_buckets() to allow moving partial clusters. The original caller of ocfs2_mv_xattr_buckets() still moves the whole cluster's worth - it just passes a start_bucket of 0. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 874d65af1c8b8f6456a934701e6828d3017be029 Author: Joel Becker Date: Wed Nov 26 13:02:18 2008 -0800 ocfs2: Rename ocfs2_cp_xattr_cluster() to ocfs2_mv_xattr_buckets(). ocfs2_cp_xattr_cluster() takes the last cluster of an xattr extent, copies its buckets to the front of a new extent, and then shrinks the bucket count of the original extent. So it's really moving the data, not copying it. While we're here, the function doesn't need a buffer_head for the old extent, just the block number. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit b5c03e746959bb005b987e9d8511df46680c3daa Author: Joel Becker Date: Tue Nov 25 19:58:16 2008 -0800 ocfs2: Use ocfs2_cp_xattr_bucket() in ocfs2_mv_xattr_bucket_cross_cluster(). The buffer copy loop of ocfs2_mv_xattr_bucket_cross_cluster() actually looks a lot like ocfs2_cp_xattr_bucket(). Let's just use that instead. We also use bucket operations to update the buckets at the start of each extent. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 2b656c1d6fc5ba7791a360766780a212faed5705 Author: Joel Becker Date: Tue Nov 25 19:00:15 2008 -0800 ocfs2: Explain t_is_new in ocfs2_cp_xattr_cluster(). I was unsure of the JOURNAL_ACCESS parameters in ocfs2_cp_xattr_cluster(). They're based on the function argument 't_is_new', but I couldn't quite figure out how t_is_new mapped to allocation. ocfs2_cp_xattr_cluster() actually overwrites the target, regardless of t_is_new. Well, I just figured it out. So I'm adding a big fat comment for those who come after me. ocfs2_divide_xattr_cluster() has the same behavior. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 15d609293d1954465a4788b9b182214323c6a2a1 Author: Joel Becker Date: Tue Nov 25 18:36:42 2008 -0800 ocfs2: Dirty the entire first bucket in ocfs2_cp_xattr_cluster(). ocfs2_cp_xattr_cluster() takes the last bucket of a full extent and copies it over to a new extent. It then updates the headers of both extents to reflect the new state. It is passed the first bh of the first bucket in order to update that first extent's bucket count. It reads and dirties the first bh of the new extent for the same reason. However, future code wants to always dirty the entire bucket when it is changed. So it is changed to read the entire bucket it is updating for both extents. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 92de109ade7999084fb0bfcc65d603252504e0d0 Author: Joel Becker Date: Tue Nov 25 17:06:40 2008 -0800 ocfs2: Dirty the entire first bucket in ocfs2_extend_xattr_bucket() ocfs2_extend_xattr_bucket() takes an extent of buckets and shifts some of them down to make room for a new xattr. It is passed the first bh of the first bucket, because that is where we store the number of buckets in the extent. However, future code wants to always dirty the entire bucket when it is changed. So let's pass the entire bucket into this function, skip any block reads (we have them), and add the access/dirty logic. We also can skip passing in the target bucket bh - we only need its block number. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 88c3b0622acf82c7c86fbc066e81e15edc7c1685 Author: Tao Ma Date: Thu Dec 11 08:54:11 2008 +0800 ocfs2: Narrow the transaction for deleting xattrs from a bucket. We move the transaction into the loop because in ocfs2_remove_extent, we will double the credits in function ocfs2_extend_rotate_transaction. So if we have a large loop number, we will soon waste much the journal space. Signed-off-by: Tao Ma Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 548b0f22bb7497ba76f91627b99f9fed53a91704 Author: Joel Becker Date: Mon Nov 24 19:32:13 2008 -0800 ocfs2: Dirty the entire bucket in ocfs2_bucket_value_truncate() ocfs2_bucket_value_truncate() currently takes the first bh of the bucket, and magically plays around with the value bh - even though the bucket structure in the calling function already has it. In addition, future code wants to always dirty the entire bucket when it is changed. So let's pass the entire bucket into this function, skip any block reads (we have them), and add the access/dirty logic. ocfs2_xattr_update_value_size() is no longer necessary, as it only did one thing other than journal access/dirty. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit df32b3343aa11e0c7f54783594b24321d17d376f Author: Tao Ma Date: Tue Nov 25 07:21:36 2008 +0800 ocfs2/quota: sparse fixes for quota Fix 2 minor things in quota. They are both found by sparse check. 1. an endian bug in ocfs2_local_quota_add_chunk. 2. change olq_alloc_dquot to static. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit e35ff98f7c37b7bc901b4b90a66a0287565e456c Author: Tao Ma Date: Wed Nov 26 16:20:19 2008 -0800 ocfs2: fix indendation in ocfs2_dquot_drop_slow Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit 9a2f3866c825c67c3a5806799cdc93fb7517f0c4 Author: Jan Kara Date: Tue Nov 25 15:31:30 2008 +0100 ocfs2: Fix build warnings (64-bit types vs long long) fs/ocfs2/quota_local.c: In function 'olq_set_dquot': fs/ocfs2/quota_local.c:844: warning: format '%lld' expects type 'long long int', but argument 7 has type '__le64' fs/ocfs2/quota_local.c:844: warning: format '%lld' expects type 'long long int', but argument 8 has type '__le64' fs/ocfs2/quota_local.c:844: warning: format '%lld' expects type 'long long int', but argument 7 has type '__le64' fs/ocfs2/quota_local.c:844: warning: format '%lld' expects type 'long long int', but argument 8 has type '__le64' fs/ocfs2/quota_local.c:844: warning: format '%lld' expects type 'long long int', but argument 7 has type '__le64' fs/ocfs2/quota_local.c:844: warning: format '%lld' expects type 'long long int', but argument 8 has type '__le64' fs/ocfs2/quota_global.c: In function '__ocfs2_sync_dquot': fs/ocfs2/quota_global.c:457: warning: format '%lld' expects type 'long long int', but argument 8 has type 's64' fs/ocfs2/quota_global.c:457: warning: format '%lld' expects type 'long long int', but argument 10 has type 's64' fs/ocfs2/quota_global.c:457: warning: format '%lld' expects type 'long long int', but argument 8 has type 's64' fs/ocfs2/quota_global.c:457: warning: format '%lld' expects type 'long long int', but argument 10 has type 's64' fs/ocfs2/quota_global.c:457: warning: format '%lld' expects type 'long long int', but argument 8 has type 's64' fs/ocfs2/quota_global.c:457: warning: format '%lld' expects type 'long long int', but argument 10 has type 's64' Signed-off-by: Jan Kara Signed-off-by: Mark Fasheh commit 53a3604610e92a5344cf8003c19975583e71a598 Author: Jan Kara Date: Tue Nov 25 15:31:29 2008 +0100 ocfs2: Make ocfs2_get_quota_block() consistent with ocfs2_read_quota_block() Make function return error status and not buffer pointer so that it's consistent with ocfs2_read_quota_block(). Signed-off-by: Jan Kara Signed-off-by: Mark Fasheh commit af09e51b6810d3408db1c0e956b3b0687b0e3723 Author: Jan Kara Date: Tue Nov 25 15:31:28 2008 +0100 ocfs2: Fix oops when extending quota files We have to mark buffer as uptodate before calling ocfs2_journal_access() and ocfs2_set_buffer_uptodate() does not do this for us. Signed-off-by: Jan Kara Signed-off-by: Mark Fasheh commit 85eb8b73d66530bb7b931789ae7a5ec9744eed34 Author: Joel Becker Date: Tue Nov 25 15:31:27 2008 +0100 ocfs2: Fix ocfs2_read_quota_block() error handling. ocfs2_bread() has become ocfs2_read_virt_blocks(), with a prototype to match ocfs2_read_blocks(). The quota code, converting from ocfs2_bread(), wraps the call to ocfs2_read_virt_blocks() in ocfs2_read_quota_block(). Unfortunately, the prototype of ocfs2_read_quota_block() matches the old prototype of ocfs2_bread(). The problem is that ocfs2_bread() returned the buffer head, and callers assumed that a NULL pointer was indicative of error. It wasn't. This is why ocfs2_bread() took an int*err argument as well. The new prototype of ocfs2_read_virt_blocks() avoids this error handling confusion. Let's change ocfs2_read_quota_block() to match. Signed-off-by: Joel Becker Acked-by: Jan Kara Signed-off-by: Mark Fasheh commit 57a09a7b3d9445a17c78d544f1e49d4d7d61705a Author: Jan Kara Date: Tue Nov 25 15:31:26 2008 +0100 ocfs2: Add missing initialization Add missing variable initialization to ocfs2_dquot_drop_slow(). Signed-off-by: Jan Kara Signed-off-by: Mark Fasheh commit b86c86fa1feb50221dc16071ae5b8a4acf3bd32c Author: Mark Fasheh Date: Tue Nov 18 17:16:47 2008 -0800 ocfs2: Use BH_JBDPrivateStart instead of BH_Unshadow This is safer. We no longer have to worry about tracking changes to jbd_state_bits. Signed-off-by: Mark Fasheh commit 19ece546a418997226bd91552fbc41abcb05cea6 Author: Jan Kara Date: Thu Aug 21 20:13:17 2008 +0200 ocfs2: Enable quota accounting on mount, disable on umount Enable quota usage tracking on mount and disable it on umount. Also add support for quota on and quota off quotactls and usrquota and grpquota mount options. Add quota features among supported ones. Signed-off-by: Jan Kara Signed-off-by: Mark Fasheh commit 2205363dce7447b8e85f1ead14387664c1a98753 Author: Jan Kara Date: Mon Oct 20 23:50:38 2008 +0200 ocfs2: Implement quota recovery Implement functions for recovery after a crash. Functions just read local quota file and sync info to global quota file. Signed-off-by: Jan Kara Signed-off-by: Mark Fasheh commit 171bf93ce11f4c9929fdce6ce63df8da2f3c4475 Author: Mark Fasheh Date: Mon Oct 20 15:36:47 2008 +0200 ocfs2: Periodic quota syncing This patch creates a work queue for periodic syncing of locally cached quota information to the global quota files. We constantly queue a delayed work item, to get the periodic behavior. Signed-off-by: Mark Fasheh Acked-by: Jan Kara commit a90714c150e3ce677c57a9dac3ab1ec342c75a95 Author: Jan Kara Date: Thu Oct 9 19:38:40 2008 +0200 ocfs2: Add quota calls for allocation and freeing of inodes and space Add quota calls for allocation and freeing of inodes and space, also update estimates on number of needed credits for a transaction. Move out inode allocation from ocfs2_mknod_locked() because vfs_dq_init() must be called outside of a transaction. Signed-off-by: Jan Kara Signed-off-by: Mark Fasheh commit 9e33d69f553aaf11377307e8d6f82deb3385e351 Author: Jan Kara Date: Mon Aug 25 19:56:50 2008 +0200 ocfs2: Implementation of local and global quota file handling For each quota type each node has local quota file. In this file it stores changes users have made to disk usage via this node. Once in a while this information is synced to global file (and thus with other nodes) so that limits enforcement at least aproximately works. Global quota files contain all the information about usage and limits. It's mostly handled by the generic VFS code (which implements a trie of structures inside a quota file). We only have to provide functions to convert structures from on-disk format to in-memory one. We also have to provide wrappers for various quota functions starting transactions and acquiring necessary cluster locks before the actual IO is really started. Signed-off-by: Jan Kara Signed-off-by: Mark Fasheh commit bbbd0eb34bf801dee01e345785959a75258f6567 Author: Jan Kara Date: Thu Aug 21 18:22:30 2008 +0200 ocfs2: Mark system files as not subject to quota accounting Mark system files as not subject to quota accounting. This prevents possible recursions into quota code and thus deadlocks. Signed-off-by: Jan Kara Signed-off-by: Mark Fasheh commit 1a224ad11eeb190da4a123e156601aad1bb67f24 Author: Jan Kara Date: Wed Aug 20 15:43:36 2008 +0200 ocfs2: Assign feature bits and system inodes to quota feature and quota files Signed-off-by: Jan Kara Signed-off-by: Mark Fasheh commit 90e86a63eadf1a3b2f19b68d82150dc63fe01443 Author: Jan Kara Date: Wed Aug 27 22:30:28 2008 +0200 ocfs2: Support nested transactions OCFS2 can easily support nested transactions. We just have to take care and not spoil statistics acquire semaphore unnecessarily. Signed-off-by: Jan Kara Signed-off-by: Mark Fasheh commit 9f868f16e40e9ad8e39aebff94a4be0d96520734 Author: Tao Ma Date: Wed Nov 19 16:48:42 2008 +0800 ocfs2/xattr: Restore not_found in xis During an xattr set, when we move a xattr which was stored in inode to the outside bucket, we have to delete it and it will use the old value of xis->not_found. xis->not_found is removed by ocfs2_calc_xattr_set_need though, so we must restore it. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit 97aff52ae13d3c11a074bbbfc80ad0b59cb8cdeb Author: Tao Ma Date: Wed Nov 19 16:48:41 2008 +0800 ocfs2/xattr: Fix a bug in xattr allocation estimation When we extend one xattr's value to a large size, the old value size might be smaller than the size of a value root. In those cases, we still need to guess the metadata allocation. Reported-by: Tiger Yang Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit 53ef99cad9878f02f27bb30bc304fc42af8bdd6e Author: Mark Fasheh Date: Tue Nov 18 16:53:43 2008 -0800 ocfs2: Remove JBD compatibility layer JBD2 is fully backwards compatible with JBD and it's been tested enough with Ocfs2 that we can clean this code up now. Signed-off-by: Mark Fasheh commit 511308d90b53479b194cd067715f44dc99d39b08 Author: Joel Becker Date: Thu Nov 13 14:49:21 2008 -0800 ocfs2: Convert ocfs2_read_dir_block() to ocfs2_read_virt_blocks() Now that we've centralized the ocfs2_read_virt_blocks() code, let's use it in ocfs2_read_dir_block(). Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit a8549fb5abb2b372e46d5de0d23ff8b24f4a61af Author: Joel Becker Date: Thu Nov 13 14:49:20 2008 -0800 ocfs2: Wrap virtual block reads in ocfs2_read_virt_blocks() The ocfs2_read_dir_block() function really maps an inode's virtual blocks to physical ones before calling ocfs2_read_blocks(). Let's extract that to common code, because other places might want to do that. Other than the block number being virtual, ocfs2_read_virt_blocks() takes the same arguments as ocfs2_read_blocks(). It converts those virtual block numbers to physical before calling ocfs2_read_blocks() directly. If the blocks asked for are discontiguous, this can mean multiple calls to ocfs2_read_blocks(), but this is mostly hidden from the caller. Like ocfs2_read_blocks(), the caller can pass in an existing buffer_head. This is usually done to pick up some readahead I/O. ocfs2_read_virt_blocks() checks the buffer_head's block number against the extent map - it must match. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 970e4936d7d15f35d00fd15a14f5343ba78b2fc8 Author: Joel Becker Date: Thu Nov 13 14:49:19 2008 -0800 ocfs2: Validate metadata only when it's read from disk. Add an optional validation hook to ocfs2_read_blocks(). Now the validation function is only called when a block was actually read off of disk. It is not called when the buffer was in cache. We add a buffer state bit BH_NeedsValidate to flag these buffers. It must always be one higher than the last JBD2 buffer state bit. The dinode, dirblock, extent_block, and xattr_block validators are lifted to this scheme directly. The group_descriptor validator needs to be split into two pieces. The first part only needs the gd buffer and is passed to ocfs2_read_block(). The second part requires the dinode as well, and is called every time. It's only 3 compares, so it's tiny. This also allows us to clean up the non-fatal gd check used by resize.c. It now has no magic argument. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 4ae1d69bedc8d174cb8a558694607e013157cde1 Author: Joel Becker Date: Thu Nov 13 14:49:18 2008 -0800 ocfs2: Wrap xattr block reads in a dedicated function We weren't consistently checking xattr blocks after we read them. Most places checked the signature, but none checked xb_blkno or xb_fs_signature. Create a toplevel ocfs2_read_xattr_block() that does the read and the validation. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit a22305cc693254a2aa651e797875669112ef8635 Author: Joel Becker Date: Thu Nov 13 14:49:17 2008 -0800 ocfs2: Wrap dirblock reads in a dedicated function. We have ocfs2_bread() as a vestige of the original ext-based dir code. It's only used by directories, though. Turn it into ocfs2_read_dir_block(), with a prototype matching the other metadata read functions. It's set up to validate dirblocks when the time comes. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 5e96581a377fc6bd76e9b112da9aeb8a7ae8bf22 Author: Joel Becker Date: Thu Nov 13 14:49:16 2008 -0800 ocfs2: Wrap extent block reads in a dedicated function. We weren't consistently checking extent blocks after we read them. Most places checked the signature, but none checked h_blkno or h_fs_signature. Create a toplevel ocfs2_read_extent_block() that does the read and the validation. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 4203530613280281868b3ca36c817530bca3825c Author: Joel Becker Date: Thu Nov 13 14:49:15 2008 -0800 ocfs2: Morph the haphazard OCFS2_IS_VALID_GROUP_DESC() checks. Random places in the code would check a group descriptor bh to see if it was valid. The previous commit unified descriptor block reads, validating all block reads in the same place. Thus, these checks are no longer necessary. Rather than eliminate them, however, we change them to BUG_ON() checks. This ensures the assumptions remain true. All of the code paths to these checks have been audited to ensure they come from a validated descriptor read. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 68f64d471be38631d7196b938d9809802dd467fa Author: Joel Becker Date: Thu Nov 13 14:49:14 2008 -0800 ocfs2: Wrap group descriptor reads in a dedicated function. We have a clean call for validating group descriptors, but every place that wants the always does a read_block()+validate() call pair. Create a toplevel ocfs2_read_group_descriptor() that does the right thing. This allows us to leverage the single call point later for fancier handling. We also add validation of gd->bg_generation against the superblock and gd->bg_blkno against the block we thought we read. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 57e3e7971136003c96766346049aa73b82cab079 Author: Joel Becker Date: Thu Nov 13 14:49:13 2008 -0800 ocfs2: Consolidate validation of group descriptors. Currently the validation of group descriptors is directly duplicated so that one version can error the filesystem and the other (resize) can just report the problem. Consolidate to one function that takes a boolean. Wrap that function with the old call for the old users. This is in preparation for lifting the read+validate step into a single function. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 10995aa2451afa20b721cc7de856cae1a13dba57 Author: Joel Becker Date: Thu Nov 13 14:49:12 2008 -0800 ocfs2: Morph the haphazard OCFS2_IS_VALID_DINODE() checks. Random places in the code would check a dinode bh to see if it was valid. Not only did they do different levels of validation, they handled errors in different ways. The previous commit unified inode block reads, validating all block reads in the same place. Thus, these haphazard checks are no longer necessary. Rather than eliminate them, however, we change them to BUG_ON() checks. This ensures the assumptions remain true. All of the code paths to these checks have been audited to ensure they come from a validated inode read. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit b657c95c11088d77fc1bfc9c84d940f778bf9d12 Author: Joel Becker Date: Thu Nov 13 14:49:11 2008 -0800 ocfs2: Wrap inode block reads in a dedicated function. The ocfs2 code currently reads inodes off disk with a simple ocfs2_read_block() call. Each place that does this has a different set of sanity checks it performs. Some check only the signature. A couple validate the block number (the block read vs di->i_blkno). A couple others check for VALID_FL. Only one place validates i_fs_generation. A couple check nothing. Even when an error is found, they don't all do the same thing. We wrap inode reading into ocfs2_read_inode_block(). This will validate all the above fields, going readonly if they are invalid (they never should be). ocfs2_read_inode_block_full() is provided for the places that want to pass read_block flags. Every caller is passing a struct inode with a valid ip_blkno, so we don't need a separate blkno argument either. We will remove the validation checks from the rest of the code in a later commit, as they are no longer necessary. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit a68979b857283daf4acc405e476dcc8812a3ff2b Author: Tiger Yang Date: Fri Nov 14 11:17:52 2008 +0800 ocfs2: add mount option and Kconfig option for acl This patch adds the Kconfig option "CONFIG_OCFS2_FS_POSIX_ACL" and mount options "acl" to enable acls in Ocfs2. Signed-off-by: Tiger Yang Signed-off-by: Mark Fasheh commit 89c38bd0ade3c567707ed8fce088b253b0369c50 Author: Tiger Yang Date: Fri Nov 14 11:17:41 2008 +0800 ocfs2: add ocfs2_init_acl in mknod We need to get the parent directories acls and let the new child inherit it. To this, we add additional calculations for data/metadata allocation. Signed-off-by: Tiger Yang Signed-off-by: Mark Fasheh commit 060bc66dd5017460076d9e808e2198cd532c943d Author: Tiger Yang Date: Fri Nov 14 11:17:29 2008 +0800 ocfs2: add ocfs2_acl_chmod This function is used to update acl xattrs during file mode changes. Signed-off-by: Tiger Yang Signed-off-by: Mark Fasheh commit 23fc2702bea686569281708ad519b41a11d0a2f4 Author: Tiger Yang Date: Fri Nov 14 11:17:18 2008 +0800 ocfs2: add ocfs2_check_acl This function is used to enhance permission checking with POSIX ACLs. Signed-off-by: Tiger Yang Signed-off-by: Mark Fasheh commit 929fb014e041c6572c5e8c3686f1e32742b5b953 Author: Tiger Yang Date: Fri Nov 14 11:17:04 2008 +0800 ocfs2: add POSIX ACL API This patch adds POSIX ACL(access control lists) APIs in ocfs2. We convert struct posix_acl to many ocfs2_acl_entry and regard them as an extended attribute entry. Signed-off-by: Tiger Yang Signed-off-by: Mark Fasheh commit 4e3e9d027f63488e676bf7700ec515a192e54f69 Author: Tiger Yang Date: Fri Nov 14 11:16:53 2008 +0800 ocfs2: add ocfs2_xattr_get_nolock This function does the work of ocfs2_xattr_get under an open lock. Signed-off-by: Tiger Yang Signed-off-by: Mark Fasheh commit 534eadddc1de8754a227202c0e747af4973f82ce Author: Tiger Yang Date: Fri Nov 14 11:16:41 2008 +0800 ocfs2: add ocfs2_init_security in during file create Security attributes must be set when creating a new inode. We do this in three steps. - First, get security xattr's name and value by security_operation - Calculate and reserve the meta data and clusters needed by this security xattr before starting transaction - Finally, we set it before add_entry Signed-off-by: Tiger Yang Signed-off-by: Mark Fasheh commit 923f7f3102b80403152e05aee3d55ecfce240440 Author: Tiger Yang Date: Fri Nov 14 11:16:27 2008 +0800 ocfs2: add security xattr API This patch add security xattr set/get/list APIs to support security attributes in Ocfs2. Signed-off-by: Tiger Yang Signed-off-by: Mark Fasheh commit 6c3faba4421e230d77a181c260972229c542dec9 Author: Tiger Yang Date: Fri Nov 14 11:16:03 2008 +0800 ocfs2: add ocfs2_xattr_set_handle This function is used to set xattr's in a started transaction. It is only called during inode creation inode for initial security/acl xattrs of the new inode. These xattrs could be put into ibody or extent block, so xattr bucket would not be use in this case. Signed-off-by: Tiger Yang Signed-off-by: Mark Fasheh commit f5d362022a947e84b0a3dd656d09c6b2322e234f Author: Tiger Yang Date: Fri Nov 14 11:15:44 2008 +0800 ocfs2: move new inode allocation out of the transaction Move out inode allocation from ocfs2_mknod_locked() because vfs_dq_init() must be called outside of a transaction. Signed-off-by: Jan Kara Signed-off-by: Tiger Yang Signed-off-by: Mark Fasheh commit fecc01126d7a244b7e9b563c80663ffdca35343b Author: Mark Fasheh Date: Wed Nov 12 15:16:38 2008 -0800 ocfs2: turn __ocfs2_remove_inode_range() into ocfs2_remove_btree_range() This patch genericizes the high level handling of extent removal. ocfs2_remove_btree_range() is nearly identical to __ocfs2_remove_inode_range(), except that extent tree operations have been used where necessary. We update ocfs2_remove_inode_range() to use the generic helper. Now extent tree based structures have an easy way to truncate ranges. Signed-off-by: Mark Fasheh Acked-by: Joel Becker commit 85db90e77806d48a19fda77dabe8897d369a1710 Author: Tao Ma Date: Wed Nov 12 08:27:01 2008 +0800 ocfs2/xattr: Merge xattr set transaction. In current ocfs2/xattr, the whole xattr set is divided into many steps are many transaction are used, this make the xattr set process isn't like a real transaction, so this patch try to merge all the transaction into one. Another benefit is that acl can use it easily now. I don't merge the transaction of deleting xattr when we remove an inode. The reason is that if we have a large number of xattrs and every xattrs has large values(large enough for outside storage), the whole transaction will be very huge and it looks like jbd can't handle it(I meet with a jbd complain once). And the old inode removal is also divided into many steps, so I'd like to leave as it is. Note: In xattr set, I try to avoid ocfs2_extend_trans since if the credits aren't enough for the extension, it will commit all the dirty blocks and create a new transaction which may lead to inconsistency in metadata. All ocfs2_extend_trans remained are safe now. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit 78f30c314a74b9dc5d7368d96fe4be883d9a3a04 Author: Tao Ma Date: Wed Nov 12 08:27:00 2008 +0800 ocfs2/xattr: Reserve meta/data at the beginning of ocfs2_xattr_set. In ocfs2 xattr set, we reserve metadata and clusters in any place they are needed. It is time-consuming and ineffective, so this patch try to reserve metadata and clusters at the beginning of ocfs2_xattr_set. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit c73f60f900ddf73ec4ea2a143829ab97242c4e8c Author: Tao Ma Date: Wed Nov 12 08:26:59 2008 +0800 ocfs2/xattr: Move clusters free into dealloc. Move clusters free process into dealloc context so that they can be freed after the transaction. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit 2891d290aa6eee0821f7e4ad0b1c4ae4d964b0f1 Author: Tao Ma Date: Wed Nov 12 08:26:58 2008 +0800 ocfs2: Add clusters free in dealloc_ctxt. Now in ocfs2 xattr set, the whole process are divided into many small parts and they are wrapped into diffrent transactions and it make the set doesn't look like a real transaction. So we want to integrate it into a real one. In some cases we will allocate some clusters and free some in just one transaction. e.g, one xattr is larger than inline size, so it and its value root is stored within the inode while the value is outside in a cluster. Then we try to update it with a smaller value(larger than the size of root but smaller than inline size), we may need to free the outside cluster while allocate a new bucket(one cluster) since now the inode may be full. The old solution will lock the global_bitmap(if the local alloc failed in stress test) and then the truncate log. This will cause a ABBA lock with truncate log flush. This patch add the clusters free in dealloc_ctxt, so that we can record the free clusters during the transaction and then free it after we release the global_bitmap in xattr set. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit 976331d8789d4d84a11b45b87c520ade83715343 Author: Tao Ma Date: Wed Nov 12 08:26:57 2008 +0800 ocfs2/xattr: Only extend xattr bucket in need. When the first block of a bucket is filled up with xattr entries, we normally extend the bucket. But if we are just replace one xattr with small length, we don't need to extend it. This is important since we will calculate what we need before the transaction and in this situation no resources will be allocated. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit 757055adc5d41b910bdead925060f077dd2d9169 Author: Tao Ma Date: Thu Nov 6 08:10:48 2008 +0800 ocfs2/xattr: Only set buffer update if it doesn't exist in cache. When we call ocfs2_init_xattr_bucket, we deem that the new buffer head will be written to disk immediately, so we just use sb_getblk. But in some cases the buffer may have already been in ocfs2 uptodate cache, so we only call ocfs2_set_buffer_uptodate if the buffer head isn't in the cache. Signed-off-by: Tao Ma Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 1c32a2fd46ddc01bd86bff56a8f5d98c815750f4 Author: Tao Ma Date: Thu Nov 6 08:10:47 2008 +0800 ocfs2/xattr: Remove additional bucket allocation in bucket defragment. Joel has refactored xattr bucket and make xattr bucket a general wrapper. So in ocfs2_defrag_xattr_bucket, we have already passed the bucket in, so there is no need to allocate a new one and read it. Signed-off-by: Tao Ma Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 02dbf38d19c19016f558fe0dc0c44f8041d3eb8e Author: Joel Becker Date: Mon Oct 27 18:07:45 2008 -0700 ocfs2: Use buckets in ocfs2_xattr_set_entry_in_bucket(). The ocfs2_xattr_set_entry_in_bucket() function is already working on an ocfs2_xattr_bucket structure, so let's use the bucket API. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 161d6f30f18c4a7e2b24705b6690cce3ff276eb9 Author: Joel Becker Date: Mon Oct 27 15:25:18 2008 -0700 ocfs2: Use buckets in ocfs2_defrag_xattr_bucket(). Use the ocfs2_xattr_bucket abstraction for reading and writing the bucket in ocfs2_defrag_xattr_bucket(). Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 178eeac354ea28828d5e94a3a7b51368c171d6a5 Author: Joel Becker Date: Mon Oct 27 15:18:29 2008 -0700 ocfs2: Use buckets in ocfs2_xattr_create_index_block(). Use the ocfs2_xattr_bucket abstraction in ocfs2_xattr_create_index_block() and its helpers. We get more efficient reads, a lot less buffer_head munging, and nicer code to boot. While we're at it, ocfs2_xattr_update_xattr_search() becomes void. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit e2356a3f02cfdbce735465a2b40b6dc72a764c26 Author: Joel Becker Date: Mon Oct 27 15:01:54 2008 -0700 ocfs2: Use buckets in ocfs2_xattr_bucket_find(). Change the ocfs2_xattr_bucket_find() function to use ocfs2_xattr_bucket as its abstraction. This makes for more efficient reads, as buckets are linear blocks, and also has improved caching characteristics. It also reads better. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit ba937127596ec2c61437006741f7d29999284de4 Author: Joel Becker Date: Fri Oct 24 19:13:20 2008 -0700 ocfs2: Take ocfs2_xattr_bucket structures off of the stack. The ocfs2_xattr_bucket structure is a nice abstraction, but it is a bit large to have on the stack. Just like ocfs2_path, let's allocate it with a ocfs2_xattr_bucket_new() function. We can now store the inode on the bucket, cleaning up all the other bucket functions. While we're here, we catch another place or two that wasn't using ocfs2_read_xattr_bucket(). Updates: - No longer allocating xis.bucket, as it will never be used. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 4980c6daba967124ed6420032960abd2b48412e2 Author: Joel Becker Date: Fri Oct 24 18:54:43 2008 -0700 ocfs2: Copy xattr buckets with a dedicated function. Now that the places that copy whole buckets are using struct ocfs2_xattr_bucket, we can do the copy in a dedicated function. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 1224be020f62ada3e19822feeac3840abf80de3e Author: Joel Becker Date: Fri Oct 24 18:47:33 2008 -0700 ocfs2: Wrap journal_access/journal_dirty for xattr buckets. A common action is to call ocfs2_journal_access() and ocfs2_journal_dirty() on the buffer heads of an xattr bucket. Let's create nice wrappers. While we're there, let's drop the places that try to be smart by writing only the first and last blocks of a bucket. A bucket is contiguous, so writing the whole thing is actually more efficient. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 784b816a9198dc3782c97cde8ddcf52fecdf1797 Author: Joel Becker Date: Fri Oct 24 17:33:40 2008 -0700 ocfs2: Improve ocfs2_read_xattr_bucket(). The ocfs2_read_xattr_bucket() function would read an xattr bucket into a list of buffer heads. However, we have a nice ocfs2_xattr_bucket structure. Let's have it fill that out instead. In addition, ocfs2_read_xattr_bucket() would initialize buffer heads for a bucket that's never been on disk before. That's confusing. Let's call that functionality ocfs2_init_xattr_bucket(). The functions ocfs2_cp_xattr_bucket() and ocfs2_half_xattr_bucket() are updated to use the ocfs2_xattr_bucket structure rather than raw bh lists. That way they can use the new read/init calls. In addition, they drop the wasted read of an existing target bucket. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 6dde41d9e7ba62f84cd7e91c0e993500af32ceb6 Author: Joel Becker Date: Fri Oct 24 17:16:48 2008 -0700 ocfs2: Provide a wrapper to brelse() xattr bucket buffers. A common theme is walking all the buffer heads on an ocfs2_xattr_bucket and releasing them. Let's wrap that. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 3e6329463e3a5c311e1d607ff3db735a18b6d67a Author: Joel Becker Date: Fri Oct 24 17:04:49 2008 -0700 ocfs2: Convenient access to an xattr bucket's header. The xattr code often wants to access the ocfs2_xattr_header at the start of an bucket. Rather than walk the pointer chains, let's just create another nice macro. As a side benefit, we can get rid of the mostly spurious ->bu_xh element on the bucket structure. The idea is ripped from the ocfs2_path code. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 51def39f0cabd46131c7c4df08751cb0cb9433d1 Author: Joel Becker Date: Fri Oct 24 16:57:21 2008 -0700 ocfs2: Convenient access to xattr bucket data blocks. The xattr code often wants to access the data pointer for blocks in an xattr bucket. This is usually found by dereferencing the bh array hanging off of the ocfs2_xattr_bucket structure. Rather than do this all the time, let's provide a nice little macro. The idea is ripped from the ocfs2_path code. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 9c7759aa670918a48f0c6e06779cd20f2781a2ac Author: Joel Becker Date: Fri Oct 24 16:21:03 2008 -0700 ocfs2: Convenient access to an xattr bucket's block number. The xattr code often wants to know the block number of an xattr bucket. This is usually found by dereferencing the first bh hanging off of the ocfs2_xattr_bucket structure. Rather than do this all the time, let's provide a nice little macro. The idea is ripped from the ocfs2_path code. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 4ac6032d6c92f0ac65cf5bc56b68557b3f099b66 Author: Joel Becker Date: Sat Oct 18 19:11:42 2008 -0700 ocfs2: Field prefixes for the xattr_bucket structure The ocfs2_xattr_bucket structure keeps track of the buffers for one xattr bucket. Let's prefix the fields for easier code navigation. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 0191b625ca5a46206d2fb862bb08f36f2fcb3b31 Merge: 54a696b eb56092 Author: Linus Torvalds Date: Sun Dec 28 12:49:40 2008 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1429 commits) net: Allow dependancies of FDDI & Tokenring to be modular. igb: Fix build warning when DCA is disabled. net: Fix warning fallout from recent NAPI interface changes. gro: Fix potential use after free sfc: If AN is enabled, always read speed/duplex from the AN advertising bits sfc: When disabling the NIC, close the device rather than unregistering it sfc: SFT9001: Add cable diagnostics sfc: Add support for multiple PHY self-tests sfc: Merge top-level functions for self-tests sfc: Clean up PHY mode management in loopback self-test sfc: Fix unreliable link detection in some loopback modes sfc: Generate unique names for per-NIC workqueues 802.3ad: use standard ethhdr instead of ad_header 802.3ad: generalize out mac address initializer 802.3ad: initialize ports LACPDU from const initializer 802.3ad: remove typedef around ad_system 802.3ad: turn ports is_individual into a bool 802.3ad: turn ports is_enabled into a bool 802.3ad: make ntt bool ixgbe: Fix set_ringparam in ixgbe to use the same memory pools. ... Fixed trivial IPv4/6 address printing conflicts in fs/cifs/connect.c due to the conversion to %pI (in this networking merge) and the addition of doing IPv6 addresses (from the earlier merge of CIFS). commit cbacc2c7f066a1e01b33b0e27ae5efbf534bc2db Merge: 4a6908a 7419224 Author: James Morris Date: Thu Dec 25 11:40:09 2008 +1100 Merge branch 'next' into for-linus commit ec98ce480ada787f2cfbd696980ff3564415505b Merge: 3496f92 feaf384 Author: James Morris Date: Thu Dec 4 17:16:36 2008 +1100 Merge branch 'master' into next Conflicts: fs/nfsd/nfs4recover.c Manually fixed above to use new creds API functions, e.g. nfs4_save_creds(). Signed-off-by: James Morris commit aa2ba5f1082dc705745899584aac8416d710c056 Merge: 6802454 f6f7b52 Author: David S. Miller Date: Tue Dec 2 19:50:27 2008 -0800 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/ixgbe/ixgbe_main.c drivers/net/smc91x.c commit 2b828925652340277a889cbc11b2d0637f7cdaf7 Merge: 3a3b7ce 58e20d8 Author: James Morris Date: Fri Nov 14 11:29:12 2008 +1100 Merge branch 'master' into next Conflicts: security/keys/internal.h security/keys/process_keys.c security/keys/request_key.c Fixed conflicts above by using the non 'tsk' versions. Signed-off-by: James Morris commit b19c2a3b839b9dfb3f258e8943dc3784ae20c7b0 Author: David Howells Date: Fri Nov 14 10:38:59 2008 +1100 CRED: Wrap task credential accesses in the OCFS2 filesystem Wrap access to task credentials so that they can be separated more easily from the task_struct during the introduction of COW creds. Change most current->(|e|s|fs)[ug]id to current_(|e|s|fs)[ug]id(). Change some task->e?[ug]id to task_e?[ug]id(). In some places it makes more sense to use RCU directly rather than a convenient wrapper; these will be addressed by later patches. Signed-off-by: David Howells Reviewed-by: James Morris Acked-by: Serge Hallyn Acked-by: Mark Fasheh Cc: Joel Becker Cc: ocfs2-devel@oss.oracle.com Signed-off-by: James Morris commit 7e452baf6b96b5aeba097afd91501d33d390cc97 Merge: 3ac38c3 f21f237 Author: David S. Miller Date: Tue Nov 11 15:43:02 2008 -0800 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/message/fusion/mptlan.c drivers/net/sfc/ethtool.c net/mac80211/debugfs_sta.c commit be859405487324ed548f1ba11dc949b8230ab991 Author: Harvey Harrison Date: Fri Oct 31 00:56:28 2008 -0700 fs: replace NIPQUAD() Using NIPQUAD() with NIPQUAD_FMT, %d.%d.%d.%d or %u.%u.%u.%u can be replaced with %pI4 Signed-off-by: Harvey Harrison Signed-off-by: David S. Miller