xfs: patches for 3.13
v2 cover xfs: patches for 3.13
Hi folks,
This is an update of the previous patches I sent here:
http://oss.sgi.com/pipermail/xfs/2013-September/030390.html
http://oss.sgi.com/pipermail/xfs/2013-September/030398.html
I've addressed the review comments from Eric, Ben and Christoph and fixed the non-debug build failure that Michael Semon reported. Comments and testing welcome.
Cheers,
Dave.
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
PATCH v2 1/19 xfs: xfs_remove deadlocks due to inverted AGF vs AGI lock ordering
From: Dave Chinner <[email protected]>
Removing an inode from the namespace involves removing the directory entry and dropping the link count on the inode. Removing the directory entry can result in locking an AGF (directory blocks were freed) and removing a link count can result in placing the inode on an unlinked list which results in locking an AGI.
The big problem here is that we have an ordering constraint on AGF and AGI locking - inode allocation locks the AGI, then can allocate a new extent for new inodes, locking the AGF after the AGI. Similarly, freeing the inode removes the inode from the unlinked list, requiring that we lock the AGI first, and then freeing the inode can result in an inode chunk being freed and hence freeing disk space requiring that we lock an AGF.
Hence the ordering that is imposed by other parts of the code is AGI before AGF. This means we cannot remove the directory entry before we drop the inode reference count and put it on the unlinked list as this results in a lock order of AGF then AGI, and this can deadlock against inode allocation and freeing. Therefore we must drop the link counts before we remove the directory entry.
This is still safe from a transactional point of view - it is not until we get to xfs_bmap_finish() that we have the possibility of multiple transactions in this operation. Hence as long as we remove the directory entry and drop the link count in the first transaction of the remove operation, there are no transactional constraints on the ordering here.
Change the ordering of the operations in the xfs_remove() function to align the ordering of AGI and AGF locking to match that of the rest of the code.
--- fs/xfs/xfs_inode.c | 72 +++++++++++++++++++++++++++++++++--------------------- 1 file changed, 44 insertions(+), 28 deletions(-)
fs/xfs/xfs_inode.c +44 -28
@@ -2405,6 +2405,33 @@ xfs_iunpin_wait(__xfs_iunpin_wait (ip); } +/* +* Removing an inode from the namespace involves removing the directory entry +* and dropping the link count on the inode. Removing the directory entry can +* result in locking an AGF (directory blocks were freed) and removing a link +* count can result in placing the inode on an unlinked list which results in +* locking an AGI. +* +* The big problem here is that we have an ordering constraint on AGF and AGI +* locking - inode allocation locks the AGI, then can allocate a new extent for +* new inodes, locking the AGF after the AGI. Similarly, freeing the inode +* removes the inode from the unlinked list, requiring that we lock the AGI +* first, and then freeing the inode can result in an inode chunk being freed +* and hence freeing disk space requiring that we lock an AGF. +* +* Hence the ordering that is imposed by other parts of the code is AGI before +* AGF. This means we cannot remove the directory entry before we drop the inode +* reference count and put it on the unlinked list as this results in a lock +* order of AGF then AGI, and this can deadlock against inode allocation and +* freeing. Therefore we must drop the link counts before we remove the +* directory entry. +* +* This is still safe from a transactional point of view - it is not until we +* get to xfs_bmap_finish() that we have the possibility of multiple +* transactions in this operation. Hence as long as we remove the directory +* entry and drop the link count in the first transaction of the remove +* operation, there are no transactional constraints on the ordering here. +*/ int xfs_remove( xfs_inode_t *dp,
@@ -2474,6 +2501,7 @@ xfs_remove(/* * If we're removing a directory perform some additional validation. */ + cancel_flags |=XFS_TRANS_ABORT ;if (is_dir) {ASSERT (ip->i_d.di_nlink >=2 );if (ip->i_d.di_nlink !=2 ) {
@@ -2484,31 +2512,16 @@ xfs_remove( error =XFS_ERROR (ENOTEMPTY ); goto out_trans_cancel; } - } -xfs_bmap_init (&free_list, &first_block); - error =xfs_dir_removename (tp, dp, name, ip->i_ino, - &first_block, &free_list, resblks); -if (error) { -ASSERT (error !=ENOENT ); - goto out_bmap_cancel; - } -xfs_trans_ichgtime (tp, dp,XFS_ICHGTIME_MOD |XFS_ICHGTIME_CHG ); - -if (is_dir) { -/* -* Drop the link from ip's "..". -*/ +/* Drop the link from ip's "..". */ error =xfs_droplink (tp, dp);if (error) - goto out_bmap_cancel; + goto out_trans_cancel; -/* -* Drop the "." link from ip to self. -*/ +/* Drop the "." link from ip to self. */ error =xfs_droplink (tp, ip);if (error) - goto out_bmap_cancel; + goto out_trans_cancel; }else {/* * When removing a non-directory we need to log the parent
@@ -2517,20 +2530,24 @@ xfs_remove(*/ xfs_trans_log_inode (tp, dp,XFS_ILOG_CORE ); } +xfs_trans_ichgtime (tp, dp,XFS_ICHGTIME_MOD |XFS_ICHGTIME_CHG ); -/* -* Drop the link from dp to ip. -*/ +/* Drop the link from dp to ip. */ error =xfs_droplink (tp, ip);if (error) - goto out_bmap_cancel; + goto out_trans_cancel; -/* -* Determine if this is the last link while -* we are in the transaction. -*/ +/* Determine if this is the last link while the inode is locked */ link_zero = (ip->i_d.di_nlink ==0 ); +xfs_bmap_init (&free_list, &first_block); + error =xfs_dir_removename (tp, dp, name, ip->i_ino, + &first_block, &free_list, resblks); +if (error) { +ASSERT (error !=ENOENT ); + goto out_bmap_cancel; + } +/* * If this is a synchronous mount, make sure that the * remove transaction goes to disk before returning to
@@ -2560,7 +2577,6 @@ xfs_remove( out_bmap_cancel:xfs_bmap_cancel (&free_list); - cancel_flags |=XFS_TRANS_ABORT ; out_trans_cancel:xfs_trans_cancel (tp, cancel_flags); std_return:
Signature · 6 lines
1.8.4.rc3 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH v2 2/19 xfs: open code inc_inode_iversion when logging an inode
In reply to Dave ChinnerFrom: Dave Chinner <[email protected]>
Michael L Semon reported that generic/069 runtime increased on v5 superblocks by 100% compared to v4 superblocks. his perf-based analysis pointed directly at the timestamp updates being done by the write path in this workload. The append writers are doing 4-byte writes, so there are lots of timestamp updates occurring.
The thing is, they aren't being triggered by timestamp changes - they are being triggered by the inode change counter needing to be updated. That is, every write(2) system call needs to bump the inode version count, and it does that through the timestamp update mechanism. Hence for v5 filesystems, test generic/069 is running 3 orders of magnitude more timestmap update transactions on v5 filesystems due to the fact it does a huge number of *4 byte* write(2) calls.
This isn't a real world scenario we really need to address - anyone doing such sequential IO should be using fwrite(3), not write(2). i.e. fwrite(3) buffers the writes in userspace to minimise the number of write(2) syscalls, and the problem goes away.
However, there is a small change we can make to improve the situation - removing the expensive lock operation on the change counter update. All inode version counter changes in XFS occur under the ip->i_ilock during a transaction, and therefore we don't actually need the spin lock that provides exclusive access to it through inc_inode_iversion().
Hence avoid the lock and just open code the increment ourselves when logging the inode.
--- fs/xfs/xfs_trans_inode.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
fs/xfs/xfs_trans_inode.c +5 -3
@@ -114,12 +114,14 @@ xfs_trans_log_inode(/* * First time we log the inode in a transaction, bump the inode change -* counter if it is configured for this to occur. +* counter if it is configured for this to occur. We don't use +* inode_inc_version() because there is no need for extra locking around +* i_version as we already hold the inode locked exclusively for +* metadata modification. */ if (!(ip->i_itemp->ili_item.li_desc->lid_flags &XFS_LID_DIRTY ) &&IS_I_VERSION (VFS_I (ip))) { -inode_inc_iversion (VFS_I (ip)); - ip->i_d.di_changecount =VFS_I (ip)->i_version; + ip->i_d.di_changecount = ++VFS_I (ip)->i_version; flags |=XFS_ILOG_CORE ; }
Signature · 6 lines
1.8.4.rc3 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH v2 3/19 xfs: prevent deadlock trying to cover an active log
In reply to Dave ChinnerFrom: Dave Chinner <[email protected]>
Recent analysis of a deadlocked XFS filesystem from a kernel crash dump indicated that the filesystem was stuck waiting for log space. The short story of the hang on the RHEL6 kernel is this:
- the tail of the log is pinned by an inode
- the inode has been pushed by the xfsaild
- the inode has been flushed to it's backing buffer and is currently flush locked and hence waiting for backing buffer IO to complete and remove it from the AIL
- the backing buffer is marked for write - it is on the delayed write queue
- the inode buffer has been modified directly and logged recently due to unlinked inode list modification
- the backing buffer is pinned in memory as it is in the active CIL context.
- the xfsbufd won't start buffer writeback because it is pinned
- xfssyncd won't force the log because it sees the log as needing to be covered and hence wants to issue a dummy transaction to move the log covering state machine along.
Hence there is no trigger to force the CIL to the log and hence unpin the inode buffer and therefore complete the inode IO, remove it from the AIL and hence move the tail of the log along, allowing transactions to start again.
Mainline kernels also have the same deadlock, though the signature is slightly different - the inode buffer never reaches the delayed write lists because xfs_buf_item_push() sees that it is pinned and hence never adds it to the delayed write list that the xfsaild flushes.
There are two possible solutions here. The first is to simply force the log before trying to cover the log and so ensure that the CIL is emptied before we try to reserve space for the dummy transaction in the xfs_log_worker(). While this might work most of the time, it is still racy and is no guarantee that we don't get stuck in xfs_trans_reserve waiting for log space to come free. Hence it's not the best way to solve the problem.
The second solution is to modify xfs_log_need_covered() to be aware of the CIL. We only should be attempting to cover the log if there is no current activity in the log - covering the log is the process of ensuring that the head and tail in the log on disk are identical (i.e. the log is clean and at idle). Hence, by definition, if there are items in the CIL then the log is not at idle and so we don't need to attempt to cover it.
When we don't need to cover the log because it is active or idle, we issue a log force from xfs_log_worker() - if the log is idle, then this does nothing. However, if the log is active due to there being items in the CIL, it will force the items in the CIL to the log and unpin them.
In the case of the above deadlock scenario, instead of xfs_log_worker() getting stuck in xfs_trans_reserve() attempting to cover the log, it will instead force the log, thereby unpinning the inode buffer, allowing IO to be issued and complete and hence removing the inode that was pinning the tail of the log from the AIL. At that point, everything will start moving along again. i.e. the xfs_log_worker turns back into a watchdog that can alleviate deadlocks based around pinned items that prevent the tail of the log from being moved...
--- fs/xfs/xfs_log.c | 48 +++++++++++++++++++++++++++++------------------- fs/xfs/xfs_log_cil.c | 14 ++++++++++++++ fs/xfs/xfs_log_priv.h | 10 ++++------ 3 files changed, 47 insertions(+), 25 deletions(-)
fs/xfs/xfs_log.c +29 -19
@@ -1000,27 +1000,34 @@ xfs_log_space_wake( }/* -* Determine if we have a transaction that has gone to disk -* that needs to be covered. To begin the transition to the idle state -* firstly the log needs to be idle (no AIL and nothing in the iclogs). -* If we are then in a state where covering is needed, the caller is informed -* that dummy transactions are required to move the log into the idle state. +* Determine if we have a transaction that has gone to disk that needs to be +* covered. To begin the transition to the idle state firstly the log needs to +* be idle. That means the CIL, the AIL and the iclogs needs to be empty before +* we start attempting to cover the log. * -* Because this is called as part of the sync process, we should also indicate -* that dummy transactions should be issued in anything but the covered or -* idle states. This ensures that the log tail is accurately reflected in -* the log at the end of the sync, hence if a crash occurrs avoids replay -* of transactions where the metadata is already on disk. +* Only if we are then in a state where covering is needed, the caller is +* informed that dummy transactions are required to move the log into the idle +* state. +* +* If there are any items in the AIl or CIL, then we do not want to attempt to +* cover the log as we may be in a situation where there isn't log space +* available to run a dummy transaction and this can lead to deadlocks when the +* tail of the log is pinned by an item that is modified in the CIL. Hence +* there's no point in running a dummy transaction at this point because we +* can't start trying to idle the log until both the CIL and AIL are empty. */ int xfs_log_need_covered (xfs_mount_t *mp) { -int needed =0 ;struct xlog *log = mp->m_log; +int needed =0 ;if (!xfs_fs_writable (mp))return 0 ; +if (!xlog_cil_empty (log)) +return 0 ; +spin_lock (&log->l_icloglock);switch (log->l_covered_state) {case XLOG_STATE_COVER_DONE :
@@ -1029,14 +1036,17 @@ xfs_log_need_covered(xfs_mount_t *mp)break ;case XLOG_STATE_COVER_NEED :case XLOG_STATE_COVER_NEED2 : -if (!xfs_ail_min_lsn (log->l_ailp) && -xlog_iclogs_empty (log)) { -if (log->l_covered_state ==XLOG_STATE_COVER_NEED ) - log->l_covered_state =XLOG_STATE_COVER_DONE ; -else - log->l_covered_state =XLOG_STATE_COVER_DONE2 ; - } -/* FALLTHRU */ +if (xfs_ail_min_lsn (log->l_ailp)) +break ; +if (!xlog_iclogs_empty (log)) +break ; + + needed =1 ; +if (log->l_covered_state ==XLOG_STATE_COVER_NEED ) + log->l_covered_state =XLOG_STATE_COVER_DONE ; +else + log->l_covered_state =XLOG_STATE_COVER_DONE2 ; +break ;default : needed =1 ;break ;
fs/xfs/xfs_log_cil.c +14 -0
@@ -711,6 +711,20 @@ xlog_cil_push_foreground(xlog_cil_push (log); } +bool +xlog_cil_empty ( +struct xlog *log) +{ +struct xfs_cil *cil = log->l_cilp; +bool empty = false; + +spin_lock (&cil->xc_push_lock); +if (list_empty (&cil->xc_cil)) + empty = true; +spin_unlock (&cil->xc_push_lock); +return empty; +} +/* * Commit a transaction with the given vector to the Committed Item List. *
fs/xfs/xfs_log_priv.h +4 -6
@@ -514,12 +514,10 @@ xlog_assign_grant_head(atomic64_t *head, int cycle, int space)/* * Committed Item List interfaces */ -int -xlog_cil_init (struct xlog *log); -void -xlog_cil_init_post_recovery (struct xlog *log); -void -xlog_cil_destroy (struct xlog *log); +int xlog_cil_init (struct xlog *log); +void xlog_cil_init_post_recovery (struct xlog *log); +void xlog_cil_destroy (struct xlog *log); +bool xlog_cil_empty (struct xlog *log);/* * CIL force routines
Signature · 6 lines
1.8.4.rc3 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Re: [PATCH 03/19] xfs: prevent deadlock trying to cover an active log
Quoted 66 lines · Dave Chinner
From: Dave Chinner <[email protected]>
Recent analysis of a deadlocked XFS filesystem from a kernel crash dump indicated that the filesystem was stuck waiting for log space. The short story of the hang on the RHEL6 kernel is this:
- the tail of the log is pinned by an inode
- the inode has been pushed by the xfsaild
- the inode has been flushed to it's backing buffer and is currently flush locked and hence waiting for backing buffer IO to complete and remove it from the AIL
- the backing buffer is marked for write - it is on the delayed write queue
- the inode buffer has been modified directly and logged recently due to unlinked inode list modification
- the backing buffer is pinned in memory as it is in the active CIL context.
- the xfsbufd won't start buffer writeback because it is pinned
- xfssyncd won't force the log because it sees the log as needing to be covered and hence wants to issue a dummy transaction to move the log covering state machine along.Hence there is no trigger to force the CIL to the log and hence unpin the inode buffer and therefore complete the inode IO, remove it from the AIL and hence move the tail of the log along, allowing transactions to start again.
Mainline kernels also have the same deadlock, though the signature is slightly different - the inode buffer never reaches the delayed write lists because
xfs_buf_item_push()sees that it is pinned and hence never adds it to the delayed write list that the xfsaild flushes.There are two possible solutions here. The first is to simply force the log before trying to cover the log and so ensure that the CIL is emptied before we try to reserve space for the dummy transaction in the
xfs_log_worker(). While this might work most of the time, it is still racy and is no guarantee that we don't get stuck inxfs_trans_reservewaiting for log space to come free. Hence it's not the best way to solve the problem.The second solution is to modify
xfs_log_need_covered()to be aware of the CIL. We only should be attempting to cover the log if there is no current activity in the log - covering the log is the process of ensuring that the head and tail in the log on disk are identical (i.e. the log is clean and at idle). Hence, by definition, if there are items in the CIL then the log is not at idle and so we don't need to attempt to cover it.When we don't need to cover the log because it is active or idle, we issue a log force from
xfs_log_worker()- if the log is idle, then this does nothing. However, if the log is active due to there being items in the CIL, it will force the items in the CIL to the log and unpin them.In the case of the above deadlock scenario, instead of
xfs_log_worker()getting stuck inxfs_trans_reserve()attempting to cover the log, it will instead force the log, thereby unpinning the inode buffer, allowing IO to be issued and complete and hence removing the inode that was pinning the tail of the log from the AIL. At that point, everything will start moving along again. i.e. thexfs_log_workerturns back into a watchdog that can alleviate deadlocks based around pinned items that prevent the tail of the log from being moved...
Quoted 1 line
Signed-off-by Dave Chinner <[email protected]>
Quoted 119 lines
--- fs/xfs/xfs_log.c | 48 +++++++++++++++++++++++++++++------------------- fs/xfs/xfs_log_cil.c | 14 ++++++++++++++ fs/xfs/xfs_log_priv.h | 10 ++++------ 3 files changed, 47 insertions(+), 25 deletions(-)fs/xfs/xfs_log.c +29
-19@@ -1000,27 +1000,34 @@ xfs_log_space_wake( }/* -* Determine if we have a transaction that has gone to disk -* that needs to be covered. To begin the transition to the idle state -* firstly the log needs to be idle (no AIL and nothing in the iclogs). -* If we are then in a state where covering is needed, the caller is informed -* that dummy transactions are required to move the log into the idle state. +* Determine if we have a transaction that has gone to disk that needs to be +* covered. To begin the transition to the idle state firstly the log needs to +* be idle. That means the CIL, the AIL and the iclogs needs to be empty before +* we start attempting to cover the log. * -* Because this is called as part of the sync process, we should also indicate -* that dummy transactions should be issued in anything but the covered or -* idle states. This ensures that the log tail is accurately reflected in -* the log at the end of the sync, hence if a crash occurrs avoids replay -* of transactions where the metadata is already on disk. +* Only if we are then in a state where covering is needed, the caller is +* informed that dummy transactions are required to move the log into the idle +* state. +* +* If there are any items in the AIl or CIL, then we do not want to attempt to +* cover the log as we may be in a situation where there isn't log space +* available to run a dummy transaction and this can lead to deadlocks when the +* tail of the log is pinned by an item that is modified in the CIL. Hence +* there's no point in running a dummy transaction at this point because we +* can't start trying to idle the log until both the CIL and AIL are empty. */ int xfs_log_need_covered (xfs_mount_t *mp) { -int needed =0 ;struct xlog *log = mp->m_log; +int needed =0 ;if (!xfs_fs_writable (mp))return 0 ; +if (!xlog_cil_empty (log)) +return 0 ; +spin_lock (&log->l_icloglock);switch (log->l_covered_state) {case XLOG_STATE_COVER_DONE :@@ -1029,14 +1036,17 @@ xfs_log_need_covered(xfs_mount_t *mp)break ;case XLOG_STATE_COVER_NEED :case XLOG_STATE_COVER_NEED2 : -if (!xfs_ail_min_lsn (log->l_ailp) && -xlog_iclogs_empty (log)) { -if (log->l_covered_state ==XLOG_STATE_COVER_NEED ) - log->l_covered_state =XLOG_STATE_COVER_DONE ; -else - log->l_covered_state =XLOG_STATE_COVER_DONE2 ; - } -/* FALLTHRU */ +if (xfs_ail_min_lsn (log->l_ailp)) +break ; +if (!xlog_iclogs_empty (log)) +break ; + + needed =1 ; +if (log->l_covered_state ==XLOG_STATE_COVER_NEED ) + log->l_covered_state =XLOG_STATE_COVER_DONE ; +else + log->l_covered_state =XLOG_STATE_COVER_DONE2 ; +break ;default : needed =1 ;break ;fs/xfs/xfs_log_cil.c +14
-0@@ -711,6 +711,20 @@ xlog_cil_push_foreground(xlog_cil_push (log); } +bool +xlog_cil_empty ( +struct xlog *log) +{ +struct xfs_cil *cil = log->l_cilp; +bool empty = false; + +spin_lock (&cil->xc_push_lock); +if (list_empty (&cil->xc_cil)) + empty = true; +spin_unlock (&cil->xc_push_lock); +return empty; +} +/* * Commit a transaction with the given vector to the Committed Item List. * fs/xfs/xfs_log_priv.h +0
-3@@ -514,12 +514,10 @@ xlog_assign_grant_head(atomic64_t *head, int cycle, int space)/* * Committed Item List interfaces */ -int -xlog_cil_init (struct xlog *log); -void
fs/xfs/xfs_log_priv.h xlog_assign_grant_head(atomic64_t *head, int cycle, int space) · line 523
Quoted 10 lines
fs/xfs/xfs_log_priv.h +4
-3-xlog_cil_init_post_recovery(struct xlog *log); -void -xlog_cil_destroy (struct xlog *log); +int xlog_cil_init (struct xlog *log); +void xlog_cil_init_post_recovery (struct xlog *log); +void xlog_cil_destroy (struct xlog *log); +bool xlog_cil_empty (struct xlog *log);/* * CIL force routines
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Ben Myers
AppliedRe: [PATCH 03/19] xfs: prevent deadlock trying to cover an active log
Quoted 67 lines · Eric Sandeen
Quoted 66 lines · Dave Chinner
From: Dave Chinner <[email protected]>
Recent analysis of a deadlocked XFS filesystem from a kernel crash dump indicated that the filesystem was stuck waiting for log space. The short story of the hang on the RHEL6 kernel is this:
- the tail of the log is pinned by an inode
- the inode has been pushed by the xfsaild
- the inode has been flushed to it's backing buffer and is currently flush locked and hence waiting for backing buffer IO to complete and remove it from the AIL
- the backing buffer is marked for write - it is on the delayed write queue
- the inode buffer has been modified directly and logged recently due to unlinked inode list modification
- the backing buffer is pinned in memory as it is in the active CIL context.
- the xfsbufd won't start buffer writeback because it is pinned
- xfssyncd won't force the log because it sees the log as needing to be covered and hence wants to issue a dummy transaction to move the log covering state machine along.Hence there is no trigger to force the CIL to the log and hence unpin the inode buffer and therefore complete the inode IO, remove it from the AIL and hence move the tail of the log along, allowing transactions to start again.
Mainline kernels also have the same deadlock, though the signature is slightly different - the inode buffer never reaches the delayed write lists because
xfs_buf_item_push()sees that it is pinned and hence never adds it to the delayed write list that the xfsaild flushes.There are two possible solutions here. The first is to simply force the log before trying to cover the log and so ensure that the CIL is emptied before we try to reserve space for the dummy transaction in the
xfs_log_worker(). While this might work most of the time, it is still racy and is no guarantee that we don't get stuck inxfs_trans_reservewaiting for log space to come free. Hence it's not the best way to solve the problem.The second solution is to modify
xfs_log_need_covered()to be aware of the CIL. We only should be attempting to cover the log if there is no current activity in the log - covering the log is the process of ensuring that the head and tail in the log on disk are identical (i.e. the log is clean and at idle). Hence, by definition, if there are items in the CIL then the log is not at idle and so we don't need to attempt to cover it.When we don't need to cover the log because it is active or idle, we issue a log force from
xfs_log_worker()- if the log is idle, then this does nothing. However, if the log is active due to there being items in the CIL, it will force the items in the CIL to the log and unpin them.In the case of the above deadlock scenario, instead of
xfs_log_worker()getting stuck inxfs_trans_reserve()attempting to cover the log, it will instead force the log, thereby unpinning the inode buffer, allowing IO to be issued and complete and hence removing the inode that was pinning the tail of the log from the AIL. At that point, everything will start moving along again. i.e. thexfs_log_workerturns back into a watchdog that can alleviate deadlocks based around pinned items that prevent the tail of the log from being moved...
Quoted 3 lines
Quoted 1 line
Signed-off-by Dave Chinner <[email protected]>Reviewed-by Eric Sandeen <[email protected]>
Applied.
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
PATCH v2 4/19 xfs: create a shared header file for format-related information
In reply to Dave ChinnerAll of the buffer operations structures are needed to be exported for xfs_db, so move them all to a common location rather than spreading them all over the place. They are verifying the on-disk format, so while xfs_format.h might be a good place, it is not part of the on disk format.
Hence we need to create a new header file that we centralise these related definitions. Start by moving the bffer operations structures, and then also move all the other definitions that have crept into xfs_log_format.h and xfs_format.h as there was no other shared header file to put them in.
--- fs/xfs/xfs_ag.h | 4 - fs/xfs/xfs_alloc.c | 3 +- fs/xfs/xfs_alloc.h | 3 - fs/xfs/xfs_alloc_btree.h | 2 - fs/xfs/xfs_aops.c | 4 +- fs/xfs/xfs_attr.c | 1 + fs/xfs/xfs_attr_inactive.c | 1 + fs/xfs/xfs_attr_leaf.h | 2 - fs/xfs/xfs_attr_remote.h | 2 - fs/xfs/xfs_bmap.c | 1 + fs/xfs/xfs_bmap_btree.h | 2 - fs/xfs/xfs_bmap_util.c | 1 + fs/xfs/xfs_btree.c | 2 +- fs/xfs/xfs_da_btree.c | 3 +- fs/xfs/xfs_da_btree.h | 2 - fs/xfs/xfs_dquot.c | 1 + fs/xfs/xfs_dquot.h | 2 - fs/xfs/xfs_extent_busy.c | 3 +- fs/xfs/xfs_format.h | 10 -- fs/xfs/xfs_fsops.c | 2 + fs/xfs/xfs_ialloc.c | 3 +- fs/xfs/xfs_ialloc.h | 2 - fs/xfs/xfs_ialloc_btree.h | 2 - fs/xfs/xfs_icreate_item.c | 2 +- fs/xfs/xfs_inode.c | 1 + fs/xfs/xfs_inode_buf.c | 1 + fs/xfs/xfs_inode_buf.h | 3 - fs/xfs/xfs_ioctl.c | 1 + fs/xfs/xfs_iomap.c | 1 + fs/xfs/xfs_iops.c | 1 + fs/xfs/xfs_itable.c | 2 +- fs/xfs/xfs_log.c | 2 +- fs/xfs/xfs_log_cil.c | 2 +- fs/xfs/xfs_log_format.h | 177 -------------------------------- fs/xfs/xfs_log_recover.c | 1 + fs/xfs/xfs_log_rlimit.c | 1 + fs/xfs/xfs_mount.c | 1 + fs/xfs/xfs_qm.c | 1 + fs/xfs/xfs_qm_syscalls.c | 1 + fs/xfs/xfs_quota.h | 2 - fs/xfs/xfs_rtalloc.c | 1 + fs/xfs/xfs_sb.h | 3 - fs/xfs/xfs_shared.h | 244 ++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_super.c | 1 + fs/xfs/xfs_symlink.c | 1 + fs/xfs/xfs_symlink_remote.c | 1 + fs/xfs/xfs_trace.c | 2 +- fs/xfs/xfs_trans.c | 1 + fs/xfs/xfs_trans_buf.c | 2 +- fs/xfs/xfs_trans_dquot.c | 1 + fs/xfs/xfs_trans_extfree.c | 2 +- fs/xfs/xfs_trans_inode.c | 2 +- fs/xfs/xfs_trans_resv.c | 1 + 53 files changed, 288 insertions(+), 232 deletions(-) create mode 100644 fs/xfs/xfs_shared.h
fs/xfs/xfs_ag.h +0 -4
@@ -128,8 +128,6 @@ typedef struct xfs_agf {extern int xfs_read_agf (struct xfs_mount *mp,struct xfs_trans *tp,xfs_agnumber_t agno,int flags,struct xfs_buf **bpp); -extern const struct xfs_buf_ops xfs_agf_buf_ops; -/* * Size of the unlinked inode hash table in the agi. */
@@ -191,8 +189,6 @@ typedef struct xfs_agi {extern int xfs_read_agi (struct xfs_mount *mp,struct xfs_trans *tp,xfs_agnumber_t agno,struct xfs_buf **bpp); -extern const struct xfs_buf_ops xfs_agi_buf_ops; -/* * The third a.g. block contains the a.g. freelist, an array * of block pointers to blocks owned by the allocation btree code.
fs/xfs/xfs_alloc.c +2 -1
@@ -17,7 +17,8 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_bit.h" #include "xfs_log.h" #include "xfs_trans.h"
fs/xfs/xfs_alloc.h +0 -3
@@ -231,7 +231,4 @@ xfs_alloc_get_rec( xfs_extlen_t *len,/* output: length of extent */ int *stat); /* output: success/failure */ -extern const struct xfs_buf_ops xfs_agf_buf_ops; -extern const struct xfs_buf_ops xfs_agfl_buf_ops; -#endif /* __XFS_ALLOC_H__ */
fs/xfs/xfs_alloc_btree.h +0 -2
@@ -95,6 +95,4 @@ extern struct xfs_btree_cur *xfs_allocbt_init_cursor(struct xfs_mount *, xfs_agnumber_t, xfs_btnum_t);extern int xfs_allocbt_maxrecs (struct xfs_mount *,int ,int ); -extern const struct xfs_buf_ops xfs_allocbt_buf_ops; -#endif /* __XFS_ALLOC_BTREE_H__ */
fs/xfs/xfs_aops.c +3 -1
@@ -16,9 +16,11 @@* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" -#include "xfs_log.h" +#include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_log.h" #include "xfs_trans.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h"
fs/xfs/xfs_attr.c +1 -0
@@ -18,6 +18,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_bit.h" #include "xfs_log.h" #include "xfs_trans.h"
fs/xfs/xfs_attr_inactive.c +1 -0
@@ -19,6 +19,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_bit.h" #include "xfs_log.h" #include "xfs_trans.h"
fs/xfs/xfs_attr_leaf.h +0 -2
@@ -336,6 +336,4 @@ void xfs_attr3_leaf_hdr_from_disk(struct xfs_attr3_icleaf_hdr *to,void xfs_attr3_leaf_hdr_to_disk (struct xfs_attr_leafblock *to,struct xfs_attr3_icleaf_hdr *from); -extern const struct xfs_buf_ops xfs_attr3_leaf_buf_ops; -#endif /* __XFS_ATTR_LEAF_H__ */
fs/xfs/xfs_attr_remote.h +0 -2
@@ -45,8 +45,6 @@ struct xfs_attr3_rmt_hdr { ((bufsize) - (xfs_sb_version_hascrc (&(mp)->m_sb) ? \ sizeof(struct xfs_attr3_rmt_hdr) : 0)) -extern const struct xfs_buf_ops xfs_attr3_rmt_buf_ops; -int xfs_attr3_rmt_blocks (struct xfs_mount *mp,int attrlen);int xfs_attr_rmtval_get (struct xfs_da_args *args);
fs/xfs/xfs_bmap.c +1 -0
@@ -18,6 +18,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_bit.h" #include "xfs_log.h" #include "xfs_inum.h"
fs/xfs/xfs_bmap_btree.h +0 -2
@@ -243,6 +243,4 @@ extern int xfs_bmbt_change_owner(struct xfs_trans *tp, struct xfs_inode *ip,extern struct xfs_btree_cur *xfs_bmbt_init_cursor (struct xfs_mount *,struct xfs_trans *,struct xfs_inode *,int ); -extern const struct xfs_buf_ops xfs_bmbt_buf_ops; -#endif /* __XFS_BMAP_BTREE_H__ */
fs/xfs/xfs_bmap_util.c +1 -0
@@ -19,6 +19,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_bit.h" #include "xfs_log.h" #include "xfs_inum.h"
fs/xfs/xfs_btree.c +1 -1
@@ -17,7 +17,7 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_shared.h" #include "xfs_bit.h" #include "xfs_log.h" #include "xfs_trans.h"
fs/xfs/xfs_da_btree.c +2 -1
@@ -18,7 +18,8 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_bit.h" #include "xfs_log.h" #include "xfs_trans.h"
fs/xfs/xfs_da_btree.h +0 -2
@@ -309,8 +309,6 @@ int xfs_da3_node_read(struct xfs_trans *tp, struct xfs_inode *dp, xfs_dablk_t bno, xfs_daddr_t mappedbno, struct xfs_buf **bpp, int which_fork); -extern const struct xfs_buf_ops xfs_da3_node_buf_ops; -/* * Utility routines. */
fs/xfs/xfs_dquot.c +1 -0
@@ -18,6 +18,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_bit.h" #include "xfs_log.h" #include "xfs_trans.h"
fs/xfs/xfs_dquot.h +0 -2
@@ -172,6 +172,4 @@ static inline struct xfs_dquot *xfs_qm_dqhold(struct xfs_dquot *dqp) return dqp; } -extern const struct xfs_buf_ops xfs_dquot_buf_ops; -#endif /* __XFS_DQUOT_H__ */
fs/xfs/xfs_extent_busy.c +2 -1
@@ -19,7 +19,8 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_sb.h"
fs/xfs/xfs_format.h +0 -10
@@ -156,14 +156,4 @@ struct xfs_dsymlink_hdr { ((bufsize) - (xfs_sb_version_hascrc (&(mp)->m_sb) ? \ sizeof(struct xfs_dsymlink_hdr) : 0)) -int xfs_symlink_blocks (struct xfs_mount *mp,int pathlen); -int xfs_symlink_hdr_set (struct xfs_mount *mp,xfs_ino_t ino,uint32_t offset, -uint32_t size,struct xfs_buf *bp); -bool xfs_symlink_hdr_ok (struct xfs_mount *mp,xfs_ino_t ino,uint32_t offset, -uint32_t size,struct xfs_buf *bp); -void xfs_symlink_local_to_remote (struct xfs_trans *tp,struct xfs_buf *bp, -struct xfs_inode *ip,struct xfs_ifork *ifp); - -extern const struct xfs_buf_ops xfs_symlink_buf_ops; -#endif /* __XFS_FORMAT_H__ */
fs/xfs/xfs_fsops.c +2 -0
@@ -18,6 +18,8 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_types.h" +#include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_sb.h"
fs/xfs/xfs_ialloc.c +2 -1
@@ -17,7 +17,8 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_bit.h" #include "xfs_log.h" #include "xfs_inum.h"
fs/xfs/xfs_ialloc.h +0 -2
@@ -158,6 +158,4 @@ int xfs_ialloc_inode_init(struct xfs_mount *mp, struct xfs_trans *tp, xfs_agnumber_t agno, xfs_agblock_t agbno, xfs_agblock_t length, unsigned int gen); -extern const struct xfs_buf_ops xfs_agi_buf_ops; -#endif /* __XFS_IALLOC_H__ */
fs/xfs/xfs_ialloc_btree.h +0 -2
@@ -110,6 +110,4 @@ extern struct xfs_btree_cur *xfs_inobt_init_cursor(struct xfs_mount *, struct xfs_trans *, struct xfs_buf *, xfs_agnumber_t);extern int xfs_inobt_maxrecs (struct xfs_mount *,int ,int ); -extern const struct xfs_buf_ops xfs_inobt_buf_ops; -#endif /* __XFS_IALLOC_BTREE_H__ */
fs/xfs/xfs_icreate_item.c +1 -1
@@ -17,7 +17,7 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_shared.h" #include "xfs_bit.h" #include "xfs_log.h" #include "xfs_trans.h"
fs/xfs/xfs_inode.c +1 -0
@@ -20,6 +20,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_inum.h" #include "xfs_trans.h"
fs/xfs/xfs_inode_buf.c +1 -0
@@ -18,6 +18,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_sb.h"
fs/xfs/xfs_inode_buf.h +0 -3
@@ -47,7 +47,4 @@ void xfs_inobp_check(struct xfs_mount *, struct xfs_buf *);#define xfs_inobp_check (mp, bp)#endif /* DEBUG */ -extern const struct xfs_buf_ops xfs_inode_buf_ops; -extern const struct xfs_buf_ops xfs_inode_buf_ra_ops; -#endif /* __XFS_INODE_BUF_H__ */
fs/xfs/xfs_ioctl.c +1 -0
@@ -18,6 +18,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_sb.h"
fs/xfs/xfs_iomap.c +1 -0
@@ -18,6 +18,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_sb.h"
fs/xfs/xfs_iops.c +1 -0
@@ -18,6 +18,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_acl.h" #include "xfs_log.h" #include "xfs_trans.h"
fs/xfs/xfs_itable.c +1 -1
@@ -17,7 +17,7 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_inum.h" #include "xfs_trans.h"
fs/xfs/xfs_log.c +1 -1
@@ -17,7 +17,7 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_sb.h"
fs/xfs/xfs_log_cil.c +1 -1
@@ -17,7 +17,7 @@#include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_trans_priv.h"
fs/xfs/xfs_log_format.h +0 -177
193 lines not on this page · raw message
fs/xfs/xfs_log_recover.c +1 -0
@@ -18,6 +18,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_bit.h" #include "xfs_log.h" #include "xfs_inum.h"
fs/xfs/xfs_log_rlimit.c +1 -0
@@ -17,6 +17,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_ag.h"
fs/xfs/xfs_mount.c +1 -0
@@ -18,6 +18,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_bit.h" #include "xfs_log.h" #include "xfs_inum.h"
fs/xfs/xfs_qm.c +1 -0
@@ -18,6 +18,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_bit.h" #include "xfs_log.h" #include "xfs_trans.h"
fs/xfs/xfs_qm_syscalls.c +1 -0
@@ -21,6 +21,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_bit.h" #include "xfs_log.h" #include "xfs_trans.h"
fs/xfs/xfs_quota.h +0 -2
@@ -154,6 +154,4 @@ extern int xfs_qm_dqcheck(struct xfs_mount *, xfs_disk_dquot_t *, xfs_dqid_t, uint, uint, char *);extern int xfs_mount_reset_sbqflags (struct xfs_mount *); -extern const struct xfs_buf_ops xfs_dquot_buf_ops; -#endif /* __XFS_QUOTA_H__ */
fs/xfs/xfs_rtalloc.c +1 -0
@@ -18,6 +18,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_bit.h" #include "xfs_log.h" #include "xfs_trans.h"
fs/xfs/xfs_sb.h +0 -3
@@ -699,7 +699,4 @@ extern void xfs_sb_from_disk(struct xfs_sb *, struct xfs_dsb *);extern void xfs_sb_to_disk (struct xfs_dsb *,struct xfs_sb *,__int64_t );extern void xfs_sb_quota_from_disk (struct xfs_sb *sbp); -extern const struct xfs_buf_ops xfs_sb_buf_ops; -extern const struct xfs_buf_ops xfs_sb_quiet_buf_ops; -#endif /* __XFS_SB_H__ */
fs/xfs/xfs_shared.h new file +244 -0
244 lines not on this page · raw message
fs/xfs/xfs_super.c +1 -0
@@ -18,6 +18,7 @@#include "xfs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_inum.h" #include "xfs_trans.h"
fs/xfs/xfs_symlink.c +1 -0
@@ -19,6 +19,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_bit.h" #include "xfs_log.h" #include "xfs_trans.h"
fs/xfs/xfs_symlink_remote.c +1 -0
@@ -19,6 +19,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_ag.h"
fs/xfs/xfs_trace.c +1 -1
@@ -17,8 +17,8 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_sb.h"
fs/xfs/xfs_trans.c +1 -0
@@ -19,6 +19,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_sb.h"
fs/xfs/xfs_trans_buf.c +1 -1
@@ -17,7 +17,7 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_sb.h"
fs/xfs/xfs_trans_dquot.c +1 -0
@@ -18,6 +18,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_sb.h"
fs/xfs/xfs_trans_extfree.c +1 -1
@@ -17,7 +17,7 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_sb.h"
fs/xfs/xfs_trans_inode.c +1 -1
@@ -17,7 +17,7 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_sb.h"
fs/xfs/xfs_trans_resv.c +1 -0
@@ -19,6 +19,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_trans_resv.h" #include "xfs_trans.h"
Signature · 6 lines
1.8.4.rc3 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Re: [PATCH 04/19] xfs: create a shared header file for format-related information
Quoted 6 lines · Dave Chinner
All of the buffer operations structures are needed to be exported for
xfs_db, so move them all to a common location rather than spreading them all over the place. They are verifying the on-disk format, so whilexfs_format.hmight be a good place, it is not part of the on disk format.
Quoted 8 lines
Hence we need to create a new header file that we centralise these related definitions. Start by moving the bffer operations structures, and then also move all the other definitions that have crept into
xfs_log_format.handxfs_format.has there was no other shared header file to put them in.Signed-off-by Dave Chinner <[email protected]>Reviewed-by Christoph Hellwig <[email protected]>
/root/xfs/fs/xfs/xfs_file.c/root/xfs/fs/xfs/xfs_file.c: In function ‘xfs_file_fallocate’:/root/xfs/fs/xfs/xfs_file.c:844: error: ‘XFS_TRANS_WRITEID’ undeclared (first use in this function) /root/xfs/fs/xfs/xfs_file.c:844: error: (Each undeclared identifier is reported only once /root/xfs/fs/xfs/xfs_file.c:844: error: for each function it appears in.) /root/xfs/fs/xfs/xfs_file.c:860: error: ‘XFS_ICHGTIME_MOD’ undeclared (first use in this function) /root/xfs/fs/xfs/xfs_file.c:860: error: ‘XFS_ICHGTIME_CHG’ undeclared (first use in this function) /root/xfs/fs/xfs/xfs_file.c:864: error: ‘XFS_TRANS_SYNC’ undeclared (first use in this function) make[1]: *** [/root/xfs/fs/xfs/xfs_file.o] Error 1
Gah. Maybe due to pulling in Christoph's series. I'll look into it more tomorrow.
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
PATCH v2 4/19 xfs: create a shared header file for format-related information
From: Dave Chinner <[email protected]>
All of the buffer operations structures are needed to be exported for xfs_db, so move them all to a common location rather than spreading them all over the place. They are verifying the on-disk format, so while xfs_format.h might be a good place, it is not part of the on disk format.
Hence we need to create a new header file that we centralise these related definitions. Start by moving the bffer operations structures, and then also move all the other definitions that have crept into xfs_log_format.h and xfs_format.h as there was no other shared header file to put them in.
---
V2: fix compile error caused by Christoph's fallocate rework which changed the #include dependencies of fs/xfs/xfs_file.c.
fs/xfs/xfs_ag.h | 4 - fs/xfs/xfs_alloc.c | 3 +- fs/xfs/xfs_alloc.h | 3 - fs/xfs/xfs_alloc_btree.h | 2 - fs/xfs/xfs_aops.c | 4 +- fs/xfs/xfs_attr.c | 1 + fs/xfs/xfs_attr_inactive.c | 1 + fs/xfs/xfs_attr_leaf.h | 2 - fs/xfs/xfs_attr_remote.h | 2 - fs/xfs/xfs_bmap.c | 1 + fs/xfs/xfs_bmap_btree.h | 2 - fs/xfs/xfs_bmap_util.c | 1 + fs/xfs/xfs_btree.c | 2 +- fs/xfs/xfs_da_btree.c | 3 +- fs/xfs/xfs_da_btree.h | 2 - fs/xfs/xfs_dquot.c | 1 + fs/xfs/xfs_dquot.h | 2 - fs/xfs/xfs_extent_busy.c | 3 +- fs/xfs/xfs_file.c | 1 + fs/xfs/xfs_format.h | 10 -- fs/xfs/xfs_fsops.c | 2 + fs/xfs/xfs_ialloc.c | 3 +- fs/xfs/xfs_ialloc.h | 2 - fs/xfs/xfs_ialloc_btree.h | 2 - fs/xfs/xfs_icreate_item.c | 2 +- fs/xfs/xfs_inode.c | 1 + fs/xfs/xfs_inode_buf.c | 1 + fs/xfs/xfs_inode_buf.h | 3 - fs/xfs/xfs_ioctl.c | 1 + fs/xfs/xfs_iomap.c | 1 + fs/xfs/xfs_iops.c | 1 + fs/xfs/xfs_itable.c | 2 +- fs/xfs/xfs_log.c | 2 +- fs/xfs/xfs_log_cil.c | 2 +- fs/xfs/xfs_log_format.h | 177 -------------------------------- fs/xfs/xfs_log_recover.c | 1 + fs/xfs/xfs_log_rlimit.c | 1 + fs/xfs/xfs_mount.c | 1 + fs/xfs/xfs_qm.c | 1 + fs/xfs/xfs_qm_syscalls.c | 1 + fs/xfs/xfs_quota.h | 2 - fs/xfs/xfs_rtalloc.c | 1 + fs/xfs/xfs_sb.h | 3 - fs/xfs/xfs_shared.h | 244 ++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_super.c | 1 + fs/xfs/xfs_symlink.c | 1 + fs/xfs/xfs_symlink_remote.c | 1 + fs/xfs/xfs_trace.c | 2 +- fs/xfs/xfs_trans.c | 1 + fs/xfs/xfs_trans_buf.c | 2 +- fs/xfs/xfs_trans_dquot.c | 1 + fs/xfs/xfs_trans_extfree.c | 2 +- fs/xfs/xfs_trans_inode.c | 2 +- fs/xfs/xfs_trans_resv.c | 1 + 54 files changed, 289 insertions(+), 232 deletions(-)
fs/xfs/xfs_ag.h +0 -4
@@ -128,8 +128,6 @@ typedef struct xfs_agf {extern int xfs_read_agf (struct xfs_mount *mp,struct xfs_trans *tp,xfs_agnumber_t agno,int flags,struct xfs_buf **bpp); -extern const struct xfs_buf_ops xfs_agf_buf_ops; -/* * Size of the unlinked inode hash table in the agi. */
@@ -191,8 +189,6 @@ typedef struct xfs_agi {extern int xfs_read_agi (struct xfs_mount *mp,struct xfs_trans *tp,xfs_agnumber_t agno,struct xfs_buf **bpp); -extern const struct xfs_buf_ops xfs_agi_buf_ops; -/* * The third a.g. block contains the a.g. freelist, an array * of block pointers to blocks owned by the allocation btree code.
fs/xfs/xfs_alloc.c +2 -1
@@ -17,7 +17,8 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_bit.h" #include "xfs_log.h" #include "xfs_trans.h"
fs/xfs/xfs_alloc.h +0 -3
@@ -231,7 +231,4 @@ xfs_alloc_get_rec( xfs_extlen_t *len,/* output: length of extent */ int *stat); /* output: success/failure */ -extern const struct xfs_buf_ops xfs_agf_buf_ops; -extern const struct xfs_buf_ops xfs_agfl_buf_ops; -#endif /* __XFS_ALLOC_H__ */
fs/xfs/xfs_alloc_btree.h +0 -2
@@ -95,6 +95,4 @@ extern struct xfs_btree_cur *xfs_allocbt_init_cursor(struct xfs_mount *, xfs_agnumber_t, xfs_btnum_t);extern int xfs_allocbt_maxrecs (struct xfs_mount *,int ,int ); -extern const struct xfs_buf_ops xfs_allocbt_buf_ops; -#endif /* __XFS_ALLOC_BTREE_H__ */
fs/xfs/xfs_aops.c +3 -1
@@ -16,9 +16,11 @@* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" -#include "xfs_log.h" +#include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_log.h" #include "xfs_trans.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h"
fs/xfs/xfs_attr.c +1 -0
@@ -18,6 +18,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_bit.h" #include "xfs_log.h" #include "xfs_trans.h"
fs/xfs/xfs_attr_inactive.c +1 -0
@@ -19,6 +19,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_bit.h" #include "xfs_log.h" #include "xfs_trans.h"
fs/xfs/xfs_attr_leaf.h +0 -2
@@ -336,6 +336,4 @@ void xfs_attr3_leaf_hdr_from_disk(struct xfs_attr3_icleaf_hdr *to,void xfs_attr3_leaf_hdr_to_disk (struct xfs_attr_leafblock *to,struct xfs_attr3_icleaf_hdr *from); -extern const struct xfs_buf_ops xfs_attr3_leaf_buf_ops; -#endif /* __XFS_ATTR_LEAF_H__ */
fs/xfs/xfs_attr_remote.h +0 -2
@@ -45,8 +45,6 @@ struct xfs_attr3_rmt_hdr { ((bufsize) - (xfs_sb_version_hascrc (&(mp)->m_sb) ? \ sizeof(struct xfs_attr3_rmt_hdr) : 0)) -extern const struct xfs_buf_ops xfs_attr3_rmt_buf_ops; -int xfs_attr3_rmt_blocks (struct xfs_mount *mp,int attrlen);int xfs_attr_rmtval_get (struct xfs_da_args *args);
fs/xfs/xfs_bmap.c +1 -0
@@ -18,6 +18,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_bit.h" #include "xfs_log.h" #include "xfs_inum.h"
fs/xfs/xfs_bmap_btree.h +0 -2
@@ -243,6 +243,4 @@ extern int xfs_bmbt_change_owner(struct xfs_trans *tp, struct xfs_inode *ip,extern struct xfs_btree_cur *xfs_bmbt_init_cursor (struct xfs_mount *,struct xfs_trans *,struct xfs_inode *,int ); -extern const struct xfs_buf_ops xfs_bmbt_buf_ops; -#endif /* __XFS_BMAP_BTREE_H__ */
fs/xfs/xfs_bmap_util.c +1 -0
@@ -19,6 +19,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_bit.h" #include "xfs_log.h" #include "xfs_inum.h"
fs/xfs/xfs_btree.c +1 -1
@@ -17,7 +17,7 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_shared.h" #include "xfs_bit.h" #include "xfs_log.h" #include "xfs_trans.h"
fs/xfs/xfs_da_btree.c +2 -1
@@ -18,7 +18,8 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_bit.h" #include "xfs_log.h" #include "xfs_trans.h"
fs/xfs/xfs_da_btree.h +0 -2
@@ -309,8 +309,6 @@ int xfs_da3_node_read(struct xfs_trans *tp, struct xfs_inode *dp, xfs_dablk_t bno, xfs_daddr_t mappedbno, struct xfs_buf **bpp, int which_fork); -extern const struct xfs_buf_ops xfs_da3_node_buf_ops; -/* * Utility routines. */
fs/xfs/xfs_dquot.c +1 -0
@@ -18,6 +18,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_bit.h" #include "xfs_log.h" #include "xfs_trans.h"
fs/xfs/xfs_dquot.h +0 -2
@@ -172,6 +172,4 @@ static inline struct xfs_dquot *xfs_qm_dqhold(struct xfs_dquot *dqp) return dqp; } -extern const struct xfs_buf_ops xfs_dquot_buf_ops; -#endif /* __XFS_DQUOT_H__ */
fs/xfs/xfs_extent_busy.c +2 -1
@@ -19,7 +19,8 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_sb.h"
fs/xfs/xfs_file.c +1 -0
@@ -17,6 +17,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_sb.h" #include "xfs_ag.h"
fs/xfs/xfs_format.h +0 -10
@@ -156,14 +156,4 @@ struct xfs_dsymlink_hdr { ((bufsize) - (xfs_sb_version_hascrc (&(mp)->m_sb) ? \ sizeof(struct xfs_dsymlink_hdr) : 0)) -int xfs_symlink_blocks (struct xfs_mount *mp,int pathlen); -int xfs_symlink_hdr_set (struct xfs_mount *mp,xfs_ino_t ino,uint32_t offset, -uint32_t size,struct xfs_buf *bp); -bool xfs_symlink_hdr_ok (struct xfs_mount *mp,xfs_ino_t ino,uint32_t offset, -uint32_t size,struct xfs_buf *bp); -void xfs_symlink_local_to_remote (struct xfs_trans *tp,struct xfs_buf *bp, -struct xfs_inode *ip,struct xfs_ifork *ifp); - -extern const struct xfs_buf_ops xfs_symlink_buf_ops; -#endif /* __XFS_FORMAT_H__ */
fs/xfs/xfs_fsops.c +2 -0
@@ -18,6 +18,8 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_types.h" +#include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_sb.h"
fs/xfs/xfs_ialloc.c +2 -1
@@ -17,7 +17,8 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_bit.h" #include "xfs_log.h" #include "xfs_inum.h"
fs/xfs/xfs_ialloc.h +0 -2
@@ -158,6 +158,4 @@ int xfs_ialloc_inode_init(struct xfs_mount *mp, struct xfs_trans *tp, xfs_agnumber_t agno, xfs_agblock_t agbno, xfs_agblock_t length, unsigned int gen); -extern const struct xfs_buf_ops xfs_agi_buf_ops; -#endif /* __XFS_IALLOC_H__ */
fs/xfs/xfs_ialloc_btree.h +0 -2
@@ -110,6 +110,4 @@ extern struct xfs_btree_cur *xfs_inobt_init_cursor(struct xfs_mount *, struct xfs_trans *, struct xfs_buf *, xfs_agnumber_t);extern int xfs_inobt_maxrecs (struct xfs_mount *,int ,int ); -extern const struct xfs_buf_ops xfs_inobt_buf_ops; -#endif /* __XFS_IALLOC_BTREE_H__ */
fs/xfs/xfs_icreate_item.c +1 -1
@@ -17,7 +17,7 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_shared.h" #include "xfs_bit.h" #include "xfs_log.h" #include "xfs_trans.h"
fs/xfs/xfs_inode.c +1 -0
@@ -20,6 +20,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_inum.h" #include "xfs_trans.h"
fs/xfs/xfs_inode_buf.c +1 -0
@@ -18,6 +18,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_sb.h"
fs/xfs/xfs_inode_buf.h +0 -3
@@ -47,7 +47,4 @@ void xfs_inobp_check(struct xfs_mount *, struct xfs_buf *);#define xfs_inobp_check (mp, bp)#endif /* DEBUG */ -extern const struct xfs_buf_ops xfs_inode_buf_ops; -extern const struct xfs_buf_ops xfs_inode_buf_ra_ops; -#endif /* __XFS_INODE_BUF_H__ */
fs/xfs/xfs_ioctl.c +1 -0
@@ -18,6 +18,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_sb.h"
fs/xfs/xfs_iomap.c +1 -0
@@ -18,6 +18,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_sb.h"
fs/xfs/xfs_iops.c +1 -0
@@ -18,6 +18,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_acl.h" #include "xfs_log.h" #include "xfs_trans.h"
fs/xfs/xfs_itable.c +1 -1
@@ -17,7 +17,7 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_inum.h" #include "xfs_trans.h"
fs/xfs/xfs_log.c +1 -1
@@ -17,7 +17,7 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_sb.h"
fs/xfs/xfs_log_cil.c +1 -1
@@ -17,7 +17,7 @@#include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_trans_priv.h"
fs/xfs/xfs_log_format.h +0 -177
193 lines not on this page · raw message
fs/xfs/xfs_log_recover.c +1 -0
@@ -18,6 +18,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_bit.h" #include "xfs_log.h" #include "xfs_inum.h"
fs/xfs/xfs_log_rlimit.c +1 -0
@@ -17,6 +17,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_ag.h"
fs/xfs/xfs_mount.c +1 -0
@@ -18,6 +18,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_bit.h" #include "xfs_log.h" #include "xfs_inum.h"
fs/xfs/xfs_qm.c +1 -0
@@ -18,6 +18,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_bit.h" #include "xfs_log.h" #include "xfs_trans.h"
fs/xfs/xfs_qm_syscalls.c +1 -0
@@ -21,6 +21,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_bit.h" #include "xfs_log.h" #include "xfs_trans.h"
fs/xfs/xfs_quota.h +0 -2
@@ -154,6 +154,4 @@ extern int xfs_qm_dqcheck(struct xfs_mount *, xfs_disk_dquot_t *, xfs_dqid_t, uint, uint, char *);extern int xfs_mount_reset_sbqflags (struct xfs_mount *); -extern const struct xfs_buf_ops xfs_dquot_buf_ops; -#endif /* __XFS_QUOTA_H__ */
fs/xfs/xfs_rtalloc.c +1 -0
@@ -18,6 +18,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_bit.h" #include "xfs_log.h" #include "xfs_trans.h"
fs/xfs/xfs_sb.h +0 -3
@@ -699,7 +699,4 @@ extern void xfs_sb_from_disk(struct xfs_sb *, struct xfs_dsb *);extern void xfs_sb_to_disk (struct xfs_dsb *,struct xfs_sb *,__int64_t );extern void xfs_sb_quota_from_disk (struct xfs_sb *sbp); -extern const struct xfs_buf_ops xfs_sb_buf_ops; -extern const struct xfs_buf_ops xfs_sb_quiet_buf_ops; -#endif /* __XFS_SB_H__ */
fs/xfs/xfs_shared.h new file +244 -0
244 lines not on this page · raw message
fs/xfs/xfs_super.c +1 -0
@@ -18,6 +18,7 @@#include "xfs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_inum.h" #include "xfs_trans.h"
fs/xfs/xfs_symlink.c +1 -0
@@ -19,6 +19,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_bit.h" #include "xfs_log.h" #include "xfs_trans.h"
fs/xfs/xfs_symlink_remote.c +1 -0
@@ -19,6 +19,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_ag.h"
fs/xfs/xfs_trace.c +1 -1
@@ -17,8 +17,8 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_sb.h"
fs/xfs/xfs_trans.c +1 -0
@@ -19,6 +19,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_sb.h"
fs/xfs/xfs_trans_buf.c +1 -1
@@ -17,7 +17,7 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_sb.h"
fs/xfs/xfs_trans_dquot.c +1 -0
@@ -18,6 +18,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_sb.h"
fs/xfs/xfs_trans_extfree.c +1 -1
@@ -17,7 +17,7 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_sb.h"
fs/xfs/xfs_trans_inode.c +1 -1
@@ -17,7 +17,7 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_sb.h"
fs/xfs/xfs_trans_resv.c +1 -0
@@ -19,6 +19,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_trans_resv.h" #include "xfs_trans.h"
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
PATCH v2 5/19 xfs: unify directory/attribute format definitions
In reply to Dave ChinnerFrom: Dave Chinner <[email protected]>
The on-disk format definitions for the directory and attribute structures are spread across 3 header files right now, only one of which is dedicated to defining on-disk structures and their manipulation (xfs_dir2_format.h). Pull all the format definitions into a single header file - xfs_da_format.h - and switch all the code over to point at that.
--- fs/xfs/xfs_attr.c | 1 + fs/xfs/xfs_attr_inactive.c | 1 + fs/xfs/xfs_attr_leaf.c | 1 + fs/xfs/xfs_attr_leaf.h | 230 -------- fs/xfs/xfs_attr_list.c | 1 + fs/xfs/xfs_attr_remote.c | 1 + fs/xfs/xfs_attr_remote.h | 27 - fs/xfs/xfs_bmap.c | 2 +- fs/xfs/xfs_bmap_util.c | 2 +- fs/xfs/xfs_da_btree.c | 2 +- fs/xfs/xfs_da_btree.h | 140 ----- fs/xfs/xfs_da_format.h | 1362 ++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_dir2.c | 2 +- fs/xfs/xfs_dir2_block.c | 2 +- fs/xfs/xfs_dir2_data.c | 2 +- fs/xfs/xfs_dir2_format.h | 964 ------------------------------- fs/xfs/xfs_dir2_leaf.c | 2 +- fs/xfs/xfs_dir2_node.c | 2 +- fs/xfs/xfs_dir2_readdir.c | 2 +- fs/xfs/xfs_dir2_sf.c | 2 +- fs/xfs/xfs_export.c | 3 +- fs/xfs/xfs_file.c | 4 +- fs/xfs/xfs_inode.c | 2 +- fs/xfs/xfs_iops.c | 2 +- fs/xfs/xfs_log_recover.c | 2 +- fs/xfs/xfs_log_rlimit.c | 1 + fs/xfs/xfs_mount.c | 3 +- fs/xfs/xfs_sb.c | 2 +- fs/xfs/xfs_super.c | 2 +- fs/xfs/xfs_symlink.c | 3 +- fs/xfs/xfs_trace.c | 3 +- fs/xfs/xfs_trans.c | 2 +- fs/xfs/xfs_trans_resv.c | 1 + fs/xfs/xfs_xattr.c | 7 +- 34 files changed, 1398 insertions(+), 1387 deletions(-) create mode 100644 fs/xfs/xfs_da_format.h delete mode 100644 fs/xfs/xfs_dir2_format.h
fs/xfs/xfs_attr.c +1 -0
@@ -26,6 +26,7 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_da_format.h" #include "xfs_da_btree.h" #include "xfs_bmap_btree.h" #include "xfs_attr_sf.h"
fs/xfs/xfs_attr_inactive.c +1 -0
@@ -26,6 +26,7 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_da_format.h" #include "xfs_da_btree.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h"
fs/xfs/xfs_attr_leaf.c +1 -0
@@ -26,6 +26,7 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_da_format.h" #include "xfs_da_btree.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h"
fs/xfs/xfs_attr_leaf.h +0 -230
242 lines not on this page · raw message
fs/xfs/xfs_attr_list.c +1 -0
@@ -25,6 +25,7 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_da_format.h" #include "xfs_da_btree.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h"
fs/xfs/xfs_attr_remote.c +1 -0
@@ -26,6 +26,7 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_da_format.h" #include "xfs_error.h" #include "xfs_da_btree.h" #include "xfs_bmap_btree.h"
fs/xfs/xfs_attr_remote.h +0 -27
@@ -18,33 +18,6 @@#ifndef __XFS_ATTR_REMOTE_H__#define __XFS_ATTR_REMOTE_H__ -#define XFS_ATTR3_RMT_MAGIC 0x5841524d/* XARM */ - -/* -* There is one of these headers per filesystem block in a remote attribute. -* This is done to ensure there is a 1:1 mapping between the attribute value -* length and the number of blocks needed to store the attribute. This makes the -* verification of a buffer a little more complex, but greatly simplifies the -* allocation, reading and writing of these attributes as we don't have to guess -* the number of blocks needed to store the attribute data. -*/ -struct xfs_attr3_rmt_hdr { -__be32 rm_magic; -__be32 rm_offset; -__be32 rm_bytes; -__be32 rm_crc; -uuid_t rm_uuid; -__be64 rm_owner; -__be64 rm_blkno; -__be64 rm_lsn; -}; - -#define XFS_ATTR3_RMT_CRC_OFF offsetof(struct xfs_attr3_rmt_hdr, rm_crc) - -#define XFS_ATTR3_RMT_BUF_SPACE (mp, bufsize) \ - ((bufsize) - (xfs_sb_version_hascrc(&(mp)->m_sb) ? \ - sizeof(struct xfs_attr3_rmt_hdr) : 0)) -int xfs_attr3_rmt_blocks (struct xfs_mount *mp,int attrlen);int xfs_attr_rmtval_get (struct xfs_da_args *args);
fs/xfs/xfs_bmap.c +1 -1
@@ -26,8 +26,8 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_da_format.h" #include "xfs_da_btree.h" -#include "xfs_dir2_format.h" #include "xfs_dir2.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h"
fs/xfs/xfs_bmap_util.c +1 -1
@@ -27,7 +27,7 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_da_btree.h" +#include "xfs_da_format.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h"
fs/xfs/xfs_da_btree.c +1 -1
@@ -26,9 +26,9 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_da_format.h" #include "xfs_da_btree.h" #include "xfs_bmap_btree.h" -#include "xfs_dir2_format.h" #include "xfs_dir2.h" #include "xfs_dir2_priv.h" #include "xfs_dinode.h"
fs/xfs/xfs_da_btree.h +0 -140
146 lines not on this page · raw message
fs/xfs/xfs_da_format.h new file +1362 -0
1,362 lines not on this page · raw message
fs/xfs/xfs_dir2.c +1 -1
@@ -24,6 +24,7 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_da_format.h" #include "xfs_da_btree.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h"
@@ -31,7 +32,6 @@#include "xfs_inode.h" #include "xfs_inode_item.h" #include "xfs_bmap.h" -#include "xfs_dir2_format.h" #include "xfs_dir2.h" #include "xfs_dir2_priv.h" #include "xfs_error.h"
fs/xfs/xfs_dir2_block.c +1 -1
@@ -24,6 +24,7 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_da_format.h" #include "xfs_da_btree.h" #include "xfs_bmap_btree.h" #include "xfs_dinode.h"
@@ -31,7 +32,6 @@#include "xfs_inode_item.h" #include "xfs_bmap.h" #include "xfs_buf_item.h" -#include "xfs_dir2_format.h" #include "xfs_dir2.h" #include "xfs_dir2_priv.h" #include "xfs_error.h"
fs/xfs/xfs_dir2_data.c +1 -1
@@ -24,11 +24,11 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_da_format.h" #include "xfs_da_btree.h" #include "xfs_bmap_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" -#include "xfs_dir2_format.h" #include "xfs_dir2.h" #include "xfs_dir2_priv.h" #include "xfs_error.h"
fs/xfs/xfs_dir2_format.h deleted +0 -964
964 lines not on this page · raw message
fs/xfs/xfs_dir2_leaf.c +1 -1
@@ -25,12 +25,12 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_da_format.h" #include "xfs_da_btree.h" #include "xfs_bmap_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_bmap.h" -#include "xfs_dir2_format.h" #include "xfs_dir2.h" #include "xfs_dir2_priv.h" #include "xfs_error.h"
fs/xfs/xfs_dir2_node.c +1 -1
@@ -24,12 +24,12 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_da_format.h" #include "xfs_da_btree.h" #include "xfs_bmap_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_bmap.h" -#include "xfs_dir2_format.h" #include "xfs_dir2.h" #include "xfs_dir2_priv.h" #include "xfs_error.h"
fs/xfs/xfs_dir2_readdir.c +1 -1
@@ -25,11 +25,11 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_da_format.h" #include "xfs_da_btree.h" #include "xfs_bmap_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" -#include "xfs_dir2_format.h" #include "xfs_dir2.h" #include "xfs_dir2_priv.h" #include "xfs_error.h"
fs/xfs/xfs_dir2_sf.c +1 -1
@@ -23,13 +23,13 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_da_format.h" #include "xfs_da_btree.h" #include "xfs_bmap_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_inode_item.h" #include "xfs_error.h" -#include "xfs_dir2_format.h" #include "xfs_dir2.h" #include "xfs_dir2_priv.h" #include "xfs_trace.h"
fs/xfs/xfs_export.c +1 -2
@@ -22,8 +22,7 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_da_btree.h" -#include "xfs_dir2_format.h" +#include "xfs_da_format.h" #include "xfs_dir2.h" #include "xfs_export.h" #include "xfs_bmap_btree.h"
fs/xfs/xfs_file.c +2 -2
@@ -22,6 +22,8 @@#include "xfs_ag.h" #include "xfs_trans.h" #include "xfs_mount.h" +#include "xfs_da_format.h" +#include "xfs_da_btree.h" #include "xfs_bmap_btree.h" #include "xfs_alloc.h" #include "xfs_dinode.h"
@@ -30,8 +32,6 @@#include "xfs_bmap.h" #include "xfs_bmap_util.h" #include "xfs_error.h" -#include "xfs_da_btree.h" -#include "xfs_dir2_format.h" #include "xfs_dir2.h" #include "xfs_dir2_priv.h" #include "xfs_ioctl.h"
fs/xfs/xfs_inode.c +1 -1
@@ -29,8 +29,8 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_da_format.h" #include "xfs_da_btree.h" -#include "xfs_dir2_format.h" #include "xfs_dir2.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h"
fs/xfs/xfs_iops.c +1 -1
@@ -27,6 +27,7 @@#include "xfs_alloc.h" #include "xfs_quota.h" #include "xfs_mount.h" +#include "xfs_da_format.h" #include "xfs_bmap_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h"
@@ -42,7 +43,6 @@#include "xfs_icache.h" #include "xfs_symlink.h" #include "xfs_da_btree.h" -#include "xfs_dir2_format.h" #include "xfs_dir2_priv.h" #include <linux/capability.h>
fs/xfs/xfs_log_recover.c +1 -1
@@ -26,6 +26,7 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_da_format.h" #include "xfs_error.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h"
@@ -50,7 +51,6 @@/* Need all the magic numbers and buffer ops structures from these headers */ #include "xfs_symlink.h" #include "xfs_da_btree.h" -#include "xfs_dir2_format.h" #include "xfs_dir2.h" #include "xfs_attr_leaf.h" #include "xfs_attr_remote.h"
fs/xfs/xfs_log_rlimit.c +1 -0
@@ -23,6 +23,7 @@#include "xfs_ag.h" #include "xfs_sb.h" #include "xfs_mount.h" +#include "xfs_da_format.h" #include "xfs_trans_space.h" #include "xfs_bmap_btree.h" #include "xfs_inode.h"
fs/xfs/xfs_mount.c +1 -2
@@ -27,8 +27,7 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_da_btree.h" -#include "xfs_dir2_format.h" +#include "xfs_da_format.h" #include "xfs_dir2.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h"
fs/xfs/xfs_sb.c +1 -1
@@ -26,8 +26,8 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_da_format.h" #include "xfs_da_btree.h" -#include "xfs_dir2_format.h" #include "xfs_dir2.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h"
fs/xfs/xfs_super.c +1 -1
@@ -27,6 +27,7 @@#include "xfs_alloc.h" #include "xfs_quota.h" #include "xfs_mount.h" +#include "xfs_da_format.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h"
@@ -45,7 +46,6 @@#include "xfs_trans_priv.h" #include "xfs_filestream.h" #include "xfs_da_btree.h" -#include "xfs_dir2_format.h" #include "xfs_dir2.h"
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 6 lines
1.8.4.rc3 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Part of the diff is not shown here. View the raw message.
Re: [PATCH 05/19] xfs: unify directory/attribute format definitions
Quoted 10 lines · Dave Chinner
From: Dave Chinner <[email protected]>
The on-disk format definitions for the directory and attribute structures are spread across 3 header files right now, only one of which is dedicated to defining on-disk structures and their manipulation (
xfs_dir2_format.h). Pull all the format definitions into a single header file -xfs_da_format.h- and switch all the code over to point at that.Signed-off-by Dave Chinner <[email protected]>
IIRC Christoph had some concerns with this one, but it wasn't very clear exactly what they were. This looks ok to me. Christoph did you have anything more to add?
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Re: [PATCH 05/19] xfs: unify directory/attribute format definitions
Quoted 10 lines · Ben Myers
Quoted 9 lines · Dave Chinner
From: Dave Chinner <[email protected]>
The on-disk format definitions for the directory and attribute structures are spread across 3 header files right now, only one of which is dedicated to defining on-disk structures and their manipulation (
xfs_dir2_format.h). Pull all the format definitions into a single header file -xfs_da_format.h- and switch all the code over to point at that.
Quoted 5 lines
Quoted 1 line
Signed-off-by Dave Chinner <[email protected]>IIRC Christoph had some concerns with this one, but it wasn't very clear exactly what they were. This looks ok to me. Christoph did you have anything more to add?
I pulled some of the btree specific definitions back into xfs_btree.h (key, ptr unions), but I left the bmbt_rec-host definitions in the header as I haven't worked out exactly how to relocate them without introducing new dependencies everywhere. Hence I've cleaned up most of what Christoph asked for, but I'm leaving the hard part for a separate patch(set) where it will be (hopefully) much clearer what is being moved and what dependencies it reintroduces.
Cheers,
Dave.
Signature · 7 lines
Dave Chinner [email protected] _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Re: [PATCH 05/19] xfs: unify directory/attribute format definitions
Quoted 8 lines · Dave Chinner
I pulled some of the btree specific definitions back into
xfs_btree.h(key, ptr unions), but I left the bmbt_rec-host definitions in the header as I haven't worked out exactly how to relocate them without introducing new dependencies everywhere. Hence I've cleaned up most of what Christoph asked for, but I'm leaving the hard part for a separate patch(set) where it will be (hopefully) much clearer what is being moved and what dependencies it reintroduces.
Yes, please go ahead with merging it for now, we can sort out any minor issues later.
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
PATCH v2 6/19 xfs: split dquot buffer operations out
In reply to Dave ChinnerFrom: Dave Chinner <[email protected]>
Parts of userspace want to be able to read and modify dquot buffers (e.g. xfs_db) so we need to split out the reading and writing of these buffers so it is easy to shared code with libxfs in userspace.
--- fs/xfs/Makefile | 1 + fs/xfs/xfs_dquot.c | 117 +------------------ fs/xfs/xfs_dquot_buf.c | 288 +++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_log_recover.c | 133 +--------------------- fs/xfs/xfs_qm.c | 22 +--- fs/xfs/xfs_qm.h | 2 - fs/xfs/xfs_quota.h | 2 - fs/xfs/xfs_quota_defs.h | 4 + 8 files changed, 303 insertions(+), 266 deletions(-) create mode 100644 fs/xfs/xfs_dquot_buf.c
fs/xfs/Makefile +1 -0
@@ -72,6 +72,7 @@ xfs-y += xfs_alloc.o \ xfs_dir2_leaf.o \ xfs_dir2_node.o \ xfs_dir2_sf.o \ + xfs_dquot_buf.o \ xfs_ialloc.o \ xfs_ialloc_btree.o \ xfs_icreate_item.o \
fs/xfs/xfs_dquot.c +3 -114
141 lines not on this page · raw message
fs/xfs/xfs_dquot_buf.c new file +288 -0
288 lines not on this page · raw message
fs/xfs/xfs_log_recover.c +3 -130
157 lines not on this page · raw message
fs/xfs/xfs_qm.c +4 -18
@@ -665,20 +665,6 @@ xfs_qm_dqdetach( } } -int -xfs_qm_calc_dquots_per_chunk ( -struct xfs_mount *mp, -unsigned int nbblks)/* basic block units */ -{ -unsigned int ndquots; - -ASSERT (nbblks >0 ); - ndquots =BBTOB (nbblks); -do_div (ndquots,sizeof (xfs_dqblk_t)); - -return ndquots; -} -struct xfs_qm_isolate {struct list_head buffers;struct list_head dispose;
@@ -859,7 +845,7 @@ xfs_qm_init_quotainfo(/* Precalc some constants */ qinf->qi_dqchunklen =XFS_FSB_TO_BB (mp,XFS_DQUOT_CLUSTER_SIZE_FSB ); - qinf->qi_dqperchunk =xfs_qm_calc_dquots_per_chunk (mp, + qinf->qi_dqperchunk =xfs_calc_dquots_per_chunk (mp, qinf->qi_dqchunklen); mp->m_qflags |= (mp->m_sb.sb_qflags &XFS_ALL_QUOTA_CHKD );
@@ -1093,10 +1079,10 @@ xfs_qm_reset_dqcounts(/* * Do a sanity check, and if needed, repair the dqblk. Don't * output any warnings because it's perfectly possible to -* find uninitialised dquot blks. See comment in xfs_qm_dqcheck. +* find uninitialised dquot blks. See comment in xfs_dqcheck. */ - (void )xfs_qm_dqcheck (mp, ddq, id+j, type,XFS_QMOPT_DQREPAIR , -"xfs_quotacheck" ); +xfs_dqcheck (mp, ddq, id+j, type,XFS_QMOPT_DQREPAIR , +"xfs_quotacheck" ); ddq->d_bcount =0 ; ddq->d_icount =0 ; ddq->d_rtbcount =0 ;
fs/xfs/xfs_qm.h +0 -2
@@ -103,8 +103,6 @@ xfs_dq_to_quota_inode(struct xfs_dquot *dqp)return NULL ; } -extern int xfs_qm_calc_dquots_per_chunk (struct xfs_mount *mp, -unsigned int nbblks);extern void xfs_trans_mod_dquot (struct xfs_trans *,struct xfs_dquot *,uint ,long ); extern int xfs_trans_reserve_quota_bydquots(struct xfs_trans *,
fs/xfs/xfs_quota.h +0 -2
@@ -150,8 +150,6 @@ static inline int xfs_trans_reserve_quota_bydquots(struct xfs_trans *tp,xfs_trans_reserve_quota_bydquots (tp, mp, ud, gd, pd, nb, ni, \ f | XFS_QMOPT_RES_REGBLKS) -extern int xfs_qm_dqcheck (struct xfs_mount *,xfs_disk_dquot_t *, -xfs_dqid_t ,uint ,uint ,char *);extern int xfs_mount_reset_sbqflags (struct xfs_mount *);#endif /* __XFS_QUOTA_H__ */
fs/xfs/xfs_quota_defs.h +4 -0
@@ -154,4 +154,8 @@ typedef __uint16_t xfs_qwarncnt_t; (XFS_QMOPT_UQUOTA | XFS_QMOPT_PQUOTA | XFS_QMOPT_GQUOTA)#define XFS_QMOPT_RESBLK_MASK (XFS_QMOPT_RES_REGBLKS | XFS_QMOPT_RES_RTBLKS) +extern int xfs_dqcheck (struct xfs_mount *mp,xfs_disk_dquot_t *ddq, +xfs_dqid_t id,uint type,uint flags,char *str); +extern int xfs_calc_dquots_per_chunk (struct xfs_mount *mp,unsigned int nbblks); +#endif /* __XFS_QUOTA_H__ */
Signature · 6 lines
1.8.4.rc3 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH v2 7/19 xfs: remove unused transaction callback variables
In reply to Dave ChinnerFrom: Dave Chinner <[email protected]>
We don't do callbacks at transaction commit time, no do we have any infrastructure to set up or run such callbacks, so remove the variables and typedefs for these operations. If we ever need to add callbacks, we can reintroduce the variables at that time.
--- fs/xfs/xfs_trans.h | 7 ------- 1 file changed, 7 deletions(-)
fs/xfs/xfs_trans.h +0 -7
@@ -86,17 +86,10 @@ struct xfs_item_ops {#define XFS_ITEM_FLUSHING 3/* -* This is the type of function which can be given to xfs_trans_callback() -* to be called upon the transaction's commit to disk. -*/ -typedef void (*xfs_trans_callback_t )(struct xfs_trans *,void *); - -/* * This is the structure maintained for every active transaction. */ typedef struct xfs_trans { unsigned int t_magic; /* magic number */ - xfs_log_callback_t t_logcb; /* log callback struct */ unsigned int t_type; /* transaction type */ unsigned int t_log_res; /* amt of log space resvd */ unsigned int t_log_count; /* count for perm log res */
Signature · 6 lines
1.8.4.rc3 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Re: [PATCH 07/19] xfs: remove unused transaction callback variables
Quoted 3 lines · Dave Chinner
From: Dave Chinner <[email protected]>
We don't do callbacks at transaction commit time, no do we have any
nor
Quoted 5 lines
infrastructure to set up or run such callbacks, so remove the variables and typedefs for these operations. If we ever need to add callbacks, we can reintroduce the variables at that time.
Signed-off-by Dave Chinner <[email protected]>
Looks fine.
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
PATCH v2 8/19 xfs: decouple log and transaction headers
In reply to Dave ChinnerFrom: Dave Chinner <[email protected]>
xfs_trans.h has a dependency on xfs_log.h for a couple of structures. Most code that does transactions doesn't need to know anything about the log, bu this dependency means that they have to include xfs_log.h. Decouple the xfs_trans.h and xfs_log.h header files and clean up the includes to be in dependency order.
In doing this, remove the direct include of xfs_trans_reserve.h from xfs_trans.h so that we remove the dependency between xfs_trans.h and xfs_mount.h. Hence the xfs_trans.h include can be moved to the indicate the actual dependencies oher header files have on it.
Note that these are kernel only header files, so this does not translate to any userspace changes at all.
--- fs/xfs/xfs_alloc.c | 6 ++++-- fs/xfs/xfs_alloc_btree.c | 6 +++--- fs/xfs/xfs_aops.c | 7 ++++--- fs/xfs/xfs_attr.c | 8 ++++---- fs/xfs/xfs_attr_inactive.c | 8 ++++---- fs/xfs/xfs_attr_leaf.c | 7 +++---- fs/xfs/xfs_attr_list.c | 6 +++--- fs/xfs/xfs_attr_remote.c | 7 +++---- fs/xfs/xfs_bit.c | 5 +---- fs/xfs/xfs_bmap.c | 7 ++++--- fs/xfs/xfs_bmap_btree.c | 5 +++-- fs/xfs/xfs_bmap_util.c | 9 +++++---- fs/xfs/xfs_btree.c | 5 +++-- fs/xfs/xfs_buf.c | 5 +++-- fs/xfs/xfs_buf_item.c | 7 ++++--- fs/xfs/xfs_da_btree.c | 7 ++++--- fs/xfs/xfs_dir2.c | 6 +++--- fs/xfs/xfs_dir2_block.c | 6 +++--- fs/xfs/xfs_dir2_data.c | 6 +++--- fs/xfs/xfs_dir2_leaf.c | 6 +++--- fs/xfs/xfs_dir2_node.c | 6 +++--- fs/xfs/xfs_dir2_readdir.c | 6 +++--- fs/xfs/xfs_dir2_sf.c | 6 +++--- fs/xfs/xfs_discard.c | 5 +++-- fs/xfs/xfs_dquot.c | 10 ++++++---- fs/xfs/xfs_dquot_buf.c | 5 +++-- fs/xfs/xfs_dquot_item.c | 6 ++++-- fs/xfs/xfs_error.c | 5 ++--- fs/xfs/xfs_export.c | 7 ++++--- fs/xfs/xfs_extent_busy.c | 6 ++++-- fs/xfs/xfs_extfree_item.c | 8 ++++---- fs/xfs/xfs_file.c | 6 ++++-- fs/xfs/xfs_filestream.c | 10 +++++----- fs/xfs/xfs_fsops.c | 9 +++++---- fs/xfs/xfs_ialloc.c | 7 ++++--- fs/xfs/xfs_ialloc_btree.c | 6 +++--- fs/xfs/xfs_icache.c | 9 ++++----- fs/xfs/xfs_icreate_item.c | 5 +++-- fs/xfs/xfs_inode.c | 12 +++++++----- fs/xfs/xfs_inode_buf.c | 7 ++++--- fs/xfs/xfs_inode_fork.c | 6 +++--- fs/xfs/xfs_inode_item.c | 8 ++++---- fs/xfs/xfs_ioctl.c | 7 ++++--- fs/xfs/xfs_ioctl32.c | 4 ++-- fs/xfs/xfs_iomap.c | 11 ++++++----- fs/xfs/xfs_iops.c | 13 +++++++------ fs/xfs/xfs_itable.c | 4 ++-- fs/xfs/xfs_log.c | 8 +++++--- fs/xfs/xfs_log.h | 10 ++-------- fs/xfs/xfs_log_cil.c | 10 ++++++---- fs/xfs/xfs_log_priv.h | 7 ++++--- fs/xfs/xfs_log_recover.c | 13 +++++-------- fs/xfs/xfs_log_rlimit.c | 4 ++-- fs/xfs/xfs_message.c | 5 ++--- fs/xfs/xfs_mount.c | 10 ++++++---- fs/xfs/xfs_qm.c | 9 +++++---- fs/xfs/xfs_qm_bhv.c | 5 +++-- fs/xfs/xfs_qm_syscalls.c | 7 ++++--- fs/xfs/xfs_quotaops.c | 2 +- fs/xfs/xfs_rtalloc.c | 7 ++++--- fs/xfs/xfs_sb.c | 7 ++++--- fs/xfs/xfs_super.c | 8 +++++--- fs/xfs/xfs_symlink.c | 8 +++++--- fs/xfs/xfs_symlink_remote.c | 5 +++-- fs/xfs/xfs_trace.c | 8 +++++--- fs/xfs/xfs_trans.c | 10 ++++++---- fs/xfs/xfs_trans.h | 10 +++++----- fs/xfs/xfs_trans_ail.c | 7 ++++--- fs/xfs/xfs_trans_buf.c | 5 +++-- fs/xfs/xfs_trans_dquot.c | 7 ++++--- fs/xfs/xfs_trans_extfree.c | 5 +++-- fs/xfs/xfs_trans_inode.c | 5 +++-- fs/xfs/xfs_trans_priv.h | 1 - fs/xfs/xfs_trans_resv.c | 6 +++--- fs/xfs/xfs_xattr.c | 3 +-- 75 files changed, 276 insertions(+), 239 deletions(-)
fs/xfs/xfs_alloc.c +4 -2
@@ -18,10 +18,10 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_log_format.h" #include "xfs_shared.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -36,7 +36,9 @@#include "xfs_error.h" #include "xfs_cksum.h" #include "xfs_trace.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" +#include "xfs_log.h" struct workqueue_struct *xfs_alloc_wq;
fs/xfs/xfs_alloc_btree.c +3 -3
@@ -17,9 +17,8 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -34,6 +33,7 @@#include "xfs_error.h" #include "xfs_trace.h" #include "xfs_cksum.h" +#include "xfs_trans.h" STATIC struct xfs_btree_cur *
fs/xfs/xfs_aops.c +4 -3
@@ -16,16 +16,17 @@* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" -#include "xfs_format.h" #include "xfs_shared.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_alloc.h" #include "xfs_error.h"
fs/xfs/xfs_attr.c +4 -4
@@ -17,12 +17,11 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" -#include "xfs_trans_priv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -33,6 +32,7 @@#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_alloc.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h"
fs/xfs/xfs_attr_inactive.c +4 -4
@@ -18,11 +18,11 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -36,6 +36,7 @@#include "xfs_attr_remote.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_bmap.h" #include "xfs_attr.h"
@@ -43,7 +44,6 @@#include "xfs_error.h" #include "xfs_quota.h" #include "xfs_trace.h" -#include "xfs_trans_priv.h" /* * Look at all the extents for this logical region,
fs/xfs/xfs_attr_leaf.c +3 -4
@@ -18,11 +18,9 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" -#include "xfs_trans_priv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -37,6 +35,7 @@#include "xfs_attr_remote.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_bmap.h" #include "xfs_attr.h"
fs/xfs/xfs_attr_list.c +3 -3
@@ -18,10 +18,9 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -36,6 +35,7 @@#include "xfs_attr_remote.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_bmap.h" #include "xfs_attr.h"
fs/xfs/xfs_attr_remote.c +3 -4
@@ -18,11 +18,9 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" -#include "xfs_trans_priv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -33,6 +31,7 @@#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_alloc.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h"
fs/xfs/xfs_bit.c +1 -4
@@ -16,10 +16,7 @@* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" -#include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" -#include "xfs_buf_item.h" +#include "xfs_log_format.h" /* * XFS bit manipulation routines, used in non-realtime code.
fs/xfs/xfs_bmap.c +4 -3
@@ -17,12 +17,12 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" #include "xfs_inum.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -37,6 +37,7 @@#include "xfs_btree.h" #include "xfs_mount.h" #include "xfs_itable.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_extfree_item.h" #include "xfs_alloc.h"
fs/xfs/xfs_bmap_btree.c +3 -2
@@ -18,9 +18,9 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -29,6 +29,7 @@#include "xfs_ialloc_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_alloc.h" #include "xfs_btree.h"
fs/xfs/xfs_bmap_util.c +5 -4
@@ -18,12 +18,11 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_inum.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -34,6 +33,7 @@#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_btree.h" +#include "xfs_trans.h" #include "xfs_extfree_item.h" #include "xfs_alloc.h" #include "xfs_bmap.h"
@@ -44,6 +44,7 @@#include "xfs_trans_space.h" #include "xfs_trace.h" #include "xfs_icache.h" +#include "xfs_log.h" /* Kernel only BMAP related definitions and functions */
fs/xfs/xfs_btree.c +3 -2
@@ -18,9 +18,9 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -29,6 +29,7 @@#include "xfs_ialloc_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_buf_item.h" #include "xfs_btree.h"
fs/xfs/xfs_buf.c +3 -2
@@ -34,12 +34,13 @@#include <linux/backing-dev.h> #include <linux/freezer.h> -#include "xfs_sb.h" +#include "xfs_log_format.h" #include "xfs_trans_resv.h" -#include "xfs_log.h" +#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" #include "xfs_trace.h" +#include "xfs_log.h" static kmem_zone_t *xfs_buf_zone;
fs/xfs/xfs_buf_item.c +4 -3
@@ -17,17 +17,18 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_trans_priv.h" #include "xfs_error.h" #include "xfs_trace.h" +#include "xfs_log.h" kmem_zone_t *xfs_buf_item_zone;
fs/xfs/xfs_da_btree.c +4 -3
@@ -18,11 +18,11 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -33,6 +33,7 @@#include "xfs_dir2_priv.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_alloc.h" #include "xfs_bmap.h"
fs/xfs/xfs_dir2.c +3 -3
@@ -17,10 +17,9 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_log.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_inum.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -30,6 +29,7 @@#include "xfs_alloc_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_bmap.h" #include "xfs_dir2.h"
fs/xfs/xfs_dir2_block.c +3 -3
@@ -18,9 +18,8 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -29,6 +28,7 @@#include "xfs_bmap_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_bmap.h" #include "xfs_buf_item.h"
fs/xfs/xfs_dir2_data.c +3 -3
@@ -18,9 +18,8 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -32,6 +31,7 @@#include "xfs_dir2.h" #include "xfs_dir2_priv.h" #include "xfs_error.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_cksum.h"
fs/xfs/xfs_dir2_leaf.c +3 -3
@@ -18,10 +18,9 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -35,6 +34,7 @@#include "xfs_dir2_priv.h" #include "xfs_error.h" #include "xfs_trace.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_cksum.h"
fs/xfs/xfs_dir2_node.c +3 -3
@@ -18,9 +18,8 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -34,6 +33,7 @@#include "xfs_dir2_priv.h" #include "xfs_error.h" #include "xfs_trace.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_cksum.h"
fs/xfs/xfs_dir2_readdir.c +3 -3
@@ -18,10 +18,9 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -35,6 +34,7 @@#include "xfs_error.h" #include "xfs_trace.h" #include "xfs_bmap.h" +#include "xfs_trans.h" /* * Directory file type support functions
fs/xfs/xfs_dir2_sf.c +3 -3
@@ -17,9 +17,8 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -28,6 +27,7 @@#include "xfs_bmap_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_error.h" #include "xfs_dir2.h"
fs/xfs/xfs_discard.c +3 -2
@@ -17,8 +17,8 @@*/ #include "xfs.h" #include "xfs_format.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -33,6 +33,7 @@#include "xfs_extent_busy.h" #include "xfs_discard.h" #include "xfs_trace.h" +#include "xfs_log.h" STATIC int xfs_trim_extents(
fs/xfs/xfs_dquot.c +6 -4
@@ -18,29 +18,31 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_log_format.h" #include "xfs_shared.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" -#include "xfs_alloc.h" -#include "xfs_quota.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_inode.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" +#include "xfs_alloc.h" +#include "xfs_quota.h" #include "xfs_rtalloc.h" #include "xfs_error.h" #include "xfs_itable.h" #include "xfs_attr.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_trans_space.h" #include "xfs_trans_priv.h" #include "xfs_qm.h" #include "xfs_cksum.h" #include "xfs_trace.h" +#include "xfs_log.h" /* * Lock order:
fs/xfs/xfs_dquot_buf.c +3 -2
@@ -19,15 +19,16 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_inode.h" #include "xfs_quota.h" +#include "xfs_trans.h" #include "xfs_qm.h" #include "xfs_error.h" #include "xfs_cksum.h"
fs/xfs/xfs_dquot_item.c +4 -2
@@ -18,8 +18,8 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_alloc.h"
@@ -32,9 +32,11 @@#include "xfs_error.h" #include "xfs_itable.h" #include "xfs_attr.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_trans_priv.h" #include "xfs_qm.h" +#include "xfs_log.h" static inline struct xfs_dq_logitem *DQUOT_ITEM (struct xfs_log_item *lip) {
fs/xfs/xfs_error.c +2 -3
@@ -17,9 +17,8 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
fs/xfs/xfs_export.c +4 -3
@@ -16,9 +16,8 @@* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -27,9 +26,11 @@#include "xfs_export.h" #include "xfs_bmap_btree.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_trace.h" #include "xfs_icache.h" +#include "xfs_log.h" /* * Note that we only accept fileids which are long enough rather than allow
fs/xfs/xfs_extent_busy.c +4 -2
@@ -20,9 +20,9 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_log_format.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -31,6 +31,8 @@#include "xfs_inode.h" #include "xfs_extent_busy.h" #include "xfs_trace.h" +#include "xfs_trans.h" +#include "xfs_log.h" void xfs_extent_busy_insert(
fs/xfs/xfs_extfree_item.c +4 -4
@@ -17,14 +17,14 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_trans.h" -#include "xfs_buf_item.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_trans.h" #include "xfs_trans_priv.h" +#include "xfs_buf_item.h" #include "xfs_extfree_item.h"
fs/xfs/xfs_file.c +4 -2
@@ -17,10 +17,10 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_log.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" -#include "xfs_trans.h" #include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_da_btree.h"
@@ -28,6 +28,7 @@#include "xfs_alloc.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h"
@@ -36,6 +37,7 @@#include "xfs_dir2_priv.h" #include "xfs_ioctl.h" #include "xfs_trace.h" +#include "xfs_log.h" #include <linux/aio.h> #include <linux/dcache.h>
fs/xfs/xfs_filestream.c +5 -5
@@ -16,15 +16,15 @@* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" -#include "xfs_log.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" +#include "xfs_ag.h" +#include "xfs_sb.h" +#include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_inum.h" #include "xfs_dinode.h" #include "xfs_inode.h" -#include "xfs_ag.h" -#include "xfs_trans.h" -#include "xfs_sb.h" -#include "xfs_mount.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" #include "xfs_alloc.h"
fs/xfs/xfs_fsops.c +5 -4
@@ -17,11 +17,10 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_format.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -30,6 +29,7 @@#include "xfs_ialloc_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_btree.h" #include "xfs_error.h"
@@ -41,6 +41,7 @@#include "xfs_rtalloc.h" #include "xfs_filestream.h" #include "xfs_trace.h" +#include "xfs_log.h" /* * File system operations
fs/xfs/xfs_ialloc.c +4 -3
@@ -17,12 +17,12 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" #include "xfs_inum.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -38,6 +38,7 @@#include "xfs_error.h" #include "xfs_bmap.h" #include "xfs_cksum.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_icreate_item.h" #include "xfs_icache.h"
fs/xfs/xfs_ialloc_btree.c +3 -3
@@ -17,10 +17,9 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -35,6 +34,7 @@#include "xfs_error.h" #include "xfs_trace.h" #include "xfs_cksum.h" +#include "xfs_trans.h" STATIC int
fs/xfs/xfs_icache.c +4 -5
@@ -18,12 +18,9 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_log_priv.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_inum.h" -#include "xfs_trans.h" -#include "xfs_trans_priv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -32,6 +29,8 @@#include "xfs_dinode.h" #include "xfs_error.h" #include "xfs_filestream.h" +#include "xfs_trans.h" +#include "xfs_trans_priv.h" #include "xfs_inode_item.h" #include "xfs_quota.h" #include "xfs_trace.h"
fs/xfs/xfs_icreate_item.c +3 -2
@@ -18,12 +18,13 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_trans.h" #include "xfs_trans_priv.h" #include "xfs_error.h" #include "xfs_icreate_item.h"
fs/xfs/xfs_inode.c +7 -5
@@ -19,13 +19,11 @@#include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" -#include "xfs_log.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_inum.h" -#include "xfs_trans.h" -#include "xfs_trans_space.h" -#include "xfs_trans_priv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -39,6 +37,8 @@#include "xfs_attr.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans_space.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_inode_item.h" #include "xfs_btree.h"
@@ -53,6 +53,8 @@#include "xfs_trace.h" #include "xfs_icache.h" #include "xfs_symlink.h" +#include "xfs_trans_priv.h" +#include "xfs_log.h" kmem_zone_t *xfs_inode_zone;
fs/xfs/xfs_inode_buf.c +4 -3
@@ -17,10 +17,10 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -32,6 +32,7 @@#include "xfs_cksum.h" #include "xfs_icache.h" #include "xfs_ialloc.h" +#include "xfs_trans.h" /* * Check that none of the inode's in the buffer have a next
fs/xfs/xfs_inode_fork.c +3 -3
@@ -20,10 +20,9 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" -#include "xfs_log.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_inum.h" -#include "xfs_trans.h" -#include "xfs_trans_priv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -33,6 +32,7 @@#include "xfs_attr_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_inode_item.h" #include "xfs_btree.h"
fs/xfs/xfs_inode_item.c +4 -4
@@ -17,19 +17,19 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_trans_priv.h" #include "xfs_bmap_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_error.h" #include "xfs_trace.h" +#include "xfs_trans_priv.h" kmem_zone_t *xfs_ili_zone;/* inode log item zone */
fs/xfs/xfs_ioctl.c +4 -3
@@ -17,10 +17,10 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_alloc.h"
@@ -35,6 +35,7 @@#include "xfs_attr.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_fsops.h" #include "xfs_discard.h"
fs/xfs/xfs_ioctl32.c +2 -2
@@ -22,8 +22,8 @@#include <asm/uaccess.h> #include "xfs.h" #include "xfs_fs.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
fs/xfs/xfs_iomap.c +6 -5
@@ -17,21 +17,22 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" -#include "xfs_alloc.h" -#include "xfs_quota.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" +#include "xfs_alloc.h" +#include "xfs_quota.h" #include "xfs_btree.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h"
fs/xfs/xfs_iops.c +7 -6
@@ -17,15 +17,12 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" -#include "xfs_acl.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" -#include "xfs_alloc.h" -#include "xfs_quota.h" #include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_bmap_btree.h"
@@ -33,10 +30,14 @@#include "xfs_inode.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" +#include "xfs_acl.h" +#include "xfs_alloc.h" +#include "xfs_quota.h" #include "xfs_rtalloc.h" #include "xfs_error.h" #include "xfs_itable.h" #include "xfs_attr.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_inode_item.h" #include "xfs_trace.h"
fs/xfs/xfs_itable.c +2 -2
@@ -18,9 +18,9 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" -#include "xfs_log.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_inum.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
fs/xfs/xfs_log.c +5 -3
@@ -18,19 +18,21 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" #include "xfs_error.h" +#include "xfs_trans.h" +#include "xfs_trans_priv.h" +#include "xfs_log.h" #include "xfs_log_priv.h" #include "xfs_buf_item.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" #include "xfs_log_recover.h" -#include "xfs_trans_priv.h" #include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trace.h"
fs/xfs/xfs_log.h +2 -8
@@ -18,8 +18,6 @@ #ifndef __XFS_LOG_H__ #define __XFS_LOG_H__ -#include "xfs_log_format.h" - struct xfs_log_vec { struct xfs_log_vec *lv_next; /* next lv in build list */ int lv_niovecs; /* number of iovecs in lv */
@@ -82,11 +80,7 @@ struct xlog_ticket;struct xfs_log_item ;struct xfs_item_ops ;struct xfs_trans ; - -void xfs_log_item_init (struct xfs_mount *mp, -struct xfs_log_item *item, -int type, -const struct xfs_item_ops *ops); +struct xfs_log_callback ; xfs_lsn_t xfs_log_done(struct xfs_mount *mp, struct xlog_ticket *ticket,
@@ -114,7 +108,7 @@ xfs_lsn_t xlog_assign_tail_lsn_locked(struct xfs_mount *mp);void xfs_log_space_wake (struct xfs_mount *mp);int xfs_log_notify (struct xfs_mount *mp,struct xlog_in_core *iclog, -xfs_log_callback_t *callback_entry); +struct xfs_log_callback *callback_entry);int xfs_log_release_iclog (struct xfs_mount *mp,struct xlog_in_core *iclog); int xfs_log_reserve(struct xfs_mount *mp,
fs/xfs/xfs_log_cil.c +6 -4
@@ -17,11 +17,9 @@#include "xfs.h" #include "xfs_fs.h" +#include "xfs_log_format.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" -#include "xfs_trans_priv.h" -#include "xfs_log_priv.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -29,6 +27,10 @@#include "xfs_alloc.h" #include "xfs_extent_busy.h" #include "xfs_discard.h" +#include "xfs_trans.h" +#include "xfs_trans_priv.h" +#include "xfs_log.h" +#include "xfs_log_priv.h" /* * Allocate a new ticket. Failing to get a new ticket makes it really hard to
fs/xfs/xfs_log_priv.h +4 -3
@@ -22,6 +22,7 @@ struct xfs_buf;struct xlog ;struct xlog_ticket ;struct xfs_mount ; +struct xfs_log_callback ;/* * Flags for log structure
@@ -227,8 +228,8 @@ typedef struct xlog_in_core {/* Callback structures need their own cacheline */ spinlock_t ic_callback_lock____cacheline_aligned_in_smp ; -xfs_log_callback_t *ic_callback; -xfs_log_callback_t **ic_callback_tail; +struct xfs_log_callback *ic_callback; +struct xfs_log_callback **ic_callback_tail;/* reference counts need their own cacheline */ atomic_t ic_refcnt____cacheline_aligned_in_smp ;
@@ -254,7 +255,7 @@ struct xfs_cil_ctx {int space_used;/* aggregate size of regions */ struct list_head busy_extents;/* busy extents in chkpt */ struct xfs_log_vec *lv_chain;/* logvecs being pushed */ -xfs_log_callback_t log_cb;/* completion callback hook. */ +struct xfs_log_callback log_cb;/* completion callback hook. */ struct list_head committing;/* ctx committing list */ };
fs/xfs/xfs_log_recover.c +5 -8
@@ -17,12 +17,12 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" #include "xfs_inum.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -34,11 +34,12 @@#include "xfs_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_alloc.h" #include "xfs_ialloc.h" +#include "xfs_log.h" #include "xfs_log_priv.h" -#include "xfs_buf_item.h" #include "xfs_log_recover.h" #include "xfs_extfree_item.h" #include "xfs_trans_priv.h"
@@ -46,14 +47,10 @@#include "xfs_cksum.h" #include "xfs_trace.h" #include "xfs_icache.h" -#include "xfs_icreate_item.h" /* Need all the magic numbers and buffer ops structures from these headers */ -#include "xfs_symlink.h" #include "xfs_da_btree.h" #include "xfs_dir2.h" -#include "xfs_attr_leaf.h" -#include "xfs_attr_remote.h" #define BLK_AVG (blk1, blk2) ((blk1+blk2) >> 1)
fs/xfs/xfs_log_rlimit.c +2 -2
@@ -18,8 +18,8 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_ag.h" #include "xfs_sb.h" #include "xfs_mount.h"
fs/xfs/xfs_message.c +2 -3
@@ -17,9 +17,8 @@#include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
fs/xfs/xfs_mount.c +6 -4
@@ -17,17 +17,19 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" #include "xfs_inum.h" -#include "xfs_trans.h" -#include "xfs_trans_priv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" #include "xfs_da_format.h" +#include "xfs_trans.h" +#include "xfs_trans_priv.h" +#include "xfs_log.h" #include "xfs_dir2.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h"
fs/xfs/xfs_qm.c +5 -4
@@ -18,14 +18,12 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_log_format.h" #include "xfs_shared.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" -#include "xfs_alloc.h" -#include "xfs_quota.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_ialloc_btree.h"
@@ -33,10 +31,13 @@#include "xfs_inode.h" #include "xfs_ialloc.h" #include "xfs_itable.h" +#include "xfs_alloc.h" #include "xfs_rtalloc.h" +#include "xfs_quota.h" #include "xfs_error.h" #include "xfs_bmap.h" #include "xfs_attr.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_trans_space.h" #include "xfs_qm.h"
fs/xfs/xfs_qm_bhv.c +3 -2
@@ -18,8 +18,8 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_alloc.h"
@@ -32,6 +32,7 @@#include "xfs_rtalloc.h" #include "xfs_error.h" #include "xfs_attr.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_qm.h"
fs/xfs/xfs_qm_syscalls.c +4 -3
@@ -20,11 +20,11 @@#include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_alloc.h"
@@ -32,6 +32,7 @@#include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_itable.h" #include "xfs_bmap.h"
fs/xfs/xfs_quotaops.c +1 -1
@@ -17,8 +17,8 @@*/ #include "xfs.h" #include "xfs_format.h" +#include "xfs_log_format.h" #include "xfs_trans_resv.h" -#include "xfs_log.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
fs/xfs/xfs_rtalloc.c +4 -3
@@ -17,11 +17,11 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -34,6 +34,7 @@#include "xfs_rtalloc.h" #include "xfs_fsops.h" #include "xfs_error.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_trans_space.h" #include "xfs_trace.h"
fs/xfs/xfs_sb.c +4 -3
@@ -18,11 +18,10 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" #include "xfs_inum.h" -#include "xfs_trans.h" -#include "xfs_trans_priv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -44,6 +43,8 @@#include "xfs_fsops.h" #include "xfs_trace.h" #include "xfs_cksum.h" +#include "xfs_trans.h" +#include "xfs_trans_priv.h" #include "xfs_buf_item.h" /*
fs/xfs/xfs_super.c +5 -3
@@ -17,11 +17,11 @@*/ #include "xfs.h" -#include "xfs_format.h" #include "xfs_shared.h" -#include "xfs_log.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_inum.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_alloc.h"
@@ -41,7 +41,9 @@#include "xfs_itable.h" #include "xfs_fsops.h" #include "xfs_attr.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" +#include "xfs_log.h" #include "xfs_log_priv.h" #include "xfs_trans_priv.h" #include "xfs_filestream.h"
fs/xfs/xfs_symlink.c +5 -3
@@ -17,12 +17,12 @@* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" +#include "xfs_shared.h" #include "xfs_fs.h" #include "xfs_format.h" -#include "xfs_shared.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -41,7 +41,9 @@#include "xfs_trans_space.h" #include "xfs_trace.h" #include "xfs_symlink.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" +#include "xfs_log.h" /* ----- Kernel only functions below ----- */ STATIC int
fs/xfs/xfs_symlink_remote.c +3 -2
@@ -19,9 +19,9 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_log_format.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_trans_resv.h" #include "xfs_ag.h" #include "xfs_sb.h" #include "xfs_mount.h"
@@ -31,6 +31,7 @@#include "xfs_trace.h" #include "xfs_symlink.h" #include "xfs_cksum.h" +#include "xfs_trans.h" #include "xfs_buf_item.h"
fs/xfs/xfs_trace.c +5 -3
@@ -17,10 +17,10 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -38,6 +38,8 @@#include "xfs_bmap.h" #include "xfs_attr.h" #include "xfs_attr_leaf.h" +#include "xfs_trans.h" +#include "xfs_log.h" #include "xfs_log_priv.h" #include "xfs_buf_item.h" #include "xfs_quota.h"
fs/xfs/xfs_trans.c +6 -4
@@ -18,10 +18,10 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -38,10 +38,12 @@#include "xfs_extent_busy.h" #include "xfs_bmap.h" #include "xfs_quota.h" -#include "xfs_qm.h" +#include "xfs_trans.h" #include "xfs_trans_priv.h" #include "xfs_trans_space.h" +#include "xfs_qm.h" #include "xfs_inode_item.h" +#include "xfs_log.h" #include "xfs_log_priv.h" #include "xfs_buf_item.h" #include "xfs_trace.h"
fs/xfs/xfs_trans.h +5 -5
@@ -18,10 +18,6 @@#ifndef __XFS_TRANS_H__#define __XFS_TRANS_H__ -struct xfs_log_item ; - -#include "xfs_trans_resv.h" -/* kernel only transaction subsystem defines */ struct xfs_buf ;
@@ -77,6 +73,9 @@ struct xfs_item_ops {void (*iop_committing)(xfs_log_item_t *,xfs_lsn_t ); }; +void xfs_log_item_init (struct xfs_mount *mp,struct xfs_log_item *item, +int type,const struct xfs_item_ops *ops); +/* * Return values for the iop_push() routines. */
@@ -85,6 +84,7 @@ struct xfs_item_ops {#define XFS_ITEM_LOCKED 2#define XFS_ITEM_FLUSHING 3 +/* * This is the structure maintained for every active transaction. */
@@ -125,7 +125,6 @@ typedef struct xfs_trans {int64_t t_rextents_delta;/* superblocks rextents chg */ int64_t t_rextslog_delta;/* superblocks rextslog chg */ struct list_head t_items;/* log item descriptors */ -xfs_trans_header_t t_header;/* header for in-log trans */ struct list_head t_busy;/* list of busy extents */ unsigned long t_pflags;/* saved process flags state */ } xfs_trans_t;
@@ -230,6 +229,7 @@ void xfs_trans_log_efd_extent(xfs_trans_t *, xfs_fsblock_t, xfs_extlen_t);int xfs_trans_commit (xfs_trans_t *,uint flags); +int xfs_trans_roll (struct xfs_trans **,struct xfs_inode *);void xfs_trans_cancel (xfs_trans_t *,int );int xfs_trans_ail_init (struct xfs_mount *);void xfs_trans_ail_destroy (struct xfs_mount *);
fs/xfs/xfs_trans_ail.c +4 -3
@@ -18,15 +18,16 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_trans.h" #include "xfs_trans_priv.h" #include "xfs_trace.h" #include "xfs_error.h" +#include "xfs_log.h" #ifdef DEBUG /*
fs/xfs/xfs_trans_buf.c +3 -2
@@ -18,8 +18,8 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -28,6 +28,7 @@#include "xfs_ialloc_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_trans_priv.h" #include "xfs_error.h"
fs/xfs/xfs_trans_dquot.c +4 -3
@@ -17,10 +17,10 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_alloc.h"
@@ -33,6 +33,7 @@#include "xfs_rtalloc.h" #include "xfs_error.h" #include "xfs_attr.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_trans_priv.h" #include "xfs_qm.h"
fs/xfs/xfs_trans_extfree.c +3 -2
@@ -18,11 +18,12 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_trans.h" #include "xfs_trans_priv.h" #include "xfs_extfree_item.h"
fs/xfs/xfs_trans_inode.c +3 -2
@@ -18,8 +18,8 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -29,6 +29,7 @@#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_btree.h" +#include "xfs_trans.h" #include "xfs_trans_priv.h" #include "xfs_inode_item.h" #include "xfs_trace.h"
fs/xfs/xfs_trans_priv.h +0 -1
@@ -27,7 +27,6 @@ struct xfs_log_vec;void xfs_trans_init (struct xfs_mount *); -int xfs_trans_roll (struct xfs_trans **,struct xfs_inode *);void xfs_trans_add_item (struct xfs_trans *,struct xfs_log_item *);void xfs_trans_del_item (struct xfs_log_item *); void xfs_trans_free_items(struct xfs_trans *tp, xfs_lsn_t commit_lsn,
fs/xfs/xfs_trans_resv.c +3 -3
@@ -18,11 +18,10 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" -#include "xfs_log.h" +#include "xfs_format.h" +#include "xfs_log_format.h" #include "xfs_trans_resv.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -41,6 +40,7 @@#include "xfs_bmap.h" #include "xfs_bmap_util.h" #include "xfs_quota.h" +#include "xfs_trans.h" #include "xfs_qm.h" #include "xfs_trans_space.h" #include "xfs_trace.h"
fs/xfs/xfs_xattr.c +1 -2
@@ -18,8 +18,7 @@#include "xfs.h" #include "xfs_log_format.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
Signature · 6 lines
1.8.4.rc3 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Re: [PATCH 08/19] xfs: decouple log and transaction headers
Quoted 13 lines · Dave Chinner
From: Dave Chinner <[email protected]>
xfs_trans.hhas a dependency onxfs_log.hfor a couple of structures. Most code that does transactions doesn't need to know anything about the log, bu this dependency means that they have to includexfs_log.h. Decouple thexfs_trans.handxfs_log.hheader files and clean up the includes to be in dependency order.In doing this, remove the direct include of
xfs_trans_reserve.hfromxfs_trans.hso that we remove the dependency betweenxfs_trans.handxfs_mount.h. Hence thexfs_trans.hinclude can be moved to the indicate the actual dependencies oher header files have on it.
Quoted 4 lines
Note that these are kernel only header files, so this does not translate to any userspace changes at all.
Signed-off-by Dave Chinner <[email protected]>
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
PATCH v2 8/19 xfs: decouple log and transaction headers
From: Dave Chinner <[email protected]>
xfs_trans.h has a dependency on xfs_log.h for a couple of structures. Most code that does transactions doesn't need to know anything about the log, bu this dependency means that they have to include xfs_log.h. Decouple the xfs_trans.h and xfs_log.h header files and clean up the includes to be in dependency order.
In doing this, remove the direct include of xfs_trans_reserve.h from xfs_trans.h so that we remove the dependency between xfs_trans.h and xfs_mount.h. Hence the xfs_trans.h include can be moved to the indicate the actual dependencies oher header files have on it.
Note that these are kernel only header files, so this does not translate to any userspace changes at all.
---
V2: rebase due to changed fs/xfs/xfs_file.c include files as a result of the fallocate rework.
fs/xfs/xfs_alloc.c | 6 ++++-- fs/xfs/xfs_alloc_btree.c | 6 +++--- fs/xfs/xfs_aops.c | 7 ++++--- fs/xfs/xfs_attr.c | 8 ++++---- fs/xfs/xfs_attr_inactive.c | 8 ++++---- fs/xfs/xfs_attr_leaf.c | 7 +++---- fs/xfs/xfs_attr_list.c | 6 +++--- fs/xfs/xfs_attr_remote.c | 7 +++---- fs/xfs/xfs_bit.c | 5 +---- fs/xfs/xfs_bmap.c | 7 ++++--- fs/xfs/xfs_bmap_btree.c | 5 +++-- fs/xfs/xfs_bmap_util.c | 9 +++++---- fs/xfs/xfs_btree.c | 5 +++-- fs/xfs/xfs_buf.c | 5 +++-- fs/xfs/xfs_buf_item.c | 7 ++++--- fs/xfs/xfs_da_btree.c | 7 ++++--- fs/xfs/xfs_dir2.c | 6 +++--- fs/xfs/xfs_dir2_block.c | 6 +++--- fs/xfs/xfs_dir2_data.c | 6 +++--- fs/xfs/xfs_dir2_leaf.c | 6 +++--- fs/xfs/xfs_dir2_node.c | 6 +++--- fs/xfs/xfs_dir2_readdir.c | 6 +++--- fs/xfs/xfs_dir2_sf.c | 6 +++--- fs/xfs/xfs_discard.c | 5 +++-- fs/xfs/xfs_dquot.c | 10 ++++++---- fs/xfs/xfs_dquot_buf.c | 5 +++-- fs/xfs/xfs_dquot_item.c | 6 ++++-- fs/xfs/xfs_error.c | 5 ++--- fs/xfs/xfs_export.c | 7 ++++--- fs/xfs/xfs_extent_busy.c | 6 ++++-- fs/xfs/xfs_extfree_item.c | 8 ++++---- fs/xfs/xfs_file.c | 6 ++++-- fs/xfs/xfs_filestream.c | 10 +++++----- fs/xfs/xfs_fsops.c | 9 +++++---- fs/xfs/xfs_ialloc.c | 7 ++++--- fs/xfs/xfs_ialloc_btree.c | 6 +++--- fs/xfs/xfs_icache.c | 9 ++++----- fs/xfs/xfs_icreate_item.c | 5 +++-- fs/xfs/xfs_inode.c | 12 +++++++----- fs/xfs/xfs_inode_buf.c | 7 ++++--- fs/xfs/xfs_inode_fork.c | 6 +++--- fs/xfs/xfs_inode_item.c | 8 ++++---- fs/xfs/xfs_ioctl.c | 7 ++++--- fs/xfs/xfs_ioctl32.c | 4 ++-- fs/xfs/xfs_iomap.c | 11 ++++++----- fs/xfs/xfs_iops.c | 13 +++++++------ fs/xfs/xfs_itable.c | 4 ++-- fs/xfs/xfs_log.c | 8 +++++--- fs/xfs/xfs_log.h | 10 ++-------- fs/xfs/xfs_log_cil.c | 10 ++++++---- fs/xfs/xfs_log_priv.h | 7 ++++--- fs/xfs/xfs_log_recover.c | 13 +++++-------- fs/xfs/xfs_log_rlimit.c | 4 ++-- fs/xfs/xfs_message.c | 5 ++--- fs/xfs/xfs_mount.c | 10 ++++++---- fs/xfs/xfs_qm.c | 9 +++++---- fs/xfs/xfs_qm_bhv.c | 5 +++-- fs/xfs/xfs_qm_syscalls.c | 7 ++++--- fs/xfs/xfs_quotaops.c | 2 +- fs/xfs/xfs_rtalloc.c | 7 ++++--- fs/xfs/xfs_sb.c | 7 ++++--- fs/xfs/xfs_super.c | 8 +++++--- fs/xfs/xfs_symlink.c | 8 +++++--- fs/xfs/xfs_symlink_remote.c | 5 +++-- fs/xfs/xfs_trace.c | 8 +++++--- fs/xfs/xfs_trans.c | 10 ++++++---- fs/xfs/xfs_trans.h | 10 +++++----- fs/xfs/xfs_trans_ail.c | 7 ++++--- fs/xfs/xfs_trans_buf.c | 5 +++-- fs/xfs/xfs_trans_dquot.c | 7 ++++--- fs/xfs/xfs_trans_extfree.c | 5 +++-- fs/xfs/xfs_trans_inode.c | 5 +++-- fs/xfs/xfs_trans_priv.h | 1 - fs/xfs/xfs_trans_resv.c | 6 +++--- fs/xfs/xfs_xattr.c | 3 +-- 75 files changed, 276 insertions(+), 239 deletions(-)
fs/xfs/xfs_alloc.c +4 -2
@@ -18,10 +18,10 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_log_format.h" #include "xfs_shared.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -36,7 +36,9 @@#include "xfs_error.h" #include "xfs_cksum.h" #include "xfs_trace.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" +#include "xfs_log.h" struct workqueue_struct *xfs_alloc_wq;
fs/xfs/xfs_alloc_btree.c +3 -3
@@ -17,9 +17,8 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -34,6 +33,7 @@#include "xfs_error.h" #include "xfs_trace.h" #include "xfs_cksum.h" +#include "xfs_trans.h" STATIC struct xfs_btree_cur *
fs/xfs/xfs_aops.c +4 -3
@@ -16,16 +16,17 @@* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" -#include "xfs_format.h" #include "xfs_shared.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_alloc.h" #include "xfs_error.h"
fs/xfs/xfs_attr.c +4 -4
@@ -17,12 +17,11 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" -#include "xfs_trans_priv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -33,6 +32,7 @@#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_alloc.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h"
fs/xfs/xfs_attr_inactive.c +4 -4
@@ -18,11 +18,11 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -36,6 +36,7 @@#include "xfs_attr_remote.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_bmap.h" #include "xfs_attr.h"
@@ -43,7 +44,6 @@#include "xfs_error.h" #include "xfs_quota.h" #include "xfs_trace.h" -#include "xfs_trans_priv.h" /* * Look at all the extents for this logical region,
fs/xfs/xfs_attr_leaf.c +3 -4
@@ -18,11 +18,9 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" -#include "xfs_trans_priv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -37,6 +35,7 @@#include "xfs_attr_remote.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_bmap.h" #include "xfs_attr.h"
fs/xfs/xfs_attr_list.c +3 -3
@@ -18,10 +18,9 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -36,6 +35,7 @@#include "xfs_attr_remote.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_bmap.h" #include "xfs_attr.h"
fs/xfs/xfs_attr_remote.c +3 -4
@@ -18,11 +18,9 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" -#include "xfs_trans_priv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -33,6 +31,7 @@#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_alloc.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h"
fs/xfs/xfs_bit.c +1 -4
@@ -16,10 +16,7 @@* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" -#include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" -#include "xfs_buf_item.h" +#include "xfs_log_format.h" /* * XFS bit manipulation routines, used in non-realtime code.
fs/xfs/xfs_bmap.c +4 -3
@@ -17,12 +17,12 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" #include "xfs_inum.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -37,6 +37,7 @@#include "xfs_btree.h" #include "xfs_mount.h" #include "xfs_itable.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_extfree_item.h" #include "xfs_alloc.h"
fs/xfs/xfs_bmap_btree.c +3 -2
@@ -18,9 +18,9 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -29,6 +29,7 @@#include "xfs_ialloc_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_alloc.h" #include "xfs_btree.h"
fs/xfs/xfs_bmap_util.c +5 -4
@@ -18,12 +18,11 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_inum.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -34,6 +33,7 @@#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_btree.h" +#include "xfs_trans.h" #include "xfs_extfree_item.h" #include "xfs_alloc.h" #include "xfs_bmap.h"
@@ -44,6 +44,7 @@#include "xfs_trans_space.h" #include "xfs_trace.h" #include "xfs_icache.h" +#include "xfs_log.h" /* Kernel only BMAP related definitions and functions */
fs/xfs/xfs_btree.c +3 -2
@@ -18,9 +18,9 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -29,6 +29,7 @@#include "xfs_ialloc_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_buf_item.h" #include "xfs_btree.h"
fs/xfs/xfs_buf.c +3 -2
@@ -34,12 +34,13 @@#include <linux/backing-dev.h> #include <linux/freezer.h> -#include "xfs_sb.h" +#include "xfs_log_format.h" #include "xfs_trans_resv.h" -#include "xfs_log.h" +#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" #include "xfs_trace.h" +#include "xfs_log.h" static kmem_zone_t *xfs_buf_zone;
fs/xfs/xfs_buf_item.c +4 -3
@@ -17,17 +17,18 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_trans_priv.h" #include "xfs_error.h" #include "xfs_trace.h" +#include "xfs_log.h" kmem_zone_t *xfs_buf_item_zone;
fs/xfs/xfs_da_btree.c +4 -3
@@ -18,11 +18,11 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -33,6 +33,7 @@#include "xfs_dir2_priv.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_alloc.h" #include "xfs_bmap.h"
fs/xfs/xfs_dir2.c +3 -3
@@ -17,10 +17,9 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_log.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_inum.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -30,6 +29,7 @@#include "xfs_alloc_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_bmap.h" #include "xfs_dir2.h"
fs/xfs/xfs_dir2_block.c +3 -3
@@ -18,9 +18,8 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -29,6 +28,7 @@#include "xfs_bmap_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_bmap.h" #include "xfs_buf_item.h"
fs/xfs/xfs_dir2_data.c +3 -3
@@ -18,9 +18,8 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -32,6 +31,7 @@#include "xfs_dir2.h" #include "xfs_dir2_priv.h" #include "xfs_error.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_cksum.h"
fs/xfs/xfs_dir2_leaf.c +3 -3
@@ -18,10 +18,9 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -35,6 +34,7 @@#include "xfs_dir2_priv.h" #include "xfs_error.h" #include "xfs_trace.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_cksum.h"
fs/xfs/xfs_dir2_node.c +3 -3
@@ -18,9 +18,8 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -34,6 +33,7 @@#include "xfs_dir2_priv.h" #include "xfs_error.h" #include "xfs_trace.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_cksum.h"
fs/xfs/xfs_dir2_readdir.c +3 -3
@@ -18,10 +18,9 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -35,6 +34,7 @@#include "xfs_error.h" #include "xfs_trace.h" #include "xfs_bmap.h" +#include "xfs_trans.h" /* * Directory file type support functions
fs/xfs/xfs_dir2_sf.c +3 -3
@@ -17,9 +17,8 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -28,6 +27,7 @@#include "xfs_bmap_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_error.h" #include "xfs_dir2.h"
fs/xfs/xfs_discard.c +3 -2
@@ -17,8 +17,8 @@*/ #include "xfs.h" #include "xfs_format.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -33,6 +33,7 @@#include "xfs_extent_busy.h" #include "xfs_discard.h" #include "xfs_trace.h" +#include "xfs_log.h" STATIC int xfs_trim_extents(
fs/xfs/xfs_dquot.c +6 -4
@@ -18,29 +18,31 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_log_format.h" #include "xfs_shared.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" -#include "xfs_alloc.h" -#include "xfs_quota.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_inode.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" +#include "xfs_alloc.h" +#include "xfs_quota.h" #include "xfs_rtalloc.h" #include "xfs_error.h" #include "xfs_itable.h" #include "xfs_attr.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_trans_space.h" #include "xfs_trans_priv.h" #include "xfs_qm.h" #include "xfs_cksum.h" #include "xfs_trace.h" +#include "xfs_log.h" /* * Lock order:
fs/xfs/xfs_dquot_buf.c +3 -2
@@ -19,15 +19,16 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_inode.h" #include "xfs_quota.h" +#include "xfs_trans.h" #include "xfs_qm.h" #include "xfs_error.h" #include "xfs_cksum.h"
fs/xfs/xfs_dquot_item.c +4 -2
@@ -18,8 +18,8 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_alloc.h"
@@ -32,9 +32,11 @@#include "xfs_error.h" #include "xfs_itable.h" #include "xfs_attr.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_trans_priv.h" #include "xfs_qm.h" +#include "xfs_log.h" static inline struct xfs_dq_logitem *DQUOT_ITEM (struct xfs_log_item *lip) {
fs/xfs/xfs_error.c +2 -3
@@ -17,9 +17,8 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
fs/xfs/xfs_export.c +4 -3
@@ -16,9 +16,8 @@* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -27,9 +26,11 @@#include "xfs_export.h" #include "xfs_bmap_btree.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_trace.h" #include "xfs_icache.h" +#include "xfs_log.h" /* * Note that we only accept fileids which are long enough rather than allow
fs/xfs/xfs_extent_busy.c +4 -2
@@ -20,9 +20,9 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_log_format.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -31,6 +31,8 @@#include "xfs_inode.h" #include "xfs_extent_busy.h" #include "xfs_trace.h" +#include "xfs_trans.h" +#include "xfs_log.h" void xfs_extent_busy_insert(
fs/xfs/xfs_extfree_item.c +4 -4
@@ -17,14 +17,14 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_trans.h" -#include "xfs_buf_item.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_trans.h" #include "xfs_trans_priv.h" +#include "xfs_buf_item.h" #include "xfs_extfree_item.h"
fs/xfs/xfs_file.c +4 -2
@@ -18,10 +18,10 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" -#include "xfs_log.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" -#include "xfs_trans.h" #include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_da_btree.h"
@@ -29,6 +29,7 @@#include "xfs_alloc.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h"
@@ -37,6 +38,7 @@#include "xfs_dir2_priv.h" #include "xfs_ioctl.h" #include "xfs_trace.h" +#include "xfs_log.h" #include <linux/aio.h> #include <linux/dcache.h>
fs/xfs/xfs_filestream.c +5 -5
@@ -16,15 +16,15 @@* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" -#include "xfs_log.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" +#include "xfs_ag.h" +#include "xfs_sb.h" +#include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_inum.h" #include "xfs_dinode.h" #include "xfs_inode.h" -#include "xfs_ag.h" -#include "xfs_trans.h" -#include "xfs_sb.h" -#include "xfs_mount.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" #include "xfs_alloc.h"
fs/xfs/xfs_fsops.c +5 -4
@@ -17,11 +17,10 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_format.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -30,6 +29,7 @@#include "xfs_ialloc_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_btree.h" #include "xfs_error.h"
@@ -41,6 +41,7 @@#include "xfs_rtalloc.h" #include "xfs_filestream.h" #include "xfs_trace.h" +#include "xfs_log.h" /* * File system operations
fs/xfs/xfs_ialloc.c +4 -3
@@ -17,12 +17,12 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" #include "xfs_inum.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -38,6 +38,7 @@#include "xfs_error.h" #include "xfs_bmap.h" #include "xfs_cksum.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_icreate_item.h" #include "xfs_icache.h"
fs/xfs/xfs_ialloc_btree.c +3 -3
@@ -17,10 +17,9 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -35,6 +34,7 @@#include "xfs_error.h" #include "xfs_trace.h" #include "xfs_cksum.h" +#include "xfs_trans.h" STATIC int
fs/xfs/xfs_icache.c +4 -5
@@ -18,12 +18,9 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_log_priv.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_inum.h" -#include "xfs_trans.h" -#include "xfs_trans_priv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -32,6 +29,8 @@#include "xfs_dinode.h" #include "xfs_error.h" #include "xfs_filestream.h" +#include "xfs_trans.h" +#include "xfs_trans_priv.h" #include "xfs_inode_item.h" #include "xfs_quota.h" #include "xfs_trace.h"
fs/xfs/xfs_icreate_item.c +3 -2
@@ -18,12 +18,13 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_trans.h" #include "xfs_trans_priv.h" #include "xfs_error.h" #include "xfs_icreate_item.h"
fs/xfs/xfs_inode.c +7 -5
@@ -19,13 +19,11 @@#include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" -#include "xfs_log.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_inum.h" -#include "xfs_trans.h" -#include "xfs_trans_space.h" -#include "xfs_trans_priv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -39,6 +37,8 @@#include "xfs_attr.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans_space.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_inode_item.h" #include "xfs_btree.h"
@@ -53,6 +53,8 @@#include "xfs_trace.h" #include "xfs_icache.h" #include "xfs_symlink.h" +#include "xfs_trans_priv.h" +#include "xfs_log.h" kmem_zone_t *xfs_inode_zone;
fs/xfs/xfs_inode_buf.c +4 -3
@@ -17,10 +17,10 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -32,6 +32,7 @@#include "xfs_cksum.h" #include "xfs_icache.h" #include "xfs_ialloc.h" +#include "xfs_trans.h" /* * Check that none of the inode's in the buffer have a next
fs/xfs/xfs_inode_fork.c +3 -3
@@ -20,10 +20,9 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" -#include "xfs_log.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_inum.h" -#include "xfs_trans.h" -#include "xfs_trans_priv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -33,6 +32,7 @@#include "xfs_attr_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_inode_item.h" #include "xfs_btree.h"
fs/xfs/xfs_inode_item.c +4 -4
@@ -17,19 +17,19 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_trans_priv.h" #include "xfs_bmap_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_error.h" #include "xfs_trace.h" +#include "xfs_trans_priv.h" kmem_zone_t *xfs_ili_zone;/* inode log item zone */
fs/xfs/xfs_ioctl.c +4 -3
@@ -17,10 +17,10 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_alloc.h"
@@ -35,6 +35,7 @@#include "xfs_attr.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_fsops.h" #include "xfs_discard.h"
fs/xfs/xfs_ioctl32.c +2 -2
@@ -22,8 +22,8 @@#include <asm/uaccess.h> #include "xfs.h" #include "xfs_fs.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
fs/xfs/xfs_iomap.c +6 -5
@@ -17,21 +17,22 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" -#include "xfs_alloc.h" -#include "xfs_quota.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" +#include "xfs_alloc.h" +#include "xfs_quota.h" #include "xfs_btree.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h"
fs/xfs/xfs_iops.c +7 -6
@@ -17,15 +17,12 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" -#include "xfs_acl.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" -#include "xfs_alloc.h" -#include "xfs_quota.h" #include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_bmap_btree.h"
@@ -33,10 +30,14 @@#include "xfs_inode.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" +#include "xfs_acl.h" +#include "xfs_alloc.h" +#include "xfs_quota.h" #include "xfs_rtalloc.h" #include "xfs_error.h" #include "xfs_itable.h" #include "xfs_attr.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_inode_item.h" #include "xfs_trace.h"
fs/xfs/xfs_itable.c +2 -2
@@ -18,9 +18,9 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" -#include "xfs_log.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_inum.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
fs/xfs/xfs_log.c +5 -3
@@ -18,19 +18,21 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" #include "xfs_error.h" +#include "xfs_trans.h" +#include "xfs_trans_priv.h" +#include "xfs_log.h" #include "xfs_log_priv.h" #include "xfs_buf_item.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" #include "xfs_log_recover.h" -#include "xfs_trans_priv.h" #include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trace.h"
fs/xfs/xfs_log.h +2 -8
@@ -18,8 +18,6 @@ #ifndef __XFS_LOG_H__ #define __XFS_LOG_H__ -#include "xfs_log_format.h" - struct xfs_log_vec { struct xfs_log_vec *lv_next; /* next lv in build list */ int lv_niovecs; /* number of iovecs in lv */
@@ -82,11 +80,7 @@ struct xlog_ticket;struct xfs_log_item ;struct xfs_item_ops ;struct xfs_trans ; - -void xfs_log_item_init (struct xfs_mount *mp, -struct xfs_log_item *item, -int type, -const struct xfs_item_ops *ops); +struct xfs_log_callback ; xfs_lsn_t xfs_log_done(struct xfs_mount *mp, struct xlog_ticket *ticket,
@@ -114,7 +108,7 @@ xfs_lsn_t xlog_assign_tail_lsn_locked(struct xfs_mount *mp);void xfs_log_space_wake (struct xfs_mount *mp);int xfs_log_notify (struct xfs_mount *mp,struct xlog_in_core *iclog, -xfs_log_callback_t *callback_entry); +struct xfs_log_callback *callback_entry);int xfs_log_release_iclog (struct xfs_mount *mp,struct xlog_in_core *iclog); int xfs_log_reserve(struct xfs_mount *mp,
fs/xfs/xfs_log_cil.c +6 -4
@@ -17,11 +17,9 @@#include "xfs.h" #include "xfs_fs.h" +#include "xfs_log_format.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" -#include "xfs_trans_priv.h" -#include "xfs_log_priv.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -29,6 +27,10 @@#include "xfs_alloc.h" #include "xfs_extent_busy.h" #include "xfs_discard.h" +#include "xfs_trans.h" +#include "xfs_trans_priv.h" +#include "xfs_log.h" +#include "xfs_log_priv.h" /* * Allocate a new ticket. Failing to get a new ticket makes it really hard to
fs/xfs/xfs_log_priv.h +4 -3
@@ -22,6 +22,7 @@ struct xfs_buf;struct xlog ;struct xlog_ticket ;struct xfs_mount ; +struct xfs_log_callback ;/* * Flags for log structure
@@ -227,8 +228,8 @@ typedef struct xlog_in_core {/* Callback structures need their own cacheline */ spinlock_t ic_callback_lock____cacheline_aligned_in_smp ; -xfs_log_callback_t *ic_callback; -xfs_log_callback_t **ic_callback_tail; +struct xfs_log_callback *ic_callback; +struct xfs_log_callback **ic_callback_tail;/* reference counts need their own cacheline */ atomic_t ic_refcnt____cacheline_aligned_in_smp ;
@@ -254,7 +255,7 @@ struct xfs_cil_ctx {int space_used;/* aggregate size of regions */ struct list_head busy_extents;/* busy extents in chkpt */ struct xfs_log_vec *lv_chain;/* logvecs being pushed */ -xfs_log_callback_t log_cb;/* completion callback hook. */ +struct xfs_log_callback log_cb;/* completion callback hook. */ struct list_head committing;/* ctx committing list */ };
fs/xfs/xfs_log_recover.c +5 -8
@@ -17,12 +17,12 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" #include "xfs_inum.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -34,11 +34,12 @@#include "xfs_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_alloc.h" #include "xfs_ialloc.h" +#include "xfs_log.h" #include "xfs_log_priv.h" -#include "xfs_buf_item.h" #include "xfs_log_recover.h" #include "xfs_extfree_item.h" #include "xfs_trans_priv.h"
@@ -46,14 +47,10 @@#include "xfs_cksum.h" #include "xfs_trace.h" #include "xfs_icache.h" -#include "xfs_icreate_item.h" /* Need all the magic numbers and buffer ops structures from these headers */ -#include "xfs_symlink.h" #include "xfs_da_btree.h" #include "xfs_dir2.h" -#include "xfs_attr_leaf.h" -#include "xfs_attr_remote.h" #define BLK_AVG (blk1, blk2) ((blk1+blk2) >> 1)
fs/xfs/xfs_log_rlimit.c +2 -2
@@ -18,8 +18,8 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_ag.h" #include "xfs_sb.h" #include "xfs_mount.h"
fs/xfs/xfs_message.c +2 -3
@@ -17,9 +17,8 @@#include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
fs/xfs/xfs_mount.c +6 -4
@@ -17,17 +17,19 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" #include "xfs_inum.h" -#include "xfs_trans.h" -#include "xfs_trans_priv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" #include "xfs_da_format.h" +#include "xfs_trans.h" +#include "xfs_trans_priv.h" +#include "xfs_log.h" #include "xfs_dir2.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h"
fs/xfs/xfs_qm.c +5 -4
@@ -18,14 +18,12 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_log_format.h" #include "xfs_shared.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" -#include "xfs_alloc.h" -#include "xfs_quota.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_ialloc_btree.h"
@@ -33,10 +31,13 @@#include "xfs_inode.h" #include "xfs_ialloc.h" #include "xfs_itable.h" +#include "xfs_alloc.h" #include "xfs_rtalloc.h" +#include "xfs_quota.h" #include "xfs_error.h" #include "xfs_bmap.h" #include "xfs_attr.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_trans_space.h" #include "xfs_qm.h"
fs/xfs/xfs_qm_bhv.c +3 -2
@@ -18,8 +18,8 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_alloc.h"
@@ -32,6 +32,7 @@#include "xfs_rtalloc.h" #include "xfs_error.h" #include "xfs_attr.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_qm.h"
fs/xfs/xfs_qm_syscalls.c +4 -3
@@ -20,11 +20,11 @@#include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_alloc.h"
@@ -32,6 +32,7 @@#include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_itable.h" #include "xfs_bmap.h"
fs/xfs/xfs_quotaops.c +1 -1
@@ -17,8 +17,8 @@*/ #include "xfs.h" #include "xfs_format.h" +#include "xfs_log_format.h" #include "xfs_trans_resv.h" -#include "xfs_log.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
fs/xfs/xfs_rtalloc.c +4 -3
@@ -17,11 +17,11 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -34,6 +34,7 @@#include "xfs_rtalloc.h" #include "xfs_fsops.h" #include "xfs_error.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_trans_space.h" #include "xfs_trace.h"
fs/xfs/xfs_sb.c +4 -3
@@ -18,11 +18,10 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" #include "xfs_inum.h" -#include "xfs_trans.h" -#include "xfs_trans_priv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -44,6 +43,8 @@#include "xfs_fsops.h" #include "xfs_trace.h" #include "xfs_cksum.h" +#include "xfs_trans.h" +#include "xfs_trans_priv.h" #include "xfs_buf_item.h" /*
fs/xfs/xfs_super.c +5 -3
@@ -17,11 +17,11 @@*/ #include "xfs.h" -#include "xfs_format.h" #include "xfs_shared.h" -#include "xfs_log.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_inum.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_alloc.h"
@@ -41,7 +41,9 @@#include "xfs_itable.h" #include "xfs_fsops.h" #include "xfs_attr.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" +#include "xfs_log.h" #include "xfs_log_priv.h" #include "xfs_trans_priv.h" #include "xfs_filestream.h"
fs/xfs/xfs_symlink.c +5 -3
@@ -17,12 +17,12 @@* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" +#include "xfs_shared.h" #include "xfs_fs.h" #include "xfs_format.h" -#include "xfs_shared.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -41,7 +41,9 @@#include "xfs_trans_space.h" #include "xfs_trace.h" #include "xfs_symlink.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" +#include "xfs_log.h" /* ----- Kernel only functions below ----- */ STATIC int
fs/xfs/xfs_symlink_remote.c +3 -2
@@ -19,9 +19,9 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_log_format.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_trans_resv.h" #include "xfs_ag.h" #include "xfs_sb.h" #include "xfs_mount.h"
@@ -31,6 +31,7 @@#include "xfs_trace.h" #include "xfs_symlink.h" #include "xfs_cksum.h" +#include "xfs_trans.h" #include "xfs_buf_item.h"
fs/xfs/xfs_trace.c +5 -3
@@ -17,10 +17,10 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -38,6 +38,8 @@#include "xfs_bmap.h" #include "xfs_attr.h" #include "xfs_attr_leaf.h" +#include "xfs_trans.h" +#include "xfs_log.h" #include "xfs_log_priv.h" #include "xfs_buf_item.h" #include "xfs_quota.h"
fs/xfs/xfs_trans.c +6 -4
@@ -18,10 +18,10 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -38,10 +38,12 @@#include "xfs_extent_busy.h" #include "xfs_bmap.h" #include "xfs_quota.h" -#include "xfs_qm.h" +#include "xfs_trans.h" #include "xfs_trans_priv.h" #include "xfs_trans_space.h" +#include "xfs_qm.h" #include "xfs_inode_item.h" +#include "xfs_log.h" #include "xfs_log_priv.h" #include "xfs_buf_item.h" #include "xfs_trace.h"
fs/xfs/xfs_trans.h +5 -5
@@ -18,10 +18,6 @@#ifndef __XFS_TRANS_H__#define __XFS_TRANS_H__ -struct xfs_log_item ; - -#include "xfs_trans_resv.h" -/* kernel only transaction subsystem defines */ struct xfs_buf ;
@@ -77,6 +73,9 @@ struct xfs_item_ops {void (*iop_committing)(xfs_log_item_t *,xfs_lsn_t ); }; +void xfs_log_item_init (struct xfs_mount *mp,struct xfs_log_item *item, +int type,const struct xfs_item_ops *ops); +/* * Return values for the iop_push() routines. */
@@ -85,6 +84,7 @@ struct xfs_item_ops {#define XFS_ITEM_LOCKED 2#define XFS_ITEM_FLUSHING 3 +/* * This is the structure maintained for every active transaction. */
@@ -125,7 +125,6 @@ typedef struct xfs_trans {int64_t t_rextents_delta;/* superblocks rextents chg */ int64_t t_rextslog_delta;/* superblocks rextslog chg */ struct list_head t_items;/* log item descriptors */ -xfs_trans_header_t t_header;/* header for in-log trans */ struct list_head t_busy;/* list of busy extents */ unsigned long t_pflags;/* saved process flags state */ } xfs_trans_t;
@@ -230,6 +229,7 @@ void xfs_trans_log_efd_extent(xfs_trans_t *, xfs_fsblock_t, xfs_extlen_t);int xfs_trans_commit (xfs_trans_t *,uint flags); +int xfs_trans_roll (struct xfs_trans **,struct xfs_inode *);void xfs_trans_cancel (xfs_trans_t *,int );int xfs_trans_ail_init (struct xfs_mount *);void xfs_trans_ail_destroy (struct xfs_mount *);
fs/xfs/xfs_trans_ail.c +4 -3
@@ -18,15 +18,16 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_trans.h" #include "xfs_trans_priv.h" #include "xfs_trace.h" #include "xfs_error.h" +#include "xfs_log.h" #ifdef DEBUG /*
fs/xfs/xfs_trans_buf.c +3 -2
@@ -18,8 +18,8 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -28,6 +28,7 @@#include "xfs_ialloc_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_trans_priv.h" #include "xfs_error.h"
fs/xfs/xfs_trans_dquot.c +4 -3
@@ -17,10 +17,10 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_alloc.h"
@@ -33,6 +33,7 @@#include "xfs_rtalloc.h" #include "xfs_error.h" #include "xfs_attr.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_trans_priv.h" #include "xfs_qm.h"
fs/xfs/xfs_trans_extfree.c +3 -2
@@ -18,11 +18,12 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_trans.h" #include "xfs_trans_priv.h" #include "xfs_extfree_item.h"
fs/xfs/xfs_trans_inode.c +3 -2
@@ -18,8 +18,8 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -29,6 +29,7 @@#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_btree.h" +#include "xfs_trans.h" #include "xfs_trans_priv.h" #include "xfs_inode_item.h" #include "xfs_trace.h"
fs/xfs/xfs_trans_priv.h +0 -1
@@ -27,7 +27,6 @@ struct xfs_log_vec;void xfs_trans_init (struct xfs_mount *); -int xfs_trans_roll (struct xfs_trans **,struct xfs_inode *);void xfs_trans_add_item (struct xfs_trans *,struct xfs_log_item *);void xfs_trans_del_item (struct xfs_log_item *); void xfs_trans_free_items(struct xfs_trans *tp, xfs_lsn_t commit_lsn,
fs/xfs/xfs_trans_resv.c +3 -3
@@ -18,11 +18,10 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" -#include "xfs_log.h" +#include "xfs_format.h" +#include "xfs_log_format.h" #include "xfs_trans_resv.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -41,6 +40,7 @@#include "xfs_bmap.h" #include "xfs_bmap_util.h" #include "xfs_quota.h" +#include "xfs_trans.h" #include "xfs_qm.h" #include "xfs_trans_space.h" #include "xfs_trace.h"
fs/xfs/xfs_xattr.c +1 -2
@@ -18,8 +18,7 @@#include "xfs.h" #include "xfs_log_format.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
PATCH v2 9/19 xfs: decouple inode and bmap btree header files
In reply to Dave ChinnerFrom: Dave Chinner <[email protected]>
Currently the xfs_inode.h header has a dependency on the definition of the BMAP btree records as the inode fork includes an array of xfs_bmbt_rec_host_t objects in it's definition.
Move all the btree format definitions from xfs_btree.h, xfs_bmap_btree.h, xfs_alloc_btree.h and xfs_ialloc_btree.h to xfs_format.h to continue the process of centralising the on-disk format definitions. With this done, the xfs inode definitions are no longer dependent on btree header files.
The enables a massive culling of unnecessary includes, with close to 200 #include directives removed from the XFS kernel code base.
--- fs/xfs/xfs_acl.c | 8 +- fs/xfs/xfs_alloc.c | 5 +- fs/xfs/xfs_alloc_btree.c | 7 +- fs/xfs/xfs_alloc_btree.h | 33 ------ fs/xfs/xfs_aops.c | 4 +- fs/xfs/xfs_attr.c | 4 +- fs/xfs/xfs_attr_inactive.c | 8 +- fs/xfs/xfs_attr_leaf.c | 13 +-- fs/xfs/xfs_attr_list.c | 12 +-- fs/xfs/xfs_attr_remote.c | 5 +- fs/xfs/xfs_bmap.c | 12 +-- fs/xfs/xfs_bmap_btree.c | 7 +- fs/xfs/xfs_bmap_btree.h | 103 ------------------ fs/xfs/xfs_bmap_util.c | 6 +- fs/xfs/xfs_btree.c | 5 +- fs/xfs/xfs_btree.h | 79 +++----------- fs/xfs/xfs_buf_item.h | 4 - fs/xfs/xfs_da_btree.c | 2 - fs/xfs/xfs_dir2.c | 5 +- fs/xfs/xfs_dir2_block.c | 4 +- fs/xfs/xfs_dir2_data.c | 3 +- fs/xfs/xfs_dir2_leaf.c | 4 +- fs/xfs/xfs_dir2_node.c | 3 +- fs/xfs/xfs_dir2_readdir.c | 4 +- fs/xfs/xfs_dir2_sf.c | 4 +- fs/xfs/xfs_discard.c | 6 +- fs/xfs/xfs_dquot.c | 5 +- fs/xfs/xfs_dquot_buf.c | 2 - fs/xfs/xfs_dquot_item.c | 8 +- fs/xfs/xfs_error.c | 4 +- fs/xfs/xfs_export.c | 2 +- fs/xfs/xfs_extent_busy.c | 2 - fs/xfs/xfs_extent_busy.h | 4 + fs/xfs/xfs_file.c | 5 +- fs/xfs/xfs_filestream.c | 4 +- fs/xfs/xfs_format.h | 255 +++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_fsops.c | 12 +-- fs/xfs/xfs_ialloc.c | 6 +- fs/xfs/xfs_ialloc.h | 3 +- fs/xfs/xfs_ialloc_btree.c | 6 +- fs/xfs/xfs_ialloc_btree.h | 49 --------- fs/xfs/xfs_icache.c | 4 - fs/xfs/xfs_inode.c | 10 +- fs/xfs/xfs_inode.h | 1 - fs/xfs/xfs_inode_buf.c | 6 +- fs/xfs/xfs_inode_fork.c | 16 +-- fs/xfs/xfs_inode_fork.h | 1 + fs/xfs/xfs_inode_item.c | 4 +- fs/xfs/xfs_ioctl.c | 9 +- fs/xfs/xfs_ioctl32.c | 3 +- fs/xfs/xfs_iomap.c | 16 +-- fs/xfs/xfs_iops.c | 8 +- fs/xfs/xfs_itable.c | 9 +- fs/xfs/xfs_log.c | 6 +- fs/xfs/xfs_log_recover.c | 18 ++-- fs/xfs/xfs_log_rlimit.c | 3 +- fs/xfs/xfs_mount.c | 15 +-- fs/xfs/xfs_qm.c | 11 +- fs/xfs/xfs_qm_bhv.c | 7 -- fs/xfs/xfs_qm_syscalls.c | 10 +- fs/xfs/xfs_quotaops.c | 3 +- fs/xfs/xfs_rtalloc.c | 9 +- fs/xfs/xfs_sb.c | 18 +--- fs/xfs/xfs_super.c | 16 +-- fs/xfs/xfs_symlink.c | 6 +- fs/xfs/xfs_trace.c | 5 +- fs/xfs/xfs_trans.c | 16 +-- fs/xfs/xfs_trans.h | 5 + fs/xfs/xfs_trans_buf.c | 5 +- fs/xfs/xfs_trans_dquot.c | 9 +- fs/xfs/xfs_trans_inode.c | 6 +- fs/xfs/xfs_trans_resv.c | 12 +-- fs/xfs/xfs_xattr.c | 2 +- 73 files changed, 403 insertions(+), 583 deletions(-)
fs/xfs/xfs_acl.c +4 -4
@@ -16,15 +16,15 @@* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" -#include "xfs_acl.h" -#include "xfs_attr.h" -#include "xfs_bmap_btree.h" -#include "xfs_inode.h" #include "xfs_ag.h" #include "xfs_sb.h" #include "xfs_mount.h" +#include "xfs_inode.h" +#include "xfs_acl.h" +#include "xfs_attr.h" #include "xfs_trace.h" #include <linux/slab.h> #include <linux/xattr.h>
fs/xfs/xfs_alloc.c +1 -4
@@ -25,12 +25,9 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_alloc.h" #include "xfs_extent_busy.h" #include "xfs_error.h"
fs/xfs/xfs_alloc_btree.c +2 -5
@@ -17,17 +17,14 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" -#include "xfs_inode.h" #include "xfs_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_alloc.h" #include "xfs_extent_busy.h" #include "xfs_error.h"
fs/xfs/xfs_alloc_btree.h +0 -33
@@ -27,39 +27,6 @@ struct xfs_btree_cur;struct xfs_mount ;/* -* There are two on-disk btrees, one sorted by blockno and one sorted -* by blockcount and blockno. All blocks look the same to make the code -* simpler; if we have time later, we'll make the optimizations. -*/ -#define XFS_ABTB_MAGIC 0x41425442/* 'ABTB' for bno tree */ -#define XFS_ABTB_CRC_MAGIC 0x41423342/* 'AB3B' */ -#define XFS_ABTC_MAGIC 0x41425443/* 'ABTC' for cnt tree */ -#define XFS_ABTC_CRC_MAGIC 0x41423343/* 'AB3C' */ - -/* -* Data record/key structure -*/ -typedef struct xfs_alloc_rec { -__be32 ar_startblock;/* starting block number */ -__be32 ar_blockcount;/* count of free blocks */ -}xfs_alloc_rec_t ,xfs_alloc_key_t ; - -typedef struct xfs_alloc_rec_incore { -xfs_agblock_t ar_startblock;/* starting block number */ -xfs_extlen_t ar_blockcount;/* count of free blocks */ -}xfs_alloc_rec_incore_t ; - -/* btree pointer type */ -typedef __be32 xfs_alloc_ptr_t ; - -/* -* Block numbers in the AG: -* SB is sector 0, AGF is sector 1, AGI is sector 2, AGFL is sector 3. -*/ -#define XFS_BNO_BLOCK (mp) ((xfs_agblock_t)(XFS_AGFL_BLOCK(mp) + 1)) -#define XFS_CNT_BLOCK (mp) ((xfs_agblock_t)(XFS_BNO_BLOCK(mp) + 1)) - -/* * Btree block header size depends on a superblock flag. */ #define XFS_ALLOC_BLOCK_LEN (mp) \
fs/xfs/xfs_aops.c +2 -2
@@ -23,8 +23,6 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trans.h" #include "xfs_inode_item.h"
@@ -34,6 +32,8 @@#include "xfs_trace.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" +#include "xfs_bmap_btree.h" +#include "xfs_dinode.h" #include <linux/aio.h> #include <linux/gfp.h> #include <linux/mpage.h>
fs/xfs/xfs_attr.c +2 -2
@@ -27,15 +27,14 @@#include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_da_btree.h" -#include "xfs_bmap_btree.h" #include "xfs_attr_sf.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_alloc.h" #include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" +#include "xfs_bmap_btree.h" #include "xfs_attr.h" #include "xfs_attr_leaf.h" #include "xfs_attr_remote.h"
@@ -43,6 +42,7 @@#include "xfs_quota.h" #include "xfs_trans_space.h" #include "xfs_trace.h" +#include "xfs_dinode.h" /* * xfs_attr.c
fs/xfs/xfs_attr_inactive.c +2 -6
@@ -28,14 +28,9 @@#include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_da_btree.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" +#include "xfs_inode.h" #include "xfs_alloc.h" -#include "xfs_btree.h" #include "xfs_attr_remote.h" -#include "xfs_dinode.h" -#include "xfs_inode.h" #include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_bmap.h"
@@ -44,6 +39,7 @@#include "xfs_error.h" #include "xfs_quota.h" #include "xfs_trace.h" +#include "xfs_dinode.h" /* * Look at all the extents for this logical region,
fs/xfs/xfs_attr_leaf.c +5 -8
@@ -18,6 +18,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_bit.h"
@@ -26,24 +27,20 @@#include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_da_btree.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_alloc.h" -#include "xfs_btree.h" -#include "xfs_attr_sf.h" -#include "xfs_attr_remote.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trans.h" #include "xfs_inode_item.h" +#include "xfs_bmap_btree.h" #include "xfs_bmap.h" +#include "xfs_attr_sf.h" +#include "xfs_attr_remote.h" #include "xfs_attr.h" #include "xfs_attr_leaf.h" #include "xfs_error.h" #include "xfs_trace.h" #include "xfs_buf_item.h" #include "xfs_cksum.h" +#include "xfs_dinode.h" /*
fs/xfs/xfs_attr_list.c +4 -8
@@ -18,6 +18,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_bit.h"
@@ -26,24 +27,19 @@#include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_da_btree.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_alloc.h" -#include "xfs_btree.h" -#include "xfs_attr_sf.h" -#include "xfs_attr_remote.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_bmap.h" #include "xfs_attr.h" +#include "xfs_attr_sf.h" +#include "xfs_attr_remote.h" #include "xfs_attr_leaf.h" #include "xfs_error.h" #include "xfs_trace.h" #include "xfs_buf_item.h" #include "xfs_cksum.h" +#include "xfs_dinode.h" STATIC intxfs_attr_shortform_compare (const void *a,const void *b)
fs/xfs/xfs_attr_remote.c +2 -3
@@ -18,6 +18,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_bit.h"
@@ -25,10 +26,7 @@#include "xfs_ag.h" #include "xfs_mount.h" #include "xfs_da_format.h" -#include "xfs_error.h" #include "xfs_da_btree.h" -#include "xfs_bmap_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_alloc.h" #include "xfs_trans.h"
@@ -42,6 +40,7 @@#include "xfs_trace.h" #include "xfs_cksum.h" #include "xfs_buf_item.h" +#include "xfs_error.h" #define ATTR_RMTVALUE_MAPSIZE 1/* # of map entries at once */
fs/xfs/xfs_bmap.c +4 -8
@@ -29,29 +29,25 @@#include "xfs_da_format.h" #include "xfs_da_btree.h" #include "xfs_dir2.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_btree.h" -#include "xfs_mount.h" -#include "xfs_itable.h" #include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_extfree_item.h" #include "xfs_alloc.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" +#include "xfs_bmap_btree.h" #include "xfs_rtalloc.h" #include "xfs_error.h" -#include "xfs_attr_leaf.h" #include "xfs_quota.h" #include "xfs_trans_space.h" #include "xfs_buf_item.h" -#include "xfs_filestream.h" #include "xfs_trace.h" #include "xfs_symlink.h" +#include "xfs_attr_leaf.h" +#include "xfs_dinode.h" +#include "xfs_filestream.h" kmem_zone_t *xfs_bmap_free_item_zone;
fs/xfs/xfs_bmap_btree.c +2 -5
@@ -24,21 +24,18 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_alloc.h" #include "xfs_btree.h" -#include "xfs_itable.h" +#include "xfs_bmap_btree.h" #include "xfs_bmap.h" #include "xfs_error.h" #include "xfs_quota.h" #include "xfs_trace.h" #include "xfs_cksum.h" +#include "xfs_dinode.h" /* * Determine the extent state.
fs/xfs/xfs_bmap_btree.h +0 -103
121 lines not on this page · raw message
fs/xfs/xfs_bmap_util.c +2 -4
@@ -27,10 +27,6 @@#include "xfs_ag.h" #include "xfs_mount.h" #include "xfs_da_format.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_btree.h" #include "xfs_trans.h"
@@ -38,6 +34,7 @@#include "xfs_alloc.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" +#include "xfs_bmap_btree.h" #include "xfs_rtalloc.h" #include "xfs_error.h" #include "xfs_quota.h"
@@ -45,6 +42,7 @@#include "xfs_trace.h" #include "xfs_icache.h" #include "xfs_log.h" +#include "xfs_dinode.h" /* Kernel only BMAP related definitions and functions */
fs/xfs/xfs_btree.c +1 -4
@@ -18,16 +18,13 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_bit.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trans.h" #include "xfs_inode_item.h"
fs/xfs/xfs_btree.h +12 -67
91 lines not on this page · raw message
fs/xfs/xfs_buf_item.h +0 -4
@@ -71,10 +71,6 @@ void xfs_buf_attach_iodone(struct xfs_buf *,void xfs_buf_iodone_callbacks (struct xfs_buf *);void xfs_buf_iodone (struct xfs_buf *,struct xfs_log_item *); -void xfs_trans_buf_set_type (struct xfs_trans *,struct xfs_buf *, -enum xfs_blft ); -void xfs_trans_buf_copy_type (struct xfs_buf *dst_bp,struct xfs_buf *src_bp); -extern kmem_zone_t *xfs_buf_item_zone;#endif /* __XFS_BUF_ITEM_H__ */
fs/xfs/xfs_da_btree.c +0 -2
@@ -28,10 +28,8 @@#include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_da_btree.h" -#include "xfs_bmap_btree.h" #include "xfs_dir2.h" #include "xfs_dir2_priv.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trans.h" #include "xfs_inode_item.h"
fs/xfs/xfs_dir2.c +2 -3
@@ -17,6 +17,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_inum.h"
@@ -25,9 +26,6 @@#include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_da_btree.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trans.h" #include "xfs_inode_item.h"
@@ -36,6 +34,7 @@#include "xfs_dir2_priv.h" #include "xfs_error.h" #include "xfs_trace.h" +#include "xfs_dinode.h" struct xfs_name xfs_name_dotdot = { (unsigned char *)".." ,2 ,XFS_DIR3_FT_DIR };
fs/xfs/xfs_dir2_block.c +2 -2
@@ -18,6 +18,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_sb.h"
@@ -25,8 +26,6 @@#include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_da_btree.h" -#include "xfs_bmap_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trans.h" #include "xfs_inode_item.h"
@@ -37,6 +36,7 @@#include "xfs_error.h" #include "xfs_trace.h" #include "xfs_cksum.h" +#include "xfs_dinode.h" /* * Local function prototypes.
fs/xfs/xfs_dir2_data.c +1 -2
@@ -18,6 +18,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_sb.h"
@@ -25,8 +26,6 @@#include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_da_btree.h" -#include "xfs_bmap_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_dir2.h" #include "xfs_dir2_priv.h"
fs/xfs/xfs_dir2_leaf.c +1 -3
@@ -18,16 +18,14 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" -#include "xfs_bit.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_da_btree.h" -#include "xfs_bmap_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_bmap.h" #include "xfs_dir2.h"
fs/xfs/xfs_dir2_node.c +1 -2
@@ -18,6 +18,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_sb.h"
@@ -25,8 +26,6 @@#include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_da_btree.h" -#include "xfs_bmap_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_bmap.h" #include "xfs_dir2.h"
fs/xfs/xfs_dir2_readdir.c +2 -2
@@ -18,6 +18,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_bit.h"
@@ -26,8 +27,6 @@#include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_da_btree.h" -#include "xfs_bmap_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_dir2.h" #include "xfs_dir2_priv.h"
@@ -35,6 +34,7 @@#include "xfs_trace.h" #include "xfs_bmap.h" #include "xfs_trans.h" +#include "xfs_dinode.h" /* * Directory file type support functions
fs/xfs/xfs_dir2_sf.c +2 -2
@@ -17,6 +17,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_sb.h"
@@ -24,8 +25,6 @@#include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_da_btree.h" -#include "xfs_bmap_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trans.h" #include "xfs_inode_item.h"
@@ -33,6 +32,7 @@#include "xfs_dir2.h" #include "xfs_dir2_priv.h" #include "xfs_trace.h" +#include "xfs_dinode.h" /* * Prototypes for internal functions.
fs/xfs/xfs_discard.c +2 -4
@@ -23,11 +23,9 @@#include "xfs_ag.h" #include "xfs_mount.h" #include "xfs_quota.h" -#include "xfs_alloc_btree.h" -#include "xfs_bmap_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_btree.h" #include "xfs_inode.h" +#include "xfs_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_alloc.h" #include "xfs_error.h" #include "xfs_extent_busy.h"
fs/xfs/xfs_dquot.c +1 -4
@@ -25,16 +25,12 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" #include "xfs_inode.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" #include "xfs_alloc.h" #include "xfs_quota.h" -#include "xfs_rtalloc.h" #include "xfs_error.h" -#include "xfs_itable.h" -#include "xfs_attr.h" #include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_trans_space.h"
@@ -43,6 +39,7 @@#include "xfs_cksum.h" #include "xfs_trace.h" #include "xfs_log.h" +#include "xfs_bmap_btree.h" /* * Lock order:
fs/xfs/xfs_dquot_buf.c +0 -2
@@ -21,11 +21,9 @@#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" -#include "xfs_bit.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" #include "xfs_inode.h" #include "xfs_quota.h" #include "xfs_trans.h"
fs/xfs/xfs_dquot_item.c +1 -7
@@ -22,16 +22,10 @@#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" -#include "xfs_alloc.h" -#include "xfs_quota.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" #include "xfs_inode.h" -#include "xfs_bmap.h" -#include "xfs_rtalloc.h" +#include "xfs_quota.h" #include "xfs_error.h" -#include "xfs_itable.h" -#include "xfs_attr.h" #include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_trans_priv.h"
fs/xfs/xfs_error.c +1 -3
@@ -16,15 +16,13 @@* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" +#include "xfs_format.h" #include "xfs_fs.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_dinode.h" -#include "xfs_inode.h" #include "xfs_error.h" #ifdef DEBUG
fs/xfs/xfs_export.c +1 -1
@@ -16,6 +16,7 @@* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_sb.h"
@@ -24,7 +25,6 @@#include "xfs_da_format.h" #include "xfs_dir2.h" #include "xfs_export.h" -#include "xfs_bmap_btree.h" #include "xfs_inode.h" #include "xfs_trans.h" #include "xfs_inode_item.h"
fs/xfs/xfs_extent_busy.c +0 -2
@@ -26,9 +26,7 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" #include "xfs_alloc.h" -#include "xfs_inode.h" #include "xfs_extent_busy.h" #include "xfs_trace.h" #include "xfs_trans.h"
fs/xfs/xfs_extent_busy.h +4 -0
@@ -20,6 +20,10 @@#ifndef __XFS_EXTENT_BUSY_H__#define __XFS_EXTENT_BUSY_H__ +struct xfs_mount ; +struct xfs_trans ; +struct xfs_alloc_arg ; +/* * Busy block/extent entry. Indexed by a rbtree in perag to mark blocks that * have been freed but whose transactions aren't committed to disk yet.
fs/xfs/xfs_file.c +2 -3
@@ -17,6 +17,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_sb.h"
@@ -24,9 +25,6 @@#include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_da_btree.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trans.h" #include "xfs_inode_item.h"
@@ -38,6 +36,7 @@#include "xfs_ioctl.h" #include "xfs_trace.h" #include "xfs_log.h" +#include "xfs_dinode.h" #include <linux/aio.h> #include <linux/dcache.h>
fs/xfs/xfs_filestream.c +2 -2
@@ -16,19 +16,19 @@* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_ag.h" #include "xfs_sb.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" #include "xfs_inum.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" #include "xfs_alloc.h" #include "xfs_mru_cache.h" +#include "xfs_dinode.h" #include "xfs_filestream.h" #include "xfs_trace.h"
fs/xfs/xfs_format.h +255 -0
259 lines not on this page · raw message
fs/xfs/xfs_fsops.c +5 -7
@@ -18,30 +18,28 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" -#include "xfs_log_format.h" #include "xfs_format.h" +#include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trans.h" #include "xfs_inode_item.h" -#include "xfs_btree.h" #include "xfs_error.h" +#include "xfs_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_alloc.h" #include "xfs_ialloc.h" #include "xfs_fsops.h" #include "xfs_itable.h" #include "xfs_trans_space.h" #include "xfs_rtalloc.h" -#include "xfs_filestream.h" #include "xfs_trace.h" #include "xfs_log.h" +#include "xfs_dinode.h" +#include "xfs_filestream.h" /* * File system operations
fs/xfs/xfs_ialloc.c +2 -4
@@ -26,13 +26,10 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_btree.h" #include "xfs_ialloc.h" +#include "xfs_ialloc_btree.h" #include "xfs_alloc.h" #include "xfs_rtalloc.h" #include "xfs_error.h"
@@ -42,6 +39,7 @@#include "xfs_buf_item.h" #include "xfs_icreate_item.h" #include "xfs_icache.h" +#include "xfs_dinode.h" /*
fs/xfs/xfs_ialloc.h +2 -1
@@ -23,6 +23,7 @@ struct xfs_dinode;struct xfs_imap ;struct xfs_mount ;struct xfs_trans ; +struct xfs_btree_cur ;/* * Allocation parameters for inode allocation.
@@ -42,7 +43,7 @@ struct xfs_trans;static inline struct xfs_dinode *xfs_make_iptr (struct xfs_mount *mp,struct xfs_buf *b,int o) { -return (xfs_dinode_t *) +return (struct xfs_dinode *) (xfs_buf_offset (b, o << (mp)->m_sb.sb_inodelog)); }
fs/xfs/xfs_ialloc_btree.c +2 -4
@@ -17,19 +17,17 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_bit.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_btree.h" #include "xfs_ialloc.h" +#include "xfs_ialloc_btree.h" #include "xfs_alloc.h" #include "xfs_error.h" #include "xfs_trace.h"
fs/xfs/xfs_ialloc_btree.h +0 -49
55 lines not on this page · raw message
fs/xfs/xfs_icache.c +0 -4
@@ -24,17 +24,13 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" #include "xfs_inode.h" -#include "xfs_dinode.h" #include "xfs_error.h" -#include "xfs_filestream.h" #include "xfs_trans.h" #include "xfs_trans_priv.h" #include "xfs_inode_item.h" #include "xfs_quota.h" #include "xfs_trace.h" -#include "xfs_fsops.h" #include "xfs_icache.h" #include "xfs_bmap_util.h"
fs/xfs/xfs_inode.c +3 -7
@@ -27,27 +27,22 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_inode.h" #include "xfs_da_format.h" #include "xfs_da_btree.h" #include "xfs_dir2.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" #include "xfs_attr_sf.h" #include "xfs_attr.h" -#include "xfs_dinode.h" -#include "xfs_inode.h" #include "xfs_trans_space.h" #include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_inode_item.h" -#include "xfs_btree.h" -#include "xfs_alloc.h" #include "xfs_ialloc.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" #include "xfs_error.h" #include "xfs_quota.h" +#include "xfs_dinode.h" #include "xfs_filestream.h" #include "xfs_cksum.h" #include "xfs_trace.h"
@@ -55,6 +50,7 @@#include "xfs_symlink.h" #include "xfs_trans_priv.h" #include "xfs_log.h" +#include "xfs_bmap_btree.h" kmem_zone_t *xfs_inode_zone;
fs/xfs/xfs_inode.h +0 -1
@@ -24,7 +24,6 @@/* * Kernel only inode definitions */ -struct xfs_dinode ;struct xfs_inode ;struct xfs_buf ;
fs/xfs/xfs_inode_buf.c +2 -4
@@ -24,15 +24,13 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_error.h" #include "xfs_cksum.h" #include "xfs_icache.h" -#include "xfs_ialloc.h" #include "xfs_trans.h" +#include "xfs_ialloc.h" +#include "xfs_dinode.h" /* * Check that none of the inode's in the buffer have a next
fs/xfs/xfs_inode_fork.c +3 -13
@@ -26,25 +26,15 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_attr_sf.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trans.h" -#include "xfs_buf_item.h" #include "xfs_inode_item.h" -#include "xfs_btree.h" -#include "xfs_alloc.h" -#include "xfs_ialloc.h" +#include "xfs_bmap_btree.h" #include "xfs_bmap.h" #include "xfs_error.h" -#include "xfs_quota.h" -#include "xfs_filestream.h" -#include "xfs_cksum.h" #include "xfs_trace.h" -#include "xfs_icache.h" +#include "xfs_attr_sf.h" +#include "xfs_dinode.h" kmem_zone_t *xfs_ifork_zone;
fs/xfs/xfs_inode_fork.h +1 -0
@@ -19,6 +19,7 @@#define __XFS_INODE_FORK_H__struct xfs_inode_log_item ; +struct xfs_dinode ;/* * The following xfs_ext_irec_t struct introduces a second (top) level
fs/xfs/xfs_inode_item.c +2 -2
@@ -17,19 +17,19 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_error.h" #include "xfs_trace.h" #include "xfs_trans_priv.h" +#include "xfs_dinode.h" kmem_zone_t *xfs_ili_zone;/* inode log item zone */
fs/xfs/xfs_ioctl.c +3 -6
@@ -23,28 +23,25 @@#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" -#include "xfs_alloc.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_ioctl.h" +#include "xfs_alloc.h" #include "xfs_rtalloc.h" #include "xfs_itable.h" #include "xfs_error.h" #include "xfs_attr.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" -#include "xfs_trans.h" -#include "xfs_buf_item.h" #include "xfs_fsops.h" #include "xfs_discard.h" #include "xfs_quota.h" -#include "xfs_inode_item.h" #include "xfs_export.h" #include "xfs_trace.h" #include "xfs_icache.h" #include "xfs_symlink.h" +#include "xfs_dinode.h" +#include "xfs_trans.h" #include <linux/capability.h> #include <linux/dcache.h>
fs/xfs/xfs_ioctl32.c +1 -2
@@ -22,14 +22,13 @@#include <asm/uaccess.h> #include "xfs.h" #include "xfs_fs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" #include "xfs_vnode.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_itable.h" #include "xfs_error.h"
fs/xfs/xfs_iomap.c +4 -12
@@ -24,29 +24,21 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" -#include "xfs_trans.h" -#include "xfs_inode_item.h" -#include "xfs_alloc.h" -#include "xfs_quota.h" #include "xfs_btree.h" +#include "xfs_bmap_btree.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" -#include "xfs_rtalloc.h" #include "xfs_error.h" -#include "xfs_itable.h" -#include "xfs_attr.h" -#include "xfs_buf_item.h" +#include "xfs_trans.h" #include "xfs_trans_space.h" #include "xfs_iomap.h" #include "xfs_trace.h" #include "xfs_icache.h" +#include "xfs_quota.h" #include "xfs_dquot_item.h" #include "xfs_dquot.h" +#include "xfs_dinode.h" #define XFS_WRITEIO_ALIGN (mp,off) (((off) >> mp->m_writeio_log) \
fs/xfs/xfs_iops.c +1 -7
@@ -25,26 +25,20 @@#include "xfs_ag.h" #include "xfs_mount.h" #include "xfs_da_format.h" -#include "xfs_bmap_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" #include "xfs_acl.h" -#include "xfs_alloc.h" #include "xfs_quota.h" -#include "xfs_rtalloc.h" #include "xfs_error.h" -#include "xfs_itable.h" #include "xfs_attr.h" #include "xfs_trans.h" -#include "xfs_buf_item.h" -#include "xfs_inode_item.h" #include "xfs_trace.h" #include "xfs_icache.h" #include "xfs_symlink.h" #include "xfs_da_btree.h" #include "xfs_dir2_priv.h" +#include "xfs_dinode.h" #include <linux/capability.h> #include <linux/xattr.h>
fs/xfs/xfs_itable.c +4 -5
@@ -18,23 +18,22 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_inum.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_btree.h" #include "xfs_ialloc.h" +#include "xfs_ialloc_btree.h" #include "xfs_itable.h" #include "xfs_error.h" -#include "xfs_btree.h" #include "xfs_trace.h" #include "xfs_icache.h" +#include "xfs_dinode.h" STATIC int xfs_internal_inum(
fs/xfs/xfs_log.c +1 -5
@@ -18,6 +18,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_sb.h"
@@ -28,12 +29,7 @@#include "xfs_trans_priv.h" #include "xfs_log.h" #include "xfs_log_priv.h" -#include "xfs_buf_item.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" #include "xfs_log_recover.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trace.h" #include "xfs_fsops.h"
fs/xfs/xfs_log_recover.c +6 -12
@@ -27,29 +27,23 @@#include "xfs_ag.h" #include "xfs_mount.h" #include "xfs_da_format.h" -#include "xfs_error.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trans.h" -#include "xfs_inode_item.h" -#include "xfs_alloc.h" -#include "xfs_ialloc.h" #include "xfs_log.h" #include "xfs_log_priv.h" #include "xfs_log_recover.h" +#include "xfs_inode_item.h" #include "xfs_extfree_item.h" #include "xfs_trans_priv.h" +#include "xfs_alloc.h" +#include "xfs_ialloc.h" #include "xfs_quota.h" #include "xfs_cksum.h" #include "xfs_trace.h" #include "xfs_icache.h" - -/* Need all the magic numbers and buffer ops structures from these headers */ -#include "xfs_da_btree.h" +#include "xfs_bmap_btree.h" +#include "xfs_dinode.h" +#include "xfs_error.h" #include "xfs_dir2.h" #define BLK_AVG (blk1, blk2) ((blk1+blk2) >> 1)
fs/xfs/xfs_log_rlimit.c +2 -1
@@ -18,6 +18,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_ag.h"
@@ -25,10 +26,10 @@#include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_trans_space.h" -#include "xfs_bmap_btree.h" #include "xfs_inode.h" #include "xfs_da_btree.h" #include "xfs_attr_leaf.h" +#include "xfs_bmap_btree.h" /* * Calculate the maximum length in bytes that would be required for a local
fs/xfs/xfs_mount.c +4 -11
@@ -27,27 +27,20 @@#include "xfs_ag.h" #include "xfs_mount.h" #include "xfs_da_format.h" -#include "xfs_trans.h" -#include "xfs_trans_priv.h" -#include "xfs_log.h" -#include "xfs_dir2.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" -#include "xfs_btree.h" +#include "xfs_dir2.h" #include "xfs_ialloc.h" #include "xfs_alloc.h" #include "xfs_rtalloc.h" #include "xfs_bmap.h" +#include "xfs_trans.h" +#include "xfs_trans_priv.h" +#include "xfs_log.h" #include "xfs_error.h" #include "xfs_quota.h" #include "xfs_fsops.h" #include "xfs_trace.h" #include "xfs_icache.h" -#include "xfs_cksum.h" -#include "xfs_buf_item.h" #ifdef HAVE_PERCPU_SB
fs/xfs/xfs_qm.c +3 -8
@@ -17,33 +17,28 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_shared.h" #include "xfs_format.h" #include "xfs_log_format.h" -#include "xfs_shared.h" #include "xfs_trans_resv.h" #include "xfs_bit.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_ialloc.h" #include "xfs_itable.h" -#include "xfs_alloc.h" -#include "xfs_rtalloc.h" #include "xfs_quota.h" #include "xfs_error.h" #include "xfs_bmap.h" -#include "xfs_attr.h" +#include "xfs_bmap_btree.h" #include "xfs_trans.h" -#include "xfs_buf_item.h" #include "xfs_trans_space.h" #include "xfs_qm.h" #include "xfs_trace.h" #include "xfs_icache.h" #include "xfs_cksum.h" +#include "xfs_dinode.h" /* * The global quota manager. There is only one of these for the entire
fs/xfs/xfs_qm_bhv.c +0 -7
@@ -22,18 +22,11 @@#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" -#include "xfs_alloc.h" #include "xfs_quota.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" #include "xfs_inode.h" -#include "xfs_itable.h" -#include "xfs_bmap.h" -#include "xfs_rtalloc.h" #include "xfs_error.h" -#include "xfs_attr.h" #include "xfs_trans.h" -#include "xfs_buf_item.h" #include "xfs_qm.h"
fs/xfs/xfs_qm_syscalls.c +1 -9
@@ -27,19 +27,11 @@#include "xfs_bit.h" #include "xfs_sb.h" #include "xfs_ag.h" -#include "xfs_alloc.h" -#include "xfs_quota.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" #include "xfs_inode.h" #include "xfs_trans.h" -#include "xfs_inode_item.h" -#include "xfs_itable.h" -#include "xfs_bmap.h" -#include "xfs_rtalloc.h" #include "xfs_error.h" -#include "xfs_attr.h" -#include "xfs_buf_item.h" +#include "xfs_quota.h" #include "xfs_qm.h" #include "xfs_trace.h" #include "xfs_icache.h"
fs/xfs/xfs_quotaops.c +1 -2
@@ -22,10 +22,9 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_inode.h" #include "xfs_quota.h" #include "xfs_trans.h" -#include "xfs_bmap_btree.h" -#include "xfs_inode.h" #include "xfs_qm.h" #include <linux/quota.h>
fs/xfs/xfs_rtalloc.c +3 -6
@@ -25,21 +25,18 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" -#include "xfs_alloc.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" -#include "xfs_rtalloc.h" -#include "xfs_fsops.h" +#include "xfs_bmap_btree.h" +#include "xfs_alloc.h" #include "xfs_error.h" #include "xfs_trans.h" -#include "xfs_inode_item.h" #include "xfs_trans_space.h" #include "xfs_trace.h" #include "xfs_buf.h" #include "xfs_icache.h" +#include "xfs_dinode.h" /*
fs/xfs/xfs_sb.c +4 -14
@@ -21,31 +21,21 @@#include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_inum.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_da_format.h" -#include "xfs_da_btree.h" -#include "xfs_dir2.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" -#include "xfs_btree.h" #include "xfs_ialloc.h" #include "xfs_alloc.h" -#include "xfs_rtalloc.h" -#include "xfs_bmap.h" #include "xfs_error.h" -#include "xfs_quota.h" -#include "xfs_fsops.h" #include "xfs_trace.h" #include "xfs_cksum.h" #include "xfs_trans.h" -#include "xfs_trans_priv.h" #include "xfs_buf_item.h" +#include "xfs_dinode.h" +#include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" +#include "xfs_ialloc_btree.h" /* * Physical superblock buffer manipulations. Shared with libxfs in userspace.
fs/xfs/xfs_super.c +4 -12
@@ -24,29 +24,18 @@#include "xfs_inum.h" #include "xfs_sb.h" #include "xfs_ag.h" -#include "xfs_alloc.h" -#include "xfs_quota.h" #include "xfs_mount.h" #include "xfs_da_format.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_btree.h" -#include "xfs_ialloc.h" #include "xfs_bmap.h" -#include "xfs_rtalloc.h" +#include "xfs_alloc.h" #include "xfs_error.h" -#include "xfs_itable.h" #include "xfs_fsops.h" -#include "xfs_attr.h" #include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_log.h" #include "xfs_log_priv.h" -#include "xfs_trans_priv.h" -#include "xfs_filestream.h" #include "xfs_da_btree.h" #include "xfs_dir2.h" #include "xfs_extfree_item.h"
@@ -55,6 +44,9 @@#include "xfs_icache.h" #include "xfs_trace.h" #include "xfs_icreate_item.h" +#include "xfs_dinode.h" +#include "xfs_filestream.h" +#include "xfs_quota.h" #include <linux/namei.h> #include <linux/init.h>
fs/xfs/xfs_symlink.c +2 -4
@@ -28,13 +28,11 @@#include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_dir2.h" -#include "xfs_bmap_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_ialloc.h" #include "xfs_alloc.h" #include "xfs_bmap.h" +#include "xfs_bmap_btree.h" #include "xfs_bmap_util.h" #include "xfs_error.h" #include "xfs_quota.h"
@@ -42,8 +40,8 @@#include "xfs_trace.h" #include "xfs_symlink.h" #include "xfs_trans.h" -#include "xfs_buf_item.h" #include "xfs_log.h" +#include "xfs_dinode.h" /* ----- Kernel only functions below ----- */ STATIC int
fs/xfs/xfs_trace.c +1 -4
@@ -25,10 +25,6 @@#include "xfs_ag.h" #include "xfs_mount.h" #include "xfs_da_format.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_btree.h" #include "xfs_da_btree.h"
@@ -49,6 +45,7 @@#include "xfs_dquot.h" #include "xfs_log_recover.h" #include "xfs_inode_item.h" +#include "xfs_bmap_btree.h" /* * We include this last to have the helpers above available for the trace
fs/xfs/xfs_trans.c +1 -15
@@ -25,28 +25,14 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_error.h" -#include "xfs_da_format.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" -#include "xfs_btree.h" -#include "xfs_ialloc.h" -#include "xfs_alloc.h" #include "xfs_extent_busy.h" -#include "xfs_bmap.h" #include "xfs_quota.h" #include "xfs_trans.h" #include "xfs_trans_priv.h" -#include "xfs_trans_space.h" -#include "xfs_qm.h" -#include "xfs_inode_item.h" #include "xfs_log.h" -#include "xfs_log_priv.h" -#include "xfs_buf_item.h" #include "xfs_trace.h" +#include "xfs_error.h" kmem_zone_t *xfs_trans_zone;kmem_zone_t *xfs_log_item_desc_zone;
fs/xfs/xfs_trans.h +5 -0
@@ -234,6 +234,11 @@ void xfs_trans_cancel(xfs_trans_t *, int);int xfs_trans_ail_init (struct xfs_mount *);void xfs_trans_ail_destroy (struct xfs_mount *); +void xfs_trans_buf_set_type (struct xfs_trans *,struct xfs_buf *, +enum xfs_blft ); +void xfs_trans_buf_copy_type (struct xfs_buf *dst_bp, +struct xfs_buf *src_bp); +extern kmem_zone_t *xfs_trans_zone;extern kmem_zone_t *xfs_log_item_desc_zone;
fs/xfs/xfs_trans_buf.c +1 -4
@@ -18,15 +18,12 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trans.h" #include "xfs_buf_item.h"
fs/xfs/xfs_trans_dquot.c +1 -8
@@ -23,19 +23,12 @@#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" -#include "xfs_alloc.h" -#include "xfs_quota.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" #include "xfs_inode.h" -#include "xfs_itable.h" -#include "xfs_bmap.h" -#include "xfs_rtalloc.h" #include "xfs_error.h" -#include "xfs_attr.h" #include "xfs_trans.h" -#include "xfs_buf_item.h" #include "xfs_trans_priv.h" +#include "xfs_quota.h" #include "xfs_qm.h" STATIC void xfs_trans_alloc_dqinfo(xfs_trans_t *);
fs/xfs/xfs_trans_inode.c +1 -5
@@ -18,17 +18,13 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" -#include "xfs_btree.h" #include "xfs_trans.h" #include "xfs_trans_priv.h" #include "xfs_inode_item.h"
fs/xfs/xfs_trans_resv.c +1 -11
@@ -26,19 +26,9 @@#include "xfs_ag.h" #include "xfs_mount.h" #include "xfs_da_format.h" -#include "xfs_error.h" -#include "xfs_da_btree.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" -#include "xfs_btree.h" +#include "xfs_bmap_btree.h" #include "xfs_ialloc.h" -#include "xfs_alloc.h" -#include "xfs_extent_busy.h" -#include "xfs_bmap.h" -#include "xfs_bmap_util.h" #include "xfs_quota.h" #include "xfs_trans.h" #include "xfs_qm.h"
fs/xfs/xfs_xattr.c +1 -1
@@ -17,13 +17,13 @@*/ #include "xfs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" #include "xfs_da_format.h" -#include "xfs_bmap_btree.h" #include "xfs_inode.h" #include "xfs_attr.h" #include "xfs_attr_leaf.h"
Signature · 6 lines
1.8.4.rc3 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Re: [PATCH 09/19] xfs: decouple inode and bmap btree header files
Quoted 12 lines · Dave Chinner
From: Dave Chinner <[email protected]>
Currently the
xfs_inode.hheader has a dependency on the definition of the BMAP btree records as the inode fork includes an array ofxfs_bmbt_rec_host_tobjects in it's definition.Move all the btree format definitions from
xfs_btree.h,xfs_bmap_btree.h,xfs_alloc_btree.handxfs_ialloc_btree.htoxfs_format.hto continue the process of centralising the on-disk format definitions. With this done, the xfs inode definitions are no longer dependent on btree header files.
Quoted 4 lines
The enables a massive culling of unnecessary includes, with close to 200 #include directives removed from the XFS kernel code base.
Signed-off-by Dave Chinner <[email protected]>
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
PATCH v2 9/19 xfs: decouple inode and bmap btree header files
From: Dave Chinner <[email protected]>
xfs_trans.h has a dependency on xfs_log.h for a couple of structures. Most code that does transactions doesn't need to know anything about the log, bu this dependency means that they have to include xfs_log.h. Decouple the xfs_trans.h and xfs_log.h header files and clean up the includes to be in dependency order.
In doing this, remove the direct include of xfs_trans_reserve.h from xfs_trans.h so that we remove the dependency between xfs_trans.h and xfs_mount.h. Hence the xfs_trans.h include can be moved to the indicate the actual dependencies oher header files have on it.
Note that these are kernel only header files, so this does not translate to any userspace changes at all.
---
V2: rebase due to changed fs/xfs/xfs_file.c include files as a result of the fallocate rework.
fs/xfs/xfs_alloc.c | 6 ++++-- fs/xfs/xfs_alloc_btree.c | 6 +++--- fs/xfs/xfs_aops.c | 7 ++++--- fs/xfs/xfs_attr.c | 8 ++++---- fs/xfs/xfs_attr_inactive.c | 8 ++++---- fs/xfs/xfs_attr_leaf.c | 7 +++---- fs/xfs/xfs_attr_list.c | 6 +++--- fs/xfs/xfs_attr_remote.c | 7 +++---- fs/xfs/xfs_bit.c | 5 +---- fs/xfs/xfs_bmap.c | 7 ++++--- fs/xfs/xfs_bmap_btree.c | 5 +++-- fs/xfs/xfs_bmap_util.c | 9 +++++---- fs/xfs/xfs_btree.c | 5 +++-- fs/xfs/xfs_buf.c | 5 +++-- fs/xfs/xfs_buf_item.c | 7 ++++--- fs/xfs/xfs_da_btree.c | 7 ++++--- fs/xfs/xfs_dir2.c | 6 +++--- fs/xfs/xfs_dir2_block.c | 6 +++--- fs/xfs/xfs_dir2_data.c | 6 +++--- fs/xfs/xfs_dir2_leaf.c | 6 +++--- fs/xfs/xfs_dir2_node.c | 6 +++--- fs/xfs/xfs_dir2_readdir.c | 6 +++--- fs/xfs/xfs_dir2_sf.c | 6 +++--- fs/xfs/xfs_discard.c | 5 +++-- fs/xfs/xfs_dquot.c | 10 ++++++---- fs/xfs/xfs_dquot_buf.c | 5 +++-- fs/xfs/xfs_dquot_item.c | 6 ++++-- fs/xfs/xfs_error.c | 5 ++--- fs/xfs/xfs_export.c | 7 ++++--- fs/xfs/xfs_extent_busy.c | 6 ++++-- fs/xfs/xfs_extfree_item.c | 8 ++++---- fs/xfs/xfs_file.c | 6 ++++-- fs/xfs/xfs_filestream.c | 10 +++++----- fs/xfs/xfs_fsops.c | 9 +++++---- fs/xfs/xfs_ialloc.c | 7 ++++--- fs/xfs/xfs_ialloc_btree.c | 6 +++--- fs/xfs/xfs_icache.c | 9 ++++----- fs/xfs/xfs_icreate_item.c | 5 +++-- fs/xfs/xfs_inode.c | 12 +++++++----- fs/xfs/xfs_inode_buf.c | 7 ++++--- fs/xfs/xfs_inode_fork.c | 6 +++--- fs/xfs/xfs_inode_item.c | 8 ++++---- fs/xfs/xfs_ioctl.c | 7 ++++--- fs/xfs/xfs_ioctl32.c | 4 ++-- fs/xfs/xfs_iomap.c | 11 ++++++----- fs/xfs/xfs_iops.c | 13 +++++++------ fs/xfs/xfs_itable.c | 4 ++-- fs/xfs/xfs_log.c | 8 +++++--- fs/xfs/xfs_log.h | 10 ++-------- fs/xfs/xfs_log_cil.c | 10 ++++++---- fs/xfs/xfs_log_priv.h | 7 ++++--- fs/xfs/xfs_log_recover.c | 13 +++++-------- fs/xfs/xfs_log_rlimit.c | 4 ++-- fs/xfs/xfs_message.c | 5 ++--- fs/xfs/xfs_mount.c | 10 ++++++---- fs/xfs/xfs_qm.c | 9 +++++---- fs/xfs/xfs_qm_bhv.c | 5 +++-- fs/xfs/xfs_qm_syscalls.c | 7 ++++--- fs/xfs/xfs_quotaops.c | 2 +- fs/xfs/xfs_rtalloc.c | 7 ++++--- fs/xfs/xfs_sb.c | 7 ++++--- fs/xfs/xfs_super.c | 8 +++++--- fs/xfs/xfs_symlink.c | 8 +++++--- fs/xfs/xfs_symlink_remote.c | 5 +++-- fs/xfs/xfs_trace.c | 8 +++++--- fs/xfs/xfs_trans.c | 10 ++++++---- fs/xfs/xfs_trans.h | 10 +++++----- fs/xfs/xfs_trans_ail.c | 7 ++++--- fs/xfs/xfs_trans_buf.c | 5 +++-- fs/xfs/xfs_trans_dquot.c | 7 ++++--- fs/xfs/xfs_trans_extfree.c | 5 +++-- fs/xfs/xfs_trans_inode.c | 5 +++-- fs/xfs/xfs_trans_priv.h | 1 - fs/xfs/xfs_trans_resv.c | 6 +++--- fs/xfs/xfs_xattr.c | 3 +-- 75 files changed, 276 insertions(+), 239 deletions(-)
fs/xfs/xfs_alloc.c +4 -2
@@ -18,10 +18,10 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_log_format.h" #include "xfs_shared.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -36,7 +36,9 @@#include "xfs_error.h" #include "xfs_cksum.h" #include "xfs_trace.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" +#include "xfs_log.h" struct workqueue_struct *xfs_alloc_wq;
fs/xfs/xfs_alloc_btree.c +3 -3
@@ -17,9 +17,8 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -34,6 +33,7 @@#include "xfs_error.h" #include "xfs_trace.h" #include "xfs_cksum.h" +#include "xfs_trans.h" STATIC struct xfs_btree_cur *
fs/xfs/xfs_aops.c +4 -3
@@ -16,16 +16,17 @@* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" -#include "xfs_format.h" #include "xfs_shared.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_alloc.h" #include "xfs_error.h"
fs/xfs/xfs_attr.c +4 -4
@@ -17,12 +17,11 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" -#include "xfs_trans_priv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -33,6 +32,7 @@#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_alloc.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h"
fs/xfs/xfs_attr_inactive.c +4 -4
@@ -18,11 +18,11 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -36,6 +36,7 @@#include "xfs_attr_remote.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_bmap.h" #include "xfs_attr.h"
@@ -43,7 +44,6 @@#include "xfs_error.h" #include "xfs_quota.h" #include "xfs_trace.h" -#include "xfs_trans_priv.h" /* * Look at all the extents for this logical region,
fs/xfs/xfs_attr_leaf.c +3 -4
@@ -18,11 +18,9 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" -#include "xfs_trans_priv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -37,6 +35,7 @@#include "xfs_attr_remote.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_bmap.h" #include "xfs_attr.h"
fs/xfs/xfs_attr_list.c +3 -3
@@ -18,10 +18,9 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -36,6 +35,7 @@#include "xfs_attr_remote.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_bmap.h" #include "xfs_attr.h"
fs/xfs/xfs_attr_remote.c +3 -4
@@ -18,11 +18,9 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" -#include "xfs_trans_priv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -33,6 +31,7 @@#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_alloc.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h"
fs/xfs/xfs_bit.c +1 -4
@@ -16,10 +16,7 @@* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" -#include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" -#include "xfs_buf_item.h" +#include "xfs_log_format.h" /* * XFS bit manipulation routines, used in non-realtime code.
fs/xfs/xfs_bmap.c +4 -3
@@ -17,12 +17,12 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" #include "xfs_inum.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -37,6 +37,7 @@#include "xfs_btree.h" #include "xfs_mount.h" #include "xfs_itable.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_extfree_item.h" #include "xfs_alloc.h"
fs/xfs/xfs_bmap_btree.c +3 -2
@@ -18,9 +18,9 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -29,6 +29,7 @@#include "xfs_ialloc_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_alloc.h" #include "xfs_btree.h"
fs/xfs/xfs_bmap_util.c +5 -4
@@ -18,12 +18,11 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_inum.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -34,6 +33,7 @@#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_btree.h" +#include "xfs_trans.h" #include "xfs_extfree_item.h" #include "xfs_alloc.h" #include "xfs_bmap.h"
@@ -44,6 +44,7 @@#include "xfs_trans_space.h" #include "xfs_trace.h" #include "xfs_icache.h" +#include "xfs_log.h" /* Kernel only BMAP related definitions and functions */
fs/xfs/xfs_btree.c +3 -2
@@ -18,9 +18,9 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -29,6 +29,7 @@#include "xfs_ialloc_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_buf_item.h" #include "xfs_btree.h"
fs/xfs/xfs_buf.c +3 -2
@@ -34,12 +34,13 @@#include <linux/backing-dev.h> #include <linux/freezer.h> -#include "xfs_sb.h" +#include "xfs_log_format.h" #include "xfs_trans_resv.h" -#include "xfs_log.h" +#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" #include "xfs_trace.h" +#include "xfs_log.h" static kmem_zone_t *xfs_buf_zone;
fs/xfs/xfs_buf_item.c +4 -3
@@ -17,17 +17,18 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_trans_priv.h" #include "xfs_error.h" #include "xfs_trace.h" +#include "xfs_log.h" kmem_zone_t *xfs_buf_item_zone;
fs/xfs/xfs_da_btree.c +4 -3
@@ -18,11 +18,11 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -33,6 +33,7 @@#include "xfs_dir2_priv.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_alloc.h" #include "xfs_bmap.h"
fs/xfs/xfs_dir2.c +3 -3
@@ -17,10 +17,9 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_log.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_inum.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -30,6 +29,7 @@#include "xfs_alloc_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_bmap.h" #include "xfs_dir2.h"
fs/xfs/xfs_dir2_block.c +3 -3
@@ -18,9 +18,8 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -29,6 +28,7 @@#include "xfs_bmap_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_bmap.h" #include "xfs_buf_item.h"
fs/xfs/xfs_dir2_data.c +3 -3
@@ -18,9 +18,8 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -32,6 +31,7 @@#include "xfs_dir2.h" #include "xfs_dir2_priv.h" #include "xfs_error.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_cksum.h"
fs/xfs/xfs_dir2_leaf.c +3 -3
@@ -18,10 +18,9 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -35,6 +34,7 @@#include "xfs_dir2_priv.h" #include "xfs_error.h" #include "xfs_trace.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_cksum.h"
fs/xfs/xfs_dir2_node.c +3 -3
@@ -18,9 +18,8 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -34,6 +33,7 @@#include "xfs_dir2_priv.h" #include "xfs_error.h" #include "xfs_trace.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_cksum.h"
fs/xfs/xfs_dir2_readdir.c +3 -3
@@ -18,10 +18,9 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -35,6 +34,7 @@#include "xfs_error.h" #include "xfs_trace.h" #include "xfs_bmap.h" +#include "xfs_trans.h" /* * Directory file type support functions
fs/xfs/xfs_dir2_sf.c +3 -3
@@ -17,9 +17,8 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -28,6 +27,7 @@#include "xfs_bmap_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_error.h" #include "xfs_dir2.h"
fs/xfs/xfs_discard.c +3 -2
@@ -17,8 +17,8 @@*/ #include "xfs.h" #include "xfs_format.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -33,6 +33,7 @@#include "xfs_extent_busy.h" #include "xfs_discard.h" #include "xfs_trace.h" +#include "xfs_log.h" STATIC int xfs_trim_extents(
fs/xfs/xfs_dquot.c +6 -4
@@ -18,29 +18,31 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_log_format.h" #include "xfs_shared.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" -#include "xfs_alloc.h" -#include "xfs_quota.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_inode.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" +#include "xfs_alloc.h" +#include "xfs_quota.h" #include "xfs_rtalloc.h" #include "xfs_error.h" #include "xfs_itable.h" #include "xfs_attr.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_trans_space.h" #include "xfs_trans_priv.h" #include "xfs_qm.h" #include "xfs_cksum.h" #include "xfs_trace.h" +#include "xfs_log.h" /* * Lock order:
fs/xfs/xfs_dquot_buf.c +3 -2
@@ -19,15 +19,16 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_inode.h" #include "xfs_quota.h" +#include "xfs_trans.h" #include "xfs_qm.h" #include "xfs_error.h" #include "xfs_cksum.h"
fs/xfs/xfs_dquot_item.c +4 -2
@@ -18,8 +18,8 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_alloc.h"
@@ -32,9 +32,11 @@#include "xfs_error.h" #include "xfs_itable.h" #include "xfs_attr.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_trans_priv.h" #include "xfs_qm.h" +#include "xfs_log.h" static inline struct xfs_dq_logitem *DQUOT_ITEM (struct xfs_log_item *lip) {
fs/xfs/xfs_error.c +2 -3
@@ -17,9 +17,8 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
fs/xfs/xfs_export.c +4 -3
@@ -16,9 +16,8 @@* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -27,9 +26,11 @@#include "xfs_export.h" #include "xfs_bmap_btree.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_trace.h" #include "xfs_icache.h" +#include "xfs_log.h" /* * Note that we only accept fileids which are long enough rather than allow
fs/xfs/xfs_extent_busy.c +4 -2
@@ -20,9 +20,9 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_log_format.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -31,6 +31,8 @@#include "xfs_inode.h" #include "xfs_extent_busy.h" #include "xfs_trace.h" +#include "xfs_trans.h" +#include "xfs_log.h" void xfs_extent_busy_insert(
fs/xfs/xfs_extfree_item.c +4 -4
@@ -17,14 +17,14 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_trans.h" -#include "xfs_buf_item.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_trans.h" #include "xfs_trans_priv.h" +#include "xfs_buf_item.h" #include "xfs_extfree_item.h"
fs/xfs/xfs_file.c +4 -2
@@ -18,10 +18,10 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" -#include "xfs_log.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" -#include "xfs_trans.h" #include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_da_btree.h"
@@ -29,6 +29,7 @@#include "xfs_alloc.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h"
@@ -37,6 +38,7 @@#include "xfs_dir2_priv.h" #include "xfs_ioctl.h" #include "xfs_trace.h" +#include "xfs_log.h" #include <linux/aio.h> #include <linux/dcache.h>
fs/xfs/xfs_filestream.c +5 -5
@@ -16,15 +16,15 @@* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" -#include "xfs_log.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" +#include "xfs_ag.h" +#include "xfs_sb.h" +#include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_inum.h" #include "xfs_dinode.h" #include "xfs_inode.h" -#include "xfs_ag.h" -#include "xfs_trans.h" -#include "xfs_sb.h" -#include "xfs_mount.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" #include "xfs_alloc.h"
fs/xfs/xfs_fsops.c +5 -4
@@ -17,11 +17,10 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_format.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -30,6 +29,7 @@#include "xfs_ialloc_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_btree.h" #include "xfs_error.h"
@@ -41,6 +41,7 @@#include "xfs_rtalloc.h" #include "xfs_filestream.h" #include "xfs_trace.h" +#include "xfs_log.h" /* * File system operations
fs/xfs/xfs_ialloc.c +4 -3
@@ -17,12 +17,12 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" #include "xfs_inum.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -38,6 +38,7 @@#include "xfs_error.h" #include "xfs_bmap.h" #include "xfs_cksum.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_icreate_item.h" #include "xfs_icache.h"
fs/xfs/xfs_ialloc_btree.c +3 -3
@@ -17,10 +17,9 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -35,6 +34,7 @@#include "xfs_error.h" #include "xfs_trace.h" #include "xfs_cksum.h" +#include "xfs_trans.h" STATIC int
fs/xfs/xfs_icache.c +4 -5
@@ -18,12 +18,9 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_log_priv.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_inum.h" -#include "xfs_trans.h" -#include "xfs_trans_priv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -32,6 +29,8 @@#include "xfs_dinode.h" #include "xfs_error.h" #include "xfs_filestream.h" +#include "xfs_trans.h" +#include "xfs_trans_priv.h" #include "xfs_inode_item.h" #include "xfs_quota.h" #include "xfs_trace.h"
fs/xfs/xfs_icreate_item.c +3 -2
@@ -18,12 +18,13 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_trans.h" #include "xfs_trans_priv.h" #include "xfs_error.h" #include "xfs_icreate_item.h"
fs/xfs/xfs_inode.c +7 -5
@@ -19,13 +19,11 @@#include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" -#include "xfs_log.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_inum.h" -#include "xfs_trans.h" -#include "xfs_trans_space.h" -#include "xfs_trans_priv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -39,6 +37,8 @@#include "xfs_attr.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans_space.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_inode_item.h" #include "xfs_btree.h"
@@ -53,6 +53,8 @@#include "xfs_trace.h" #include "xfs_icache.h" #include "xfs_symlink.h" +#include "xfs_trans_priv.h" +#include "xfs_log.h" kmem_zone_t *xfs_inode_zone;
fs/xfs/xfs_inode_buf.c +4 -3
@@ -17,10 +17,10 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -32,6 +32,7 @@#include "xfs_cksum.h" #include "xfs_icache.h" #include "xfs_ialloc.h" +#include "xfs_trans.h" /* * Check that none of the inode's in the buffer have a next
fs/xfs/xfs_inode_fork.c +3 -3
@@ -20,10 +20,9 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" -#include "xfs_log.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_inum.h" -#include "xfs_trans.h" -#include "xfs_trans_priv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -33,6 +32,7 @@#include "xfs_attr_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_inode_item.h" #include "xfs_btree.h"
fs/xfs/xfs_inode_item.c +4 -4
@@ -17,19 +17,19 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_trans_priv.h" #include "xfs_bmap_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_error.h" #include "xfs_trace.h" +#include "xfs_trans_priv.h" kmem_zone_t *xfs_ili_zone;/* inode log item zone */
fs/xfs/xfs_ioctl.c +4 -3
@@ -17,10 +17,10 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_alloc.h"
@@ -35,6 +35,7 @@#include "xfs_attr.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_fsops.h" #include "xfs_discard.h"
fs/xfs/xfs_ioctl32.c +2 -2
@@ -22,8 +22,8 @@#include <asm/uaccess.h> #include "xfs.h" #include "xfs_fs.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
fs/xfs/xfs_iomap.c +6 -5
@@ -17,21 +17,22 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" -#include "xfs_alloc.h" -#include "xfs_quota.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" +#include "xfs_alloc.h" +#include "xfs_quota.h" #include "xfs_btree.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h"
fs/xfs/xfs_iops.c +7 -6
@@ -17,15 +17,12 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" -#include "xfs_acl.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" -#include "xfs_alloc.h" -#include "xfs_quota.h" #include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_bmap_btree.h"
@@ -33,10 +30,14 @@#include "xfs_inode.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" +#include "xfs_acl.h" +#include "xfs_alloc.h" +#include "xfs_quota.h" #include "xfs_rtalloc.h" #include "xfs_error.h" #include "xfs_itable.h" #include "xfs_attr.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_inode_item.h" #include "xfs_trace.h"
fs/xfs/xfs_itable.c +2 -2
@@ -18,9 +18,9 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" -#include "xfs_log.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_inum.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
fs/xfs/xfs_log.c +5 -3
@@ -18,19 +18,21 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" #include "xfs_error.h" +#include "xfs_trans.h" +#include "xfs_trans_priv.h" +#include "xfs_log.h" #include "xfs_log_priv.h" #include "xfs_buf_item.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" #include "xfs_log_recover.h" -#include "xfs_trans_priv.h" #include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trace.h"
fs/xfs/xfs_log.h +2 -8
@@ -18,8 +18,6 @@ #ifndef __XFS_LOG_H__ #define __XFS_LOG_H__ -#include "xfs_log_format.h" - struct xfs_log_vec { struct xfs_log_vec *lv_next; /* next lv in build list */ int lv_niovecs; /* number of iovecs in lv */
@@ -82,11 +80,7 @@ struct xlog_ticket;struct xfs_log_item ;struct xfs_item_ops ;struct xfs_trans ; - -void xfs_log_item_init (struct xfs_mount *mp, -struct xfs_log_item *item, -int type, -const struct xfs_item_ops *ops); +struct xfs_log_callback ; xfs_lsn_t xfs_log_done(struct xfs_mount *mp, struct xlog_ticket *ticket,
@@ -114,7 +108,7 @@ xfs_lsn_t xlog_assign_tail_lsn_locked(struct xfs_mount *mp);void xfs_log_space_wake (struct xfs_mount *mp);int xfs_log_notify (struct xfs_mount *mp,struct xlog_in_core *iclog, -xfs_log_callback_t *callback_entry); +struct xfs_log_callback *callback_entry);int xfs_log_release_iclog (struct xfs_mount *mp,struct xlog_in_core *iclog); int xfs_log_reserve(struct xfs_mount *mp,
fs/xfs/xfs_log_cil.c +6 -4
@@ -17,11 +17,9 @@#include "xfs.h" #include "xfs_fs.h" +#include "xfs_log_format.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" -#include "xfs_trans_priv.h" -#include "xfs_log_priv.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -29,6 +27,10 @@#include "xfs_alloc.h" #include "xfs_extent_busy.h" #include "xfs_discard.h" +#include "xfs_trans.h" +#include "xfs_trans_priv.h" +#include "xfs_log.h" +#include "xfs_log_priv.h" /* * Allocate a new ticket. Failing to get a new ticket makes it really hard to
fs/xfs/xfs_log_priv.h +4 -3
@@ -22,6 +22,7 @@ struct xfs_buf;struct xlog ;struct xlog_ticket ;struct xfs_mount ; +struct xfs_log_callback ;/* * Flags for log structure
@@ -227,8 +228,8 @@ typedef struct xlog_in_core {/* Callback structures need their own cacheline */ spinlock_t ic_callback_lock____cacheline_aligned_in_smp ; -xfs_log_callback_t *ic_callback; -xfs_log_callback_t **ic_callback_tail; +struct xfs_log_callback *ic_callback; +struct xfs_log_callback **ic_callback_tail;/* reference counts need their own cacheline */ atomic_t ic_refcnt____cacheline_aligned_in_smp ;
@@ -254,7 +255,7 @@ struct xfs_cil_ctx {int space_used;/* aggregate size of regions */ struct list_head busy_extents;/* busy extents in chkpt */ struct xfs_log_vec *lv_chain;/* logvecs being pushed */ -xfs_log_callback_t log_cb;/* completion callback hook. */ +struct xfs_log_callback log_cb;/* completion callback hook. */ struct list_head committing;/* ctx committing list */ };
fs/xfs/xfs_log_recover.c +5 -8
@@ -17,12 +17,12 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" #include "xfs_inum.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -34,11 +34,12 @@#include "xfs_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_alloc.h" #include "xfs_ialloc.h" +#include "xfs_log.h" #include "xfs_log_priv.h" -#include "xfs_buf_item.h" #include "xfs_log_recover.h" #include "xfs_extfree_item.h" #include "xfs_trans_priv.h"
@@ -46,14 +47,10 @@#include "xfs_cksum.h" #include "xfs_trace.h" #include "xfs_icache.h" -#include "xfs_icreate_item.h" /* Need all the magic numbers and buffer ops structures from these headers */ -#include "xfs_symlink.h" #include "xfs_da_btree.h" #include "xfs_dir2.h" -#include "xfs_attr_leaf.h" -#include "xfs_attr_remote.h" #define BLK_AVG (blk1, blk2) ((blk1+blk2) >> 1)
fs/xfs/xfs_log_rlimit.c +2 -2
@@ -18,8 +18,8 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_ag.h" #include "xfs_sb.h" #include "xfs_mount.h"
fs/xfs/xfs_message.c +2 -3
@@ -17,9 +17,8 @@#include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
fs/xfs/xfs_mount.c +6 -4
@@ -17,17 +17,19 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" #include "xfs_inum.h" -#include "xfs_trans.h" -#include "xfs_trans_priv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" #include "xfs_da_format.h" +#include "xfs_trans.h" +#include "xfs_trans_priv.h" +#include "xfs_log.h" #include "xfs_dir2.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h"
fs/xfs/xfs_qm.c +5 -4
@@ -18,14 +18,12 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_log_format.h" #include "xfs_shared.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" -#include "xfs_alloc.h" -#include "xfs_quota.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_ialloc_btree.h"
@@ -33,10 +31,13 @@#include "xfs_inode.h" #include "xfs_ialloc.h" #include "xfs_itable.h" +#include "xfs_alloc.h" #include "xfs_rtalloc.h" +#include "xfs_quota.h" #include "xfs_error.h" #include "xfs_bmap.h" #include "xfs_attr.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_trans_space.h" #include "xfs_qm.h"
fs/xfs/xfs_qm_bhv.c +3 -2
@@ -18,8 +18,8 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_alloc.h"
@@ -32,6 +32,7 @@#include "xfs_rtalloc.h" #include "xfs_error.h" #include "xfs_attr.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_qm.h"
fs/xfs/xfs_qm_syscalls.c +4 -3
@@ -20,11 +20,11 @@#include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_alloc.h"
@@ -32,6 +32,7 @@#include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_itable.h" #include "xfs_bmap.h"
fs/xfs/xfs_quotaops.c +1 -1
@@ -17,8 +17,8 @@*/ #include "xfs.h" #include "xfs_format.h" +#include "xfs_log_format.h" #include "xfs_trans_resv.h" -#include "xfs_log.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
fs/xfs/xfs_rtalloc.c +4 -3
@@ -17,11 +17,11 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -34,6 +34,7 @@#include "xfs_rtalloc.h" #include "xfs_fsops.h" #include "xfs_error.h" +#include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_trans_space.h" #include "xfs_trace.h"
fs/xfs/xfs_sb.c +4 -3
@@ -18,11 +18,10 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" #include "xfs_inum.h" -#include "xfs_trans.h" -#include "xfs_trans_priv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -44,6 +43,8 @@#include "xfs_fsops.h" #include "xfs_trace.h" #include "xfs_cksum.h" +#include "xfs_trans.h" +#include "xfs_trans_priv.h" #include "xfs_buf_item.h" /*
fs/xfs/xfs_super.c +5 -3
@@ -17,11 +17,11 @@*/ #include "xfs.h" -#include "xfs_format.h" #include "xfs_shared.h" -#include "xfs_log.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_inum.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_alloc.h"
@@ -41,7 +41,9 @@#include "xfs_itable.h" #include "xfs_fsops.h" #include "xfs_attr.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" +#include "xfs_log.h" #include "xfs_log_priv.h" #include "xfs_trans_priv.h" #include "xfs_filestream.h"
fs/xfs/xfs_symlink.c +5 -3
@@ -17,12 +17,12 @@* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" +#include "xfs_shared.h" #include "xfs_fs.h" #include "xfs_format.h" -#include "xfs_shared.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -41,7 +41,9 @@#include "xfs_trans_space.h" #include "xfs_trace.h" #include "xfs_symlink.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" +#include "xfs_log.h" /* ----- Kernel only functions below ----- */ STATIC int
fs/xfs/xfs_symlink_remote.c +3 -2
@@ -19,9 +19,9 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_format.h" +#include "xfs_log_format.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_trans_resv.h" #include "xfs_ag.h" #include "xfs_sb.h" #include "xfs_mount.h"
@@ -31,6 +31,7 @@#include "xfs_trace.h" #include "xfs_symlink.h" #include "xfs_cksum.h" +#include "xfs_trans.h" #include "xfs_buf_item.h"
fs/xfs/xfs_trace.c +5 -3
@@ -17,10 +17,10 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -38,6 +38,8 @@#include "xfs_bmap.h" #include "xfs_attr.h" #include "xfs_attr_leaf.h" +#include "xfs_trans.h" +#include "xfs_log.h" #include "xfs_log_priv.h" #include "xfs_buf_item.h" #include "xfs_quota.h"
fs/xfs/xfs_trans.c +6 -4
@@ -18,10 +18,10 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -38,10 +38,12 @@#include "xfs_extent_busy.h" #include "xfs_bmap.h" #include "xfs_quota.h" -#include "xfs_qm.h" +#include "xfs_trans.h" #include "xfs_trans_priv.h" #include "xfs_trans_space.h" +#include "xfs_qm.h" #include "xfs_inode_item.h" +#include "xfs_log.h" #include "xfs_log_priv.h" #include "xfs_buf_item.h" #include "xfs_trace.h"
fs/xfs/xfs_trans.h +5 -5
@@ -18,10 +18,6 @@#ifndef __XFS_TRANS_H__#define __XFS_TRANS_H__ -struct xfs_log_item ; - -#include "xfs_trans_resv.h" -/* kernel only transaction subsystem defines */ struct xfs_buf ;
@@ -77,6 +73,9 @@ struct xfs_item_ops {void (*iop_committing)(xfs_log_item_t *,xfs_lsn_t ); }; +void xfs_log_item_init (struct xfs_mount *mp,struct xfs_log_item *item, +int type,const struct xfs_item_ops *ops); +/* * Return values for the iop_push() routines. */
@@ -85,6 +84,7 @@ struct xfs_item_ops {#define XFS_ITEM_LOCKED 2#define XFS_ITEM_FLUSHING 3 +/* * This is the structure maintained for every active transaction. */
@@ -125,7 +125,6 @@ typedef struct xfs_trans {int64_t t_rextents_delta;/* superblocks rextents chg */ int64_t t_rextslog_delta;/* superblocks rextslog chg */ struct list_head t_items;/* log item descriptors */ -xfs_trans_header_t t_header;/* header for in-log trans */ struct list_head t_busy;/* list of busy extents */ unsigned long t_pflags;/* saved process flags state */ } xfs_trans_t;
@@ -230,6 +229,7 @@ void xfs_trans_log_efd_extent(xfs_trans_t *, xfs_fsblock_t, xfs_extlen_t);int xfs_trans_commit (xfs_trans_t *,uint flags); +int xfs_trans_roll (struct xfs_trans **,struct xfs_inode *);void xfs_trans_cancel (xfs_trans_t *,int );int xfs_trans_ail_init (struct xfs_mount *);void xfs_trans_ail_destroy (struct xfs_mount *);
fs/xfs/xfs_trans_ail.c +4 -3
@@ -18,15 +18,16 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_trans.h" #include "xfs_trans_priv.h" #include "xfs_trace.h" #include "xfs_error.h" +#include "xfs_log.h" #ifdef DEBUG /*
fs/xfs/xfs_trans_buf.c +3 -2
@@ -18,8 +18,8 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -28,6 +28,7 @@#include "xfs_ialloc_btree.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_trans_priv.h" #include "xfs_error.h"
fs/xfs/xfs_trans_dquot.c +4 -3
@@ -17,10 +17,10 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_format.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_alloc.h"
@@ -33,6 +33,7 @@#include "xfs_rtalloc.h" #include "xfs_error.h" #include "xfs_attr.h" +#include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_trans_priv.h" #include "xfs_qm.h"
fs/xfs/xfs_trans_extfree.c +3 -2
@@ -18,11 +18,12 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_trans.h" #include "xfs_trans_priv.h" #include "xfs_extfree_item.h"
fs/xfs/xfs_trans_inode.c +3 -2
@@ -18,8 +18,8 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_log_format.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -29,6 +29,7 @@#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_btree.h" +#include "xfs_trans.h" #include "xfs_trans_priv.h" #include "xfs_inode_item.h" #include "xfs_trace.h"
fs/xfs/xfs_trans_priv.h +0 -1
@@ -27,7 +27,6 @@ struct xfs_log_vec;void xfs_trans_init (struct xfs_mount *); -int xfs_trans_roll (struct xfs_trans **,struct xfs_inode *);void xfs_trans_add_item (struct xfs_trans *,struct xfs_log_item *);void xfs_trans_del_item (struct xfs_log_item *); void xfs_trans_free_items(struct xfs_trans *tp, xfs_lsn_t commit_lsn,
fs/xfs/xfs_trans_resv.c +3 -3
@@ -18,11 +18,10 @@*/ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_format.h" #include "xfs_shared.h" -#include "xfs_log.h" +#include "xfs_format.h" +#include "xfs_log_format.h" #include "xfs_trans_resv.h" -#include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
@@ -41,6 +40,7 @@#include "xfs_bmap.h" #include "xfs_bmap_util.h" #include "xfs_quota.h" +#include "xfs_trans.h" #include "xfs_qm.h" #include "xfs_trans_space.h" #include "xfs_trace.h"
fs/xfs/xfs_xattr.c +1 -2
@@ -18,8 +18,7 @@#include "xfs.h" #include "xfs_log_format.h" -#include "xfs_log.h" -#include "xfs_trans.h" +#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h"
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Re: [PATCH 09/19, V2] xfs: decouple inode and bmap btree header files
Quoted 13 lines · Dave Chinner
From: Dave Chinner <[email protected]>
xfs_trans.hhas a dependency onxfs_log.hfor a couple of structures. Most code that does transactions doesn't need to know anything about the log, bu this dependency means that they have to includexfs_log.h. Decouple thexfs_trans.handxfs_log.hheader files and clean up the includes to be in dependency order.In doing this, remove the direct include of
xfs_trans_reserve.hfromxfs_trans.hso that we remove the dependency betweenxfs_trans.handxfs_mount.h. Hence thexfs_trans.hinclude can be moved to the indicate the actual dependencies oher header files have on it.
Quoted 8 lines
Note that these are kernel only header files, so this does not translate to any userspace changes at all.
Signed-off-by Dave Chinner <[email protected]>Reviewed-by Ben Myers <[email protected]>---
V2: rebase due to changedfs/xfs/xfs_file.cinclude files as a result of the fallocate rework.
Ignore this patch - it's a rebase for 08/19, not 09/19. I'll send the rebase for this patch in a minute.
-Dave.
Signature · 7 lines
Dave Chinner [email protected] _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH v3 9/19 xfs: decouple inode and bmap btree header files
In reply to Ben MyersFrom: Dave Chinner <[email protected]>
Currently the xfs_inode.h header has a dependency on the definition of the BMAP btree records as the inode fork includes an array of xfs_bmbt_rec_host_t objects in it's definition.
Move all the btree format definitions from xfs_btree.h, xfs_bmap_btree.h, xfs_alloc_btree.h and xfs_ialloc_btree.h to xfs_format.h to continue the process of centralising the on-disk format definitions. With this done, the xfs inode definitions are no longer dependent on btree header files.
The enables a massive culling of unnecessary includes, with close to 200 #include directives removed from the XFS kernel code base.
---
V3: rebase due to changed fs/xfs/xfs_file.c include files as a result of the fallocate rework.
(Wrong patch sent as v2, ignore it)
fs/xfs/xfs_acl.c | 8 +- fs/xfs/xfs_alloc.c | 5 +- fs/xfs/xfs_alloc_btree.c | 7 +- fs/xfs/xfs_alloc_btree.h | 33 ------ fs/xfs/xfs_aops.c | 4 +- fs/xfs/xfs_attr.c | 4 +- fs/xfs/xfs_attr_inactive.c | 8 +- fs/xfs/xfs_attr_leaf.c | 13 +-- fs/xfs/xfs_attr_list.c | 12 +-- fs/xfs/xfs_attr_remote.c | 5 +- fs/xfs/xfs_bmap.c | 12 +-- fs/xfs/xfs_bmap_btree.c | 7 +- fs/xfs/xfs_bmap_btree.h | 103 ------------------ fs/xfs/xfs_bmap_util.c | 6 +- fs/xfs/xfs_btree.c | 5 +- fs/xfs/xfs_btree.h | 79 +++----------- fs/xfs/xfs_buf_item.h | 4 - fs/xfs/xfs_da_btree.c | 2 - fs/xfs/xfs_dir2.c | 5 +- fs/xfs/xfs_dir2_block.c | 4 +- fs/xfs/xfs_dir2_data.c | 3 +- fs/xfs/xfs_dir2_leaf.c | 4 +- fs/xfs/xfs_dir2_node.c | 3 +- fs/xfs/xfs_dir2_readdir.c | 4 +- fs/xfs/xfs_dir2_sf.c | 4 +- fs/xfs/xfs_discard.c | 6 +- fs/xfs/xfs_dquot.c | 5 +- fs/xfs/xfs_dquot_buf.c | 2 - fs/xfs/xfs_dquot_item.c | 8 +- fs/xfs/xfs_error.c | 4 +- fs/xfs/xfs_export.c | 2 +- fs/xfs/xfs_extent_busy.c | 2 - fs/xfs/xfs_extent_busy.h | 4 + fs/xfs/xfs_file.c | 5 +- fs/xfs/xfs_filestream.c | 4 +- fs/xfs/xfs_format.h | 255 +++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_fsops.c | 12 +-- fs/xfs/xfs_ialloc.c | 6 +- fs/xfs/xfs_ialloc.h | 3 +- fs/xfs/xfs_ialloc_btree.c | 6 +- fs/xfs/xfs_ialloc_btree.h | 49 --------- fs/xfs/xfs_icache.c | 4 - fs/xfs/xfs_inode.c | 10 +- fs/xfs/xfs_inode.h | 1 - fs/xfs/xfs_inode_buf.c | 6 +- fs/xfs/xfs_inode_fork.c | 16 +-- fs/xfs/xfs_inode_fork.h | 1 + fs/xfs/xfs_inode_item.c | 4 +- fs/xfs/xfs_ioctl.c | 9 +- fs/xfs/xfs_ioctl32.c | 3 +- fs/xfs/xfs_iomap.c | 16 +-- fs/xfs/xfs_iops.c | 8 +- fs/xfs/xfs_itable.c | 9 +- fs/xfs/xfs_log.c | 6 +- fs/xfs/xfs_log_recover.c | 18 ++-- fs/xfs/xfs_log_rlimit.c | 3 +- fs/xfs/xfs_mount.c | 15 +-- fs/xfs/xfs_qm.c | 11 +- fs/xfs/xfs_qm_bhv.c | 7 -- fs/xfs/xfs_qm_syscalls.c | 10 +- fs/xfs/xfs_quotaops.c | 3 +- fs/xfs/xfs_rtalloc.c | 9 +- fs/xfs/xfs_sb.c | 18 +--- fs/xfs/xfs_super.c | 16 +-- fs/xfs/xfs_symlink.c | 6 +- fs/xfs/xfs_trace.c | 5 +- fs/xfs/xfs_trans.c | 16 +-- fs/xfs/xfs_trans.h | 5 + fs/xfs/xfs_trans_buf.c | 5 +- fs/xfs/xfs_trans_dquot.c | 9 +- fs/xfs/xfs_trans_inode.c | 6 +- fs/xfs/xfs_trans_resv.c | 12 +-- fs/xfs/xfs_xattr.c | 2 +- 73 files changed, 403 insertions(+), 583 deletions(-)
fs/xfs/xfs_acl.c +4 -4
@@ -16,15 +16,15 @@* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" -#include "xfs_acl.h" -#include "xfs_attr.h" -#include "xfs_bmap_btree.h" -#include "xfs_inode.h" #include "xfs_ag.h" #include "xfs_sb.h" #include "xfs_mount.h" +#include "xfs_inode.h" +#include "xfs_acl.h" +#include "xfs_attr.h" #include "xfs_trace.h" #include <linux/slab.h> #include <linux/xattr.h>
fs/xfs/xfs_alloc.c +1 -4
@@ -25,12 +25,9 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_alloc.h" #include "xfs_extent_busy.h" #include "xfs_error.h"
fs/xfs/xfs_alloc_btree.c +2 -5
@@ -17,17 +17,14 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" -#include "xfs_inode.h" #include "xfs_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_alloc.h" #include "xfs_extent_busy.h" #include "xfs_error.h"
fs/xfs/xfs_alloc_btree.h +0 -33
@@ -27,39 +27,6 @@ struct xfs_btree_cur;struct xfs_mount ;/* -* There are two on-disk btrees, one sorted by blockno and one sorted -* by blockcount and blockno. All blocks look the same to make the code -* simpler; if we have time later, we'll make the optimizations. -*/ -#define XFS_ABTB_MAGIC 0x41425442/* 'ABTB' for bno tree */ -#define XFS_ABTB_CRC_MAGIC 0x41423342/* 'AB3B' */ -#define XFS_ABTC_MAGIC 0x41425443/* 'ABTC' for cnt tree */ -#define XFS_ABTC_CRC_MAGIC 0x41423343/* 'AB3C' */ - -/* -* Data record/key structure -*/ -typedef struct xfs_alloc_rec { -__be32 ar_startblock;/* starting block number */ -__be32 ar_blockcount;/* count of free blocks */ -}xfs_alloc_rec_t ,xfs_alloc_key_t ; - -typedef struct xfs_alloc_rec_incore { -xfs_agblock_t ar_startblock;/* starting block number */ -xfs_extlen_t ar_blockcount;/* count of free blocks */ -}xfs_alloc_rec_incore_t ; - -/* btree pointer type */ -typedef __be32 xfs_alloc_ptr_t ; - -/* -* Block numbers in the AG: -* SB is sector 0, AGF is sector 1, AGI is sector 2, AGFL is sector 3. -*/ -#define XFS_BNO_BLOCK (mp) ((xfs_agblock_t)(XFS_AGFL_BLOCK(mp) + 1)) -#define XFS_CNT_BLOCK (mp) ((xfs_agblock_t)(XFS_BNO_BLOCK(mp) + 1)) - -/* * Btree block header size depends on a superblock flag. */ #define XFS_ALLOC_BLOCK_LEN (mp) \
fs/xfs/xfs_aops.c +2 -2
@@ -23,8 +23,6 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trans.h" #include "xfs_inode_item.h"
@@ -34,6 +32,8 @@#include "xfs_trace.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" +#include "xfs_bmap_btree.h" +#include "xfs_dinode.h" #include <linux/aio.h> #include <linux/gfp.h> #include <linux/mpage.h>
fs/xfs/xfs_attr.c +2 -2
@@ -27,15 +27,14 @@#include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_da_btree.h" -#include "xfs_bmap_btree.h" #include "xfs_attr_sf.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_alloc.h" #include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" +#include "xfs_bmap_btree.h" #include "xfs_attr.h" #include "xfs_attr_leaf.h" #include "xfs_attr_remote.h"
@@ -43,6 +42,7 @@#include "xfs_quota.h" #include "xfs_trans_space.h" #include "xfs_trace.h" +#include "xfs_dinode.h" /* * xfs_attr.c
fs/xfs/xfs_attr_inactive.c +2 -6
@@ -28,14 +28,9 @@#include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_da_btree.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" +#include "xfs_inode.h" #include "xfs_alloc.h" -#include "xfs_btree.h" #include "xfs_attr_remote.h" -#include "xfs_dinode.h" -#include "xfs_inode.h" #include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_bmap.h"
@@ -44,6 +39,7 @@#include "xfs_error.h" #include "xfs_quota.h" #include "xfs_trace.h" +#include "xfs_dinode.h" /* * Look at all the extents for this logical region,
fs/xfs/xfs_attr_leaf.c +5 -8
@@ -18,6 +18,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_bit.h"
@@ -26,24 +27,20 @@#include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_da_btree.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_alloc.h" -#include "xfs_btree.h" -#include "xfs_attr_sf.h" -#include "xfs_attr_remote.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trans.h" #include "xfs_inode_item.h" +#include "xfs_bmap_btree.h" #include "xfs_bmap.h" +#include "xfs_attr_sf.h" +#include "xfs_attr_remote.h" #include "xfs_attr.h" #include "xfs_attr_leaf.h" #include "xfs_error.h" #include "xfs_trace.h" #include "xfs_buf_item.h" #include "xfs_cksum.h" +#include "xfs_dinode.h" /*
fs/xfs/xfs_attr_list.c +4 -8
@@ -18,6 +18,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_bit.h"
@@ -26,24 +27,19 @@#include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_da_btree.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_alloc.h" -#include "xfs_btree.h" -#include "xfs_attr_sf.h" -#include "xfs_attr_remote.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_bmap.h" #include "xfs_attr.h" +#include "xfs_attr_sf.h" +#include "xfs_attr_remote.h" #include "xfs_attr_leaf.h" #include "xfs_error.h" #include "xfs_trace.h" #include "xfs_buf_item.h" #include "xfs_cksum.h" +#include "xfs_dinode.h" STATIC intxfs_attr_shortform_compare (const void *a,const void *b)
fs/xfs/xfs_attr_remote.c +2 -3
@@ -18,6 +18,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_bit.h"
@@ -25,10 +26,7 @@#include "xfs_ag.h" #include "xfs_mount.h" #include "xfs_da_format.h" -#include "xfs_error.h" #include "xfs_da_btree.h" -#include "xfs_bmap_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_alloc.h" #include "xfs_trans.h"
@@ -42,6 +40,7 @@#include "xfs_trace.h" #include "xfs_cksum.h" #include "xfs_buf_item.h" +#include "xfs_error.h" #define ATTR_RMTVALUE_MAPSIZE 1/* # of map entries at once */
fs/xfs/xfs_bmap.c +4 -8
@@ -29,29 +29,25 @@#include "xfs_da_format.h" #include "xfs_da_btree.h" #include "xfs_dir2.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_btree.h" -#include "xfs_mount.h" -#include "xfs_itable.h" #include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_extfree_item.h" #include "xfs_alloc.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" +#include "xfs_bmap_btree.h" #include "xfs_rtalloc.h" #include "xfs_error.h" -#include "xfs_attr_leaf.h" #include "xfs_quota.h" #include "xfs_trans_space.h" #include "xfs_buf_item.h" -#include "xfs_filestream.h" #include "xfs_trace.h" #include "xfs_symlink.h" +#include "xfs_attr_leaf.h" +#include "xfs_dinode.h" +#include "xfs_filestream.h" kmem_zone_t *xfs_bmap_free_item_zone;
fs/xfs/xfs_bmap_btree.c +2 -5
@@ -24,21 +24,18 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_alloc.h" #include "xfs_btree.h" -#include "xfs_itable.h" +#include "xfs_bmap_btree.h" #include "xfs_bmap.h" #include "xfs_error.h" #include "xfs_quota.h" #include "xfs_trace.h" #include "xfs_cksum.h" +#include "xfs_dinode.h" /* * Determine the extent state.
fs/xfs/xfs_bmap_btree.h +0 -103
121 lines not on this page · raw message
fs/xfs/xfs_bmap_util.c +2 -4
@@ -27,10 +27,6 @@#include "xfs_ag.h" #include "xfs_mount.h" #include "xfs_da_format.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_btree.h" #include "xfs_trans.h"
@@ -38,6 +34,7 @@#include "xfs_alloc.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" +#include "xfs_bmap_btree.h" #include "xfs_rtalloc.h" #include "xfs_error.h" #include "xfs_quota.h"
@@ -45,6 +42,7 @@#include "xfs_trace.h" #include "xfs_icache.h" #include "xfs_log.h" +#include "xfs_dinode.h" /* Kernel only BMAP related definitions and functions */
fs/xfs/xfs_btree.c +1 -4
@@ -18,16 +18,13 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_bit.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trans.h" #include "xfs_inode_item.h"
fs/xfs/xfs_btree.h +12 -67
91 lines not on this page · raw message
fs/xfs/xfs_buf_item.h +0 -4
@@ -71,10 +71,6 @@ void xfs_buf_attach_iodone(struct xfs_buf *,void xfs_buf_iodone_callbacks (struct xfs_buf *);void xfs_buf_iodone (struct xfs_buf *,struct xfs_log_item *); -void xfs_trans_buf_set_type (struct xfs_trans *,struct xfs_buf *, -enum xfs_blft ); -void xfs_trans_buf_copy_type (struct xfs_buf *dst_bp,struct xfs_buf *src_bp); -extern kmem_zone_t *xfs_buf_item_zone;#endif /* __XFS_BUF_ITEM_H__ */
fs/xfs/xfs_da_btree.c +0 -2
@@ -28,10 +28,8 @@#include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_da_btree.h" -#include "xfs_bmap_btree.h" #include "xfs_dir2.h" #include "xfs_dir2_priv.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trans.h" #include "xfs_inode_item.h"
fs/xfs/xfs_dir2.c +2 -3
@@ -17,6 +17,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_inum.h"
@@ -25,9 +26,6 @@#include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_da_btree.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trans.h" #include "xfs_inode_item.h"
@@ -36,6 +34,7 @@#include "xfs_dir2_priv.h" #include "xfs_error.h" #include "xfs_trace.h" +#include "xfs_dinode.h" struct xfs_name xfs_name_dotdot = { (unsigned char *)".." ,2 ,XFS_DIR3_FT_DIR };
fs/xfs/xfs_dir2_block.c +2 -2
@@ -18,6 +18,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_sb.h"
@@ -25,8 +26,6 @@#include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_da_btree.h" -#include "xfs_bmap_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trans.h" #include "xfs_inode_item.h"
@@ -37,6 +36,7 @@#include "xfs_error.h" #include "xfs_trace.h" #include "xfs_cksum.h" +#include "xfs_dinode.h" /* * Local function prototypes.
fs/xfs/xfs_dir2_data.c +1 -2
@@ -18,6 +18,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_sb.h"
@@ -25,8 +26,6 @@#include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_da_btree.h" -#include "xfs_bmap_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_dir2.h" #include "xfs_dir2_priv.h"
fs/xfs/xfs_dir2_leaf.c +1 -3
@@ -18,16 +18,14 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" -#include "xfs_bit.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_da_btree.h" -#include "xfs_bmap_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_bmap.h" #include "xfs_dir2.h"
fs/xfs/xfs_dir2_node.c +1 -2
@@ -18,6 +18,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_sb.h"
@@ -25,8 +26,6 @@#include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_da_btree.h" -#include "xfs_bmap_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_bmap.h" #include "xfs_dir2.h"
fs/xfs/xfs_dir2_readdir.c +2 -2
@@ -18,6 +18,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_bit.h"
@@ -26,8 +27,6 @@#include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_da_btree.h" -#include "xfs_bmap_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_dir2.h" #include "xfs_dir2_priv.h"
@@ -35,6 +34,7 @@#include "xfs_trace.h" #include "xfs_bmap.h" #include "xfs_trans.h" +#include "xfs_dinode.h" /* * Directory file type support functions
fs/xfs/xfs_dir2_sf.c +2 -2
@@ -17,6 +17,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_sb.h"
@@ -24,8 +25,6 @@#include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_da_btree.h" -#include "xfs_bmap_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trans.h" #include "xfs_inode_item.h"
@@ -33,6 +32,7 @@#include "xfs_dir2.h" #include "xfs_dir2_priv.h" #include "xfs_trace.h" +#include "xfs_dinode.h" /* * Prototypes for internal functions.
fs/xfs/xfs_discard.c +2 -4
@@ -23,11 +23,9 @@#include "xfs_ag.h" #include "xfs_mount.h" #include "xfs_quota.h" -#include "xfs_alloc_btree.h" -#include "xfs_bmap_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_btree.h" #include "xfs_inode.h" +#include "xfs_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_alloc.h" #include "xfs_error.h" #include "xfs_extent_busy.h"
fs/xfs/xfs_dquot.c +1 -4
@@ -25,16 +25,12 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" #include "xfs_inode.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" #include "xfs_alloc.h" #include "xfs_quota.h" -#include "xfs_rtalloc.h" #include "xfs_error.h" -#include "xfs_itable.h" -#include "xfs_attr.h" #include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_trans_space.h"
@@ -43,6 +39,7 @@#include "xfs_cksum.h" #include "xfs_trace.h" #include "xfs_log.h" +#include "xfs_bmap_btree.h" /* * Lock order:
fs/xfs/xfs_dquot_buf.c +0 -2
@@ -21,11 +21,9 @@#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" -#include "xfs_bit.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" #include "xfs_inode.h" #include "xfs_quota.h" #include "xfs_trans.h"
fs/xfs/xfs_dquot_item.c +1 -7
@@ -22,16 +22,10 @@#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" -#include "xfs_alloc.h" -#include "xfs_quota.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" #include "xfs_inode.h" -#include "xfs_bmap.h" -#include "xfs_rtalloc.h" +#include "xfs_quota.h" #include "xfs_error.h" -#include "xfs_itable.h" -#include "xfs_attr.h" #include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_trans_priv.h"
fs/xfs/xfs_error.c +1 -3
@@ -16,15 +16,13 @@* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" +#include "xfs_format.h" #include "xfs_fs.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_dinode.h" -#include "xfs_inode.h" #include "xfs_error.h" #ifdef DEBUG
fs/xfs/xfs_export.c +1 -1
@@ -16,6 +16,7 @@* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_sb.h"
@@ -24,7 +25,6 @@#include "xfs_da_format.h" #include "xfs_dir2.h" #include "xfs_export.h" -#include "xfs_bmap_btree.h" #include "xfs_inode.h" #include "xfs_trans.h" #include "xfs_inode_item.h"
fs/xfs/xfs_extent_busy.c +0 -2
@@ -26,9 +26,7 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" #include "xfs_alloc.h" -#include "xfs_inode.h" #include "xfs_extent_busy.h" #include "xfs_trace.h" #include "xfs_trans.h"
fs/xfs/xfs_extent_busy.h +4 -0
@@ -20,6 +20,10 @@#ifndef __XFS_EXTENT_BUSY_H__#define __XFS_EXTENT_BUSY_H__ +struct xfs_mount ; +struct xfs_trans ; +struct xfs_alloc_arg ; +/* * Busy block/extent entry. Indexed by a rbtree in perag to mark blocks that * have been freed but whose transactions aren't committed to disk yet.
fs/xfs/xfs_file.c +2 -3
@@ -18,6 +18,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_sb.h"
@@ -25,9 +26,6 @@#include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_da_btree.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trans.h" #include "xfs_inode_item.h"
@@ -39,6 +37,7 @@#include "xfs_ioctl.h" #include "xfs_trace.h" #include "xfs_log.h" +#include "xfs_dinode.h" #include <linux/aio.h> #include <linux/dcache.h>
fs/xfs/xfs_filestream.c +2 -2
@@ -16,19 +16,19 @@* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_ag.h" #include "xfs_sb.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" #include "xfs_inum.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" #include "xfs_alloc.h" #include "xfs_mru_cache.h" +#include "xfs_dinode.h" #include "xfs_filestream.h" #include "xfs_trace.h"
fs/xfs/xfs_format.h +255 -0
259 lines not on this page · raw message
fs/xfs/xfs_fsops.c +5 -7
@@ -18,30 +18,28 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" -#include "xfs_log_format.h" #include "xfs_format.h" +#include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trans.h" #include "xfs_inode_item.h" -#include "xfs_btree.h" #include "xfs_error.h" +#include "xfs_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_alloc.h" #include "xfs_ialloc.h" #include "xfs_fsops.h" #include "xfs_itable.h" #include "xfs_trans_space.h" #include "xfs_rtalloc.h" -#include "xfs_filestream.h" #include "xfs_trace.h" #include "xfs_log.h" +#include "xfs_dinode.h" +#include "xfs_filestream.h" /* * File system operations
fs/xfs/xfs_ialloc.c +2 -4
@@ -26,13 +26,10 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_btree.h" #include "xfs_ialloc.h" +#include "xfs_ialloc_btree.h" #include "xfs_alloc.h" #include "xfs_rtalloc.h" #include "xfs_error.h"
@@ -42,6 +39,7 @@#include "xfs_buf_item.h" #include "xfs_icreate_item.h" #include "xfs_icache.h" +#include "xfs_dinode.h" /*
fs/xfs/xfs_ialloc.h +2 -1
@@ -23,6 +23,7 @@ struct xfs_dinode;struct xfs_imap ;struct xfs_mount ;struct xfs_trans ; +struct xfs_btree_cur ;/* * Allocation parameters for inode allocation.
@@ -42,7 +43,7 @@ struct xfs_trans;static inline struct xfs_dinode *xfs_make_iptr (struct xfs_mount *mp,struct xfs_buf *b,int o) { -return (xfs_dinode_t *) +return (struct xfs_dinode *) (xfs_buf_offset (b, o << (mp)->m_sb.sb_inodelog)); }
fs/xfs/xfs_ialloc_btree.c +2 -4
@@ -17,19 +17,17 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_bit.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_btree.h" #include "xfs_ialloc.h" +#include "xfs_ialloc_btree.h" #include "xfs_alloc.h" #include "xfs_error.h" #include "xfs_trace.h"
fs/xfs/xfs_ialloc_btree.h +0 -49
55 lines not on this page · raw message
fs/xfs/xfs_icache.c +0 -4
@@ -24,17 +24,13 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" #include "xfs_inode.h" -#include "xfs_dinode.h" #include "xfs_error.h" -#include "xfs_filestream.h" #include "xfs_trans.h" #include "xfs_trans_priv.h" #include "xfs_inode_item.h" #include "xfs_quota.h" #include "xfs_trace.h" -#include "xfs_fsops.h" #include "xfs_icache.h" #include "xfs_bmap_util.h"
fs/xfs/xfs_inode.c +3 -7
@@ -27,27 +27,22 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_inode.h" #include "xfs_da_format.h" #include "xfs_da_btree.h" #include "xfs_dir2.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" #include "xfs_attr_sf.h" #include "xfs_attr.h" -#include "xfs_dinode.h" -#include "xfs_inode.h" #include "xfs_trans_space.h" #include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_inode_item.h" -#include "xfs_btree.h" -#include "xfs_alloc.h" #include "xfs_ialloc.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" #include "xfs_error.h" #include "xfs_quota.h" +#include "xfs_dinode.h" #include "xfs_filestream.h" #include "xfs_cksum.h" #include "xfs_trace.h"
@@ -55,6 +50,7 @@#include "xfs_symlink.h" #include "xfs_trans_priv.h" #include "xfs_log.h" +#include "xfs_bmap_btree.h" kmem_zone_t *xfs_inode_zone;
fs/xfs/xfs_inode.h +0 -1
@@ -24,7 +24,6 @@/* * Kernel only inode definitions */ -struct xfs_dinode ;struct xfs_inode ;struct xfs_buf ;
fs/xfs/xfs_inode_buf.c +2 -4
@@ -24,15 +24,13 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_error.h" #include "xfs_cksum.h" #include "xfs_icache.h" -#include "xfs_ialloc.h" #include "xfs_trans.h" +#include "xfs_ialloc.h" +#include "xfs_dinode.h" /* * Check that none of the inode's in the buffer have a next
fs/xfs/xfs_inode_fork.c +3 -13
@@ -26,25 +26,15 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_attr_sf.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trans.h" -#include "xfs_buf_item.h" #include "xfs_inode_item.h" -#include "xfs_btree.h" -#include "xfs_alloc.h" -#include "xfs_ialloc.h" +#include "xfs_bmap_btree.h" #include "xfs_bmap.h" #include "xfs_error.h" -#include "xfs_quota.h" -#include "xfs_filestream.h" -#include "xfs_cksum.h" #include "xfs_trace.h" -#include "xfs_icache.h" +#include "xfs_attr_sf.h" +#include "xfs_dinode.h" kmem_zone_t *xfs_ifork_zone;
fs/xfs/xfs_inode_fork.h +1 -0
@@ -19,6 +19,7 @@#define __XFS_INODE_FORK_H__struct xfs_inode_log_item ; +struct xfs_dinode ;/* * The following xfs_ext_irec_t struct introduces a second (top) level
fs/xfs/xfs_inode_item.c +2 -2
@@ -17,19 +17,19 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trans.h" #include "xfs_inode_item.h" #include "xfs_error.h" #include "xfs_trace.h" #include "xfs_trans_priv.h" +#include "xfs_dinode.h" kmem_zone_t *xfs_ili_zone;/* inode log item zone */
fs/xfs/xfs_ioctl.c +3 -6
@@ -23,28 +23,25 @@#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" -#include "xfs_alloc.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_ioctl.h" +#include "xfs_alloc.h" #include "xfs_rtalloc.h" #include "xfs_itable.h" #include "xfs_error.h" #include "xfs_attr.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" -#include "xfs_trans.h" -#include "xfs_buf_item.h" #include "xfs_fsops.h" #include "xfs_discard.h" #include "xfs_quota.h" -#include "xfs_inode_item.h" #include "xfs_export.h" #include "xfs_trace.h" #include "xfs_icache.h" #include "xfs_symlink.h" +#include "xfs_dinode.h" +#include "xfs_trans.h" #include <linux/capability.h> #include <linux/dcache.h>
fs/xfs/xfs_ioctl32.c +1 -2
@@ -22,14 +22,13 @@#include <asm/uaccess.h> #include "xfs.h" #include "xfs_fs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" #include "xfs_vnode.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_itable.h" #include "xfs_error.h"
fs/xfs/xfs_iomap.c +4 -12
@@ -24,29 +24,21 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" -#include "xfs_trans.h" -#include "xfs_inode_item.h" -#include "xfs_alloc.h" -#include "xfs_quota.h" #include "xfs_btree.h" +#include "xfs_bmap_btree.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" -#include "xfs_rtalloc.h" #include "xfs_error.h" -#include "xfs_itable.h" -#include "xfs_attr.h" -#include "xfs_buf_item.h" +#include "xfs_trans.h" #include "xfs_trans_space.h" #include "xfs_iomap.h" #include "xfs_trace.h" #include "xfs_icache.h" +#include "xfs_quota.h" #include "xfs_dquot_item.h" #include "xfs_dquot.h" +#include "xfs_dinode.h" #define XFS_WRITEIO_ALIGN (mp,off) (((off) >> mp->m_writeio_log) \
fs/xfs/xfs_iops.c +1 -7
@@ -25,26 +25,20 @@#include "xfs_ag.h" #include "xfs_mount.h" #include "xfs_da_format.h" -#include "xfs_bmap_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" #include "xfs_acl.h" -#include "xfs_alloc.h" #include "xfs_quota.h" -#include "xfs_rtalloc.h" #include "xfs_error.h" -#include "xfs_itable.h" #include "xfs_attr.h" #include "xfs_trans.h" -#include "xfs_buf_item.h" -#include "xfs_inode_item.h" #include "xfs_trace.h" #include "xfs_icache.h" #include "xfs_symlink.h" #include "xfs_da_btree.h" #include "xfs_dir2_priv.h" +#include "xfs_dinode.h" #include <linux/capability.h> #include <linux/xattr.h>
fs/xfs/xfs_itable.c +4 -5
@@ -18,23 +18,22 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_inum.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_btree.h" #include "xfs_ialloc.h" +#include "xfs_ialloc_btree.h" #include "xfs_itable.h" #include "xfs_error.h" -#include "xfs_btree.h" #include "xfs_trace.h" #include "xfs_icache.h" +#include "xfs_dinode.h" STATIC int xfs_internal_inum(
fs/xfs/xfs_log.c +1 -5
@@ -18,6 +18,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_sb.h"
@@ -28,12 +29,7 @@#include "xfs_trans_priv.h" #include "xfs_log.h" #include "xfs_log_priv.h" -#include "xfs_buf_item.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" #include "xfs_log_recover.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trace.h" #include "xfs_fsops.h"
fs/xfs/xfs_log_recover.c +6 -12
@@ -27,29 +27,23 @@#include "xfs_ag.h" #include "xfs_mount.h" #include "xfs_da_format.h" -#include "xfs_error.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trans.h" -#include "xfs_inode_item.h" -#include "xfs_alloc.h" -#include "xfs_ialloc.h" #include "xfs_log.h" #include "xfs_log_priv.h" #include "xfs_log_recover.h" +#include "xfs_inode_item.h" #include "xfs_extfree_item.h" #include "xfs_trans_priv.h" +#include "xfs_alloc.h" +#include "xfs_ialloc.h" #include "xfs_quota.h" #include "xfs_cksum.h" #include "xfs_trace.h" #include "xfs_icache.h" - -/* Need all the magic numbers and buffer ops structures from these headers */ -#include "xfs_da_btree.h" +#include "xfs_bmap_btree.h" +#include "xfs_dinode.h" +#include "xfs_error.h" #include "xfs_dir2.h" #define BLK_AVG (blk1, blk2) ((blk1+blk2) >> 1)
fs/xfs/xfs_log_rlimit.c +2 -1
@@ -18,6 +18,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_ag.h"
@@ -25,10 +26,10 @@#include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_trans_space.h" -#include "xfs_bmap_btree.h" #include "xfs_inode.h" #include "xfs_da_btree.h" #include "xfs_attr_leaf.h" +#include "xfs_bmap_btree.h" /* * Calculate the maximum length in bytes that would be required for a local
fs/xfs/xfs_mount.c +4 -11
@@ -27,27 +27,20 @@#include "xfs_ag.h" #include "xfs_mount.h" #include "xfs_da_format.h" -#include "xfs_trans.h" -#include "xfs_trans_priv.h" -#include "xfs_log.h" -#include "xfs_dir2.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" -#include "xfs_btree.h" +#include "xfs_dir2.h" #include "xfs_ialloc.h" #include "xfs_alloc.h" #include "xfs_rtalloc.h" #include "xfs_bmap.h" +#include "xfs_trans.h" +#include "xfs_trans_priv.h" +#include "xfs_log.h" #include "xfs_error.h" #include "xfs_quota.h" #include "xfs_fsops.h" #include "xfs_trace.h" #include "xfs_icache.h" -#include "xfs_cksum.h" -#include "xfs_buf_item.h" #ifdef HAVE_PERCPU_SB
fs/xfs/xfs_qm.c +3 -8
@@ -17,33 +17,28 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_shared.h" #include "xfs_format.h" #include "xfs_log_format.h" -#include "xfs_shared.h" #include "xfs_trans_resv.h" #include "xfs_bit.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_ialloc.h" #include "xfs_itable.h" -#include "xfs_alloc.h" -#include "xfs_rtalloc.h" #include "xfs_quota.h" #include "xfs_error.h" #include "xfs_bmap.h" -#include "xfs_attr.h" +#include "xfs_bmap_btree.h" #include "xfs_trans.h" -#include "xfs_buf_item.h" #include "xfs_trans_space.h" #include "xfs_qm.h" #include "xfs_trace.h" #include "xfs_icache.h" #include "xfs_cksum.h" +#include "xfs_dinode.h" /* * The global quota manager. There is only one of these for the entire
fs/xfs/xfs_qm_bhv.c +0 -7
@@ -22,18 +22,11 @@#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" -#include "xfs_alloc.h" #include "xfs_quota.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" #include "xfs_inode.h" -#include "xfs_itable.h" -#include "xfs_bmap.h" -#include "xfs_rtalloc.h" #include "xfs_error.h" -#include "xfs_attr.h" #include "xfs_trans.h" -#include "xfs_buf_item.h" #include "xfs_qm.h"
fs/xfs/xfs_qm_syscalls.c +1 -9
@@ -27,19 +27,11 @@#include "xfs_bit.h" #include "xfs_sb.h" #include "xfs_ag.h" -#include "xfs_alloc.h" -#include "xfs_quota.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" #include "xfs_inode.h" #include "xfs_trans.h" -#include "xfs_inode_item.h" -#include "xfs_itable.h" -#include "xfs_bmap.h" -#include "xfs_rtalloc.h" #include "xfs_error.h" -#include "xfs_attr.h" -#include "xfs_buf_item.h" +#include "xfs_quota.h" #include "xfs_qm.h" #include "xfs_trace.h" #include "xfs_icache.h"
fs/xfs/xfs_quotaops.c +1 -2
@@ -22,10 +22,9 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_inode.h" #include "xfs_quota.h" #include "xfs_trans.h" -#include "xfs_bmap_btree.h" -#include "xfs_inode.h" #include "xfs_qm.h" #include <linux/quota.h>
fs/xfs/xfs_rtalloc.c +3 -6
@@ -25,21 +25,18 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" -#include "xfs_alloc.h" #include "xfs_bmap.h" #include "xfs_bmap_util.h" -#include "xfs_rtalloc.h" -#include "xfs_fsops.h" +#include "xfs_bmap_btree.h" +#include "xfs_alloc.h" #include "xfs_error.h" #include "xfs_trans.h" -#include "xfs_inode_item.h" #include "xfs_trans_space.h" #include "xfs_trace.h" #include "xfs_buf.h" #include "xfs_icache.h" +#include "xfs_dinode.h" /*
fs/xfs/xfs_sb.c +4 -14
@@ -21,31 +21,21 @@#include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_bit.h" -#include "xfs_inum.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_da_format.h" -#include "xfs_da_btree.h" -#include "xfs_dir2.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" -#include "xfs_btree.h" #include "xfs_ialloc.h" #include "xfs_alloc.h" -#include "xfs_rtalloc.h" -#include "xfs_bmap.h" #include "xfs_error.h" -#include "xfs_quota.h" -#include "xfs_fsops.h" #include "xfs_trace.h" #include "xfs_cksum.h" #include "xfs_trans.h" -#include "xfs_trans_priv.h" #include "xfs_buf_item.h" +#include "xfs_dinode.h" +#include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" +#include "xfs_ialloc_btree.h" /* * Physical superblock buffer manipulations. Shared with libxfs in userspace.
fs/xfs/xfs_super.c +4 -12
@@ -24,29 +24,18 @@#include "xfs_inum.h" #include "xfs_sb.h" #include "xfs_ag.h" -#include "xfs_alloc.h" -#include "xfs_quota.h" #include "xfs_mount.h" #include "xfs_da_format.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_btree.h" -#include "xfs_ialloc.h" #include "xfs_bmap.h" -#include "xfs_rtalloc.h" +#include "xfs_alloc.h" #include "xfs_error.h" -#include "xfs_itable.h" #include "xfs_fsops.h" -#include "xfs_attr.h" #include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_log.h" #include "xfs_log_priv.h" -#include "xfs_trans_priv.h" -#include "xfs_filestream.h" #include "xfs_da_btree.h" #include "xfs_dir2.h" #include "xfs_extfree_item.h"
@@ -55,6 +44,9 @@#include "xfs_icache.h" #include "xfs_trace.h" #include "xfs_icreate_item.h" +#include "xfs_dinode.h" +#include "xfs_filestream.h" +#include "xfs_quota.h" #include <linux/namei.h> #include <linux/init.h>
fs/xfs/xfs_symlink.c +2 -4
@@ -28,13 +28,11 @@#include "xfs_mount.h" #include "xfs_da_format.h" #include "xfs_dir2.h" -#include "xfs_bmap_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_ialloc.h" #include "xfs_alloc.h" #include "xfs_bmap.h" +#include "xfs_bmap_btree.h" #include "xfs_bmap_util.h" #include "xfs_error.h" #include "xfs_quota.h"
@@ -42,8 +40,8 @@#include "xfs_trace.h" #include "xfs_symlink.h" #include "xfs_trans.h" -#include "xfs_buf_item.h" #include "xfs_log.h" +#include "xfs_dinode.h" /* ----- Kernel only functions below ----- */ STATIC int
fs/xfs/xfs_trace.c +1 -4
@@ -25,10 +25,6 @@#include "xfs_ag.h" #include "xfs_mount.h" #include "xfs_da_format.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_btree.h" #include "xfs_da_btree.h"
@@ -49,6 +45,7 @@#include "xfs_dquot.h" #include "xfs_log_recover.h" #include "xfs_inode_item.h" +#include "xfs_bmap_btree.h" /* * We include this last to have the helpers above available for the trace
fs/xfs/xfs_trans.c +1 -15
@@ -25,28 +25,14 @@#include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_error.h" -#include "xfs_da_format.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" -#include "xfs_btree.h" -#include "xfs_ialloc.h" -#include "xfs_alloc.h" #include "xfs_extent_busy.h" -#include "xfs_bmap.h" #include "xfs_quota.h" #include "xfs_trans.h" #include "xfs_trans_priv.h" -#include "xfs_trans_space.h" -#include "xfs_qm.h" -#include "xfs_inode_item.h" #include "xfs_log.h" -#include "xfs_log_priv.h" -#include "xfs_buf_item.h" #include "xfs_trace.h" +#include "xfs_error.h" kmem_zone_t *xfs_trans_zone;kmem_zone_t *xfs_log_item_desc_zone;
fs/xfs/xfs_trans.h +5 -0
@@ -234,6 +234,11 @@ void xfs_trans_cancel(xfs_trans_t *, int);int xfs_trans_ail_init (struct xfs_mount *);void xfs_trans_ail_destroy (struct xfs_mount *); +void xfs_trans_buf_set_type (struct xfs_trans *,struct xfs_buf *, +enum xfs_blft ); +void xfs_trans_buf_copy_type (struct xfs_buf *dst_bp, +struct xfs_buf *src_bp); +extern kmem_zone_t *xfs_trans_zone;extern kmem_zone_t *xfs_log_item_desc_zone;
fs/xfs/xfs_trans_buf.c +1 -4
@@ -18,15 +18,12 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_trans.h" #include "xfs_buf_item.h"
fs/xfs/xfs_trans_dquot.c +1 -8
@@ -23,19 +23,12 @@#include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" -#include "xfs_alloc.h" -#include "xfs_quota.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" #include "xfs_inode.h" -#include "xfs_itable.h" -#include "xfs_bmap.h" -#include "xfs_rtalloc.h" #include "xfs_error.h" -#include "xfs_attr.h" #include "xfs_trans.h" -#include "xfs_buf_item.h" #include "xfs_trans_priv.h" +#include "xfs_quota.h" #include "xfs_qm.h" STATIC void xfs_trans_alloc_dqinfo(xfs_trans_t *);
fs/xfs/xfs_trans_inode.c +1 -5
@@ -18,17 +18,13 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" -#include "xfs_btree.h" #include "xfs_trans.h" #include "xfs_trans_priv.h" #include "xfs_inode_item.h"
fs/xfs/xfs_trans_resv.c +1 -11
@@ -26,19 +26,9 @@#include "xfs_ag.h" #include "xfs_mount.h" #include "xfs_da_format.h" -#include "xfs_error.h" -#include "xfs_da_btree.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dinode.h" #include "xfs_inode.h" -#include "xfs_btree.h" +#include "xfs_bmap_btree.h" #include "xfs_ialloc.h" -#include "xfs_alloc.h" -#include "xfs_extent_busy.h" -#include "xfs_bmap.h" -#include "xfs_bmap_util.h" #include "xfs_quota.h" #include "xfs_trans.h" #include "xfs_qm.h"
fs/xfs/xfs_xattr.c +1 -1
@@ -17,13 +17,13 @@*/ #include "xfs.h" +#include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_mount.h" #include "xfs_da_format.h" -#include "xfs_bmap_btree.h" #include "xfs_inode.h" #include "xfs_attr.h" #include "xfs_attr_leaf.h"
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
PATCH v2 10/19 xfs: split xfs_rtalloc.c for userspace sanity
In reply to Dave ChinnerFrom: Dave Chinner <[email protected]>
xfs_rtalloc.c is partially shared with userspace. Split the file up into two parts - one that is kernel private and the other which is wholly shared with userspace.
--- fs/xfs/Makefile | 6 +- fs/xfs/xfs_rtalloc.c | 1845 ++++++++++++------------------------------------- fs/xfs/xfs_rtalloc.h | 24 + fs/xfs/xfs_rtbitmap.c | 973 ++++++++++++++++++++++++++ 4 files changed, 1446 insertions(+), 1402 deletions(-) create mode 100644 fs/xfs/xfs_rtbitmap.c
fs/xfs/Makefile +5 -1
@@ -104,7 +104,11 @@ xfs-$(CONFIG_XFS_QUOTA) += xfs_dquot.o \ xfs_qm_bhv.o \ xfs_qm.o \ xfs_quotaops.o -xfs-$(CONFIG_XFS_RT) += xfs_rtalloc.o + +# xfs_rtbitmap is shared with libxfs +xfs-$(CONFIG_XFS_RT) += xfs_rtalloc.o \ + xfs_rtbitmap.o + xfs-$(CONFIG_XFS_POSIX_ACL) += xfs_acl.o xfs-$(CONFIG_PROC_FS) += xfs_stats.o xfs-$(CONFIG_SYSCTL) += xfs_sysctl.o
fs/xfs/xfs_rtalloc.c +444 -1401
1,948 lines not on this page · raw message
fs/xfs/xfs_rtalloc.h +24 -0
@@ -95,6 +95,30 @@ xfs_growfs_rt(struct xfs_mount *mp,/* file system mount structure */ xfs_growfs_rt_t *in); /* user supplied growfs struct */ +/* +* From xfs_rtbitmap.c +*/ +int xfs_rtbuf_get (struct xfs_mount *mp,struct xfs_trans *tp, +xfs_rtblock_t block,int issum,struct xfs_buf **bpp); +int xfs_rtcheck_range (struct xfs_mount *mp,struct xfs_trans *tp, +xfs_rtblock_t start,xfs_extlen_t len,int val, +xfs_rtblock_t *new,int *stat); +int xfs_rtfind_back (struct xfs_mount *mp,struct xfs_trans *tp, +xfs_rtblock_t start,xfs_rtblock_t limit, +xfs_rtblock_t *rtblock); +int xfs_rtfind_forw (struct xfs_mount *mp,struct xfs_trans *tp, +xfs_rtblock_t start,xfs_rtblock_t limit, +xfs_rtblock_t *rtblock); +int xfs_rtmodify_range (struct xfs_mount *mp,struct xfs_trans *tp, +xfs_rtblock_t start,xfs_extlen_t len,int val); +int xfs_rtmodify_summary (struct xfs_mount *mp,struct xfs_trans *tp,int log, +xfs_rtblock_t bbno,int delta,xfs_buf_t **rbpp, +xfs_fsblock_t *rsb); +int xfs_rtfree_range (struct xfs_mount *mp,struct xfs_trans *tp, +xfs_rtblock_t start,xfs_extlen_t len, +struct xfs_buf **rbpp,xfs_fsblock_t *rsb); + +#else # define xfs_rtallocate_extent (t,b,min,max,l,a,f,p,rb) (ENOSYS)# define xfs_rtfree_extent (t,b,l) (ENOSYS)
fs/xfs/xfs_rtbitmap.c new file +973 -0
973 lines not on this page · raw message
Signature · 6 lines
1.8.4.rc3 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH v2 11/19 xfs: abstract the differences in dir2/dir3 via an ops vector
In reply to Dave ChinnerFrom: Dave Chinner <[email protected]>
Lots of the dir code now goes through switches to determine what is the correct on-disk format to parse. It generally involves a "xfs_sbversion_hasfoo" check, deferencing the superblock version and feature fields and hence touching several cache lines per operation in the process. Some operations do multiple checks because they nest conditional operations and they don't pass the information in a direct fashion between each other.
Hence, add an ops vector to the xfs_inode structure that is configured when the inode is initialised to point to all the correct decode and encoding operations. This will significantly reduce the branchiness and cacheline footprint of the directory object decoding and encoding.
This is the first patch in a series of conversion patches. It will introduce the ops structure, the setup of it and add the first operation to the vector. Subsequent patches will convert directory ops one at a time to keep the changes simple and obvious.
Just this patch shows the benefit of such an approach on code size. Just converting the two shortform dir operations as this patch does decreases the built binary size by ~1500 bytes:
$ size fs/xfs/xfs.o.orig fs/xfs/xfs.o.p1 text data bss dec hex filename 794490 96802 1096 892388 d9de4 fs/xfs/xfs.o.orig 792986 96802 1096 890884 d9804 fs/xfs/xfs.o.p1 $
That's a significant decrease in the instruction cache footprint of the directory code for such a simple change, and indicates that this approach is definitely worth pursuing further.
--- fs/xfs/Makefile | 1 + fs/xfs/xfs_da_btree.h | 1 + fs/xfs/xfs_da_format.c | 85 +++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_da_format.h | 26 --------------- fs/xfs/xfs_dir2.c | 7 ++++ fs/xfs/xfs_dir2.h | 14 ++++++++ fs/xfs/xfs_dir2_block.c | 2 +- fs/xfs/xfs_dir2_readdir.c | 4 +-- fs/xfs/xfs_dir2_sf.c | 31 +++++++++-------- fs/xfs/xfs_inode.h | 3 ++ fs/xfs/xfs_iops.c | 1 + fs/xfs/xfs_mount.h | 2 ++ 12 files changed, 132 insertions(+), 45 deletions(-) create mode 100644 fs/xfs/xfs_da_format.c
fs/xfs/Makefile +1 -0
@@ -66,6 +66,7 @@ xfs-y += xfs_alloc.o \ xfs_bmap_btree.o \ xfs_btree.o \ xfs_da_btree.o \ + xfs_da_format.o \ xfs_dir2.o \ xfs_dir2_block.o \ xfs_dir2_data.o \
fs/xfs/xfs_da_btree.h +1 -0
@@ -23,6 +23,7 @@ struct xfs_bmap_free;struct xfs_inode ;struct xfs_trans ;struct zone ; +struct xfs_dir_ops ;/*======================================================================== * Btree searching and modification structure definitions.
fs/xfs/xfs_da_format.c new file +85 -0
85 lines not on this page · raw message
fs/xfs/xfs_da_format.h +0 -26
@@ -329,32 +329,6 @@ xfs_dir2_sf_firstentry(struct xfs_dir2_sf_hdr *hdr) ((char *)hdr +xfs_dir2_sf_hdr_size (hdr->i8count)); } -static inline int -xfs_dir3_sf_entsize ( -struct xfs_mount *mp, -struct xfs_dir2_sf_hdr *hdr, -int len) -{ -int count =sizeof (struct xfs_dir2_sf_entry );/* namelen + offset */ - - count += len;/* name */ - count += hdr->i8count ?sizeof (xfs_dir2_ino8_t) : -sizeof (xfs_dir2_ino4_t);/* ino # */ -if (xfs_sb_version_hasftype (&mp->m_sb)) - count +=sizeof (__uint8_t);/* file type */ -return count; -} - -static inline struct xfs_dir2_sf_entry * -xfs_dir3_sf_nextentry ( -struct xfs_mount *mp, -struct xfs_dir2_sf_hdr *hdr, -struct xfs_dir2_sf_entry *sfep) -{ -return (struct xfs_dir2_sf_entry *) - ((char *)sfep +xfs_dir3_sf_entsize (mp, hdr, sfep->namelen)); -} -/* * in dir3 shortform directories, the file type field is stored at a variable * offset after the inode number. Because it's only a single byte, endian
fs/xfs/xfs_dir2.c +7 -0
@@ -112,6 +112,13 @@ xfs_dir_mount( mp->m_dirnameops = &xfs_ascii_ci_nameops; else mp->m_dirnameops = &xfs_default_nameops; + +if (xfs_sb_version_hascrc (&mp->m_sb)) + mp->m_dir_inode_ops = &xfs_dir3_ops; +else if (xfs_sb_version_hasftype (&mp->m_sb)) + mp->m_dir_inode_ops = &xfs_dir2_ftype_ops; +else + mp->m_dir_inode_ops = &xfs_dir2_ops; }/*
fs/xfs/xfs_dir2.h +14 -0
@@ -32,6 +32,20 @@ struct xfs_dir2_data_unused;extern struct xfs_name xfs_name_dotdot;/* +* directory operations vector for encode/decode routines +*/ +struct xfs_dir_ops { +int (*sf_entsize)(struct xfs_dir2_sf_hdr *hdr,int len); +struct xfs_dir2_sf_entry * + (*sf_nextentry)(struct xfs_dir2_sf_hdr *hdr, +struct xfs_dir2_sf_entry *sfep); +}; + +extern const struct xfs_dir_ops xfs_dir2_ops; +extern const struct xfs_dir_ops xfs_dir2_ftype_ops; +extern const struct xfs_dir_ops xfs_dir3_ops; + +/* * Generic directory interface routines */ extern void xfs_dir_startup (void );
fs/xfs/xfs_dir2_block.c +1 -1
@@ -1240,7 +1240,7 @@ xfs_dir2_sf_to_block(if (++i == sfp->count) sfep =NULL ;else - sfep =xfs_dir3_sf_nextentry (mp, sfp, sfep); + sfep = dp->d_ops->sf_nextentry (sfp, sfep); }/* Done with the temporary buffer */ kmem_free (sfp);
fs/xfs/xfs_dir2_readdir.c +2 -2
@@ -153,7 +153,7 @@ xfs_dir2_sf_getdents( xfs_dir2_sf_get_offset(sfep));if (ctx->pos > off) { - sfep =xfs_dir3_sf_nextentry (mp, sfp, sfep); + sfep = dp->d_ops->sf_nextentry (sfp, sfep);continue ; }
@@ -163,7 +163,7 @@ xfs_dir2_sf_getdents(if (!dir_emit (ctx, (char *)sfep->name, sfep->namelen, ino,xfs_dir3_get_dtype (mp, filetype)))return 0 ; - sfep =xfs_dir3_sf_nextentry (mp, sfp, sfep); + sfep = dp->d_ops->sf_nextentry (sfp, sfep); } ctx->pos = xfs_dir2_db_off_to_dataptr(mp, mp->m_dirdatablk + 1, 0) &
fs/xfs/xfs_dir2_sf.c +15 -16
@@ -336,7 +336,7 @@ xfs_dir2_block_to_sf(xfs_dir3_sfe_put_ftype (mp, sfp, sfep,xfs_dir3_dirent_get_ftype (mp, dep)); - sfep =xfs_dir3_sf_nextentry (mp, sfp, sfep); + sfep = dp->d_ops->sf_nextentry (sfp, sfep); } ptr +=xfs_dir3_data_entsize (mp, dep->namelen); }
@@ -389,7 +389,7 @@ xfs_dir2_sf_addname(/* * Compute entry (and change in) size. */ - add_entsize =xfs_dir3_sf_entsize (dp->i_mount, sfp, args->namelen); + add_entsize = dp->d_ops->sf_entsize (sfp, args->namelen); incr_isize = add_entsize; objchange =0 ;#if XFS_BIG_INUMS
@@ -483,8 +483,7 @@ xfs_dir2_sf_addname_easy(/* * Grow the in-inode space. */ -xfs_idata_realloc (dp, -xfs_dir3_sf_entsize (dp->i_mount, sfp, args->namelen), +xfs_idata_realloc (dp, dp->d_ops->sf_entsize (sfp, args->namelen),XFS_DATA_FORK );/* * Need to set up again due to realloc of the inode data.
@@ -563,7 +562,7 @@ xfs_dir2_sf_addname_hard( eof = (char *)oldsfep == &buf[old_isize]; !eof; offset = new_offset + xfs_dir3_data_entsize(mp, oldsfep->namelen), - oldsfep = xfs_dir3_sf_nextentry(mp, oldsfp, oldsfep), + oldsfep = dp->d_ops->sf_nextentry(oldsfp, oldsfep), eof = (char *)oldsfep == &buf[old_isize]) { new_offset =xfs_dir2_sf_get_offset (oldsfep);if (offset + add_datasize <= new_offset)
@@ -603,7 +602,7 @@ xfs_dir2_sf_addname_hard(* If there's more left to copy, do that. */ if (!eof) { - sfep =xfs_dir3_sf_nextentry (mp, sfp, sfep); + sfep = dp->d_ops->sf_nextentry (sfp, sfep);memcpy (sfep, oldsfep, old_isize - nbytes); }kmem_free (buf);
@@ -653,7 +652,7 @@ xfs_dir2_sf_addname_pick( holefit = offset + size <=xfs_dir2_sf_get_offset (sfep); offset =xfs_dir2_sf_get_offset (sfep) +xfs_dir3_data_entsize (mp, sfep->namelen); - sfep =xfs_dir3_sf_nextentry (mp, sfp, sfep); + sfep = dp->d_ops->sf_nextentry (sfp, sfep); }/* * Calculate data bytes used excluding the new entry, if this
@@ -719,7 +718,7 @@ xfs_dir2_sf_check(for (i =0 , sfep =xfs_dir2_sf_firstentry (sfp); i < sfp->count; - i++, sfep =xfs_dir3_sf_nextentry (mp, sfp, sfep)) { + i++, sfep = dp->d_ops->sf_nextentry (sfp, sfep)) {ASSERT (xfs_dir2_sf_get_offset (sfep) >= offset); ino =xfs_dir3_sfe_get_ino (mp, sfp, sfep); i8count += ino >XFS_DIR2_MAX_SHORT_INUM ;
@@ -848,7 +847,7 @@ xfs_dir2_sf_lookup(*/ ci_sfep =NULL ;for (i =0 , sfep =xfs_dir2_sf_firstentry (sfp); i < sfp->count; - i++, sfep =xfs_dir3_sf_nextentry (dp->i_mount, sfp, sfep)) { + i++, sfep = dp->d_ops->sf_nextentry (sfp, sfep)) {/* * Compare name and if it's an exact match, return the inode * number. If it's the first case-insensitive match, store the
@@ -917,7 +916,7 @@ xfs_dir2_sf_removename(* Find the one we're deleting. */ for (i =0 , sfep =xfs_dir2_sf_firstentry (sfp); i < sfp->count; - i++, sfep =xfs_dir3_sf_nextentry (dp->i_mount, sfp, sfep)) { + i++, sfep = dp->d_ops->sf_nextentry (sfp, sfep)) {if (xfs_da_compname (args, sfep->name, sfep->namelen) ==XFS_CMP_EXACT ) { ASSERT(xfs_dir3_sfe_get_ino(dp->i_mount, sfp, sfep) ==
@@ -934,7 +933,7 @@ xfs_dir2_sf_removename(* Calculate sizes. */ byteoff = (int )((char *)sfep - (char *)sfp); - entsize =xfs_dir3_sf_entsize (dp->i_mount, sfp, args->namelen); + entsize = dp->d_ops->sf_entsize (sfp, args->namelen); newsize = oldsize - entsize;/* * Copy the part if any after the removed entry, sliding it down.
@@ -1051,7 +1050,7 @@ xfs_dir2_sf_replace(*/ else {for (i =0 , sfep =xfs_dir2_sf_firstentry (sfp); i < sfp->count; - i++, sfep =xfs_dir3_sf_nextentry (dp->i_mount, sfp, sfep)) { + i++, sfep = dp->d_ops->sf_nextentry (sfp, sfep)) {if (xfs_da_compname (args, sfep->name, sfep->namelen) ==XFS_CMP_EXACT ) {#if XFS_BIG_INUMS || defined(DEBUG )
@@ -1172,8 +1171,8 @@ xfs_dir2_sf_toino4(for (i =0 , sfep =xfs_dir2_sf_firstentry (sfp), oldsfep =xfs_dir2_sf_firstentry (oldsfp); i < sfp->count; - i++, sfep =xfs_dir3_sf_nextentry (mp, sfp, sfep), - oldsfep =xfs_dir3_sf_nextentry (mp, oldsfp, oldsfep)) { + i++, sfep = dp->d_ops->sf_nextentry (sfp, sfep), + oldsfep = dp->d_ops->sf_nextentry (oldsfp, oldsfep)) { sfep->namelen = oldsfep->namelen; sfep->offset = oldsfep->offset;memcpy (sfep->name, oldsfep->name, sfep->namelen);
@@ -1251,8 +1250,8 @@ xfs_dir2_sf_toino8(for (i =0 , sfep =xfs_dir2_sf_firstentry (sfp), oldsfep =xfs_dir2_sf_firstentry (oldsfp); i < sfp->count; - i++, sfep =xfs_dir3_sf_nextentry (mp, sfp, sfep), - oldsfep =xfs_dir3_sf_nextentry (mp, oldsfp, oldsfep)) { + i++, sfep = dp->d_ops->sf_nextentry (sfp, sfep), + oldsfep = dp->d_ops->sf_nextentry (oldsfp, oldsfep)) { sfep->namelen = oldsfep->namelen; sfep->offset = oldsfep->offset;memcpy (sfep->name, oldsfep->name, sfep->namelen);
fs/xfs/xfs_inode.h +3 -0
@@ -49,6 +49,9 @@ typedef struct xfs_inode {xfs_ifork_t *i_afp;/* attribute fork pointer */ xfs_ifork_t i_df;/* data fork */ +/* operations vectors */ +const struct xfs_dir_ops *d_ops;/* directory ops vector */ +/* Transaction and locking information. */ struct xfs_inode_log_item *i_itemp;/* logging information */ mrlock_t i_lock;/* inode lock */
fs/xfs/xfs_iops.c +1 -0
@@ -1212,6 +1212,7 @@ xfs_setup_inode(else inode->i_op = &xfs_dir_inode_operations; inode->i_fop = &xfs_dir_file_operations; + ip->d_ops = ip->i_mount->m_dir_inode_ops;break ;case S_IFLNK : inode->i_op = &xfs_symlink_inode_operations;
fs/xfs/xfs_mount.h +2 -0
@@ -26,6 +26,7 @@ struct xfs_mru_cache;struct xfs_nameops ;struct xfs_ail ;struct xfs_quotainfo ; +struct xfs_dir_ops ;#ifdef HAVE_PERCPU_SB
@@ -148,6 +149,7 @@ typedef struct xfs_mount {int m_dir_magicpct;/* 37% of the dir blocksize */ __uint8_t m_sectbb_log;/* sectlog - BBSHIFT */ const struct xfs_nameops *m_dirnameops;/* vector of dir name ops */ +const struct xfs_dir_ops *m_dir_inode_ops;/* vector of dir inode ops */ int m_dirblksize;/* directory block sz--bytes */ int m_dirblkfsbs;/* directory block sz--fsbs */ xfs_dablk_t m_dirdatablk;/* blockno of dir data v2 */
Signature · 6 lines
1.8.4.rc3 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs