This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "XFS development tree". The branch, for-linus has been updated 55fb25d5 xfs: add size update tracepoint to IO completion af3e402 xfs: convert AIL cursors to use struct list_head 16b5902 xfs: remove confusing ail cursor wrapper 1d8c95a xfs: use a cursor for bulk AIL insertion ad1a2c8 xfs: failure mapping nfs fh to inode should return ESTALE adab0f6 xfs: Remove the second parameter to xfs_sb_count() d0f9e8f xfs: remove the dead XFS_DABUF_DEBUG code c84470d xfs: remove leftovers of the old btree tracing code ea15ab3 xfs: remove the dead QUOTADEBUG code 54244fe xfs: remove the unused xfs_buf_delwri_sort function cb669ca xfs: remove wrappers around b_iodone adadbee xfs: remove wrappers around b_fspriv bf9d901 xfs: add a proper transaction pointer to struct xfs_buf 77936d0 xfs: factor out xfs_da_grow_inode_int a230a1d xfs: factor out xfs_dir2_leaf_find_stale a00b774 xfs: cleanup struct xfs_dir2_free 5792664 xfs: reshuffle dir2 headers 2bcf6e9 xfs: start periodic workers later b2ce397 Revert "xfs: fix filesystsem freeze race in xfs_trans_alloc" 81463b1 xfs: remove variables that serve no purpose in xfs_alloc_ag_vextent_exact() c0e090c xfs: consolidate & clarify mount sanity checks e163cbd xfs: avoid a few disk cache flushes 1d5ae5d xfs: cleanup I/O-related buffer flags c8da0fa xfs: return the buffer locked from xfs_buf_get_uncached 0c842ad xfs: clean up buffer locking helpers bbb4197 xfs: remove the unused xfs_bufhash structure 69ef921 xfs: byteswap constants instead of variables 218106a xfs: use generic get_unaligned_beXX helpers 2282396 xfs: cleanup struct xfs_dir2_leaf 3ed8638 xfs: cleanup the definition of struct xfs_dir2_data_entry 0ba9cd8 xfs: kill struct xfs_dir2_data c2066e2 xfs: avoid usage of struct xfs_dir2_data a64b041 xfs: kill struct xfs_dir2_block 4f6ae1a xfs: avoid usage of struct xfs_dir2_block 78f70cd xfs: cleanup the definition of struct xfs_dir2_sf_entry ac8ba50 xfs: kill struct xfs_dir2_sf 8bc3878 xfs: cleanup shortform directory inode number handling 4fb44c8 xfs: factor out xfs_dir2_leaf_find_entry 29d104a xfs: kill the unused struct xfs_sync_work f3ca873 xfs: remove i_transp 7a249cf xfs: fix filesystsem freeze race in xfs_trans_alloc 33b8f7c xfs: improve sync behaviour in the face of aggressive dirtying 8f04c47 xfs: split xfs_itruncate_finish 857b977 xfs: kill xfs_itruncate_start 681b120 xfs: always log timestamp updates in xfs_setattr_size c4ed424 xfs: split xfs_setattr dec58f1 xfs: work around bogus gcc warning in xfs_allocbt_init_cursor dbcdde3 xfs: re-enable non-blocking behaviour in xfs_map_blocks 680a647 xfs: PF_FSTRANS should never be set in ->writepage from 1316d4da3f632d5843d5a446203e73067dc40f09 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 55fb25d5b39320242b41af894921f5cef0c7e293 Author: Dave Chinner <dchinner@xxxxxxxxxx> Date: Mon Jul 18 03:40:19 2011 +0000 xfs: add size update tracepoint to IO completion For improving insight into IO completion behaviour. Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx> Reviewed-by: Christoph Hellwig <hch@xxxxxx> Signed-off-by: Alex Elder <aelder@xxxxxxx> commit af3e40228fb2dbc18d94fbd5103f07344a720ae7 Author: Dave Chinner <dchinner@xxxxxxxxxx> Date: Mon Jul 18 03:40:18 2011 +0000 xfs: convert AIL cursors to use struct list_head The list of active AIL cursors uses a roll-your-own linked list with special casing for the AIL push cursor. Simplify this code by replacing the list with standard struct list_head lists, and use a separate list_head to track the active cursors. This allows us to treat the AIL push cursor as a generic cursor rather than as a special case, further simplifying the code. Further, fix the duplicate push cursor initialisation that the special case handling was hiding, and clean up all the comments around the active cursor list handling. Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx> Reviewed-by: Christoph Hellwig <hch@xxxxxx> Signed-off-by: Alex Elder <aelder@xxxxxxx> commit 16b5902943c793e632cf8c9526619f59893bdc29 Author: Dave Chinner <dchinner@xxxxxxxxxx> Date: Mon Jul 18 03:40:17 2011 +0000 xfs: remove confusing ail cursor wrapper xfs_trans_ail_cursor_set() doesn't set the cursor to the current log item, it sets it to the next item. There is already a function for doing this - xfs_trans_ail_cursor_next() - and the _set function is simply a two line wrapper. Remove it and open code the setting of the cursor in the two locations that call it to remove the confusion. Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx> Reviewed-by: Christoph Hellwig <hch@xxxxxx> Signed-off-by: Alex Elder <aelder@xxxxxxx> commit 1d8c95a363bf8cd4d4182dd19c01693b635311c2 Author: Dave Chinner <dchinner@xxxxxxxxxx> Date: Mon Jul 18 03:40:16 2011 +0000 xfs: use a cursor for bulk AIL insertion Delayed logging can insert tens of thousands of log items into the AIL at the same LSN. When the committing of log commit records occur, we can get insertions occurring at an LSN that is not at the end of the AIL. If there are thousands of items in the AIL on the tail LSN, each insertion has to walk the AIL to find the correct place to insert the new item into the AIL. This can consume large amounts of CPU time and block other operations from occurring while the traversals are in progress. To avoid this repeated walk, use a AIL cursor to record where we should be inserting the new items into the AIL without having to repeat the walk. The cursor infrastructure already provides this functionality for push walks, so is a simple extension of existing code. While this will not avoid the initial walk, it will avoid repeating it tens of thousands of times during a single checkpoint commit. This version includes logic improvements from Christoph Hellwig. Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx> Reviewed-by: Christoph Hellwig <hch@xxxxxx> Signed-off-by: Alex Elder <aelder@xxxxxxx> commit ad1a2c878ca70829874b4fcc83223cccb4e26dab Author: J. Bruce Fields <bfields@xxxxxxxxxx> Date: Thu Jul 14 20:50:36 2011 +0000 xfs: failure mapping nfs fh to inode should return ESTALE On xfs exports, nfsd is incorrectly returning ENOENT instead of ESTALE on attempts to use a filehandle of a deleted file (spotted with pynfs test PUTFH3). The ENOENT was coming from xfs_iget. (It's tempting to wonder whether we should just map all xfs_iget errors to ESTALE, but I don't believe so--xfs_iget can also return ENOMEM at least, which we wouldn't want mapped to ESTALE.) While we're at it, the other return of ENOENT in xfs_nfs_get_inode() also looks wrong. Signed-off-by: J. Bruce Fields <bfields@xxxxxxxxxx> Signed-off-by: Alex Elder <aelder@xxxxxxx> commit adab0f67d1cdaf468bbc311bce4d61f17626a536 Author: Chandra Seetharaman <sekharan@xxxxxxxxxx> Date: Wed Jun 29 22:10:14 2011 +0000 xfs: Remove the second parameter to xfs_sb_count() Remove the second parameter to xfs_sb_count() since all callers of the function set them. Also, fix the header comment regarding it being called periodically. Signed-off-by: Chandra Seetharaman <sekharan@xxxxxxxxxx> Signed-off-by: Alex Elder <aelder@xxxxxxx> commit d0f9e8fb4cc6dd5d07c72eeecc2f332b6e85e221 Author: Christoph Hellwig <hch@xxxxxx> Date: Wed Jul 13 13:43:50 2011 +0200 xfs: remove the dead XFS_DABUF_DEBUG code Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit c84470dda7a1165d90f55c2025c4c8ca403d485e Author: Christoph Hellwig <hch@xxxxxx> Date: Wed Jul 13 13:43:50 2011 +0200 xfs: remove leftovers of the old btree tracing code Remove various bits left over from the old kdb-only btree tracing code, but leave the actual trace point stubs in place to ease adding new event based btree tracing. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit ea15ab3cdda1bc6822f572ce9ce5d86f097f9b08 Author: Christoph Hellwig <hch@xxxxxx> Date: Wed Jul 13 13:43:50 2011 +0200 xfs: remove the dead QUOTADEBUG code Remove the dead hash table test rid which has been rotting away under QUOTADEBUG, including some code that was compiled for normal debug builds, but not actually called without QUOTADEBUG, and enable a few cheap debug checks that were hidden under QUOTADEBUG for normal debug builds. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit 54244fec67024032cb54eb604b2a36579b5db2d3 Author: Christoph Hellwig <hch@xxxxxx> Date: Wed Jul 13 13:43:49 2011 +0200 xfs: remove the unused xfs_buf_delwri_sort function Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit cb669ca5701153a808db6627521cc8aa52fc42d1 Author: Christoph Hellwig <hch@xxxxxx> Date: Wed Jul 13 13:43:49 2011 +0200 xfs: remove wrappers around b_iodone Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit adadbeefb34f755a3477da51035eeeec2c1fde38 Author: Christoph Hellwig <hch@xxxxxx> Date: Wed Jul 13 13:43:49 2011 +0200 xfs: remove wrappers around b_fspriv Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit bf9d9013a2a559858efb590bf922377be9d6d969 Author: Christoph Hellwig <hch@xxxxxx> Date: Wed Jul 13 13:43:49 2011 +0200 xfs: add a proper transaction pointer to struct xfs_buf Replace the typeless b_fspriv2 and the ugly macros around it with a properly typed transaction pointer. As a fallout the log buffer state debug checks are also removed. We could have kept them using casts, but as they do not have a real purpose we can as well just remove them. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit 77936d0280616d84d1eb0eb38a6f857d2827a434 Author: Christoph Hellwig <hch@xxxxxx> Date: Wed Jul 13 13:43:49 2011 +0200 xfs: factor out xfs_da_grow_inode_int xfs_da_grow_inode and xfs_dir2_grow_inode are mostly duplicate code. Factor the meat of those two functions into a new common helper. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit a230a1df40864ef68ff6fbd09302f16d2a216ea5 Author: Christoph Hellwig <hch@xxxxxx> Date: Wed Jul 13 13:43:48 2011 +0200 xfs: factor out xfs_dir2_leaf_find_stale Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit a00b7745c6e68ee89a123cd81e1dbc52fb55868e Author: Christoph Hellwig <hch@xxxxxx> Date: Wed Jul 13 13:43:48 2011 +0200 xfs: cleanup struct xfs_dir2_free Change the bests array to be a proper variable sized entry. This is done easily as no one relies on the size of the structure. Also change XFS_DIR2_MAX_FREE_BESTS to an inline function while we're at it. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit 5792664070c62479b088e4909000582de3686396 Author: Christoph Hellwig <hch@xxxxxx> Date: Wed Jul 13 13:43:48 2011 +0200 xfs: reshuffle dir2 headers Replace the current mess of dir2 headers with just three that have a clear purpose: - xfs_dir2_format.h for all format definitions, including the inline helpers to access our variable size structures - xfs_dir2_priv.h for all prototypes that are internal to the dir2 code and not needed by anything outside of the directory code. For this purpose xfs_da_btree.c, and phase6.c in xfs_repair are considered part of the directory code. - xfs_dir2.h for the public interface to the directory code In addition to the reshuffle I have also update the comments to not only match the new file structure, but also to describe the directory format better. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit 2bcf6e970f5a88fa05dced5eeb0326e13d93c4a1 Author: Christoph Hellwig <hch@xxxxxx> Date: Wed Jul 13 13:43:48 2011 +0200 xfs: start periodic workers later Start the periodic sync workers only after we have finished xfs_mountfs and thus fully set up the filesystem structures. Without this we can call into xfs_qm_sync before the quotainfo strucute is set up if the mount takes unusually long, and probably hit other incomplete states as well. Also clean up the xfs_fs_fill_super error path by using consistent label names, and removing an impossible to reach case. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reported-by: Arkadiusz Miskiewicz <arekm@xxxxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> commit b2ce39740066604288876c752d8170b3b17a21aa Author: Alex Elder <aelder@xxxxxxx> Date: Mon Jul 11 09:51:44 2011 -0500 Revert "xfs: fix filesystsem freeze race in xfs_trans_alloc" This reverts commit 7a249cf83da1813cfa71cfe1e265b40045eceb47. That commit created a situation that could lead to a filesystem hang. As Dave Chinner pointed out, xfs_trans_alloc() could hold a reference to m_active_trans (i.e., keep it non-zero) and then wait for SB_FREEZE_TRANS to complete. Meanwhile a filesystem freeze request could set SB_FREEZE_TRANS and then wait for m_active_trans to drop to zero. Nobody benefits from this sequence of events... Signed-off-by: Christoph Hellwig <hch@xxxxxx> Signed-off-by: Alex Elder <aelder@xxxxxxx> commit 81463b1ca8dbd2f4f180feac3f49c7640e2b5f79 Author: Chandra Seetharaman <sekharan@xxxxxxxxxx> Date: Thu Jun 9 16:47:49 2011 +0000 xfs: remove variables that serve no purpose in xfs_alloc_ag_vextent_exact() Remove two variables that serve no purpose in xfs_alloc_ag_vextent_exact(). Signed-off-by: Chandra Seetharaman <sekharan@xxxxxxxxxx> Signed-off-by: Alex Elder <aelder@xxxxxxx> commit c0e090ced259b85b854636c99dda95b7070a2785 Author: Eric Sandeen <sandeen@xxxxxxxxxx> Date: Fri May 20 21:52:17 2011 +0000 xfs: consolidate & clarify mount sanity checks Pavol pointed out that there is one silent error case in the mount path, and that others are rather uninformative. I've taken Pavol's suggested patch and extended it a bit to also: * fix a message which says "turned off" but actually errors out * consolidate the vaguely differentiated "SB sanity check [12]" messages, and hexdump the superblock for analysis Original-patch-by: Pavol Gono <Pavol.Gono@xxxxxxxxxxx> Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx> Signed-off-by: Alex Elder <aelder@xxxxxxx> commit e163cbde981c5988c3e80ca29589132336f18a72 Author: Christoph Hellwig <hch@xxxxxx> Date: Fri Jul 8 14:36:36 2011 +0200 xfs: avoid a few disk cache flushes There is no need for a pre-flush when doing writing the second part of a split log buffer, and if we are using an external log there is no need to do a full cache flush of the log device at all given that all writes to it use the FUA flag. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit 1d5ae5dfeee024d51fb2c0205035d7611a8f0c86 Author: Christoph Hellwig <hch@xxxxxx> Date: Fri Jul 8 14:36:32 2011 +0200 xfs: cleanup I/O-related buffer flags Remove the unused and misnamed _XBF_RUN_QUEUES flag, rename XBF_LOG_BUFFER to the more fitting XBF_SYNCIO, and split XBF_ORDERED into XBF_FUA and XBF_FLUSH to allow more fine grained control over the bio flags. Also cleanup processing of the flags in _xfs_buf_ioapply to make more sense, and renumber the sparse flag number space to group flags by purpose. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit c8da0faf6b07623c473cab42967f943ad4ab7560 Author: Christoph Hellwig <hch@xxxxxx> Date: Fri Jul 8 14:36:25 2011 +0200 xfs: return the buffer locked from xfs_buf_get_uncached All other xfs_buf_get/read-like helpers return the buffer locked, make sure xfs_buf_get_uncached isn't different for no reason. Half of the callers already lock it directly after, and the others probably should also keep it locked if only for consistency and beeing able to use xfs_buf_rele, but I'll leave that for later. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit 0c842ad46a51891ac4420b7285613f4134a65ccd Author: Christoph Hellwig <hch@xxxxxx> Date: Fri Jul 8 14:36:19 2011 +0200 xfs: clean up buffer locking helpers Rename xfs_buf_cond_lock and reverse it's return value to fit most other trylock operations in the Kernel and XFS (with the exception of down_trylock, after which xfs_buf_cond_lock was modelled), and replace xfs_buf_lock_val with an xfs_buf_islocked for use in asserts, or and opencoded variant in tracing. remove the XFS_BUF_* wrappers for all the locking helpers. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit bbb4197c73be356a052dac25cce5ed0c157c6c90 Author: Christoph Hellwig <hch@xxxxxx> Date: Fri Jul 8 14:36:10 2011 +0200 xfs: remove the unused xfs_bufhash structure Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit 69ef921b55cc3788d1d2a27b33b27d04acd0090a Author: Christoph Hellwig <hch@xxxxxx> Date: Fri Jul 8 14:36:05 2011 +0200 xfs: byteswap constants instead of variables Micro-optimize various comparisms by always byteswapping the constant instead of the variable, which allows to do the swap at compile instead of runtime. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit 218106a1104c598011e5df9d9aac7e0416be03e6 Author: Christoph Hellwig <hch@xxxxxx> Date: Fri Jul 8 14:35:58 2011 +0200 xfs: use generic get_unaligned_beXX helpers Switch the shortform directory code over to use the generic get_unaligned_beXX helpers instead of reinventing them. As a result kill off xfs_arch.h and move the setting of XFS_NATIVE_HOST into xfs_linux.h. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit 2282396d8157033503318fe4dee77ba82dc9d144 Author: Christoph Hellwig <hch@xxxxxx> Date: Fri Jul 8 14:35:53 2011 +0200 xfs: cleanup struct xfs_dir2_leaf Simplify the confusing xfs_dir2_leaf structure. It is supposed to describe an XFS dir2 leaf format btree block, but due to the variable sized nature of almost all elements in it it can't actuall do anything close to that job. Remove the members that are after the first variable sized array, given that they could only be used for sizeof expressions that can as well just use the underlying types directly, and make the ents array a real C99 variable sized array. Also factor out the xfs_dir2_leaf_size, to make the sizing of a leaf entry which already was convoluted somewhat readable after using the longer type names in the sizeof expressions. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit 3ed8638f8867b4d0df1ec606231a087ff06c4a59 Author: Christoph Hellwig <hch@xxxxxx> Date: Fri Jul 8 14:35:50 2011 +0200 xfs: cleanup the definition of struct xfs_dir2_data_entry Remove the tag member which is at a variable offset after the actual name, and make name a real variable sized C99 array instead of the incorrect one-sized array which confuses (not only) gcc. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit 0ba9cd84ef2af58645333a86f9c901684ab1fef6 Author: Christoph Hellwig <hch@xxxxxx> Date: Fri Jul 8 14:35:42 2011 +0200 xfs: kill struct xfs_dir2_data Remove the confusing xfs_dir2_data structure. It is supposed to describe an XFS dir2 data btree block, but due to the variable sized nature of almost all elements in it it can't actuall do anything close to that job. In addition to accessing the fixed offset header structure it was only used to get a pointer to the first dir or unused entry after it, which can be trivially replaced by pointer arithmetics on the header pointer. For most users that is actually more natural anyway, as they don't use a typed pointer but rather a character pointer for further arithmetics. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit c2066e2662070e794f57a96a129c42575e77cfcb Author: Christoph Hellwig <hch@xxxxxx> Date: Fri Jul 8 14:35:38 2011 +0200 xfs: avoid usage of struct xfs_dir2_data In most places we can simply pass around and use the struct xfs_dir2_data_hdr, which is the first and most important member of struct xfs_dir2_data instead of the full structure. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit a64b04179735de6bfd9f00c130a68ed7f20d18ef Author: Christoph Hellwig <hch@xxxxxx> Date: Fri Jul 8 14:35:32 2011 +0200 xfs: kill struct xfs_dir2_block Remove the confusing xfs_dir2_block structure. It is supposed to describe an XFS dir2 block format btree block, but due to the variable sized nature of almost all elements in it it can't actuall do anything close to that job. In addition to accessing the fixed offset header structure it was only used to get a pointer to the first dir or unused entry after it, which can be trivially replaced by pointer arithmetics on the header pointer. For most users that is actually more natural anyway, as they don't use a typed pointer but rather a character pointer for further arithmetics. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit 4f6ae1a49ed5c81501d6f7385416bb4e07289e99 Author: Christoph Hellwig <hch@xxxxxx> Date: Fri Jul 8 14:35:27 2011 +0200 xfs: avoid usage of struct xfs_dir2_block In most places we can simply pass around and use the struct xfs_dir2_data_hdr, which is the first and most important member of struct xfs_dir2_block instead of the full structure. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit 78f70cd7b7e8fd44dc89af4f72fb110d865338a1 Author: Christoph Hellwig <hch@xxxxxx> Date: Fri Jul 8 14:35:19 2011 +0200 xfs: cleanup the definition of struct xfs_dir2_sf_entry Remove the inumber member which is at a variable offset after the actual name, and make name a real variable sized C99 array instead of the incorrect one-sized array which confuses (not only) gcc. Based on this clean up the helpers to calculate the entry size. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit ac8ba50f6be4a3ab49a2ad2cb676422af4ebaf8a Author: Christoph Hellwig <hch@xxxxxx> Date: Fri Jul 8 14:35:13 2011 +0200 xfs: kill struct xfs_dir2_sf The list field of it is never cactually used, so all uses can simply be replaced with the xfs_dir2_sf_hdr_t type that it has as first member. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit 8bc387875870c87087f138741f456983cbc54660 Author: Christoph Hellwig <hch@xxxxxx> Date: Fri Jul 8 14:35:03 2011 +0200 xfs: cleanup shortform directory inode number handling Refactor the shortform directory helpers that deal with the 32-bit vs 64-bit wide inode numbers into more sensible helpers, and kill the xfs_intino_t typedef that is now superflous. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit 4fb44c8272a071290d2ad76164c532fa2902b604 Author: Christoph Hellwig <hch@xxxxxx> Date: Fri Jul 8 14:34:59 2011 +0200 xfs: factor out xfs_dir2_leaf_find_entry Add a new xfs_dir2_leaf_find_entry helper to factor out some duplicate code from xfs_dir2_leaf_addname xfs_dir2_leafn_add. Found by Eric Sandeen using an automated code duplication checker. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit 29d104af0a92ba1eac74b636da7fcf88242e1180 Author: Christoph Hellwig <hch@xxxxxx> Date: Fri Jul 8 14:34:51 2011 +0200 xfs: kill the unused struct xfs_sync_work Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit f3ca87389dbff0a3dc1a7cb2fa7c62e25421c66c Author: Christoph Hellwig <hch@xxxxxx> Date: Fri Jul 8 14:34:47 2011 +0200 xfs: remove i_transp Remove the transaction pointer in the inode. It's only used to avoid passing down an argument in the bmap code, and for a few asserts in the transaction code right now. Also use the local variable ip in a few more places in xfs_inode_item_unlock, so that it isn't only used for debug builds after the above change. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit 7a249cf83da1813cfa71cfe1e265b40045eceb47 Author: Christoph Hellwig <hch@xxxxxx> Date: Fri Jul 8 14:34:42 2011 +0200 xfs: fix filesystsem freeze race in xfs_trans_alloc As pointed out by Jan xfs_trans_alloc can race with a concurrent filesystem freeze when it sleeps during the memory allocation. Fix this by moving the wait_for_freeze call after the memory allocation. This means moving the freeze into the low-level _xfs_trans_alloc helper, which thus grows a new argument. Also fix up some comments in that area while at it. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <david@xxxxxxxxxxxxx> commit 33b8f7c2479dfcbc5c27174e44b5f659d9f33c70 Author: Christoph Hellwig <hch@xxxxxx> Date: Fri Jul 8 14:34:39 2011 +0200 xfs: improve sync behaviour in the face of aggressive dirtying The following script from Wu Fengguang shows very bad behaviour in XFS when aggressively dirtying data during a sync on XFS, with sync times up to almost 10 times as long as ext4. A large part of the issue is that XFS writes data out itself two times in the ->sync_fs method, overriding the livelock protection in the core writeback code, and another issue is the lock-less xfs_ioend_wait call, which doesn't prevent new ioend from being queue up while waiting for the count to reach zero. This patch removes the XFS-internal sync calls and relies on the VFS to do it's work just like all other filesystems do. Note that the i_iocount wait which is rather suboptimal is simply removed here. We already do it in ->write_inode, which keeps the current supoptimal behaviour. We'll eventually need to remove that as well, but that's material for a separate commit. ------------------------------ snip ------------------------------ #!/bin/sh umount /dev/sda7 mkfs.xfs -f /dev/sda7 # mkfs.ext4 /dev/sda7 # mkfs.btrfs /dev/sda7 mount /dev/sda7 /fs echo $((50<<20)) > /proc/sys/vm/dirty_bytes pid= for i in `seq 10` do dd if=/dev/zero of=/fs/zero-$i bs=1M count=1000 & pid="$pid $!" done sleep 1 tic=$(date +'%s') sync tac=$(date +'%s') echo echo sync time: $((tac-tic)) egrep '(Dirty|Writeback|NFS_Unstable)' /proc/meminfo pidof dd > /dev/null && { kill -9 $pid; echo sync NOT livelocked; } ------------------------------ snip ------------------------------ Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reported-by: Wu Fengguang <fengguang.wu@xxxxxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit 8f04c47aa9712874af2c8816c2ca2a332cba80e4 Author: Christoph Hellwig <hch@xxxxxx> Date: Fri Jul 8 14:34:34 2011 +0200 xfs: split xfs_itruncate_finish Split the guts of xfs_itruncate_finish that loop over the existing extents and calls xfs_bunmapi on them into a new helper, xfs_itruncate_externs. Make xfs_attr_inactive call it directly instead of xfs_itruncate_finish, which allows to simplify the latter a lot, by only letting it deal with the data fork. As a result xfs_itruncate_finish is renamed to xfs_itruncate_data to make its use case more obvious. Also remove the sync parameter from xfs_itruncate_data, which has been unessecary since the introduction of the busy extent list in 2002, and completely dead code since 2003 when the XFS_BMAPI_ASYNC parameter was made a no-op. I can't actually see why the xfs_attr_inactive needs to set the transaction sync, but let's keep this patch simple and without changes in behaviour. Also avoid passing a useless argument to xfs_isize_check, and make it private to xfs_inode.c. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit 857b9778d86ccba7d7b42c9d8aeecde794ec8a6b Author: Christoph Hellwig <hch@xxxxxx> Date: Fri Jul 8 14:34:30 2011 +0200 xfs: kill xfs_itruncate_start xfs_itruncate_start is a rather length wrapper that evaluates to a call to xfs_ioend_wait and xfs_tosspages, and only has two callers. Instead of using the complicated checks left over from IRIX where we can to truncate the pagecache just call xfs_tosspages (aka truncate_inode_pages) directly as we want to get rid of all data after i_size, and truncate_inode_pages handles incorrect alignments and too large offsets just fine. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit 681b120018e3c7e2680c93e8188c5ee34215df2f Author: Christoph Hellwig <hch@xxxxxx> Date: Fri Jul 8 14:34:26 2011 +0200 xfs: always log timestamp updates in xfs_setattr_size Get rid of the special case where we use unlogged timestamp updates for a truncate to the current inode size, and just call xfs_setattr_nonsize for it to treat it like a utimes calls. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit c4ed4243c40f97ed5b7b121777bbbc6aeaa722f0 Author: Christoph Hellwig <hch@xxxxxx> Date: Fri Jul 8 14:34:23 2011 +0200 xfs: split xfs_setattr Split up xfs_setattr into two functions, one for the complex truncate handling, and one for the trivial attribute updates. Also move both new routines to xfs_iops.c as they are fairly Linux-specific. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit dec58f1dfd30a3c3e9dadc808692f4e5cd922745 Author: Christoph Hellwig <hch@xxxxxx> Date: Fri Jul 8 14:34:18 2011 +0200 xfs: work around bogus gcc warning in xfs_allocbt_init_cursor GCC 4.6 complains about an array subscript is above array bounds when using the btree index to index into the agf_levels array. The only two indices passed in are 0 and 1, and we have an assert insuring that. Replace the trick of using the array index directly with using constants in the already existing branch for assigning the XFS_BTREE_LASTREC_UPDATE flag. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit dbcdde3e76f45d56c4a30ca6c5d69b6d473d3fd1 Author: Christoph Hellwig <hch@xxxxxx> Date: Fri Jul 8 14:34:14 2011 +0200 xfs: re-enable non-blocking behaviour in xfs_map_blocks The non-blockig behaviour in xfs_vm_writepage currently is conditional on having both the WB_SYNC_NONE sync_mode and the nonblocking flag set. The latter used to be used by both pdflush, kswapd and a few other places in older kernels, but has been fading out starting with the introduction of the per-bdi flusher threads. Enable the non-blocking behaviour for all WB_SYNC_NONE calls to get back the behaviour we want. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Signed-off-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> commit 680a647b49fa52de0b37b8bc58a3a8c4bc76b262 Author: Christoph Hellwig <hch@xxxxxx> Date: Fri Jul 8 14:34:05 2011 +0200 xfs: PF_FSTRANS should never be set in ->writepage Now that we reject direct reclaim in addition to always using GFP_NOFS allocation there's no chance we'll ever end up in ->writepage with PF_FSTRANS set. Add a WARN_ON if we hit this case, and stop checking if we'd actually need to start a transaction. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> ----------------------------------------------------------------------- Summary of changes: fs/xfs/Makefile | 2 - fs/xfs/linux-2.6/xfs_acl.c | 2 +- fs/xfs/linux-2.6/xfs_aops.c | 20 +- fs/xfs/linux-2.6/xfs_buf.c | 79 ++---- fs/xfs/linux-2.6/xfs_buf.h | 64 ++--- fs/xfs/linux-2.6/xfs_export.c | 4 +- fs/xfs/linux-2.6/xfs_file.c | 2 +- fs/xfs/linux-2.6/xfs_iops.c | 433 +++++++++++++++++++++++++++++- fs/xfs/linux-2.6/xfs_linux.h | 7 +- fs/xfs/linux-2.6/xfs_super.c | 36 +-- fs/xfs/linux-2.6/xfs_sync.c | 10 +- fs/xfs/linux-2.6/xfs_sync.h | 8 - fs/xfs/linux-2.6/xfs_trace.h | 60 +--- fs/xfs/quota/xfs_dquot.c | 48 +--- fs/xfs/quota/xfs_dquot.h | 6 - fs/xfs/quota/xfs_qm.c | 49 +---- fs/xfs/quota/xfs_qm.h | 6 - fs/xfs/quota/xfs_qm_syscalls.c | 355 +------------------------ fs/xfs/quota/xfs_trans_dquot.c | 15 +- fs/xfs/xfs.h | 1 - fs/xfs/xfs_alloc.c | 14 +- fs/xfs/xfs_alloc_btree.c | 84 +------ fs/xfs/xfs_arch.h | 136 --------- fs/xfs/xfs_attr.c | 41 ++-- fs/xfs/xfs_attr_leaf.c | 60 ++-- fs/xfs/xfs_bmap.c | 41 ++-- fs/xfs/xfs_bmap_btree.c | 106 +------- fs/xfs/xfs_btree.c | 29 +- fs/xfs/xfs_btree.h | 38 ++-- fs/xfs/xfs_btree_trace.c | 249 ----------------- fs/xfs/xfs_btree_trace.h | 99 ------- fs/xfs/xfs_buf_item.c | 75 +++--- fs/xfs/xfs_da_btree.c | 272 ++++++++----------- fs/xfs/xfs_da_btree.h | 13 +- fs/xfs/xfs_dir2.c | 140 ++-------- fs/xfs/xfs_dir2.h | 54 +---- fs/xfs/xfs_dir2_block.c | 253 ++++++++--------- fs/xfs/xfs_dir2_block.h | 92 ------ fs/xfs/xfs_dir2_data.c | 327 +++++++++++----------- fs/xfs/xfs_dir2_data.h | 184 ------------ fs/xfs/xfs_dir2_format.h | 597 ++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_dir2_leaf.c | 417 +++++++++++++++------------- fs/xfs/xfs_dir2_leaf.h | 253 ----------------- fs/xfs/xfs_dir2_node.c | 201 ++++---------- fs/xfs/xfs_dir2_node.h | 100 ------- fs/xfs/xfs_dir2_priv.h | 135 +++++++++ fs/xfs/xfs_dir2_sf.c | 338 ++++++++++++++--------- fs/xfs/xfs_dir2_sf.h | 171 ------------ fs/xfs/xfs_fs.h | 5 + fs/xfs/xfs_ialloc.c | 14 +- fs/xfs/xfs_ialloc_btree.c | 75 ----- fs/xfs/xfs_iget.c | 1 - fs/xfs/xfs_inode.c | 537 +++++++++--------------------------- fs/xfs/xfs_inode.h | 25 +-- fs/xfs/xfs_inode_item.c | 17 +- fs/xfs/xfs_inum.h | 11 - fs/xfs/xfs_log.c | 64 ++--- fs/xfs/xfs_log_recover.c | 38 ++-- fs/xfs/xfs_mount.c | 71 ++--- fs/xfs/xfs_mount.h | 2 +- fs/xfs/xfs_trans.c | 27 ++- fs/xfs/xfs_trans_ail.c | 214 ++++++++------- fs/xfs/xfs_trans_buf.c | 118 ++++----- fs/xfs/xfs_trans_inode.c | 9 - fs/xfs/xfs_trans_priv.h | 14 +- fs/xfs/xfs_vnodeops.c | 479 +------------------------------- fs/xfs/xfs_vnodeops.h | 3 +- 67 files changed, 2796 insertions(+), 4654 deletions(-) delete mode 100644 fs/xfs/xfs_arch.h delete mode 100644 fs/xfs/xfs_btree_trace.c delete mode 100644 fs/xfs/xfs_btree_trace.h delete mode 100644 fs/xfs/xfs_dir2_block.h delete mode 100644 fs/xfs/xfs_dir2_data.h create mode 100644 fs/xfs/xfs_dir2_format.h delete mode 100644 fs/xfs/xfs_dir2_leaf.h delete mode 100644 fs/xfs/xfs_dir2_node.h create mode 100644 fs/xfs/xfs_dir2_priv.h delete mode 100644 fs/xfs/xfs_dir2_sf.h hooks/post-receive -- XFS development tree _______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs