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 24446fc xfs: xfs_bmap_add_extent_delay_real should init br_startblock 0fbca4d xfs: fix dquot shaker deadlock c6f990d xfs: handle CIl transaction commit failures correctly 5315837 xfs: limit extsize to size of AGs and/or MAXEXTLEN 4ce1598 xfs: prevent extsize alignment from exceeding maximum extent size 14b064c xfs: limit extent length for allocation to AG size b8fc826 xfs: speculative delayed allocation uses rounddown_power_of_2 badly e34a314 xfs: fix efi item leak on forced shutdown 7db37c5 xfs: fix log ticket leak on forced shutdown. cf78859 xfs: Do not name variables "panic" 2fe17c1 fallocate should be a file operation 64c23e8 make the feature checks in ->fallocate future proof 7cb3920 Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs 275220f Merge branch 'for-2.6.38/core' of git://git.kernel.dk/linux-2.6-block b2034d4 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 008d23e Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial c25d246 XFS: handle hole punching via fallocate properly 92f1c00 Merge branch 'master' into for-linus-merged 23d69b0 Merge branch 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq 880566e xfs: provide simple rcu-walk ACL implementation b74c79e fs: provide rcu-walk aware permission i_ops fa0d7e3 fs: icache RCU free inodes 4b7bd36 Merge branch 'master' into for-next afe2c51 workqueue: convert cancel_rearming_delayed_work[queue]() users to cancel_delayed_work_sync() f30195c Merge branch 'cleanup-bd_claim' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc into for-2.6.38/core d4d7762 block: clean up blkdev_get() wrappers and their users e525fd8 block: make blkdev_get/put() handle exclusive access b595076 tree-wide: fix comment/printk typos from 73efe4a4ddf8eb2b1cc7039e8a66a23a424961af (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 24446fc66fdebbdd8baca0f44fd2a47ad77ba580 Author: bpm@xxxxxxx <bpm@xxxxxxx> Date: Wed Jan 19 17:41:58 2011 +0000 xfs: xfs_bmap_add_extent_delay_real should init br_startblock When filling in the middle of a previous delayed allocation in xfs_bmap_add_extent_delay_real, set br_startblock of the new delay extent to the right to nullstartblock instead of 0 before inserting the extent into the ifork (xfs_iext_insert), rather than setting br_startblock afterward. Adding the extent into the ifork with br_startblock=0 can lead to the extent being copied into the btree by xfs_bmap_extent_to_btree if we happen to convert from extents format to btree format before updating br_startblock with the correct value. The unexpected addition of this delay extent to the btree can cause subsequent XFS_WANT_CORRUPTED_GOTO filesystem shutdown in several xfs_bmap_add_extent_delay_real cases where we are converting a delay extent to real and unexpectedly find an extent already inserted. For example: 911 case BMAP_LEFT_FILLING: 912 /* 913 * Filling in the first part of a previous delayed allocation. 914 * The left neighbor is not contiguous. 915 */ 916 trace_xfs_bmap_pre_update(ip, idx, state, _THIS_IP_); 917 xfs_bmbt_set_startoff(ep, new_endoff); 918 temp = PREV.br_blockcount - new->br_blockcount; 919 xfs_bmbt_set_blockcount(ep, temp); 920 xfs_iext_insert(ip, idx, 1, new, state); 921 ip->i_df.if_lastex = idx; 922 ip->i_d.di_nextents++; 923 if (cur == NULL) 924 rval = XFS_ILOG_CORE | XFS_ILOG_DEXT; 925 else { 926 rval = XFS_ILOG_CORE; 927 if ((error = xfs_bmbt_lookup_eq(cur, new->br_startoff, 928 new->br_startblock, new->br_blockcount, 929 &i))) 930 goto done; 931 XFS_WANT_CORRUPTED_GOTO(i == 0, done); With the bogus extent in the btree we shutdown the filesystem at 931. The conversion from extents to btree format happens when the number of extents in the inode increases above ip->i_df.if_ext_max. xfs_bmap_extent_to_btree copies extents from the ifork into the btree, ignoring all delalloc extents which are denoted by br_startblock having some value of nullstartblock. SGI-PV: 1013221 Signed-off-by: Ben Myers <bpm@xxxxxxx> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> Signed-off-by: Alex Elder <aelder@xxxxxxx> commit 0fbca4d1c3932c27c4794bf5c2b5fc961cf5a54f Author: Dave Chinner <dchinner@xxxxxxxxxx> Date: Fri Jan 28 11:20:46 2011 +1100 xfs: fix dquot shaker deadlock Commit 368e136 ("xfs: remove duplicate code from dquot reclaim") fails to unlock the dquot freelist when the number of loop restarts is exceeded in xfs_qm_dqreclaim_one(). This causes hangs in memory reclaim. Rework the loop control logic into an unwind stack that all the different cases jump into. This means there is only one set of code that processes the loop exit criteria, and simplifies the unlocking of all the items from different points in the loop. It also fixes a double increment of the restart counter from the qi_dqlist_lock case. Reported-by: Malcolm Scott <lkml@xxxxxxxxxxx> Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> commit c6f990d1ff8e4e53b12f4175eb7d7ea710c3ca73 Author: Dave Chinner <dchinner@xxxxxxxxxx> Date: Thu Jan 27 13:23:28 2011 +1100 xfs: handle CIl transaction commit failures correctly Failure to commit a transaction into the CIL is not handled correctly. This currently can only happen when racing with a shutdown and requires an explicit shutdown check, so it rare and can be avoided. Remove the shutdown check and make the CIL commit a void function to indicate it will always succeed, thereby removing the incorrectly handled failure case. Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx> Reviewed-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> commit 5315837daee7ed76c31ef643915f7d76ef8c1aa3 Author: Dave Chinner <dchinner@xxxxxxxxxx> Date: Thu Jan 27 12:18:18 2011 +1100 xfs: limit extsize to size of AGs and/or MAXEXTLEN The extent size hint can be set to larger than an AG. This means that the alignment process can push the range to be allocated outside the bounds of the AG, resulting in assert failures or corrupted bmbt records. Similarly, if the extsize is larger than the maximum extent size supported, the alignment process will produce extents that are too large to fit into the bmbt records, resulting in a different type of assert/corruption failure. Fix this by limiting extsize at the time Ñ?t is set firstly to be less than MAXEXTLEN, then to be a maximum of half the size of the AGs in the filesystem for non-realtime inodes. Realtime inodes do not allocate out of AGs, so don't have to be restricted by the size of AGs. Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx> Reviewed-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> commit 4ce159890c00e2cc705e955a939bf1dca7b07ab8 Author: Dave Chinner <dchinner@xxxxxxxxxx> Date: Thu Jan 27 12:17:58 2011 +1100 xfs: prevent extsize alignment from exceeding maximum extent size When doing delayed allocation, if the allocation size is for a maximally sized extent, extent size alignment can push it over this limit. This results in an assert failure in xfs_bmbt_set_allf() as the extent length is too large to find in the extent record. Fix this by ensuring that we allow for space that extent size alignment requires (up to 2 * (extsize -1) blocks as we have to handle both head and tail alignment) when limiting the maximum size of the extent. Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx> Reviewed-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> commit 14b064ceaa6f51a7426cc45b4b43685b94380658 Author: Dave Chinner <dchinner@xxxxxxxxxx> Date: Thu Jan 27 12:16:28 2011 +1100 xfs: limit extent length for allocation to AG size Delayed allocation extents can be larger than AGs, so when trying to convert a large range we may scan every AG inside xfs_bmap_alloc_nullfb() trying to find an AG with a size larger than an AG. We should stop when we find the first AG with a maximum possible allocation size. This causes excessive CPU usage when there are lots of AGs. The same problem occurs when doing preallocation of a range larger than an AG. Fix the problem by limiting real allocation lengths to the maximum that an AG can support. This means if we have empty AGs, we'll stop the search at the first of them. If there are no empty AGs, we'll still scan them all, but that is a different problem.... Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx> Reviewed-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> commit b8fc82630ae289bb4e661567808afc59e3298dce Author: Dave Chinner <dchinner@xxxxxxxxxx> Date: Thu Jan 27 12:14:12 2011 +1100 xfs: speculative delayed allocation uses rounddown_power_of_2 badly rounddown_power_of_2() returns an undefined result when passed a value of zero. The specualtive delayed allocation code is doing this when the inode is zero length. Hence occasionally the preallocation is much, much larger than is necessary (e.g. 8GB for a 270 _byte_ file). Ensure we don't even pass a zero value to this function so the result of preallocation is always the desired size. Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx> Reviewed-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> commit e34a314c5e49fe6b763568f6576b19f1299c33c2 Author: Dave Chinner <dchinner@xxxxxxxxxx> Date: Thu Jan 27 12:13:35 2011 +1100 xfs: fix efi item leak on forced shutdown After test 139, kmemleak shows: unreferenced object 0xffff880078b405d8 (size 400): comm "xfs_io", pid 4904, jiffies 4294909383 (age 1186.728s) hex dump (first 32 bytes): 60 c1 17 79 00 88 ff ff 60 c1 17 79 00 88 ff ff `..y....`..y.... 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<ffffffff81afb04d>] kmemleak_alloc+0x2d/0x60 [<ffffffff8115c6cf>] kmem_cache_alloc+0x13f/0x2b0 [<ffffffff814aaa97>] kmem_zone_alloc+0x77/0xf0 [<ffffffff814aab2e>] kmem_zone_zalloc+0x1e/0x50 [<ffffffff8147cd6b>] xfs_efi_init+0x4b/0xb0 [<ffffffff814a4ee8>] xfs_trans_get_efi+0x58/0x90 [<ffffffff81455fab>] xfs_bmap_finish+0x8b/0x1d0 [<ffffffff814851b4>] xfs_itruncate_finish+0x2c4/0x5d0 [<ffffffff814a970f>] xfs_setattr+0x8df/0xa70 [<ffffffff814b5c7b>] xfs_vn_setattr+0x1b/0x20 [<ffffffff8117dc00>] notify_change+0x170/0x2e0 [<ffffffff81163bf6>] do_truncate+0x66/0xa0 [<ffffffff81163d0b>] sys_ftruncate+0xdb/0xe0 [<ffffffff8103a002>] system_call_fastpath+0x16/0x1b [<ffffffffffffffff>] 0xffffffffffffffff The cause of the leak is that the "remove" parameter of IOP_UNPIN() is never set when a CIL push is aborted. This means that the EFI item is never freed if it was in the push being cancelled. The problem is specific to delayed logging, but has uncovered a couple of problems with the handling of IOP_UNPIN(remove). Firstly, we cannot safely call xfs_trans_del_item() from IOP_UNPIN() in the CIL commit failure path or the iclog write failure path because for delayed loging we have no transaction context. Hence we must only call xfs_trans_del_item() if the log item being unpinned has an active log item descriptor. Secondly, xfs_trans_uncommit() does not handle log item descriptor freeing during the traversal of log items on a transaction. It can reference a freed log item descriptor when unpinning an EFI item. Hence it needs to use a safe list traversal method to allow items to be removed from the transaction during IOP_UNPIN(). Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> commit 7db37c5e6575b229a5051be1d3ef15257ae0ba5d Author: Dave Chinner <dchinner@xxxxxxxxxx> Date: Thu Jan 27 12:02:00 2011 +1100 xfs: fix log ticket leak on forced shutdown. The kmemleak detector shows this after test 139: unreferenced object 0xffff880079b88bb0 (size 264): comm "xfs_io", pid 4904, jiffies 4294909382 (age 276.824s) hex dump (first 32 bytes): 00 00 00 00 ad 4e ad de ff ff ff ff 00 00 00 00 .....N.......... ff ff ff ff ff ff ff ff 48 7b c9 82 ff ff ff ff ........H{...... backtrace: [<ffffffff81afb04d>] kmemleak_alloc+0x2d/0x60 [<ffffffff8115c6cf>] kmem_cache_alloc+0x13f/0x2b0 [<ffffffff814aaa97>] kmem_zone_alloc+0x77/0xf0 [<ffffffff814aab2e>] kmem_zone_zalloc+0x1e/0x50 [<ffffffff8148f394>] xlog_ticket_alloc+0x34/0x170 [<ffffffff81494444>] xlog_cil_push+0xa4/0x3f0 [<ffffffff81494eca>] xlog_cil_force_lsn+0x15a/0x160 [<ffffffff814933a5>] _xfs_log_force_lsn+0x75/0x2d0 [<ffffffff814a264d>] _xfs_trans_commit+0x2bd/0x2f0 [<ffffffff8148bfdd>] xfs_iomap_write_allocate+0x1ad/0x350 [<ffffffff814ac17f>] xfs_map_blocks+0x21f/0x370 [<ffffffff814ad1b7>] xfs_vm_writepage+0x1c7/0x550 [<ffffffff8112200a>] __writepage+0x1a/0x50 [<ffffffff81122df2>] write_cache_pages+0x1c2/0x4c0 [<ffffffff81123117>] generic_writepages+0x27/0x30 [<ffffffff814aba5d>] xfs_vm_writepages+0x5d/0x80 By inspection, the leak occurs when xlog_write() returns and error and we jump to the abort path without dropping the reference on the active ticket. Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx> Reviewed-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Alex Elder <aelder@xxxxxxx> commit cf78859f520f8275318f47d7864f4459d940cb6b Author: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> Date: Mon Jan 17 21:21:14 2011 +0100 xfs: Do not name variables "panic" On platforms that call panic() inside their BUG() macro (m68k/sun3, and all platforms that don't set HAVE_ARCH_BUG), compilation fails with: | fs/xfs/support/debug.c: In function â??xfs_cmn_errâ??: | fs/xfs/support/debug.c:92: error: called object â??panicâ?? is not a function as the local variable "panic" conflicts with the "panic()" function. Rename the local variable to resolve this. Signed-off-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> Reviewed-by: Christoph Hellwig <hch@xxxxxx> Signed-off-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> commit 2fe17c1075836b66678ed2a305fd09b6773883aa Author: Christoph Hellwig <hch@xxxxxx> Date: Fri Jan 14 13:07:43 2011 +0100 fallocate should be a file operation Currently all filesystems except XFS implement fallocate asynchronously, while XFS forced a commit. Both of these are suboptimal - in case of O_SYNC I/O we really want our allocation on disk, especially for the !KEEP_SIZE case where we actually grow the file with user-visible zeroes. On the other hand always commiting the transaction is a bad idea for fast-path uses of fallocate like for example in recent Samba versions. Given that block allocation is a data plane operation anyway change it from an inode operation to a file operation so that we have the file structure available that lets us check for O_SYNC. This also includes moving the code around for a few of the filesystems, and remove the already unnedded S_ISDIR checks given that we only wire up fallocate for regular files. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx> commit 64c23e86873ee410554d6d1c76b60da47025e96f Author: Christoph Hellwig <hch@xxxxxx> Date: Fri Jan 14 13:07:30 2011 +0100 make the feature checks in ->fallocate future proof Instead of various home grown checks that might need updates for new flags just check for any bit outside the mask of the features supported by the filesystem. This makes the check future proof for any newly added flag. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx> commit 7cb3920a6529df7f54487abe973b903b8239e901 Merge: ad56cbf0fa6c09350c738ec59a3361f2e4ab4bc7 73efe4a4ddf8eb2b1cc7039e8a66a23a424961af Author: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> Date: Fri Jan 14 15:24:17 2011 -0800 Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs * 'for-linus' of git://oss.sgi.com/xfs/xfs: xfs: prevent NMI timeouts in cmn_err xfs: Add log level to assertion printk xfs: fix an assignment within an ASSERT() xfs: fix error handling for synchronous writes xfs: add FITRIM support xfs: ensure log covering transactions are synchronous xfs: serialise unaligned direct IOs xfs: factor common write setup code xfs: split buffered IO write path from xfs_file_aio_write xfs: split direct IO write path from xfs_file_aio_write xfs: introduce xfs_rw_lock() helpers for locking the inode xfs: factor post-write newsize updates xfs: factor common post-write isize handling code xfs: ensure sync write errors are returned commit 275220f0fcff1adf28a717076e00f575edf05fda Merge: fe3c560b8a22cb28e54fe8950abef38e88d75831 81c5e2ae33c4b19e53966b427e33646bf6811830 Author: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> Date: Thu Jan 13 10:45:01 2011 -0800 Merge branch 'for-2.6.38/core' of git://git.kernel.dk/linux-2.6-block * 'for-2.6.38/core' of git://git.kernel.dk/linux-2.6-block: (43 commits) block: ensure that completion error gets properly traced blktrace: add missing probe argument to block_bio_complete block cfq: don't use atomic_t for cfq_group block cfq: don't use atomic_t for cfq_queue block: trace event block fix unassigned field block: add internal hd part table references block: fix accounting bug on cross partition merges kref: add kref_test_and_get bio-integrity: mark kintegrityd_wq highpri and CPU intensive block: make kblockd_workqueue smarter Revert "sd: implement sd_check_events()" block: Clean up exit_io_context() source code. Fix compile warnings due to missing removal of a 'ret' variable fs/block: type signature of major_to_index(int) to major_to_index(unsigned) block: convert !IS_ERR(p) && p to !IS_ERR_NOR_NULL(p) cfq-iosched: don't check cfqg in choose_service_tree() fs/splice: Pull buf->ops->confirm() from splice_from_pipe actors cdrom: export cdrom_check_events() sd: implement sd_check_events() sr: implement sr_check_events() ... commit b2034d474b7e1e8578bd5c2977024b51693269d9 Merge: 27d189c02ba25851973c8582e419c0bded9f7e5b 924241575a85249b9d410e38f5b2fcad9035e45c Author: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> Date: Thu Jan 13 10:27:28 2011 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (41 commits) fs: add documentation on fallocate hole punching Gfs2: fail if we try to use hole punch Btrfs: fail if we try to use hole punch Ext4: fail if we try to use hole punch Ocfs2: handle hole punching via fallocate properly XFS: handle hole punching via fallocate properly fs: add hole punching to fallocate vfs: pass struct file to do_truncate on O_TRUNC opens (try #2) fix signedness mess in rw_verify_area() on 64bit architectures fs: fix kernel-doc for dcache::prepend_path fs: fix kernel-doc for dcache::d_validate sanitize ecryptfs ->mount() switch afs move internal-only parts of ncpfs headers to fs/ncpfs switch ncpfs switch 9p pass default dentry_operations to mount_pseudo() switch hostfs switch affs switch configfs ... commit 008d23e4852d78bb2618f2035f8b2110b6a6b968 Merge: 8f685fbda43deccd130d192c9fcef1444649eaca bfc672dcf323877228682aff79dff8ecd9f30ff8 Author: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> Date: Thu Jan 13 10:05:56 2011 -0800 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits) Documentation/trace/events.txt: Remove obsolete sched_signal_send. writeback: fix global_dirty_limits comment runtime -> real-time ppc: fix comment typo singal -> signal drivers: fix comment typo diable -> disable. m68k: fix comment typo diable -> disable. wireless: comment typo fix diable -> disable. media: comment typo fix diable -> disable. remove doc for obsolete dynamic-printk kernel-parameter remove extraneous 'is' from Documentation/iostats.txt Fix spelling milisec -> ms in snd_ps3 module parameter description Fix spelling mistakes in comments Revert conflicting V4L changes i7core_edac: fix typos in comments mm/rmap.c: fix comment sound, ca0106: Fix assignment to 'channel'. hrtimer: fix a typo in comment init/Kconfig: fix typo anon_inodes: fix wrong function name in comment fix comment typos concerning "consistent" poll: fix a typo in comment ... Fix up trivial conflicts in: - drivers/net/wireless/iwlwifi/iwl-core.c (moved to iwl-legacy.c) - fs/ext4/ext4.h Also fix missed 'diabled' typo in drivers/net/bnx2x/bnx2x.h while at it. commit c25d246715b87ad37e69e7abd1a0fed781423fa2 Author: Josef Bacik <josef@xxxxxxxxxx> Date: Wed Nov 17 20:46:16 2010 -0500 XFS: handle hole punching via fallocate properly This patch simply allows XFS to handle the hole punching flag in fallocate properly. I've tested this with a little program that does a bunch of random hole punching with FL_KEEP_SIZE and without it to make sure it does the right thing. Thanks, Signed-off-by: Josef Bacik <josef@xxxxxxxxxx> Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx> commit 4b7bd364700d9ac8372eff48832062b936d0793b Merge: c0d8768af260e2cbb4bf659ae6094a262c86b085 90a8a73c06cc32b609a880d48449d7083327e11a Author: Jiri Kosina <jkosina@xxxxxxx> Date: Wed Dec 22 18:57:02 2010 +0100 Merge branch 'master' into for-next Conflicts: MAINTAINERS arch/arm/mach-omap2/pm24xx.c drivers/scsi/bfa/bfa_fcpim.c Needed to update to apply fixes for which the old branch was too outdated. commit f30195c50245d8ace628e1978b1daa8df86e7224 Merge: d07335e51df0c6dec202d315fc4f1f7e100eec4e d4d77629953eabd3c14f6fa5746f6b28babfc55f Author: Jens Axboe <jaxboe@xxxxxxxxxxxx> Date: Sat Nov 27 19:49:18 2010 +0100 Merge branch 'cleanup-bd_claim' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc into for-2.6.38/core commit d4d77629953eabd3c14f6fa5746f6b28babfc55f Author: Tejun Heo <tj@xxxxxxxxxx> Date: Sat Nov 13 11:55:18 2010 +0100 block: clean up blkdev_get() wrappers and their users After recent blkdev_get() modifications, open_by_devnum() and open_bdev_exclusive() are simple wrappers around blkdev_get(). Replace them with blkdev_get_by_dev() and blkdev_get_by_path(). blkdev_get_by_dev() is identical to open_by_devnum(). blkdev_get_by_path() is slightly different in that it doesn't automatically add %FMODE_EXCL to @mode. All users are converted. Most conversions are mechanical and don't introduce any behavior difference. There are several exceptions. * btrfs now sets FMODE_EXCL in btrfs_device->mode, so there's no reason to OR it explicitly on blkdev_put(). * gfs2, nilfs2 and the generic mount_bdev() now set FMODE_EXCL in sb->s_mode. * With the above changes, sb->s_mode now always should contain FMODE_EXCL. WARN_ON_ONCE() added to kill_block_super() to detect errors. The new blkdev_get_*() functions are with proper docbook comments. While at it, add function description to blkdev_get() too. Signed-off-by: Tejun Heo <tj@xxxxxxxxxx> Cc: Philipp Reisner <philipp.reisner@xxxxxxxxxx> Cc: Neil Brown <neilb@xxxxxxx> Cc: Mike Snitzer <snitzer@xxxxxxxxxx> Cc: Joern Engel <joern@xxxxxxxxxxxxxxx> Cc: Chris Mason <chris.mason@xxxxxxxxxx> Cc: Jan Kara <jack@xxxxxxx> Cc: "Theodore Ts'o" <tytso@xxxxxxx> Cc: KONISHI Ryusuke <konishi.ryusuke@xxxxxxxxxxxxx> Cc: reiserfs-devel@xxxxxxxxxxxxxxx Cc: xfs-masters@xxxxxxxxxxx Cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx> commit e525fd89d380c4a94c0d63913a1dd1a593ed25e7 Author: Tejun Heo <tj@xxxxxxxxxx> Date: Sat Nov 13 11:55:17 2010 +0100 block: make blkdev_get/put() handle exclusive access Over time, block layer has accumulated a set of APIs dealing with bdev open, close, claim and release. * blkdev_get/put() are the primary open and close functions. * bd_claim/release() deal with exclusive open. * open/close_bdev_exclusive() are combination of open and claim and the other way around, respectively. * bd_link/unlink_disk_holder() to create and remove holder/slave symlinks. * open_by_devnum() wraps bdget() + blkdev_get(). The interface is a bit confusing and the decoupling of open and claim makes it impossible to properly guarantee exclusive access as in-kernel open + claim sequence can disturb the existing exclusive open even before the block layer knows the current open if for another exclusive access. Reorganize the interface such that, * blkdev_get() is extended to include exclusive access management. @holder argument is added and, if is @FMODE_EXCL specified, it will gain exclusive access atomically w.r.t. other exclusive accesses. * blkdev_put() is similarly extended. It now takes @mode argument and if @FMODE_EXCL is set, it releases an exclusive access. Also, when the last exclusive claim is released, the holder/slave symlinks are removed automatically. * bd_claim/release() and close_bdev_exclusive() are no longer necessary and either made static or removed. * bd_link_disk_holder() remains the same but bd_unlink_disk_holder() is no longer necessary and removed. * open_bdev_exclusive() becomes a simple wrapper around lookup_bdev() and blkdev_get(). It also has an unexpected extra bdev_read_only() test which probably should be moved into blkdev_get(). * open_by_devnum() is modified to take @holder argument and pass it to blkdev_get(). Most of bdev open/close operations are unified into blkdev_get/put() and most exclusive accesses are tested atomically at the open time (as it should). This cleans up code and removes some, both valid and invalid, but unnecessary all the same, corner cases. open_bdev_exclusive() and open_by_devnum() can use further cleanup - rename to blkdev_get_by_path() and blkdev_get_by_devt() and drop special features. Well, let's leave them for another day. Most conversions are straight-forward. drbd conversion is a bit more involved as there was some reordering, but the logic should stay the same. Signed-off-by: Tejun Heo <tj@xxxxxxxxxx> Acked-by: Neil Brown <neilb@xxxxxxx> Acked-by: Ryusuke Konishi <konishi.ryusuke@xxxxxxxxxxxxx> Acked-by: Mike Snitzer <snitzer@xxxxxxxxxx> Acked-by: Philipp Reisner <philipp.reisner@xxxxxxxxxx> Cc: Peter Osterlund <petero2@xxxxxxxxx> Cc: Martin Schwidefsky <schwidefsky@xxxxxxxxxx> Cc: Heiko Carstens <heiko.carstens@xxxxxxxxxx> Cc: Jan Kara <jack@xxxxxxx> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Cc: Andreas Dilger <adilger.kernel@xxxxxxxxx> Cc: "Theodore Ts'o" <tytso@xxxxxxx> Cc: Mark Fasheh <mfasheh@xxxxxxxx> Cc: Joel Becker <joel.becker@xxxxxxxxxx> Cc: Alex Elder <aelder@xxxxxxx> Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx> Cc: dm-devel@xxxxxxxxxx Cc: drbd-dev@xxxxxxxxxxxxxxxx Cc: Leo Chen <leochen@xxxxxxxxxxxx> Cc: Scott Branden <sbranden@xxxxxxxxxxxx> Cc: Chris Mason <chris.mason@xxxxxxxxxx> Cc: Steven Whitehouse <swhiteho@xxxxxxxxxx> Cc: Dave Kleikamp <shaggy@xxxxxxxxxxxxxxxxxx> Cc: Joern Engel <joern@xxxxxxxxx> Cc: reiserfs-devel@xxxxxxxxxxxxxxx Cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx> commit b595076a180a56d1bb170e6eceda6eb9d76f4cd3 Author: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> Date: Mon Nov 1 15:38:34 2010 -0400 tree-wide: fix comment/printk typos "gadget", "through", "command", "maintain", "maintain", "controller", "address", "between", "initiali[zs]e", "instead", "function", "select", "already", "equal", "access", "management", "hierarchy", "registration", "interest", "relative", "memory", "offset", "already", Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> Signed-off-by: Jiri Kosina <jkosina@xxxxxxx> ----------------------------------------------------------------------- Summary of changes: fs/xfs/linux-2.6/xfs_acl.c | 11 ++++++- fs/xfs/linux-2.6/xfs_file.c | 56 ++++++++++++++++++++++++++++++++++++++ fs/xfs/linux-2.6/xfs_ioctl.c | 20 ++++++++++++- fs/xfs/linux-2.6/xfs_iops.c | 54 ------------------------------------- fs/xfs/linux-2.6/xfs_super.c | 7 +++-- fs/xfs/quota/xfs_qm.c | 46 ++++++++++++++----------------- fs/xfs/support/debug.c | 6 ++-- fs/xfs/xfs_acl.h | 2 +- fs/xfs/xfs_alloc.h | 16 +++++++++++ fs/xfs/xfs_bmap.c | 61 +++++++++++++++++++++++++++++++----------- fs/xfs/xfs_buf_item.c | 12 +++++--- fs/xfs/xfs_extfree_item.c | 3 +- fs/xfs/xfs_iget.c | 10 +++--- fs/xfs/xfs_iomap.c | 7 ++++- fs/xfs/xfs_log.h | 2 +- fs/xfs/xfs_log_cil.c | 15 ++++------ fs/xfs/xfs_mru_cache.c | 2 +- fs/xfs/xfs_trans.c | 41 ++++++++++++++++++++------- 18 files changed, 231 insertions(+), 140 deletions(-) hooks/post-receive -- XFS development tree
_______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs