[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-xfs
Subject: [XFS updates] XFS development tree branch, for-linus,
From: xfs () oss ! sgi ! com
Date: 2008-12-30 2:53:15
Message-ID: 200812300253.mBU2rFFo013962 () oss ! sgi ! com
[Download RAW message or body]
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
0a8c539 [XFS] Fix merge failures
2505115 [XFS] Fix race in xfs_write() between direct and buffered I/O with DMAPI
ad1ad96 [XFS] handle unaligned data in xfs_bmbt_disk_get_all
efc5575 [XFS] avoid memory allocations in xfs_fs_vcmn_err
9f6c92b [XFS] Fix speculative allocation beyond eof
4fdc778 [XFS] Remove XFS_BUF_SHUT() and friends
d415867 [XFS] Use the incore inode size in xfs_file_readdir()
27a0464 [XFS] Fix merge conflict in fs/xfs/xfs_rename.c
4d9d4eb Merge branch 'master' of git+ssh://git.melbourne.sgi.com/git/xfs
cfbe526 [XFS] set b_error from bio error in xfs_buf_bio_end_io
c4cd747 [XFS] use inode_change_ok for setattr permission checking
4d4be48 [XFS] add a FMODE flag to make XFS invisible I/O less hacky
6d73cf1 [XFS] resync headers with libxfs
2175dd9 [XFS] simplify projid check in xfs_rename
15ac08a [XFS] replace b_fspriv with b_mount
e055f13 [XFS] Remove unused tracing code
14d676f Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
797eaed [XFS] Remove unnecessary assertion
a5b429d [XFS] Remove unused variable in ktrace_free()
c642261 [XFS] Check return value of xfs_buf_get_noaddr()
6a0775a [XFS] Fix hang after disallowed rename across directory quota domains
8bb5732 [XFS] Fix compile with CONFIG_COMPAT enabled
5a8d0f3 move inode tracing out of xfs_vnode.
25e41b3 move vn_iowait / vn_iowake into xfs_aops.c
583fa58 kill vn_ioerror
f95099b kill xfs_unmount_flush
e57481d no explicit xfs_iflush for special inodes during unmount
070c461 use xfs_trans_ijoin in xfs_trans_iget
b56757b remove leftovers of shared read-only support
e88f11a remove unused m_inode_quiesce member from struct xfs_mount
6bd16ff kill dead inode flags
5efcbb8 cleanup xfs_sb.h feature flag helpers
df6771b kill dead quota flags
63ad2a5 remove dead code from sv_t implementation
39e2def reduce l_icloglock roundtrips
d9424b3 stop using igrab in xfs_vn_link
5d765b9 kill xfs_buf_iostart
5cafdeb cleanup the inode reclaim path
ccd0be6 remove unused prototypes for xfs_ihash_init / xfs_ihash_free
73e6335 remove unused behvavior cruft in xfs_super.h
2234d54 remove useless mnt_want_write call in xfs_write
ddcd856 [XFS] fix compile on 32 bit systems
e5d412f [XFS] Reorder xfs_ioctl32.c for some tidiness
710d62a [XFS] Hook up compat XFS_IOC_FSSETDM_BY_HANDLE ioctl handler
2875097 [XFS] Hook up compat XFS_IOC_ATTRMULTI_BY_HANDLE ioctl handler
ebeecd2 [XFS] Hook up compat XFS_IOC_ATTRLIST_BY_HANDLE ioctl handler
af819d2 [XFS] Fix compat XFS_IOC_FSBULKSTAT_SINGLE ioctl
65fbaf2 [XFS] Fix xfs_bulkstat_one size checks & error handling
2ee4fa5 [XFS] Make the bulkstat_one compat ioctl handling more sane
471d591 [XFS] Add compat handlers for data & rt growfs ioctls
e94fc4a [XFS] Add compat handlers for swapext ioctl
d5547f9 [XFS] Clean up some existing compat ioctl calls
ffae263 [XFS] Move compat ioctl structs & numbers into xfs_ioctl32.h
743bb46 [XFS] Move copy_from_user calls out of ioctl helpers into ioctl switch.
0e44667 [XFS] fix error handling in xlog_recover_process_one_iunlink
24f211b [XFS] move inode allocation out xfs_iread
b48d8d6 [XFS] kill the XFS_IMAP_BULKSTAT flag
92bfc6e [XFS] embededd struct xfs_imap into xfs_inode
94e1b69 [XFS] merge xfs_imap into xfs_dilocate
a194189 [XFS] remove dead code for old inode item recovery
76d8b27 [XFS] stop using xfs_itobp in xfs_iread
23fac50 [XFS] split up xlog_recover_process_iunlinks
51ce16d [XFS] kill XFS_DINODE_VERSION_ defines
81591fe [XFS] kill xfs_dinode_core_t
d42f08f [XFS] kill xfs_ialloc_log_di
b28708d [XFS] sanitize xlog_in_core_t definition
4805621 [XFS] factor out xfs_read_agf helper
5e1be0f [XFS] factor out xfs_read_agi helper
26c5295 [XFS] remove i_gen from incore inode
207fcfa [XFS] remove xfs_vfsops.h
2b5decd [XFS] remove xfs_vfs.h
00dd402 [XFS] remove bhv_statvfs_t typedef
f35642e [XFS] Hook up the fiemap ioctl.
5af317c [XFS] Add new getbmap flags.
8a7141a [XFS] convert xfs_getbmap to take formatter functions
0924b58 [XFS] fix uninitialised variable bug in dquot release.
2e65609 [XFS] fix error inversion problems with data flushing
6579591 [XFS] fix spurious gcc warnings
6c31b93 [XFS] allow inode64 mount option on 32 bit systems
f999a5b [XFS] wire up ->open for directories
bac8dca [XFS] fix NULL pointer dereference in xfs_log_force_umount
b5a20aa Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
cc09c0d [XFS] Fix double free of log tickets
6307091 [XFS] Avoid using inodes that haven't been completely initialised
cb4f0d1 [XFS] fix uninitialised variable bug in dquot release
d44dab8 fs: xfs needs inode_wait to be exported
644c356 [XFS] handle memory allocation failures during log initialisation
dcd7b4e Merge branch 'master' of git://oss.sgi.com:8090/xfs/linux-2.6
91b7771 CRED: Wrap task credential accesses in the XFS filesystem
6bfb3d0 [XFS] Fix race when looking up reclaimable inodes
e0b8e8b [XFS] remove restricted chown parameter from xfs linux
f3f0d7b [XFS] remove restricted chown parameter from xfs linux
ea5a3dc8 [XFS] kill sys_cred
7ee49ac [XFS] correctly select first log item to push
9ed0451 [XFS] free partially initialized inodes using destroy_inode
087e3b0 Inode: export symbol destroy_inode
c679eef [XFS] stop using xfs_itobp in xfs_bulkstat
455486b [XFS] avoid all reclaimable inodes in xfs_sync_inodes_ag
56e73ec [XFS] Can't lock inodes in radix tree preload region
2b7035f [XFS] Trivial xfs_remove comment fixup
1ec7944 [XFS] fix biosize option
469fc23 [XFS] fix the noquota mount option
9d565ff [XFS] kill struct xfs_mount_args
5a792c4 [XFS] XFS: Check for valid transaction headers in recovery
783a2f6 [XFS] Finish removing the mount pointer from the AIL API
fc1829f [XFS] Add ail pointer into log items
a9c21c1 [XFS] Given the log a pointer to the AIL
c7e8f26 [XFS] Move the AIL lock into the struct xfs_ail
7b2e2a3 [XFS] Allow 64 bit machines to avoid the AIL lock during flushes
5b00f14 [XFS] move the AIl traversal over to a consistent interface
27d8d5f [XFS] Use a cursor for AIL traversal.
82fa901 [XFS] Allocate the struct xfs_ail
a744405 [XFS] Account for allocated blocks when expanding directories
8c38ab0 [XFS] Prevent looping in xfs_sync_inodes_ag
1165451 [XFS] kill deleted inodes list
7a3be02 [XFS] use the inode radix tree for reclaiming inodes
396beb8 [XFS] mark inodes for reclaim via a tag in the inode radix tree
1dc3318 [XFS] rename inode reclaim functions
fce08f2 [XFS] move inode reclaim functions to xfs_sync.c
493dca6 [XFS] Fix build warning - xfs_fs_alloc_inode() needs a return statement
99fa8cb [XFS] Prevent use-after-free caused by synchronous inode reclaim
bf90424 [XFS] Combine the XFS and Linux inodes
8290c35 Inode: Allow external list initialisation
2cb1599 Inode: Allow external initialisers
94b97e3 [XFS] Never call mark_inode_dirty_sync() directly
6441e54 [XFS] factor xfs_iget_core() into hit and miss cases
3471394 [XFS] fix instant oops with tracing enabled
76bf105 [XFS] Move remaining quiesce code.
a4e4c4f [XFS] Kill xfs_sync()
cb56a4b [XFS] Kill SYNC_CLOSE
e9f1c6e [XFS] make SYNC_DELWRI no longer use xfs_sync
be97d9d [XFS] make SYNC_ATTR no longer use xfs_sync
aacaa88 [XFS] xfssyncd: don't call xfs_sync
dfd837a [XFS] kill xfs_syncsub
2030b5a [XFS] use xfs_sync_inodes rather than xfs_syncsub
bc60a99 [XFS] Use struct inodes instead of vnodes to kill vn_grab
2af75df [XFS] split out two helpers from xfs_syncsub
4e8938f [XFS] Move XFS_BMAP_SANITY_CHECK out of line.
7cc95a8 [XFS] Always use struct xfs_btree_block instead of short / longform
136341b [XFS] cleanup btree record / key / ptr addressing macros.
6c7699c [XFS] remove the mount inode list
60197e8 [XFS] Cleanup maxrecs calculation.
5b4d89a [XFS] Traverse inode trees when releasing dquots
683a897 [XFS] Use the inode tree for finding dirty inodes
2f8a3ce [XFS] don't block in xfs_qm_dqflush() during async writeback.
75c68f4 [XFS] Remove xfs_iflush_all and clean up xfs_finish_reclaim_all()
a167b17 [XFS] move xfssyncd code to xfs_sync.c
fe4fa4b [XFS] move sync code to its own file
34519da [XFS] Show buffer address with debug hexdump on corruption
89b2839 [XFS] Check agf_btreeblks is valid when reading in the AGF
847fff5 [XFS] Sync up kernel and user-space headers
24ee0e4 [XFS] Make xfs_btree_check_ptr() debug-only code.
d1de802 [XFS] Fix build brakage from patch "Clean up dquot pincount code"
bc3048e [XFS] Clean up dquot pincount code.
d112f29 [XFS] Wait for all I/O on truncate to zero file size
7f7c39c [XFS] make btree tracing generic
3cc7524 [XFS] mark various functions in xfs_btree.c static
4a26e66 [XFS] add keys_inorder and recs_inorder btree methods
fd6bcc5 [XFS] kill xfs_bmbt_log_block and xfs_bmbt_log_recs
8cc938f [XFS] implement generic xfs_btree_get_rec
91cca5d [XFS] implement generic xfs_btree_delete/delrec
d4b3a4b [XFS] move xfs_bmbt_killroot to common code
4b22a57 [XFS] implement generic xfs_btree_insert/insrec
ea77b0a [XFS] move xfs_bmbt_newroot to common code
344207c [XFS] implement semi-generic xfs_btree_new_root
f5eb8e7 [XFS] implement generic xfs_btree_split
687b890 [XFS] implement generic xfs_btree_lshift
9eaead5 [XFS] implement generic xfs_btree_rshift
278d0ca [XFS] implement generic xfs_btree_update
38bb742 [XFS] implement generic xfs_btree_updkey
fe033cc [XFS] implement generic xfs_btree_lookup
8df4da4 [XFS] implement generic xfs_btree_decrement
637aa50 [XFS] implement generic xfs_btree_increment
65f1eae [XFS] add helpers for addressing entities inside a btree block
ce5e42d [XFS] add get_maxrecs btree operation
8c4ed63 [XFS] make btree tracing generic
854929f [XFS] add new btree statistics
a23f6ef [XFS] refactor btree validation helpers
b524bfe [XFS] refactor xfs_btree_readahead
e99ab90 [XFS] add a long pointers flag to xfs_btree_cur
8186e51 [XFS] make btree root in inode support generic
de227dd [XFS] add generic btree types
561f7d1 [XFS] split up xfs_btree_init_cursor
f2277f0 [XFS] kill struct xfs_btree_hdr
f338f90 [XFS] Unlock inode before calling xfs_idestroy()
a357a12 [XFS] Fix use-after-free with log and quotas
4603992 [XFS] Remove final remnants of dirv1 macros and other stuff
d07c60e [XFS] Use xfs_idestroy() to cleanup an inode.
be8b78a [XFS] Remove kmem_zone_t argument from xfs_inode_init_once()
07c8f67 [XFS] Make use of the init-once slab optimisation.
from 3c92ec8ae91ecf59d88c798301833d7cf83f2179 (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 0a8c5395f90f06d128247844b2515c8bf3f2826b
Merge: 25051158bbed127e8672b43396c71c5eb610e5f1 3c92ec8ae91ecf59d88c798301833d7cf83f2179
Author: Lachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Date: Mon Dec 29 16:47:18 2008 +1100
[XFS] Fix merge failures
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
fs/xfs/linux-2.6/xfs_cred.h
fs/xfs/linux-2.6/xfs_globals.h
fs/xfs/linux-2.6/xfs_ioctl.c
fs/xfs/xfs_vnodeops.h
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 25051158bbed127e8672b43396c71c5eb610e5f1
Author: Lachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Date: Wed Dec 24 14:07:32 2008 +1100
[XFS] Fix race in xfs_write() between direct and buffered I/O with DMAPI
The iolock is dropped and re-acquired around the call to XFS_SEND_NAMESP().
While the iolock is released the file can become cached. We then
'goto retry' and - if we are doing direct I/O - mapping->nrpages may now be
non zero but need_i_mutex will be zero and we will hit the WARN_ON().
Since we have dropped the I/O lock then the file size may have also changed
so what we need to do here is 'goto start' like we do for the XFS_SEND_DATA()
DMAPI event.
We also need to update the filesize before releasing the iolock so that
needs to be done before the XFS_SEND_NAMESP event. If we drop the iolock
before setting the filesize we could race with a truncate.
Reviewed-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit ad1ad968f4e7b06c75741575ea077e25a87da49a
Author: Christoph Hellwig <hch@infradead.org>
Date: Mon Dec 22 09:59:06 2008 -0500
[XFS] handle unaligned data in xfs_bmbt_disk_get_all
In libxfs xfs_bmbt_disk_get_all needs to handle unaligned data and thus
has been updated to use get_unaligned_be64. In kernelspace we don't strictly
need it as the routine is only used for tracing and xfsidbg, but let's keep
the two implementations in sync.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit efc557570dc99b46e46a7be51c3c7402b485e829
Author: Christoph Hellwig <hch@infradead.org>
Date: Wed Dec 17 12:27:36 2008 -0500
[XFS] avoid memory allocations in xfs_fs_vcmn_err
xfs_fs_vcmn_err can be called under a spinlock, but does a sleeping memory
allocation to create buffer for it's internal sprintf. Fortunately it's
the only caller of icmn_err, so we can merge the two and have one single
static buffer and spinlock protecting it. While we're at it make sure
we proper __attribute__ format annotations so that the compiler can detect
mismatched format strings.
Reported-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 9f6c92b9cc2fd41d6c7b493be5637cc5b5659880
Author: Lachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Date: Mon Dec 22 17:56:49 2008 +1100
[XFS] Fix speculative allocation beyond eof
Speculative allocation beyond eof doesn't work properly. It was
broken some time ago after a code cleanup that moved what is now
xfs_iomap_eof_align_last_fsb() and xfs_iomap_eof_want_preallocate()
out of xfs_iomap_write_delay() into separate functions. The code
used to use the current file size in various checks but got changed
to be max(file_size, i_new_size). Since i_new_size is the result
of 'offset + count' then in xfs_iomap_eof_want_preallocate() the
check for '(offset + count) <= isize' will always be true.
ie if 'offset + count' is > ip->i_size then isize will be i_new_size
and equal to 'offset + count'.
This change fixes all the places that used to use the current file
size.
Reviewed-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 4fdc7781799926dca6c3a3bb6e9533a9718c4dea
Author: Lachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Date: Mon Dec 22 17:52:58 2008 +1100
[XFS] Remove XFS_BUF_SHUT() and friends
Code does nothing so remove it.
Reviewed-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit d415867e0abc35e3b2f0d4196e98c339d6fe29a2
Author: Lachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Date: Mon Dec 22 17:50:56 2008 +1100
[XFS] Use the incore inode size in xfs_file_readdir()
We should be using the incore inode size here not the linux inode
size. The incore inode size is always up to date for directories
whereas the linux inode size is not updated for directories.
We've hit assertions in xfs_bmap() and traced it back to the linux
inode size being zero but the incore size being correct.
Reviewed-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 27a0464a6cb837d3a90b6e69365dfc01cb0dff2f
Merge: 4d9d4ebf5de848e3450e23e4db9ac74e23e5daa6 3d44cc3e01ee1b40317f79ed54324e25c4f848df
Author: Lachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Date: Mon Dec 22 17:34:26 2008 +1100
[XFS] Fix merge conflict in fs/xfs/xfs_rename.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
fs/xfs/xfs_rename.c
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 4d9d4ebf5de848e3450e23e4db9ac74e23e5daa6
Merge: cfbe52672fbc6f333892e8dde82c35e0a76aa5f5 c4cd747ee6c3ba1e7727878e3fce482d0d8c0136
Author: Lachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Date: Fri Dec 12 15:28:02 2008 +1100
Merge branch 'master' of git+ssh://git.melbourne.sgi.com/git/xfs
commit cfbe52672fbc6f333892e8dde82c35e0a76aa5f5
Author: Lachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Date: Fri Dec 12 15:27:25 2008 +1100
[XFS] set b_error from bio error in xfs_buf_bio_end_io
Preserve any error returned by the bio layer.
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Tim Shimmin <tes@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit c4cd747ee6c3ba1e7727878e3fce482d0d8c0136
Author: Christoph Hellwig <hch@infradead.org>
Date: Tue Dec 9 04:47:34 2008 -0500
[XFS] use inode_change_ok for setattr permission checking
Instead of implementing our own checks use inode_change_ok to check for
necessary permission in setattr. There is a slight change in behaviour
as inode_change_ok doesn't allow i_mode updates to add the suid or sgid
without superuser privilegues while the old XFS code just stripped away
those bits from the file mode.
(First sent on Semptember 29th)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 4d4be482a4d78ca906f45e99fd9fdb91e907f5ad
Author: Christoph Hellwig <hch@infradead.org>
Date: Tue Dec 9 04:47:33 2008 -0500
[XFS] add a FMODE flag to make XFS invisible I/O less hacky
XFS has a mode called invisble I/O that doesn't update any of the
timestamps. It's used for HSM-style applications and exposed through
the nasty open by handle ioctl.
Instead of doing directly assignment of file operations that set an
internal flag for it add a new FMODE_NOCMTIME flag that we can check
in the normal file operations.
(addition of the generic VFS flag has been ACKed by Al as an interims
solution)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 6d73cf133c5477f7038577bfeda603ce9946f8cb
Author: Christoph Hellwig <hch@infradead.org>
Date: Tue Dec 9 04:47:32 2008 -0500
[XFS] resync headers with libxfs
- xfs_sb.h add the XFS_SB_VERSION2_PARENTBIT features2 that has been
around in userspace for some time
- xfs_inode.h: move a few things out of __KERNEL__ that are needed by
userspace
- xfs_mount.h: only include xfs_sync.h under __KERNEL__
- xfs_inode.c: minor whitespace fixup. I accidentaly changes this when
importing this file for use by userspace.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 2175dd95741bda5f438e4efe388a8c1bb5abf1cc
Author: Christoph Hellwig <hch@infradead.org>
Date: Tue Dec 9 04:47:31 2008 -0500
[XFS] simplify projid check in xfs_rename
Check for the project ID after attaching all inodes to the transaction.
That way the unlock in the error case is done by the transaction subsystem,
which guaratees that is uses the right flags (which was wrong from day one
of this check), and avoids having special code unlocking an array of inodes
with potential duplicates. Attaching the inode first is the method used
by xfs_rename and the other namespace methods all other error that require
multiple locked inodes.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 15ac08a8b2c129abccf1be47b6ab09491e013db2
Author: Christoph Hellwig <hch@infradead.org>
Date: Tue Dec 9 04:47:30 2008 -0500
[XFS] replace b_fspriv with b_mount
Replace the b_fspriv pointer and it's ugly accessors with a properly types
xfs_mount pointer. Also switch log reocvery over to it instead of using
b_fspriv for the mount pointer.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit e055f13a6d8448d4f23121b7b11340c3fb55cce6
Author: Lachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Date: Wed Dec 10 11:51:54 2008 +1100
[XFS] Remove unused tracing code
None of this code appears to be used anywhere so remove it.
Reviewed-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 14d676f56fad26fd3c31eeff5d4ef8ea4a163571
Merge: 797eaed40e1df4a3b9ece6894a71ce2b568bca38 feaf3848a813a106f163013af6fcf6c4bfec92d9
Author: Lachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Date: Fri Dec 5 15:27:43 2008 +1100
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
commit 797eaed40e1df4a3b9ece6894a71ce2b568bca38
Author: Lachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Date: Fri Dec 5 14:15:49 2008 +1100
[XFS] Remove unnecessary assertion
Hit this assert because an inode was tagged with XFS_ICI_RECLAIM_TAG but
not XFS_IRECLAIMABLE|XFS_IRECLAIM. This is because xfs_iget_cache_hit()
first clears XFS_IRECLAIMABLE and then calls __xfs_inode_clear_reclaim_tag()
while only holding the pag_ici_lock in read mode so we can race with
xfs_reclaim_inodes_ag(). Looks like xfs_reclaim_inodes_ag() will do the
right thing anyway so just remove the assert.
Thanks to Christoph for pointing out where the problem was.
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Reviewed-by: Christoph Hellwig <hch@infradead.org>
commit a5b429d41fede3a90deb532f5c2318393ed3a17b
Author: Lachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Date: Fri Dec 5 13:31:51 2008 +1100
[XFS] Remove unused variable in ktrace_free()
entries_size is probably left over from when we used to pass the
size to kmem_free().
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Reviewed-by: Christoph Hellwig <hch@infradead.org>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
commit c6422617a1c0d7787e515748b01f594fe43aea98
Author: Lachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Date: Fri Dec 5 13:16:15 2008 +1100
[XFS] Check return value of xfs_buf_get_noaddr()
We check the return value of all other calls to xfs_buf_get_noaddr().
Make sense to do it here too.
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Reviewed-by: Christoph Hellwig <hch@infradead.org>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
commit 6a0775a991d5597ce98f1e15373288ea133cc793
Author: Dave Chinner <david@fromorbit.com>
Date: Thu Dec 4 09:09:34 2008 +1100
[XFS] Fix hang after disallowed rename across directory quota domains
When project quota is active and is being used for directory tree
quota control, we disallow rename outside the current directory
tree. This requires a check to be made after all the inodes
involved in the rename are locked. We fail to unlock the inodes
correctly if we disallow the rename when the target is outside the
current directory tree. This results in a hang on the next access
to the inodes involved in failed rename.
Reported-by: Arkadiusz Miskiewicz <arekm@maven.pl>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Tested-by: Arkadiusz Miskiewicz <arekm@maven.pl>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 8bb57320f3f5dd8c2373c0b66e4950391e037109
Author: Christoph Hellwig <hch@lst.de>
Date: Thu Dec 4 14:23:27 2008 +0100
[XFS] Fix compile with CONFIG_COMPAT enabled
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 5a8d0f3c7af801c7263fbba39952504d6fc7ff60
Author: Christoph Hellwig <hch@lst.de>
Date: Wed Dec 3 12:20:40 2008 +0100
move inode tracing out of xfs_vnode.
Move the inode tracing into xfs_iget.c / xfs_inode.h and kill xfs_vnode.c
now that it's empty.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit 25e41b3d521f52771354a718042a753a3e77df0a
Author: Christoph Hellwig <hch@lst.de>
Date: Wed Dec 3 12:20:39 2008 +0100
move vn_iowait / vn_iowake into xfs_aops.c
The whole machinery to wait on I/O completion is related to the I/O path
and should be there instead of in xfs_vnode.c. Also give the functions
more descriptive names.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit 583fa586f0e4a8222dd091ce971b85c1364f3d92
Author: Christoph Hellwig <hch@lst.de>
Date: Wed Dec 3 12:20:38 2008 +0100
kill vn_ioerror
There's just one caller of this helper, and it's much cleaner to just merge
the xfs_do_force_shutdown call into it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit f95099ba5ae06b96a9c17ef93cc655f686d79077
Author: Christoph Hellwig <hch@lst.de>
Date: Wed Dec 3 12:20:37 2008 +0100
kill xfs_unmount_flush
There's almost nothing left in this function, instead remove the IRELE
on the real times inodes and the call to XFS_QM_UNMOUNT into xfs_unmountfs.
For the regular unmount case that means it now also happenes after dmapi
notification, but otherwise there is no difference in behaviour.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit e57481dc269cd3773b22f53bfb869308780a7bf1
Author: Christoph Hellwig <hch@lst.de>
Date: Wed Dec 3 12:20:36 2008 +0100
no explicit xfs_iflush for special inodes during unmount
Currently we explicitly call xfs_iflush on the quota, real-time and root
inodes from xfs_unmount_flush. But we just called xfs_sync_inodes with
SYNC_ATTR and do an XFS_bflush aka xfs_flush_buftarg to make sure all inodes
are on disk already, so there is no need for these special cases.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit 070c4616ec62fc207e2aeef9d0f28af294c651d0
Author: Christoph Hellwig <hch@lst.de>
Date: Wed Dec 3 12:20:35 2008 +0100
use xfs_trans_ijoin in xfs_trans_iget
Use xfs_trans_ijoin in xfs_trans_iget in case we need to join an inode into
a transaction instead of opencoding it. Based on a discussion with and an
incomplete patch from Niv Sardi.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit b56757becf8bc62292263a24a23cf55edb4be55f
Author: Christoph Hellwig <hch@lst.de>
Date: Wed Dec 3 12:20:34 2008 +0100
remove leftovers of shared read-only support
We never supported shared read-only filesystems, so remove the dead
code left over from IRIX for it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit e88f11abe09d14718b82a991db118c5e485aa897
Author: Christoph Hellwig <hch@lst.de>
Date: Wed Dec 3 12:20:33 2008 +0100
remove unused m_inode_quiesce member from struct xfs_mount
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit 6bd16ff27060819d16b3e7abe59b6644b349aea3
Author: Christoph Hellwig <hch@lst.de>
Date: Wed Dec 3 12:20:32 2008 +0100
kill dead inode flags
There are a few inode flags around that aren't used anywhere, so remove
them. Also update xfsidbg to display all used inode flags correctly.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit 5efcbb853bc2f051d720a191268f8dd901fea9c2
Author: Christoph Hellwig <hch@lst.de>
Date: Wed Dec 3 12:20:31 2008 +0100
cleanup xfs_sb.h feature flag helpers
The various inlines in xfs_sb.h that deal with the superblock version
and fature flags were converted from macros a while ago, and this
show by the odd coding style full of useless braces and backslashes
and the avoidance of conditionals.
Clean these up to look like normal C code.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit df6771bde14551eceeacf331666a92735e0773ac
Author: Christoph Hellwig <hch@lst.de>
Date: Wed Dec 3 12:20:30 2008 +0100
kill dead quota flags
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit 63ad2a5c4cf37e3242142eee8a8dcd4a8515302e
Author: Christoph Hellwig <hch@lst.de>
Date: Wed Dec 3 12:20:29 2008 +0100
remove dead code from sv_t implementation
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit 39e2defe73106ca2e1c85e5286038a0a13f49513
Author: Christoph Hellwig <hch@lst.de>
Date: Wed Dec 3 12:20:28 2008 +0100
reduce l_icloglock roundtrips
All but one caller of xlog_state_want_sync drop and re-acquire
l_icloglock around the call to it, just so that xlog_state_want_sync can
acquire and drop it.
Move all lock operation out of l_icloglock and assert that the lock is
held when it is called.
Note that it would make sense to extende this scheme to
xlog_state_release_iclog, but the locking in there is more complicated
and we'd like to keep the atomic_dec_and_lock optmization for those
callers not having l_icloglock yet.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit d9424b3c4a1e96f87c6cfd4d8dd2f8d9bbb4dcc5
Author: Christoph Hellwig <hch@lst.de>
Date: Wed Dec 3 12:20:27 2008 +0100
stop using igrab in xfs_vn_link
->link is guranteed to get an already reference inode passed so we
can do a simple increment of i_count instead of using igrab and thus
avoid banging on the global inode_lock. This is what most filesystems
already do.
Also move the increment after the call to xfs_link to simplify error
handling.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit 5d765b976c3a41faf9a73718fb8cc5833990a8ef
Author: Christoph Hellwig <hch@lst.de>
Date: Wed Dec 3 12:20:26 2008 +0100
kill xfs_buf_iostart
xfs_buf_iostart is a "shared" helper for xfs_buf_read_flags,
xfs_bawrite, and xfs_bdwrite - except that there isn't much shared
code but rather special cases for each caller.
So remove this function and move the functionality to the caller.
xfs_bawrite and xfs_bdwrite are now big enough to be moved out of
line and the xfs_buf_read_flags is moved into a new helper called
_xfs_buf_read.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit 5cafdeb2891a415a5dbf0ad80f0afedf8369e6bb
Author: Christoph Hellwig <hch@lst.de>
Date: Wed Dec 3 12:20:25 2008 +0100
cleanup the inode reclaim path
Merge xfs_iextract and xfs_idestroy into xfs_ireclaim as they are never
called individually. Also rewrite most comments in this area as they
were severly out of date.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit ccd0be6cfc6943c4e0b3e3cdb598e0b7354a2d78
Author: Christoph Hellwig <hch@lst.de>
Date: Wed Dec 3 12:20:24 2008 +0100
remove unused prototypes for xfs_ihash_init / xfs_ihash_free
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit 73e6335c14209e508bec8ca7985d1fbde183bd1f
Author: Christoph Hellwig <hch@lst.de>
Date: Wed Dec 3 12:20:23 2008 +0100
remove unused behvavior cruft in xfs_super.h
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit 2234d54d3d855d6ffae88a24772a9389d6755e0c
Author: Christoph Hellwig <hch@lst.de>
Date: Wed Dec 3 12:20:22 2008 +0100
remove useless mnt_want_write call in xfs_write
When mnt_want_write was introduced a call to it was added around
xfs_ichgtime, but there is no need for this because a file can't be open
read/write on a r/o mount, and a mount can't degrade r/o while we still
have files open for writing. As the mnt_want_write changes were never
merged into the CVS tree this patch is for mainline only.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit ddcd856d81861a523d79d077facd875da1f66792
Author: Christoph Hellwig <hch@infradead.org>
Date: Wed Dec 3 07:55:34 2008 -0500
[XFS] fix compile on 32 bit systems
The recent compat patches make xfs_file.c include xfs_ioctl32.h unconditional,
which breaks the build on 32 bit systems which don't have the various compat
defintions.
Remove the include and move the defintion of xfs_file_compat_ioctl to
xfs_ioctl.h so that we can avoid including all the compat defintions in
xfs_file.c
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit e5d412f17846b0aea9e5250926f994ab2e4e1006
Author: sandeen@sandeen.net <sandeen@sandeen.net>
Date: Tue Nov 25 21:20:17 2008 -0600
[XFS] Reorder xfs_ioctl32.c for some tidiness
Put things in IMHO a more readable order, now
that it's all done; add some comments.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 710d62aaaf17c841b8bdbc7a775f8910a7160248
Author: sandeen@sandeen.net <sandeen@sandeen.net>
Date: Tue Nov 25 21:20:16 2008 -0600
[XFS] Hook up compat XFS_IOC_FSSETDM_BY_HANDLE ioctl handler
Add a compat handler for XFS_IOC_FSSETDM_BY_HANDLE.
I haven't tested this, lacking dmapi tools to do so
(unless xfsqa magically gets this somehow?)
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 28750975ace79c547407a84d3969cbed516be8f8
Author: sandeen@sandeen.net <sandeen@sandeen.net>
Date: Tue Nov 25 21:20:15 2008 -0600
[XFS] Hook up compat XFS_IOC_ATTRMULTI_BY_HANDLE ioctl handler
Add a compat handler for XFS_IOC_ATTRMULTI_BY_HANDLE
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit ebeecd2b04645a4b79e1bc00d69cf4f98e03a684
Author: sandeen@sandeen.net <sandeen@sandeen.net>
Date: Tue Nov 25 21:20:14 2008 -0600
[XFS] Hook up compat XFS_IOC_ATTRLIST_BY_HANDLE ioctl handler
Add a compat handler for XFS_IOC_ATTRLIST_BY_HANDLE
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit af819d27637119105213433881f158931e29620b
Author: sandeen@sandeen.net <sandeen@sandeen.net>
Date: Tue Nov 25 21:20:13 2008 -0600
[XFS] Fix compat XFS_IOC_FSBULKSTAT_SINGLE ioctl
The XFS_IOC_FSBULKSTAT_SINGLE ioctl passes in the
desired inode number, while XFS_IOC_FSBULKSTAT passes
in the previous/last-stat'd inode number. The
compat handler wasn't differentiating these, so
when a XFS_IOC_FSBULKSTAT_SINGLE request for inode
128 was sent in, stat information for 131 was sent out.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 65fbaf2489c667bf79ae1f20403f30c66568d445
Author: sandeen@sandeen.net <sandeen@sandeen.net>
Date: Tue Nov 25 21:20:12 2008 -0600
[XFS] Fix xfs_bulkstat_one size checks & error handling
The 32-bit xfs_blkstat_one handler was failing because
a size check checked whether the remaining (32-bit)
user buffer was less than the (64-bit) bulkstat buffer,
and failed with ENOMEM if so. Move this check
into the respective handlers so that they check the
correct sizes.
Also, the formatters were returning negative errors
or positive bytes copied; this was odd in the positive
error value world of xfs, and handled wrong by at least
some of the callers, which treated the bytes returned
as an error value. Move the bytes-used assignment
into the formatters.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 2ee4fa5cb716eba104a4ef8efe159e1007a2aef6
Author: sandeen@sandeen.net <sandeen@sandeen.net>
Date: Tue Nov 25 21:20:11 2008 -0600
[XFS] Make the bulkstat_one compat ioctl handling more sane
Currently the compat formatter was handled by passing
in "private_data" for the xfs_bulkstat_one formatter,
which was really just another formatter... IMHO this
got confusing.
Instead, just make a new xfs_bulkstat_one_compat
formatter for xfs_bulkstat, and call it via a wrapper.
Also, don't translate the ioctl nrs into their native
counterparts, that just clouds the issue; we're in a
compat handler anyway, just switch on the 32-bit cmds.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 471d59103167c84f17b9bcfee22ed10b44ff206e
Author: sandeen@sandeen.net <sandeen@sandeen.net>
Date: Tue Nov 25 21:20:10 2008 -0600
[XFS] Add compat handlers for data & rt growfs ioctls
The args for XFS_IOC_FSGROWFSDATA and XFS_IOC_FSGROWFSRTA
have padding on the end on intel, so add arg copyin functions,
and then just call the growfs ioctl helpers.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit e94fc4a43e5c39f689e83caf6d2f0939081f5e6b
Author: sandeen@sandeen.net <sandeen@sandeen.net>
Date: Tue Nov 25 21:20:09 2008 -0600
[XFS] Add compat handlers for swapext ioctl
The big hitter here was the bstat field, which contains
different sized time_t on 32 vs. 64 bit. Add a copyin
function to translate the 32-bit arg to 64-bit, and
call the swapext ioctl helper.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit d5547f9feea459dfc9e7313bd1d561394e2c129f
Author: sandeen@sandeen.net <sandeen@sandeen.net>
Date: Tue Nov 25 21:20:08 2008 -0600
[XFS] Clean up some existing compat ioctl calls
Create a new xfs_ioctl.h file which has prototypes for
ioctl helpers that may be called in compat mode.
Change several compat ioctl cases which are IOW to simply copy
in the userspace argument, then call the common ioctl helper.
This also fixes xfs_compat_ioc_fsgeometry_v1(), which had
it backwards before; it copied in an (empty) arg, then copied
out the native result, which probably corrupted userspace. It
should be translating on the copyout.
Also, a bit of formatting cleanup for consistency, and conversion
of all error returns to use XFS_ERROR().
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit ffae263a640b736a7206a0d7bd14ab44eb58cd28
Author: sandeen@sandeen.net <sandeen@sandeen.net>
Date: Tue Nov 25 21:20:07 2008 -0600
[XFS] Move compat ioctl structs & numbers into xfs_ioctl32.h
This makes the c file less cluttered and a bit more
readable. Consistently name the ioctl number
macros with "_32" and the compatibility stuctures
with "_compat." Rename the helpers which simply
copy in the arg with "_copyin" for easy identification.
Finally, for a few of the existing helpers, modify them
so that they directly call the native ioctl helper
after userspace argument fixup.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 743bb4650da9e2595d6cedd01c680b5b9398c74a
Author: sandeen@sandeen.net <sandeen@sandeen.net>
Date: Tue Nov 25 21:20:06 2008 -0600
[XFS] Move copy_from_user calls out of ioctl helpers into ioctl switch.
Moving the copy_from_user out of some of the ioctl helpers will
make it easier for the compat ioctl switch to copy in the right
struct, then just pass to the underlying helper.
Also, move common access checks into the helpers themselves,
and out of the native ioctl switch code, to reduce code
duplication between native & compat ioctl callers.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 0e446673a15a4e9c336b67c1a638eb12c21d0993
Author: Christoph Hellwig <hch@lst.de>
Date: Fri Nov 28 14:23:42 2008 +1100
[XFS] fix error handling in xlog_recover_process_one_iunlink
If we fail after xfs_iget we have to drop the reference count, spotted
by Dave Chinner. Also remove some useless asserts and stop trying to
deal with di_mode == 0 inodes because never gets those without passing
the IGET_CREATE flag to xfs_iget.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit 24f211bad09a31f19dda0c3faffe0244f4f235f5
Author: Christoph Hellwig <hch@lst.de>
Date: Fri Nov 28 14:23:42 2008 +1100
[XFS] move inode allocation out xfs_iread
Allocate the inode in xfs_iget_cache_miss and pass it into xfs_iread. This
simplifies the error handling and allows xfs_iread to be shared with userspace
which already uses these semantics.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit b48d8d64377f39913663a06f4757f3b8c6fc6d87
Author: Christoph Hellwig <hch@lst.de>
Date: Fri Nov 28 14:23:41 2008 +1100
[XFS] kill the XFS_IMAP_BULKSTAT flag
Just pass down the XFS_IGET_* flags all the way down to xfs_imap instead
of translating them mid-way.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit 92bfc6e7c4eabbbd15e7d6d49123b296d05dcfd1
Author: Christoph Hellwig <hch@lst.de>
Date: Fri Nov 28 14:23:41 2008 +1100
[XFS] embededd struct xfs_imap into xfs_inode
Most uses of struct xfs_imap are to map and inode to a buffer. To avoid
copying around the inode location information we should just embedd a
strcut xfs_imap into the xfs_inode. To make sure it doesn't bloat an
inode the im_len is changed to a ushort, which is fine as that's what
the users exepect anyway.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit 94e1b69d1abd108d306e926c3012ec89e481c0da
Author: Christoph Hellwig <hch@lst.de>
Date: Fri Nov 28 14:23:41 2008 +1100
[XFS] merge xfs_imap into xfs_dilocate
xfs_imap is the only caller of xfs_dilocate and doesn't add any significant
value. Merge the two functions and document the various cases we have for
inode cluster lookup in the new xfs_imap.
Also remove the unused im_agblkno and im_ioffset fields from struct xfs_imap
while we're at it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit a1941895034cda2bffa23ba845607c82138ccf52
Author: Christoph Hellwig <hch@lst.de>
Date: Fri Nov 28 14:23:40 2008 +1100
[XFS] remove dead code for old inode item recovery
We have removed the support for old-style inode items a while ago and
xlog_recover_do_inode_trans is now only called for XFS_LI_INODE items.
That means we can remove the call to xfs_imap there and with it the
XFS_IMAP_LOOKUP that is set by all other callers. We can also mark
xfs_imap static now.
(First sent on October 21st)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit 76d8b277f7b715f78ee3cb09ee112563639693a5
Author: Christoph Hellwig <hch@lst.de>
Date: Fri Nov 28 14:23:40 2008 +1100
[XFS] stop using xfs_itobp in xfs_iread
The only caller of xfs_itobp that doesn't have i_blkno setup is now
the initial inode read. It needs access to the whole xfs_imap so using
xfs_inotobp is not an option. Instead opencode the buffer lookup in
xfs_iread and kill all the functionality for the initial map from
xfs_itobp.
(First sent on October 21st)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit 23fac50f959a87febf7ce4ae9d47525121f10c7a
Author: Christoph Hellwig <hch@lst.de>
Date: Fri Nov 28 14:23:40 2008 +1100
[XFS] split up xlog_recover_process_iunlinks
Split out the body of the main loop into a separate helper to make the
code readable.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit 51ce16d519da0bc3c548e0facef7cb3aab1ac8cc
Author: Christoph Hellwig <hch@lst.de>
Date: Fri Nov 28 14:23:39 2008 +1100
[XFS] kill XFS_DINODE_VERSION_ defines
These names don't add any value at all over just using the numerical
values.
(First sent on October 9th)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit 81591fe2db19d0fc1ec2aaaa6a790a5ab97ac3ab
Author: Christoph Hellwig <hch@lst.de>
Date: Fri Nov 28 14:23:39 2008 +1100
[XFS] kill xfs_dinode_core_t
Now that we have a separate xfs_icdinode_t for the in-core inode which
gets logged there is no need anymore for the xfs_dinode vs xfs_dinode_core
split - the fact that part of the structure gets logged through the inode
log item and a small part not can better be described in a comment.
All sizeof operations on the dinode_core either really wanted the
icdinode and are switched to that one, or had already added the size
of the agi unlinked list pointer. Later both will be replaced with
helpers once we get the larger CRC-enabled dinode.
Removing the data and attribute fork unions also has the advantage that
xfs_dinode.h doesn't need to pull in every header under the sun.
While we're at it also add some more comments describing the dinode
structure.
(First sent on October 7th)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit d42f08f61c5e7f0ed4c6b6df4c9987ddb85ec66e
Author: Christoph Hellwig <hch@lst.de>
Date: Fri Nov 28 14:23:38 2008 +1100
[XFS] kill xfs_ialloc_log_di
xfs_ialloc_log_di is only used to log the full inode core + di_next_unlinked.
That means all the offset magic is not nessecary and we can simply use
xfs_trans_log_buf directly. Also add a comment describing what we should do
here instead.
(First sent on October 7th)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit b28708d6a0a3ed65a68f0dcd8e6d1c09f14e5cf3
Author: Christoph Hellwig <hch@lst.de>
Date: Fri Nov 28 14:23:38 2008 +1100
[XFS] sanitize xlog_in_core_t definition
Move all fields from xlog_iclog_fields_t into xlog_in_core_t instead of having
them in a substructure and the using #defines to make it look like they were
directly in xlog_in_core_t. Also document that xlog_in_core_2_t is grossly
misnamed, and make all references to it typesafe.
(First sent on Semptember 15th)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit 4805621a37d9b2b16641b5c68597651419e9e252
Author: From: Christoph Hellwig <hch@lst.de>
Date: Fri Nov 28 14:23:38 2008 +1100
[XFS] factor out xfs_read_agf helper
Add a helper to read the AGF header and perform basic verification.
Based on hunks from a larger patch from Dave Chinner.
(First sent on Juli 23rd)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit 5e1be0fb1a3950597aeda448698e85b0595a2e92
Author: Christoph Hellwig <hch@lst.de>
Date: Fri Nov 28 14:23:37 2008 +1100
[XFS] factor out xfs_read_agi helper
Add a helper to read the AGI header and perform basic verification.
Based on hunks from a larger patch from Dave Chinner.
(First sent on Juli 23rd)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit 26c5295135d10fc90cbf160adfda392d91f58279
Author: Dave Chinner <david@fromorbit.com>
Date: Fri Nov 28 14:23:37 2008 +1100
[XFS] remove i_gen from incore inode
i_gen is incremented in directory operations when the
directory is changed. It is never read or otherwise used
so it should be removed to help reduce the size of the
struct xfs_inode.
The patch also removes a duplicate logging of the directory
inode core. We only need to do this once per transaction
so kill the one associated with the i_gen increment.
Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit 207fcfad58482c7c9f92939a1f6df9f7e8873a34
Author: Christoph Hellwig <hch@infradead.org>
Date: Fri Nov 28 14:23:37 2008 +1100
[XFS] remove xfs_vfsops.h
The only thing left is xfs_do_force_shutdown which already has a defintion
in xfs_mount.h.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit 2b5decd09e9f98c4e361f97f3e32d80164774f75
Author: Christoph Hellwig <hch@lst.de>
Date: Fri Nov 28 14:23:36 2008 +1100
[XFS] remove xfs_vfs.h
The only thing left are the forced shutdown flags and freeze macros which
fit into xfs_mount.h much better.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit 00dd4029e9afa642c2b26dc3aac834322ac29b4a
Author: Christoph Hellwig <hch@lst.de>
Date: Fri Nov 28 14:23:36 2008 +1100
[XFS] remove bhv_statvfs_t typedef
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit f35642e2f89f2b0379e929bd9027342365abc839
Author: Eric Sandeen <sandeen@sandeen.net>
Date: Fri Nov 28 14:23:35 2008 +1100
[XFS] Hook up the fiemap ioctl.
This adds the fiemap inode_operation, which for us converts the
fiemap values & flags into a getbmapx structure which can be sent
to xfs_getbmap. The formatter then copies the bmv array back into
the user's fiemap buffer via the fiemap helpers.
If we wanted to be more clever, we could also return mapping data
for in-inode attributes, but I'm not terribly motivated to do that
just yet.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit 5af317c942aebc928ab244eb69581bd8e5333215
Author: Eric Sandeen <sandeen@sandeen.net>
Date: Fri Nov 28 14:23:35 2008 +1100
[XFS] Add new getbmap flags.
This adds a new output flag, BMV_OF_LAST to indicate if we've hit
the last extent in the inode. This potentially saves an extra call
from userspace to see when the whole mapping is done.
It also adds BMV_IF_DELALLOC and BMV_OF_DELALLOC to request, and
indicate, delayed-allocation extents. In this case bmv_block
is set to -2 (-1 was already taken for HOLESTARTBLOCK; unfortunately
these are the reverse of the in-kernel constants.)
These new flags facilitate addition of the new fiemap interface.
Rather than adding sh_delalloc, remove sh_unwritten & just test
the flags directly.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit 8a7141a8b931d60d42830432b82078cd6dace83b
Author: Eric Sandeen <sandeen@sandeen.net>
Date: Fri Nov 28 14:23:35 2008 +1100
[XFS] convert xfs_getbmap to take formatter functions
Preliminary work to hook up fiemap, this allows us to pass in an
arbitrary formatter to copy extent data back to userspace.
The formatter takes info for 1 extent, a pointer to the user "thing*"
and a pointer to a "filled" variable to indicate whether a userspace
buffer did get filled in (for fiemap, hole "extents" are skipped).
I'm just using the getbmapx struct as a "common denominator" because
as far as I can see, it holds all info that any formatters will care
about.
("*thing" because fiemap doesn't pass the user pointer around, but rather
has a pointer to a fiemap info structure, and helpers associated with it)
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit 0924b585fc49bf371bc700c23e516a538bf589af
Author: Dave Chinner <david@fromorbit.com>
Date: Fri Nov 28 14:23:34 2008 +1100
[XFS] fix uninitialised variable bug in dquot release.
gcc is warning about an uninitialised variable in xfs_growfs_rt().
This is a false positive. Fix it by changing the scope of the
transaction pointer to wholly within the internal loop inside
the function.
While there, preemptively change xfs_growfs_rt_alloc() in the
same way as it has exactly the same structure as xfs_growfs_rt()
but gcc is not warning about it. Yet.
Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit 2e6560929d8ab4b650fecc3a87013852b34f0922
Author: Dave Chinner <david@fromorbit.com>
Date: Fri Nov 28 14:23:33 2008 +1100
[XFS] fix error inversion problems with data flushing
XFS gets the sign of the error wrong in several places when
gathering the error from generic linux functions. These functions
return negative error values, while the core XFS code returns
positive error values. Hence when XFS inverts the error to be
returned to the VFS, it can incorrectly invert a negative
error and this error will be ignored by the syscall return.
Fix all the problems related to calling filemap_* functions.
Problem initially identified by Nick Piggin in xfs_fsync().
Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit 65795910c1b798f8a47181b48cf6eb163a15e778
Author: Christoph Hellwig <hch@infradead.org>
Date: Fri Nov 28 14:23:33 2008 +1100
[XFS] fix spurious gcc warnings
Some recent gcc warnings don't like passing string variables to
printf-like functions without using at least a "%s" format string.
Change the two occurances of that in xfs to please gcc.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit 6c31b93a14a453c8756ffd228e24910ffdf30c5d
Author: Christoph Hellwig <hch@infradead.org>
Date: Fri Nov 28 14:23:32 2008 +1100
[XFS] allow inode64 mount option on 32 bit systems
Now that we've stopped using the Linux inode cache when can trivally
support the inode64 mount option on 32bit architectures. As far as the
kernel and most userspace is concerned this works perfectly, but
applications still using really old stat and readdir interfaces will get
an EOVERFLOW error when hitting an inode number not fitting into 32
bits (that problem of course also exists when using these applications
on a 64bit kernel).
Note that because inode64 is simply a mount option we can currently
mount a filesystem having > 32 bit inode numbers and cause a variety of
problems, all this is solved but this patch which enables XFS_BIG_INUMS,
even when inode64 is not used.
(First sent on October 18th)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit f999a5bf3fa6b3d11334c3ba1e9dcfed5ff9f8a6
Author: Christoph Hellwig <hch@infradead.org>
Date: Fri Nov 28 14:23:32 2008 +1100
[XFS] wire up ->open for directories
Currently there's no ->open method set for directories on XFS. That
means we don't perform any check for opening too large directories
without O_LARGEFILE, we don't check for shut down filesystems, and we
don't actually do the readahead for the first block in the directory.
Instead of just setting the directories open routine to xfs_file_open
we merge the shutdown check directly into xfs_file_open and create
a new xfs_dir_open that first calls xfs_file_open and then performs
the readahead for block 0.
(First sent on September 29th)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit bac8dca9f9b1dfcf9c4ecb4f9ca17185b828cc20
Author: Christoph Hellwig <hch@infradead.org>
Date: Fri Nov 28 14:23:31 2008 +1100
[XFS] fix NULL pointer dereference in xfs_log_force_umount
xfs_log_force_umount may be called very early during log recovery where
If we fail a buffer read in xlog_recover_do_inode_trans we abort the mount.
But at that point log recovery has started delayed writeback of inode
buffers. As part of the aborted mount we try to flush out all delwri
buffers, but at that point we have already freed the superblock, and set
mp->m_sb_bp to NULL, and xfs_log_force_umount which gets called after
the inode buffer writeback trips over it.
Make xfs_log_force_umount a little more careful when accessing mp->m_sb_bp
to avoid this.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
commit b5a20aa2657063cbf3b47fc700603180de4bb554
Merge: cc09c0dc57de7f7d2ed89d480b5653e5f6a32f2c ed313489badef16d700f5a3be50e8fd8f8294bc8
Author: Lachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Date: Fri Nov 28 15:23:52 2008 +1100
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
commit cc09c0dc57de7f7d2ed89d480b5653e5f6a32f2c
Author: Dave Chinner <david@fromorbit.com>
Date: Mon Nov 17 17:37:10 2008 +1100
[XFS] Fix double free of log tickets
When an I/O error occurs during an intermediate commit on a rolling
transaction, xfs_trans_commit() will free the transaction structure
and the related ticket. However, the duplicate transaction that
gets used as the transaction continues still contains a pointer
to the ticket. Hence when the duplicate transaction is cancelled
and freed, we free the ticket a second time.
Add reference counting to the ticket so that we hold an extra
reference to the ticket over the transaction commit. We drop the
extra reference once we have checked that the transaction commit
did not return an error, thus avoiding a double free on commit
error.
Credit to Nick Piggin for tripping over the problem.
SGI-PV: 989741
Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 6307091fe69ae74747298bdcaf43119ad67bda3a
Author: Dave Chinner <david@fromorbit.com>
Date: Mon Nov 10 17:13:23 2008 +1100
[XFS] Avoid using inodes that haven't been completely initialised
The radix tree walks in xfs_sync_inodes_ag and xfs_qm_dqrele_all_inodes()
can find inodes that are still undergoing initialisation. Avoid
them by checking for the the XFS_INEW() flag once we have a reference
on the inode. This flag is cleared once the inode is properly initialised.
SGI-PV: 987246
Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit cb4f0d1d4229f609f43c68acec69c7618ed72397
Author: Dave Chinner <david@fromorbit.com>
Date: Mon Nov 10 17:11:18 2008 +1100
[XFS] fix uninitialised variable bug in dquot release
gcc on ARM warns about an using an uninitialised variable
in xfs_qm_dqrele_all_inodes(). This is a real bug, but gcc
on x86_64 is not reporting this warning so it went unnoticed.
Fix the bug by bring the inode radix tree walk code up to
date with xfs_sync_inodes_ag().
SGI-PV: 987246
Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit d44dab8d1cde8aeba1faf44a7654f90800feb7fc
Author: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon Nov 10 17:06:05 2008 +1100
fs: xfs needs inode_wait to be exported
Since wait_on_inode() references it.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 644c3567d16b7e53cf52ae98c4150d601c9eacfe
Author: Dave Chinner <david@fromorbit.com>
Date: Mon Nov 10 16:50:24 2008 +1100
[XFS] handle memory allocation failures during log initialisation
When there is no memory left in the system, xfs_buf_get_noaddr()
can fail. If this happens at mount time during xlog_alloc_log()
we fail to catch the error and oops.
Catch the error from xfs_buf_get_noaddr(), and allow other memory
allocations to fail and catch those errors too. Report the error
to the console and fail the mount with ENOMEM.
Tested by manually injecting errors into xfs_buf_get_noaddr() and
xlog_alloc_log().
Version 2:
o remove unnecessary casts of the returned pointer from kmem_zalloc()
SGI-PV: 987246
Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit dcd7b4e5c0649b1d2219399529b20de1df517e55
Merge: 75fa67706cce5272bcfc51ed646f2da21f3bdb6e 91b777125175077fb74025608dba87f100586c62
Author: Niv Sardi <xaiki@debian.org>
Date: Fri Nov 7 15:07:12 2008 +1100
Merge branch 'master' of git://oss.sgi.com:8090/xfs/linux-2.6
commit 91b777125175077fb74025608dba87f100586c62
Author: David Howells <dhowells@redhat.com>
Date: Fri Oct 31 15:50:04 2008 +1100
CRED: Wrap task credential accesses in the XFS 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 <dhowells@redhat.com>
Reviewed-by: James Morris <jmorris@namei.org>
Acked-by: Serge Hallyn <serue@us.ibm.com>
commit 6bfb3d065f4c498c17a3a07f3dc08cedff53aff4
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 18:32:43 2008 +1100
[XFS] Fix race when looking up reclaimable inodes
If we get a race looking up a reclaimable inode, we can end up with the
winner proceeding to use the inode before it has been completely
re-initialised. This is a Bad Thing.
Fix the race by checking whether we are still initialising the inod eonce
we have a reference to it, and if so wait for the initialisation to
complete before continuing.
While there, fix a leaked reference count in the same code when
encountering an unlinked inode and we are not doing a lookup for a create
operation.
SGI-PV: 987246
SGI-Modid: xfs-linux-melb:xfs-kern:32429a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit e0b8e8b65d578f5d5538465dff8392cf02e1cc5d
Author: Tim Shimmin <tes@sgi.com>
Date: Thu Oct 30 18:30:48 2008 +1100
[XFS] remove restricted chown parameter from xfs linux
On Linux all filesystems are supposed to be operating under Posix'
restricted chown. Restricted chown means it restricts chown to the owner
unless you have CAP_FOWNER.
NOTE: that 2 files outside of fs/xfs have been modified too for this
change.
Reviewed-by: Dave Chinner <david@fromorbit.com>
SGI-PV: 988919
SGI-Modid: xfs-linux-melb:xfs-kern:32413a
Signed-off-by: Tim Shimmin <tes@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit f3f0d7b026ae34d6ed5ae67cd4dd5909f9cd70a5
Author: Tim Shimmin <tes@sgi.com>
Date: Thu Oct 30 18:30:09 2008 +1100
[XFS] remove restricted chown parameter from xfs linux
On Linux all filesystems are supposed to be operating under Posix'
restricted chown. Restricted chown means it restricts chown to the owner
unless you have CAP_FOWNER.
NOTE: that 2 files outside of fs/xfs have been modified too for this
change.
Reviewed-by: Dave Chinner <david@fromorbit.com>
SGI-PV: 988919
SGI-Modid: 2.6.x-xfs-melb:linux:32413b
Signed-off-by: Tim Shimmin <tes@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit ea5a3dc8356bf1cf27bab9a5a0da5dfbbb82013d
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 18:27:48 2008 +1100
[XFS] kill sys_cred
capable_cred has been unused for a while so we can kill it and sys_cred.
That also means the cred argument to xfs_setattr and xfs_change_file_space
can be removed now.
SGI-PV: 988918
SGI-Modid: xfs-linux-melb:xfs-kern:32412a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Tim Shimmin <tes@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 7ee49acfe54883f16d28d9486b789431a5804d18
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 18:26:51 2008 +1100
[XFS] correctly select first log item to push
Under heavy metadata load we are seeing log hangs. The AIL has items in it
ready to be pushed, and they are within the push target window. However,
we are not pushing them when the last pushed LSN is less than the LSN of
the first log item on the AIL. This is a regression introduced by the AIL
push cursor modifications.
SGI-PV: 987246
SGI-Modid: xfs-linux-melb:xfs-kern:32409a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
commit 9ed0451ee0a13469f7b38e4ced8974036f6d114f
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 18:26:04 2008 +1100
[XFS] free partially initialized inodes using destroy_inode
To make sure we free the security data inodes need to be freed using the
proper VFS helper (which we also need to export for this). We mark these
inodes bad so we can skip the flush path for them.
SGI-PV: 987246
SGI-Modid: xfs-linux-melb:xfs-kern:32398a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
commit 087e3b0460c367d0f4a5b71d7b013968ae23b588
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 18:24:37 2008 +1100
Inode: export symbol destroy_inode
To make sure we free the security data inodes need to be freed using
the proper VFS helper (which we also need to export for this). We mark
these inodes bad so we can skip the flush path for them.
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
commit c679eef0520eb3c2c731fce505e61b8ef9469aac
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 18:04:13 2008 +1100
[XFS] stop using xfs_itobp in xfs_bulkstat
xfs_bulkstat only wants the dinode, offset and buffer from a given inode
number. Instead of using xfs_itobp on a fake inode which is complicated
and currently leads to leaks of the security data just use xfs_inotobp
which is designed to do exactly the kind of lookup xfs_bulkstat wants. The
only thing that's missing in xfs_inotobp is a flags paramter that let's us
pass down XFS_IMAP_BULKSTAT, but that can easily added.
SGI-PV: 987246
SGI-Modid: xfs-linux-melb:xfs-kern:32397a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
commit 455486b9ccdd0a1d7432a03302f549b1c917c181
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 18:03:14 2008 +1100
[XFS] avoid all reclaimable inodes in xfs_sync_inodes_ag
If we are syncing data in xfs_sync_inodes_ag(), the VFS inode must still
be referencable as the dirty data state is carried on the VFS inode. hence
if we can't get a reference via igrab(), the inode must be in reclaim
which implies that it has no dirty data attached.
Leave such inodes to the reclaim code to flush the dirty inode state to
disk and so avoid attempting to access the VFS inode when it may not exist
in xfs_sync_inodes_ag().
Version 4:
o don't reference linux inode until after igrab() succeeds
Version 3:
o converted unlock/rele to an xfs_iput() call.
Version 2:
o change igrab logic to be more linear
o remove initial reclaimable inode check now that we are using
igrab() failure to find reclaimable inodes
o assert that igrab failure occurs only on reclaimable inodes
o clean up inode locking - only grab the iolock if we are doing
a SYNC_DELWRI call and we have a dirty inode.
SGI-PV: 987246
SGI-Modid: xfs-linux-melb:xfs-kern:32391a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Peter Leckie <pleckie@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 56e73ec47d749047f441e6b9d60d964535d31c3b
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:55:27 2008 +1100
[XFS] Can't lock inodes in radix tree preload region
When we are inside a radix tree preload region, we cannot sleep. Recently
we moved the inode locking inside the preload region for the inode radix
tree. Fix that, and fix a missed unlock in another error path in the same
code at the same time.
SGI-PV: 987246
SGI-Modid: xfs-linux-melb:xfs-kern:32385a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit 2b7035fd7473c799ca3372092d72c768c7db329d
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 17:55:18 2008 +1100
[XFS] Trivial xfs_remove comment fixup
The dp to ip comment should be for the unconditional xfs_droplink call,
and the "." link obviously only exists for directories, so it should be in
the is_dir conditional.
SGI-PV: 987246
SGI-Modid: xfs-linux-melb:xfs-kern:32374a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 1ec7944beb6f3c29f1e58a66422130133727e9e1
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 17:55:08 2008 +1100
[XFS] fix biosize option
iosizelog shouldn't be the same as iosize but the logarithm of it. Then
again the current biosize option doesn't make much sense to me as it
doesn't set the preferred I/O size as mentioned in the comment next to it
but rather the allocation size and thus is identical to the allocsize
option (except for the missing logarithm). It's also not documented in
Documentation/filesystems/xfs.txt or the mount manpage.
SGI-PV: 987246
SGI-Modid: xfs-linux-melb:xfs-kern:32373a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 469fc23d5dd172665c69099db776c39bb1b70f92
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 17:54:57 2008 +1100
[XFS] fix the noquota mount option
Noquota should clear all mount options, and not just user and group quota.
Probably doesn't matter very much in real life.
SGI-PV: 987246
SGI-Modid: xfs-linux-melb:xfs-kern:32372a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 9d565ffa33d574c2a22442f9d95ca2bd0be7cc42
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 17:53:24 2008 +1100
[XFS] kill struct xfs_mount_args
No need to parse the mount option into a structure before applying it to
struct xfs_mount.
The content of xfs_start_flags gets merged into xfs_parseargs. Calls
inbetween don't care and can use mount members instead of the args struct.
This patch uncovered that the mount option for shared filesystems wasn't
ever exposed on Linux. The code to handle it is #if 0'ed in this patch
pending a decision on this feature. I'll send a writeup about it to the
list soon.
SGI-PV: 987246
SGI-Modid: xfs-linux-melb:xfs-kern:32371a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 5a792c4579af8466246408e38fd4eff45d8493b8
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:40:09 2008 +1100
[XFS] XFS: Check for valid transaction headers in recovery
When we are about to add a new item to a transaction in recovery, we need
to check that it is valid first. Currently we just assert that header
magic number matches, but in production systems that is not present and we
add a corrupted transaction to the list to be processed. This results in a
kernel oops later when processing the corrupted transaction.
Instead, if we detect a corrupted transaction, abort recovery and leave
the user to clean up the mess that has occurred.
SGI-PV: 988145
SGI-Modid: xfs-linux-melb:xfs-kern:32356a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 783a2f656f9674c31d4019708a94af93fa1d1c22
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:39:58 2008 +1100
[XFS] Finish removing the mount pointer from the AIL API
Change all the remaining AIL API functions that are passed struct
xfs_mount pointers to pass pointers directly to the struct xfs_ail being
used. With this conversion, all external access to the AIL is via the
struct xfs_ail. Hence the operation and referencing of the AIL is almost
entirely independent of the xfs_mount that is using it - it is now much
more tightly tied to the log and the items it is tracking in the log than
it is tied to the xfs_mount.
SGI-PV: 988143
SGI-Modid: xfs-linux-melb:xfs-kern:32353a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit fc1829f34d30899701dfd5890030d39e13e1f47d
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:39:46 2008 +1100
[XFS] Add ail pointer into log items
Add an xfs_ail pointer to log items so that the log items can reference
the AIL directly during callbacks without needed a struct xfs_mount.
SGI-PV: 988143
SGI-Modid: xfs-linux-melb:xfs-kern:32352a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit a9c21c1b9deaced836034e77fe25fe0b55c21f02
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:39:35 2008 +1100
[XFS] Given the log a pointer to the AIL
When we need to go from the log to the AIL, we have to go via the
xfs_mount. Add a xfs_ail pointer to the log so we can go directly to the
AIL associated with the log.
SGI-PV: 988143
SGI-Modid: xfs-linux-melb:xfs-kern:32351a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit c7e8f268278a292d3823b4352182fa7755a71410
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:39:23 2008 +1100
[XFS] Move the AIL lock into the struct xfs_ail
Bring the ail lock inside the struct xfs_ail. This means the AIL can be
entirely manipulated via the struct xfs_ail rather than needing both the
struct xfs_mount and the struct xfs_ail.
SGI-PV: 988143
SGI-Modid: xfs-linux-melb:xfs-kern:32350a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit 7b2e2a31f5c23b5f028af8c895137b4c512cc1c8
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:39:12 2008 +1100
[XFS] Allow 64 bit machines to avoid the AIL lock during flushes
When copying lsn's from the log item to the inode or dquot flush lsn, we
currently grab the AIL lock. We do this because the LSN is a 64 bit
quantity and it needs to be read atomically. The lock is used to guarantee
atomicity for 32 bit platforms.
Make the LSN copying a small function, and make the function used
conditional on BITS_PER_LONG so that 64 bit machines don't need to take
the AIL lock in these places.
SGI-PV: 988143
SGI-Modid: xfs-linux-melb:xfs-kern:32349a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit 5b00f14fbd60d42441f78c0e414a539cbfba5cb9
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:39:00 2008 +1100
[XFS] move the AIl traversal over to a consistent interface
With the new cursor interface, it makes sense to make all the traversing
code use the cursor interface and make the old one go away. This means
more of the AIL interfacing is done by passing struct xfs_ail pointers
around the place instead of struct xfs_mount pointers.
We can replace the use of xfs_trans_first_ail() in xfs_log_need_covered()
as it is only checking if the AIL is empty. We can do that with a call to
xfs_trans_ail_tail() instead, where a zero LSN returned indicates and
empty AIL...
SGI-PV: 988143
SGI-Modid: xfs-linux-melb:xfs-kern:32348a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit 27d8d5fe0ef9daeaafbdd32b14b32a2211930062
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:38:39 2008 +1100
[XFS] Use a cursor for AIL traversal.
To replace the current generation number ensuring sanity of the AIL
traversal, replace it with an external cursor that is linked to the AIL.
Basically, we store the next item in the cursor whenever we want to drop
the AIL lock to do something to the current item. When we regain the lock.
the current item may already be free, so we can't reference it, but the
next item in the traversal is already held in the cursor.
When we move or delete an object, we search all the active cursors and if
there is an item match we clear the cursor(s) that point to the object.
This forces the traversal to restart transparently.
We don't invalidate the cursor on insert because the cursor still points
to a valid item. If the intem is inserted between the current item and the
cursor it does not matter; the traversal is considered to be past the
insertion point so it will be picked up in the next traversal.
Hence traversal restarts pretty much disappear altogether with this method
of traversal, which should substantially reduce the overhead of pushing on
a busy AIL.
Version 2 o add restart logic o comment cursor interface o minor cleanups
SGI-PV: 988143
SGI-Modid: xfs-linux-melb:xfs-kern:32347a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit 82fa9012458d867936d7bf130e6e14bdebc6873c
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:38:26 2008 +1100
[XFS] Allocate the struct xfs_ail
Rather than embedding the struct xfs_ail in the struct xfs_mount, allocate
it during AIL initialisation. Add a back pointer to the struct xfs_ail so
that we can pass around the xfs_ail and still be able to access the
xfs_mount if need be. This is th first step involved in isolating the AIL
implementation from the surrounding filesystem code.
SGI-PV: 988143
SGI-Modid: xfs-linux-melb:xfs-kern:32346a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit a7444053fb3ebd3d905e3c7a7bd5ea80a54b083a
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:38:12 2008 +1100
[XFS] Account for allocated blocks when expanding directories
When we create a directory, we reserve a number of blocks for the maximum
possible expansion of of the directory due to various btree splits,
freespace allocation, etc. Unfortunately, each allocation is not reflected
in the total number of blocks still available to the transaction, so the
maximal reservation is used over and over again.
This leads to problems where an allocation group has only enough blocks
for *some* of the allocations required for the directory modification.
After the first N allocations, the remaining blocks in the allocation
group drops below the total reservation, and subsequent allocations fail
because the allocator will not allow the allocation to proceed if the AG
does not have the enough blocks available for the entire allocation total.
This results in an ENOSPC occurring after an allocation has already
occurred. This results in aborting the directory operation (leaving the
directory in an inconsistent state) and cancelling a dirty transaction,
which results in a filesystem shutdown.
Avoid the problem by reflecting the number of blocks allocated in any
directory expansion in the total number of blocks available to the
modification in progress. This prevents a directory modification from
being aborted part way through with an ENOSPC.
SGI-PV: 988144
SGI-Modid: xfs-linux-melb:xfs-kern:32340a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 8c38ab032094ff1d903c79db689607b1ebae13ca
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:38:00 2008 +1100
[XFS] Prevent looping in xfs_sync_inodes_ag
If the last block of the AG has inodes in it and the AG is an exactly
power-of-2 size then the last inode in the AG points to the last block in
the AG. If we try to find the next inode in the AG by adding one to the
inode number, we increment the inode number past the size of the AG. The
result is that the macro XFS_INO_TO_AGINO() will strip the AG portion of
the inode number and return an inode number of zero.
That is, instead of terminating the lookup loop because we hit the inode
number went outside the valid range for the AG, the search index returns
to zero and we start traversing the radix tree from the start again. This
results in an endless loop in xfs_sync_inodes_ag().
Fix it be detecting if the new search index decreases as a result of
incrementing the current inode number. That indicate an overflow and hence
that we have finished processing the AG so we can terminate the loop.
SGI-PV: 988142
SGI-Modid: xfs-linux-melb:xfs-kern:32335a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit 116545130cbc5214523c2f994a11c81ef9eb9186
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:37:49 2008 +1100
[XFS] kill deleted inodes list
Now that the deleted inodes list is unused, kill it. This also removes the
i_reclaim list head from the xfs_inode, shrinking it by two pointers.
SGI-PV: 988142
SGI-Modid: xfs-linux-melb:xfs-kern:32334a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit 7a3be02baef7bdec43965103441bde5de4dd8601
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:37:37 2008 +1100
[XFS] use the inode radix tree for reclaiming inodes
Use the reclaim tag to walk the radix tree and find the inodes under
reclaim. This was the only user of the deleted inode list.
SGI-PV: 988142
SGI-Modid: xfs-linux-melb:xfs-kern:32333a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit 396beb85311689e38634926058d9a3bb0576ca8a
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:37:26 2008 +1100
[XFS] mark inodes for reclaim via a tag in the inode radix tree
Prepare for removing the deleted inode list by marking inodes for reclaim
in the inode radix trees so that we can use the radix trees to find
reclaimable inodes.
SGI-PV: 988142
SGI-Modid: xfs-linux-melb:xfs-kern:32331a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit 1dc3318ae1c1cc11f9fb8279a806de448e2b90e8
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:37:15 2008 +1100
[XFS] rename inode reclaim functions
The function names xfs_finish_reclaim and xfs_finish_reclaim_all are not
very descriptive of what they are reclaiming. Rename to
xfs_reclaim_inode[s] to match the xfs_sync_inodes() function.
SGI-PV: 988142
SGI-Modid: xfs-linux-melb:xfs-kern:32330a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit fce08f2f3bd0d08feeb4cea70e44aa3471d9bb4c
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:37:03 2008 +1100
[XFS] move inode reclaim functions to xfs_sync.c
Background inode reclaim is run by the xfssyncd. Move the reclaim worker
functions to be close to the sync code as the are very similar in
structure and are both run from the same background thread.
SGI-PV: 988142
SGI-Modid: xfs-linux-melb:xfs-kern:32329a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit 493dca6178cf4a6ae2a16c602d6cb455bb7d31bd
Author: Lachlan McIlroy <lachlan@sgi.com>
Date: Thu Oct 30 17:36:52 2008 +1100
[XFS] Fix build warning - xfs_fs_alloc_inode() needs a return statement
SGI-PV: 988141
SGI-Modid: xfs-linux-melb:xfs-kern:32325a
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 99fa8cb3c580d4445fe8fc239454e8f37a3b6847
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:36:40 2008 +1100
[XFS] Prevent use-after-free caused by synchronous inode reclaim
With the combined linux and XFS inode, we need to ensure that the combined
structure is not freed before the generic code is finished with the inode.
As it turns out, there is a case where the XFS inode is freed before the
linux inode - when xfs_reclaim() is called from ->clear_inode() on a clean
inode, the xfs inode is freed during that call. The generic code
references the inode after the ->clear_inode() call, so this is a use
after free situation.
Fix the problem by moving the xfs_reclaim() call to ->destroy_inode()
instead of in ->clear_inode(). This ensures the combined inode structure
is not freed until after the generic code has finished with it.
SGI-PV: 988141
SGI-Modid: xfs-linux-melb:xfs-kern:32324a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit bf904248a2adb3f3be4eb4fb1837ce3bb28cca76
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:36:14 2008 +1100
[XFS] Combine the XFS and Linux inodes
To avoid issues with different lifecycles of XFS and Linux inodes, embedd
the linux inode inside the XFS inode. This means that the linux inode has
the same lifecycle as the XFS inode, even when it has been released by the
OS. XFS inodes don't live much longer than this (a short stint in reclaim
at most), so there isn't significant memory usage penalties here.
Version 3 o kill xfs_icount()
Version 2 o remove unused commented out code from xfs_iget(). o kill
useless cast in VFS_I()
SGI-PV: 988141
SGI-Modid: xfs-linux-melb:xfs-kern:32323a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit 8290c35f87304a6b73d4fd17b03580b4f7425de8
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:35:24 2008 +1100
Inode: Allow external list initialisation
To allow XFS to combine the XFS and linux inodes into a single
structure, we need to drive inode lookup from the XFS inode cache,
not the generic inode cache. This means that we need initialise a
struct inode from a context outside alloc_inode() as it is no longer
used by XFS.
After inode allocation and initialisation, we need to add the inode
to the superblock list, the in-use list, hash it and do some
accounting. This all needs to be done with the inode_lock held and
there are already several places in fs/inode.c that do this list
manipulation. Factor out the common code, add a locking wrapper and
export the function so ti can be called from XFS.
Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 2cb1599f9b2ecdd7a9e59feeee647eb258966839
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:32:23 2008 +1100
Inode: Allow external initialisers
To allow XFS to combine the XFS and linux inodes into a single
structure, we need to drive inode lookup from the XFS inode cache,
not the generic inode cache. This means that we need initialise a
struct inode from a context outside alloc_inode() as it is no longer
used by XFS.
Factor and export the struct inode initialisation code from
alloc_inode() to inode_init_always() as a counterpart to
inode_init_once(). i.e. we have to call this init function for each
inode instantiation (always), as opposed inode_init_once() which is
only called on slab object instantiation (once).
Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 94b97e39b0c983e86f0028c456dcf213abc722a0
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:21:30 2008 +1100
[XFS] Never call mark_inode_dirty_sync() directly
Once the Linux inode and the XFS inode are combined, we cannot rely on
just check if the linux inode exists as a method of determining if it is
valid or not. Hence we should always call xfs_mark_inode_dirty_sync()
instead as it does the correct checks to determine if the liinux inode is
in a valid state or not.
SGI-PV: 988141
SGI-Modid: xfs-linux-melb:xfs-kern:32318a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit 6441e549157b749bae003cce70b4c8b62e4801fa
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:21:19 2008 +1100
[XFS] factor xfs_iget_core() into hit and miss cases
There are really two cases in xfs_iget_core(). The first is the cache hit
case, the second is the miss case. They share very little code, and hence
can easily be factored out into separate functions. This makes the code
much easier to understand and subsequently modify.
SGI-PV: 988141
SGI-Modid: xfs-linux-melb:xfs-kern:32317a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit 3471394ba56f44761ce1c300f139478dbfb49d4a
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 17:21:10 2008 +1100
[XFS] fix instant oops with tracing enabled
We can only read inode->i_count if the inode is actually there and not a
NULL pointer. This was introduced in one of the recent sync patches.
SGI-PV: 988255
SGI-Modid: xfs-linux-melb:xfs-kern:32315a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 76bf105cb16da6c847a13a3c77dc962ba1081713
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:16:21 2008 +1100
[XFS] Move remaining quiesce code.
With all the other filesystem sync code it in xfs_sync.c including the
data quiesce code, it makes sense to move the remaining quiesce code to
the same place.
SGI-PV: 988140
SGI-Modid: xfs-linux-melb:xfs-kern:32312a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit a4e4c4f4a8f9376158f8181a75285091f52a79e3
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:16:11 2008 +1100
[XFS] Kill xfs_sync()
There are no more callers to xfs_sync() now, so remove the function
altogther.
SGI-PV: 988140
SGI-Modid: xfs-linux-melb:xfs-kern:32311a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit cb56a4b995d44b7990ca3acd18db571eedd0649f
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:16:00 2008 +1100
[XFS] Kill SYNC_CLOSE
SYNC_CLOSE is only ever used and checked in conjunction with SYNC_WAIT,
and this only done in one spot. The only thing this does is make
XFS_bflush() calls to the data buftargs.
This will happen very shortly afterwards the xfs_sync() call anyway in the
unmount path via the xfs_close_devices(), so this code is redundant and
can be removed. That only user of SYNC_CLOSE is now gone, so kill the flag
completely.
SGI-PV: 988140
SGI-Modid: xfs-linux-melb:xfs-kern:32310a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit e9f1c6ee12955fd8657f6f0f9a3d09112b1f1fdd
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:15:50 2008 +1100
[XFS] make SYNC_DELWRI no longer use xfs_sync
Continue to de-multiplex xfs_sync be replacing all SYNC_DELWRI callers
with direct calls functions that do the work. Isolate the data quiesce
case to a function in xfs_sync.c. Isolate the FSDATA case with explicit
calls to xfs_sync_fsdata().
Version 2: o Push delwri related log forces into xfs_sync_inodes().
SGI-PV: 988140
SGI-Modid: xfs-linux-melb:xfs-kern:32309a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit be97d9d5577f6c8a36588e2f262c772c5422b128
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:15:38 2008 +1100
[XFS] make SYNC_ATTR no longer use xfs_sync
Continue to de-multiplex xfs_sync be replacing all SYNC_ATTR callers with
direct calls xfs_sync_inodes(). Add an assert into xfs_sync() to ensure we
caught all the SYNC_ATTR callers.
SGI-PV: 988140
SGI-Modid: xfs-linux-melb:xfs-kern:32308a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit aacaa880bfac8fecd44b279a49688643890358f5
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:15:29 2008 +1100
[XFS] xfssyncd: don't call xfs_sync
Start de-multiplexing xfs_sync() by making xfs_sync_worker() call the
specific sync functions it needs. This is only a small, unique subset of
the entire xfs_sync() code so is easier to follow.
SGI-PV: 988140
SGI-Modid: xfs-linux-melb:xfs-kern:32307a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit dfd837a9eb79de4e50323a6f4e1ad8138d806cb7
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:15:21 2008 +1100
[XFS] kill xfs_syncsub
Now that the only caller is xfs_sync(), merge the two together as it makes
no sense to keep them separate.
SGI-PV: 988140
SGI-Modid: xfs-linux-melb:xfs-kern:32306a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit 2030b5aba8a4bcaca5aca85968514fa58207d3bd
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:15:12 2008 +1100
[XFS] use xfs_sync_inodes rather than xfs_syncsub
Kill the unused arg in xfs_syncsub() and xfs_sync_inodes(). For callers of
xfs_syncsub() that only want to flush inodes, replace xfs_syncsub() with
direct calls to xfs_sync_inodes() as that is all that is being done with
the specific flags being passed in.
SGI-PV: 988140
SGI-Modid: xfs-linux-melb:xfs-kern:32305a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit bc60a99323b3ec628273b5fa998285c87d464ca6
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:15:03 2008 +1100
[XFS] Use struct inodes instead of vnodes to kill vn_grab
With the sync code relocated to the linux-2.6 directory we can use struct
inodes directly. If we do the same thing for the quota release code, we
can remove vn_grab altogether. While here, convert the VN_BAD() checks to
is_bad_inode() so we can remove vnodes entirely from this code.
SGI-PV: 988140
SGI-Modid: xfs-linux-melb:xfs-kern:32304a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit 2af75df7be7ca86965bf73766f827575d1c26fbd
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 17:14:53 2008 +1100
[XFS] split out two helpers from xfs_syncsub
Split out two helpers from xfs_syncsub for the dummy log commit and the
superblock writeout.
SGI-PV: 988140
SGI-Modid: xfs-linux-melb:xfs-kern:32303a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 4e8938feba770b583fb13d249c17943961731a3e
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 17:14:43 2008 +1100
[XFS] Move XFS_BMAP_SANITY_CHECK out of line.
Move the XFS_BMAP_SANITY_CHECK macro out of line and make it a properly
typed function. Also pass the xfs_buf for the btree block instead of just
the btree block header, as we will need some additional information for it
to implement CRC checking of btree blocks.
SGI-PV: 988146
SGI-Modid: xfs-linux-melb:xfs-kern:32301a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 7cc95a821df8f09a5d37a923cf8c3a7c3ee00c29
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 17:14:34 2008 +1100
[XFS] Always use struct xfs_btree_block instead of short / longform
structures.
Always use the generic xfs_btree_block type instead of the short / long
structures. Add XFS_BTREE_SBLOCK_LEN / XFS_BTREE_LBLOCK_LEN defines for
the length of a short / long form block. The rationale for this is that we
will grow more btree block header variants to support CRCs and other RAS
information, and always accessing them through the same datatype with
unions for the short / long form pointers makes implementing this much
easier.
SGI-PV: 988146
SGI-Modid: xfs-linux-melb:xfs-kern:32300a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 136341b41ad4883bd668120f727a52c42331fe8a
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 17:11:40 2008 +1100
[XFS] cleanup btree record / key / ptr addressing macros.
Replace the generic record / key / ptr addressing macros that use cpp
token pasting with simpler macros that do the job for just one given btree
type. The new macros lose the cur argument and thus can be used outside
the core btree code, but also gain an xfs_mount * argument to allow for
checking the CRC flag in the near future. Note that many of these macros
aren't actually used in the kernel code, but only in userspace (mostly in
xfs_repair).
SGI-PV: 988146
SGI-Modid: xfs-linux-melb:xfs-kern:32295a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 6c7699c047c50403149ad91331dd39de47dea070
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:11:29 2008 +1100
[XFS] remove the mount inode list
Now we've removed all users of the mount inode list, we can kill it. This
reduces the size of the xfs_inode by 2 pointers.
SGI-PV: 988139
SGI-Modid: xfs-linux-melb:xfs-kern:32293a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit 60197e8df364df326dcbb987519f367ad0ee1a11
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 17:11:19 2008 +1100
[XFS] Cleanup maxrecs calculation.
Clean up the way the maximum and minimum records for the btree blocks are
calculated. For the alloc and inobt btrees all the values are
pre-calculated in xfs_mount_common, and we switch the current loop around
the ugly generic macros that use cpp token pasting to generate type names
to two small helpers in normal C code. For the bmbt and bmdr trees these
helpers also exist, but can be called during runtime, too. Here we also
kill various macros dealing with them and inline the logic into the
get_minrecs / get_maxrecs / get_dmaxrecs methods in xfs_bmap_btree.c.
Note that all these new helpers take an xfs_mount * argument which will be
needed to determine the size of a btree block once we add support for
extended btree blocks with CRCs and other RAS information.
SGI-PV: 988146
SGI-Modid: xfs-linux-melb:xfs-kern:32292a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 5b4d89ae0f5ae45c7fa1dfc616fd2bb8634bb7b7
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:08:03 2008 +1100
[XFS] Traverse inode trees when releasing dquots
Make releasing all inode dquots traverse the per-ag inode radix trees
rather than the mount inode list. This removes another user of the mount
inode list.
Version 3 o fix comment relating to avoiding trying to release the
quota inodes and those in reclaim.
Version 2 o add comment explaining use of gang lookups for a single inode
o use IRELE, not VN_RELE o move check for ag initialisation to caller.
SGI-PV: 988139
SGI-Modid: xfs-linux-melb:xfs-kern:32291a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit 683a897080a053733778b36398186cb1b22c377f
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:07:29 2008 +1100
[XFS] Use the inode tree for finding dirty inodes
Update xfs_sync_inodes to walk the inode radix tree cache to find dirty
inodes. This removes a huge bunch of nasty, messy code for traversing the
mount inode list safely and removes another user of the mount inode list.
Version 3 o rediff against new linux-2.6/xfs_sync.c code
Version 2 o add comment explaining use of gang lookups for a single inode
o use IRELE, not VN_RELE o move check for ag initialisation to caller.
SGI-PV: 988139
SGI-Modid: xfs-linux-melb:xfs-kern:32290a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit 2f8a3ce1c20f20e6494cdb77fed76bc474ca3ca5
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:07:20 2008 +1100
[XFS] don't block in xfs_qm_dqflush() during async writeback.
Normally dquots are written back via delayed write mechanisms. They are
flushed to their backing buffer by xfssyncd, which is then pushed out by
either AIL or xfsbufd flushing. The flush from the xfssyncd is supposed to
be non-blocking, but xfs_qm_dqflush() always waits for pinned duots, which
means that it will block for the length of time it takes to do a
synchronous log force. This causes unnecessary extra log I/O to be issued
whenever we try to flush a busy dquot.
Avoid the log forces and blocking xfssyncd by making xfs_qm_dqflush() pay
attention to what type of sync it is doing when it sees a pinned dquot and
not waiting when doing non-blocking flushes.
SGI-PV: 988147
SGI-Modid: xfs-linux-melb:xfs-kern:32287a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Peter Leckie <pleckie@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 75c68f411b1242c8fdaf731078fdd4e77b14981d
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:06:28 2008 +1100
[XFS] Remove xfs_iflush_all and clean up xfs_finish_reclaim_all()
xfs_iflush_all() walks the m_inodes list to find inodes that need
reclaiming. We already have such a list - the m_del_inodes list. Replace
xfs_iflush_all() with a call to xfs_finish_reclaim_all() and clean up
xfs_finish_reclaim_all() to handle the different flush modes now needed.
Originally based on a patch from Christoph Hellwig.
Version 3 o rediff against new linux-2.6/xfs_sync.c code
Version 2 o revert xfs_syncsub() inode reclaim behaviour back to original
code o xfs_quiesce_fs() should use XFS_IFLUSH_DELWRI_ELSE_ASYNC, not
XFS_IFLUSH_ASYNC, to prevent change of behaviour.
SGI-PV: 988139
SGI-Modid: xfs-linux-melb:xfs-kern:32284a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit a167b17e899a930758506bbc18748078d6fd8c89
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:06:18 2008 +1100
[XFS] move xfssyncd code to xfs_sync.c
Move all the xfssyncd code to the new xfs_sync.c file. This places it
closer to the actual code that it interacts with, rather than just being
associated with high level VFS code.
SGI-PV: 988139
SGI-Modid: xfs-linux-melb:xfs-kern:32283a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit fe4fa4b8e463fa5848ef9e86ed75d27501d0da1e
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 17:06:08 2008 +1100
[XFS] move sync code to its own file
The sync code in XFS is spread around several files. While it used to make
sense to have such a distribution, the code is about to be cleaned up and
so centralising it in one spot as the first step makes sense.
SGI-PV: 988139
SGI-Modid: xfs-linux-melb:xfs-kern:32282a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit 34519daae6778d129d56688f75ade27f6011bac9
Author: Barry Naujok <bnaujok@sgi.com>
Date: Thu Oct 30 17:05:58 2008 +1100
[XFS] Show buffer address with debug hexdump on corruption
SGI-PV: 987246
SGI-Modid: xfs-linux-melb:xfs-kern:32233a
Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 89b2839319cb0c0364d55dc6fd6d3838e864ab54
Author: Barry Naujok <bnaujok@sgi.com>
Date: Thu Oct 30 17:05:49 2008 +1100
[XFS] Check agf_btreeblks is valid when reading in the AGF
SGI-PV: 987683
SGI-Modid: xfs-linux-melb:xfs-kern:32232a
Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 847fff5ca881670ca8ec617afeb943950f0c804b
Author: Barry Naujok <bnaujok@sgi.com>
Date: Thu Oct 30 17:05:38 2008 +1100
[XFS] Sync up kernel and user-space headers
SGI-PV: 986558
SGI-Modid: xfs-linux-melb:xfs-kern:32231a
Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 24ee0e49c9cce23acb1758728cb09e8d2b53bd33
Author: Lachlan McIlroy <lachlan@sgi.com>
Date: Thu Oct 30 17:05:26 2008 +1100
[XFS] Make xfs_btree_check_ptr() debug-only code.
SGI-PV: 985583
SGI-Modid: xfs-linux-melb:xfs-kern:32224a
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit d1de802155341ab63e64d37c58c61d6f358bb3ad
Author: Peter Leckie <pleckie@sgi.com>
Date: Thu Oct 30 17:05:18 2008 +1100
[XFS] Fix build brakage from patch "Clean up dquot pincount code"
This is a fix for patch " Clean up dquot pincount code" which introduced a
build breakage due to a missing & in xfs_qm_dquot_logitem_pin.
SGI-PV: 986789
SGI-Modid: xfs-linux-melb:xfs-kern:32221a
Signed-off-by: Peter Leckie <pleckie@sgi.com>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit bc3048e3cd3806ccfd5b16b1a30e5d6013abbd3d
Author: Peter Leckie <pleckie@sgi.com>
Date: Thu Oct 30 17:05:04 2008 +1100
[XFS] Clean up dquot pincount code.
This is a code cleanup and optimization that removes a per mount point
spinlock from the quota code and cleans up the code.
The patch changes the pincount from being an int protected by a spinlock
to an atomic_t allowing the pincount to be manipulated without holding the
spinlock.
This cleanup also protects against random wakup's of both the aild and
xfssyncd by reevaluating the pincount after been woken. Two latter patches
will address the Spurious wakeups.
SGI-PV: 986789
SGI-Modid: xfs-linux-melb:xfs-kern:32215a
Signed-off-by: Peter Leckie <pleckie@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit d112f2984592acb774187b3adddc107fb0825500
Author: Lachlan McIlroy <lachlan@sgi.com>
Date: Thu Oct 30 16:59:06 2008 +1100
[XFS] Wait for all I/O on truncate to zero file size
It's possible to have outstanding xfs_ioend_t's queued when the file size
is zero. This can happen in the direct I/O path when a direct I/O write
fails due to ENOSPC. In this case the xfs_ioend_t will still be queued (ie
xfs_end_io_direct() does not know that the I/O failed so can't force the
xfs_ioend_t to be flushed synchronously).
When we truncate a file on unlink we don't know to wait for these
xfs_ioend_ts and we can have a use-after-free situation if the inode is
reclaimed before the xfs_ioend_t is finally processed.
As was suggested by Dave Chinner lets wait for all I/Os to complete when
truncating the file size to zero.
SGI-PV: 981668
SGI-Modid: xfs-linux-melb:xfs-kern:32216a
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit 7f7c39ccb6045cf1fd5e7684a484c445291b44d4
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 16:58:50 2008 +1100
[XFS] make btree tracing generic
Make the existing bmap btree tracing generic so that it applies to all
btree types.
Some fragments lifted from a patch by Dave Chinner.
This adds two files that were missed from the previous btree tracing
checkin.
SGI-PV: 985583
SGI-Modid: xfs-linux-melb:xfs-kern:32210a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
commit 3cc7524c8445e6244b055f3fa338529188c7c260
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 16:58:41 2008 +1100
[XFS] mark various functions in xfs_btree.c static
Lots of functionality in xfs_btree.c isn't needed by callers outside of
this file anymore, so mark these functions static.
SGI-PV: 985583
SGI-Modid: xfs-linux-melb:xfs-kern:32209a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
commit 4a26e66e7728112f0e1cd7eca3bcc430b3a221c9
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 16:58:32 2008 +1100
[XFS] add keys_inorder and recs_inorder btree methods
Add methods to check whether two keys/records are in the righ order. This
replaces the xfs_btree_check_key and xfs_btree_check_rec methods. For the
callers from xfs_bmap.c just opencode the bmbt-specific asserts.
SGI-PV: 985583
SGI-Modid: xfs-linux-melb:xfs-kern:32208a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
commit fd6bcc5b63051392ba709a8fd33173b263669e0a
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 16:58:21 2008 +1100
[XFS] kill xfs_bmbt_log_block and xfs_bmbt_log_recs
These are equivalent to the xfs_btree_* versions, and the only remaining
caller can be switched to the generic one after they are exported. Also
remove some now dead infrastructure in xfs_bmap_btree.c.
SGI-PV: 985583
SGI-Modid: xfs-linux-melb:xfs-kern:32207a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
commit 8cc938fe4237e50bea4aa557ed53b06de2319d49
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 16:58:11 2008 +1100
[XFS] implement generic xfs_btree_get_rec
Not really much reason to make it generic given that it's so small, but
this is the last non-method in xfs_alloc_btree.c and xfs_ialloc_btree.c,
so it makes the whole btree implementation more structured.
SGI-PV: 985583
SGI-Modid: xfs-linux-melb:xfs-kern:32206a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
commit 91cca5df9bc85efdabfa645f51d54259ed09f4bf
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 16:58:01 2008 +1100
[XFS] implement generic xfs_btree_delete/delrec
Make the btree delete code generic. Based on a patch from David Chinner
with lots of changes to follow the original btree implementations more
closely. While this loses some of the generic helper routines for
inserting/moving/removing records it also solves some of the one off bugs
in the original code and makes it easier to verify.
SGI-PV: 985583
SGI-Modid: xfs-linux-melb:xfs-kern:32205a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
commit d4b3a4b7dd62f2e111d4d0afa9ef3f9b6cd955c0
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 16:57:51 2008 +1100
[XFS] move xfs_bmbt_killroot to common code
xfs_bmbt_killroot is a mostly generic implementation of moving from a real
block based root to an inode based root. So move it to xfs_btree.c where
it can use all the nice infrastructure there and make it pointer size
agnostic
The new name for it is xfs_btree_kill_iroot, following the old naming but
making it clear we're dealing with the root in inode case here, and to
avoid confusion with xfs_btree_new_root which is used for the not inode
rooted case. I've also added a comment describing what it does and why
it's named the way it is.
SGI-PV: 985583
SGI-Modid: xfs-linux-melb:xfs-kern:32203a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
commit 4b22a57188d87e873346b73c227607715be96399
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 16:57:40 2008 +1100
[XFS] implement generic xfs_btree_insert/insrec
Make the btree insert code generic. Based on a patch from David Chinner
with lots of changes to follow the original btree implementations more
closely. While this loses some of the generic helper routines for
inserting/moving/removing records it also solves some of the one off bugs
in the original code and makes it easier to verify.
SGI-PV: 985583
SGI-Modid: xfs-linux-melb:xfs-kern:32202a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
commit ea77b0a66e6c910ef265d9af522d6303ea6b3055
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 16:57:28 2008 +1100
[XFS] move xfs_bmbt_newroot to common code
xfs_bmbt_newroot is a mostly generic implementation of moving from an
inode root to a real block based root. So move it to xfs_btree.c where it
can use all the nice infrastructure there and make it pointer size
agnostic
The new name for it is xfs_btree_new_iroot, following the old naming but
making it clear we're dealing with the root in inode case here, and to
avoid confusion with xfs_btree_new_root which is used for the not inode
rooted case.
SGI-PV: 985583
SGI-Modid: xfs-linux-melb:xfs-kern:32201a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
commit 344207ce8474b79be331eb93e6df4cb5bdd48ab2
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 16:57:16 2008 +1100
[XFS] implement semi-generic xfs_btree_new_root
From: Dave Chinner <dgc@sgi.com>
Add a xfs_btree_new_root helper for the alloc and ialloc btrees. The bmap
btree needs it's own version and is not converted.
[hch: split out from bigger patch and minor adaptions]
SGI-PV: 985583
SGI-Modid: xfs-linux-melb:xfs-kern:32200a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
commit f5eb8e7ca58bc1e92436614444006120d21668ba
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 16:57:03 2008 +1100
[XFS] implement generic xfs_btree_split
Make the btree split code generic. Based on a patch from David Chinner
with lots of changes to follow the original btree implementations more
closely. While this loses some of the generic helper routines for
inserting/moving/removing records it also solves some of the one off bugs
in the original code and makes it easier to verify.
SGI-PV: 985583
SGI-Modid: xfs-linux-melb:xfs-kern:32198a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
commit 687b890a184fef263ebb773926e1f4aa69240d01
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 16:56:53 2008 +1100
[XFS] implement generic xfs_btree_lshift
Make the btree left shift code generic. Based on a patch from David
Chinner with lots of changes to follow the original btree implementations
more closely. While this loses some of the generic helper routines for
inserting/moving/removing records it also solves some of the one off bugs
in the original code and makes it easier to verify.
SGI-PV: 985583
SGI-Modid: xfs-linux-melb:xfs-kern:32197a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
commit 9eaead51bed957af0070a277d945744a76df0c8b
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 16:56:43 2008 +1100
[XFS] implement generic xfs_btree_rshift
Make the btree right shift code generic. Based on a patch from David
Chinner with lots of changes to follow the original btree implementations
more closely. While this loses some of the generic helper routines for
inserting/moving/removing records it also solves some of the one off bugs
in the original code and makes it easier to verify.
SGI-PV: 985583
SGI-Modid: xfs-linux-melb:xfs-kern:32196a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
commit 278d0ca14e889c3932a05d1a68675252a12b3466
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 16:56:32 2008 +1100
[XFS] implement generic xfs_btree_update
From: Dave Chinner <dgc@sgi.com>
The most complicated part here is the lastrec tracking for the alloc
btree. Most logic is in the update_lastrec method which has to do some
hopefully good enough dirty magic to maintain it.
[hch: split out from bigger patch and a rework of the lastrec
logic]
SGI-PV: 985583
SGI-Modid: xfs-linux-melb:xfs-kern:32194a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
commit 38bb74237d2d94c1aced2ec626d7d0f317e360da
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 16:56:22 2008 +1100
[XFS] implement generic xfs_btree_updkey
From: Dave Chinner <dgc@sgi.com>
Note that there are many > 80 char lines introduced due to the
xfs_btree_key casts. But the places where this happens is throw-away code
once the whole btree code gets merged into a common implementation.
The same is true for the temporary xfs_alloc_log_keys define to the new
name. All old users will be gone after a few patches.
[hch: split out from bigger patch and minor adaptions]
SGI-PV: 985583
SGI-Modid: xfs-linux-melb:xfs-kern:32193a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
commit fe033cc848489851f0c7de48f0b1bab5d744ad8a
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 16:56:09 2008 +1100
[XFS] implement generic xfs_btree_lookup
From: Dave Chinner <dgc@sgi.com>
[hch: split out from bigger patch and minor adaptions]
SGI-PV: 985583
SGI-Modid: xfs-linux-melb:xfs-kern:32192a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
commit 8df4da4a0a642d3a016028c0d922bcb4d5a4a6d7
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 16:55:58 2008 +1100
[XFS] implement generic xfs_btree_decrement
From: Dave Chinner <dgc@sgi.com>
[hch: split out from bigger patch and minor adaptions]
SGI-PV: 985583
SGI-Modid: xfs-linux-melb:xfs-kern:32191a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
commit 637aa50f461b8ea6b1e8bf9877b0d13d00085043
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 16:55:45 2008 +1100
[XFS] implement generic xfs_btree_increment
From: Dave Chinner <dgc@sgi.com>
Because this is the first major generic btree routine this patch includes
some infrastrucure, first a few routines to deal with a btree block that
can be either in short or long form, second xfs_btree_read_buf_block,
which is the new central routine to read a btree block given a cursor, and
third the new xfs_btree_ptr_addr routine to calculate the address for a
given btree pointer record.
[hch: split out from bigger patch and minor adaptions]
SGI-PV: 985583
SGI-Modid: xfs-linux-melb:xfs-kern:32190a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
commit 65f1eaeac0efc968797f3ac955b85ba3f5d4f9c8
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 16:55:34 2008 +1100
[XFS] add helpers for addressing entities inside a btree block
Add new helpers in xfs_btree.c to find the record, key and block pointer
entries inside a btree block. To implement this genericly the
->get_maxrecs methods and two new xfs_btree_ops entries for the key and
record sizes are used. Also add a big comment describing how the
addressing inside a btree block works.
Note that these helpers are unused until users are introduced in the next
patches and this patch will thus cause some harmless compiler warnings.
SGI-PV: 985583
SGI-Modid: xfs-linux-melb:xfs-kern:32189a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
commit ce5e42db421a41b1ad0cfd68c6058566b963e14b
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 16:55:23 2008 +1100
[XFS] add get_maxrecs btree operation
Factor xfs_btree_maxrecs into a per-btree operation.
The get_maxrecs method is based on a patch from Dave Chinner.
SGI-PV: 985583
SGI-Modid: xfs-linux-melb:xfs-kern:32188a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
commit 8c4ed633e65d0bd0a25d45aad9b4646e3236cad7
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 16:55:13 2008 +1100
[XFS] make btree tracing generic
Make the existing bmap btree tracing generic so that it applies to all
btree types.
Some fragments lifted from a patch by Dave Chinner.
SGI-PV: 985583
SGI-Modid: xfs-linux-melb:xfs-kern:32187a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
commit 854929f05831d3a290a802815ee955b96c740c61
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 16:55:03 2008 +1100
[XFS] add new btree statistics
From: Dave Chinner <dgc@sgi.com>
Introduce statistics coverage of all the btrees and cover all the btree
operations, not just some.
Invaluable for determining test code coverage of all the btree
operations....
SGI-PV: 985583
SGI-Modid: xfs-linux-melb:xfs-kern:32184a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
commit a23f6ef8ce966abc0f6e24a81ceb6a74ed30693b
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 16:54:53 2008 +1100
[XFS] refactor btree validation helpers
Move the various btree validation helpers around in xfs_btree.c so that
they are close to each other and in common #ifdef DEBUG sections.
Also add a new xfs_btree_check_ptr helper to check a btree ptr that can be
either long or short form.
Split out from a bigger patch from Dave Chinner with various small changes
applied by me.
SGI-PV: 985583
SGI-Modid: xfs-linux-melb:xfs-kern:32183a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
commit b524bfeee2152fa64b6210f28ced80489b9d2439
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 16:54:43 2008 +1100
[XFS] refactor xfs_btree_readahead
From: Dave Chinner <dgc@sgi.com>
Refactor xfs_btree_readahead to make it more readable:
(a) remove the inline xfs_btree_readahead wrapper and move all checks out
of line into the main routine.
(b) factor out helpers for short/long form btrees
(c) move check for root in inodes from the callers into
xfs_btree_readahead
[hch: split out from a big patch and minor cleanups]
SGI-PV: 985583
SGI-Modid: xfs-linux-melb:xfs-kern:32182a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
commit e99ab90d6a9e8ac92f05d2c31d44aa7feee15394
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 16:54:33 2008 +1100
[XFS] add a long pointers flag to xfs_btree_cur
Add a flag to the xfs btree cursor when using long (64bit) block pointers
instead of checking btnum == XFS_BTNUM_BMAP.
SGI-PV: 985583
SGI-Modid: xfs-linux-melb:xfs-kern:32181a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
commit 8186e517fab1854554c48955cdbcbb6710e7baef
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 16:54:22 2008 +1100
[XFS] make btree root in inode support generic
The bmap btree is rooted in the inode and not in a disk block. Make the
support for this feature more generic by adding a btree flag to for this
feature instead of relying on the XFS_BTNUM_BMAP btnum check.
Also clean up xfs_btree_get_block where this new flag is used.
Based upon a patch from Dave Chinner.
SGI-PV: 985583
SGI-Modid: xfs-linux-melb:xfs-kern:32180a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
commit de227dd9604934d2a6d33cd332d1be431719c93e
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 16:54:12 2008 +1100
[XFS] add generic btree types
Add generic union types for btree pointers, keys and records. The generic
btree pointer contains either a 32 and 64bit big endian scalar for short
and long form btrees, and the key and record contain the relevant type for
each possible btree.
Split out from a bigger patch from Dave Chinner and simplified a little
further.
SGI-PV: 985583
SGI-Modid: xfs-linux-melb:xfs-kern:32178a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
commit 561f7d17390d00444e6cd0b02b7516c91528082e
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 16:53:59 2008 +1100
[XFS] split up xfs_btree_init_cursor
xfs_btree_init_cursor contains close to little shared code for the
different btrees and will get even more non-common code in the future.
Split it up into one routine per btree type.
Because xfs_btree_dup_cursor needs to call the init routine for a generic
btree cursor add a new btree operation vector that contains a dup_cursor
method that initializes a new cursor based on an existing one.
The btree operations vector is based on an idea and code from Dave Chinner
and will grow more entries later during this series.
SGI-PV: 985583
SGI-Modid: xfs-linux-melb:xfs-kern:32176a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
commit f2277f06e626d694e61bb356524ff536ced24acf
Author: Christoph Hellwig <hch@infradead.org>
Date: Thu Oct 30 16:53:47 2008 +1100
[XFS] kill struct xfs_btree_hdr
This type is only embedded in struct xfs_btree_block and never used
directly. By moving the fields directly into struct xfs_btree_block a lot
of the macros for struct xfs_btree_sblock and struct xfs_btree_lblock can
be used for struct xfs_btree_block too now which helps greatly with some
of the migrations during implementing the generic btree code.
SGI-PV: 985583
SGI-Modid: xfs-linux-melb:xfs-kern:32174a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
commit f338f9036400e453ab553b16639a9cc838b02d44
Author: Lachlan McIlroy <lachlan@sgi.com>
Date: Thu Oct 30 16:53:38 2008 +1100
[XFS] Unlock inode before calling xfs_idestroy()
Lock debugging reported the ilock was being destroyed without being
unlocked. We don't need to lock the inode until we are going to insert it
into the radix tree.
SGI-PV: 987246
SGI-Modid: xfs-linux-melb:xfs-kern:32159a
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
commit a357a1215602f79182abdde27aaddc7166dbd709
Author: Lachlan McIlroy <lachlan@sgi.com>
Date: Thu Oct 30 16:53:25 2008 +1100
[XFS] Fix use-after-free with log and quotas
Destroying the quota stuff on unmount can access the log - ie
XFS_QM_DONE() ends up in xfs_dqunlock() which calls
xfs_trans_unlocked_item() and then xfs_log_move_tail(). By this time the
log has already been destroyed. Just move the cleanup of the quota code
earlier in xfs_unmountfs() before the call to xfs_log_unmount(). Moving
XFS_QM_DONE() up near XFS_QM_DQPURGEALL() seems like a good spot.
SGI-PV: 987086
SGI-Modid: xfs-linux-melb:xfs-kern:32148a
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Peter Leckie <pleckie@sgi.com>
commit 46039928c9abe466ed1bc0da20c2e596b1d41236
Author: Barry Naujok <bnaujok@sgi.com>
Date: Thu Oct 30 16:52:35 2008 +1100
[XFS] Remove final remnants of dirv1 macros and other stuff
SGI-PV: 981498
SGI-Modid: xfs-linux-melb:xfs-kern:32002a
Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit d07c60e54fb7647d8247ae392f128e8ee8f3e5f3
Author: Lachlan McIlroy <lachlan@sgi.com>
Date: Thu Oct 30 16:50:35 2008 +1100
[XFS] Use xfs_idestroy() to cleanup an inode.
SGI-PV: 981498
SGI-Modid: xfs-linux-melb:xfs-kern:31927a
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
commit be8b78a626dd9bc92c12e9ac34f3bc3db1204d25
Author: Lachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Date: Thu Oct 30 16:42:34 2008 +1100
[XFS] Remove kmem_zone_t argument from xfs_inode_init_once()
kmem cache constructor no longer takes a kmem_zone_t argument.
SGI-PV: 957103
SGI-Modid: xfs-linux-melb:xfs-kern:32254a
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
commit 07c8f67587724b417f60bffb32c448dd94647b54
Author: David Chinner <david@fromorbit.com>
Date: Thu Oct 30 16:11:59 2008 +1100
[XFS] Make use of the init-once slab optimisation.
To avoid having to initialise some fields of the XFS inode on every
allocation, we can use the slab init-once feature to initialise them. All
we have to guarantee is that when we free the inode, all it's entries are
in the initial state. Add asserts where possible to ensure debug kernels
check this initial state before freeing and after allocation.
SGI-PV: 981498
SGI-Modid: xfs-linux-melb:xfs-kern:31925a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
-----------------------------------------------------------------------
Summary of changes:
Documentation/filesystems/xfs.txt | 4 -
fs/inode.c | 209 ++-
fs/xfs/Makefile | 6 +-
fs/xfs/linux-2.6/sv.h | 22 +-
fs/xfs/linux-2.6/xfs_aops.c | 66 +-
fs/xfs/linux-2.6/xfs_aops.h | 3 +
fs/xfs/linux-2.6/xfs_buf.c | 87 +-
fs/xfs/linux-2.6/xfs_buf.h | 30 +-
fs/xfs/linux-2.6/xfs_cred.h | 8 -
fs/xfs/linux-2.6/xfs_export.c | 1 -
fs/xfs/linux-2.6/xfs_file.c | 189 +--
fs/xfs/linux-2.6/xfs_fs_subr.c | 23 +-
fs/xfs/linux-2.6/xfs_globals.c | 8 -
fs/xfs/linux-2.6/xfs_globals.h | 1 -
fs/xfs/linux-2.6/xfs_ioctl.c | 223 ++--
fs/xfs/linux-2.6/xfs_ioctl.h | 82 +
fs/xfs/linux-2.6/xfs_ioctl32.c | 849 ++++++---
fs/xfs/linux-2.6/xfs_ioctl32.h | 214 +++-
fs/xfs/linux-2.6/xfs_iops.c | 122 ++-
fs/xfs/linux-2.6/xfs_iops.h | 1 -
fs/xfs/linux-2.6/xfs_linux.h | 13 +-
fs/xfs/linux-2.6/xfs_lrw.c | 50 +-
fs/xfs/linux-2.6/xfs_stats.c | 6 +-
fs/xfs/linux-2.6/xfs_stats.h | 65 +
fs/xfs/linux-2.6/xfs_super.c | 884 +++------
fs/xfs/linux-2.6/xfs_super.h | 15 -
fs/xfs/linux-2.6/xfs_sync.c | 762 ++++++++
fs/xfs/linux-2.6/xfs_sync.h | 55 +
fs/xfs/linux-2.6/xfs_sysctl.c | 11 -
fs/xfs/linux-2.6/xfs_sysctl.h | 3 +-
fs/xfs/linux-2.6/xfs_vfs.h | 77 -
fs/xfs/linux-2.6/xfs_vnode.c | 145 --
fs/xfs/linux-2.6/xfs_vnode.h | 72 +-
fs/xfs/quota/xfs_dquot.c | 39 +-
fs/xfs/quota/xfs_dquot.h | 4 +-
fs/xfs/quota/xfs_dquot_item.c | 45 +-
fs/xfs/quota/xfs_qm.c | 57 +-
fs/xfs/quota/xfs_qm.h | 3 +-
fs/xfs/quota/xfs_qm_bhv.c | 5 +-
fs/xfs/quota/xfs_qm_syscalls.c | 151 +-
fs/xfs/support/debug.c | 39 +-
fs/xfs/support/debug.h | 2 -
fs/xfs/support/ktrace.c | 9 +-
fs/xfs/xfs.h | 2 +-
fs/xfs/xfs_acl.c | 2 +-
fs/xfs/xfs_ag.h | 15 +-
fs/xfs/xfs_alloc.c | 264 ++-
fs/xfs/xfs_alloc.h | 27 +-
fs/xfs/xfs_alloc_btree.c | 2387 ++++---------------------
fs/xfs/xfs_alloc_btree.h | 107 +-
fs/xfs/xfs_arch.h | 39 +-
fs/xfs/xfs_bit.h | 3 +-
fs/xfs/xfs_bmap.c | 410 +++--
fs/xfs/xfs_bmap.h | 72 +-
fs/xfs/xfs_bmap_btree.c | 2617 +++++----------------------
fs/xfs/xfs_bmap_btree.h | 171 +--
fs/xfs/xfs_btree.c | 3596 ++++++++++++++++++++++++++++++++-----
fs/xfs/xfs_btree.h | 392 +++--
fs/xfs/xfs_btree_trace.c | 249 +++
fs/xfs/xfs_btree_trace.h | 116 ++
fs/xfs/xfs_buf_item.c | 45 +-
fs/xfs/xfs_clnt.h | 105 --
fs/xfs/xfs_da_btree.h | 24 +-
fs/xfs/xfs_dfrag.c | 8 +-
fs/xfs/xfs_dfrag.h | 2 +-
fs/xfs/xfs_dinode.h | 148 +-
fs/xfs/xfs_dir2_sf.h | 7 -
fs/xfs/xfs_dmops.c | 5 +-
fs/xfs/xfs_error.c | 15 -
fs/xfs/xfs_error.h | 12 +-
fs/xfs/xfs_extfree_item.c | 45 +-
fs/xfs/xfs_fs.h | 22 +-
fs/xfs/xfs_fsops.c | 30 +-
fs/xfs/xfs_ialloc.c | 449 +++--
fs/xfs/xfs_ialloc.h | 31 +-
fs/xfs/xfs_ialloc_btree.c | 2193 +++--------------------
fs/xfs/xfs_ialloc_btree.h | 111 +-
fs/xfs/xfs_iget.c | 735 ++++----
fs/xfs/xfs_imap.h | 40 -
fs/xfs/xfs_inode.c | 587 ++-----
fs/xfs/xfs_inode.h | 375 +++--
fs/xfs/xfs_inode_item.c | 45 +-
fs/xfs/xfs_inode_item.h | 41 +-
fs/xfs/xfs_iomap.c | 28 +-
fs/xfs/xfs_itable.c | 102 +-
fs/xfs/xfs_itable.h | 14 +
fs/xfs/xfs_log.c | 81 +-
fs/xfs/xfs_log.h | 4 +
fs/xfs/xfs_log_priv.h | 48 +-
fs/xfs/xfs_log_recover.c | 416 ++---
fs/xfs/xfs_mount.c | 81 +-
fs/xfs/xfs_mount.h | 73 +-
fs/xfs/xfs_qmops.c | 5 +-
fs/xfs/xfs_quota.h | 8 +-
fs/xfs/xfs_rename.c | 61 +-
fs/xfs/xfs_rtalloc.c | 41 +-
fs/xfs/xfs_rw.c | 2 +-
fs/xfs/xfs_sb.h | 167 +-
fs/xfs/xfs_trans.c | 22 +-
fs/xfs/xfs_trans.h | 322 ++--
fs/xfs/xfs_trans_ail.c | 362 +++--
fs/xfs/xfs_trans_buf.c | 7 +-
fs/xfs/xfs_trans_inode.c | 30 +-
fs/xfs/xfs_trans_item.c | 10 +
fs/xfs/xfs_trans_priv.h | 98 +-
fs/xfs/xfs_utils.c | 12 +-
fs/xfs/xfs_vfsops.c | 757 --------
fs/xfs/xfs_vfsops.h | 16 -
fs/xfs/xfs_vnodeops.c | 354 +---
fs/xfs/xfs_vnodeops.h | 10 +-
include/linux/fs.h | 10 +
kernel/sysctl_check.c | 1 -
112 files changed, 10496 insertions(+), 12850 deletions(-)
create mode 100644 fs/xfs/linux-2.6/xfs_ioctl.h
create mode 100644 fs/xfs/linux-2.6/xfs_sync.c
create mode 100644 fs/xfs/linux-2.6/xfs_sync.h
delete mode 100644 fs/xfs/linux-2.6/xfs_vfs.h
delete mode 100644 fs/xfs/linux-2.6/xfs_vnode.c
create mode 100644 fs/xfs/xfs_btree_trace.c
create mode 100644 fs/xfs/xfs_btree_trace.h
delete mode 100644 fs/xfs/xfs_clnt.h
delete mode 100644 fs/xfs/xfs_imap.h
delete mode 100644 fs/xfs/xfs_vfsops.c
delete mode 100644 fs/xfs/xfs_vfsops.h
hooks/post-receive
--
XFS development tree
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic