diff options
author | David Chinner <david@fromorbit.com> | 2008-10-30 02:15:38 -0400 |
---|---|---|
committer | Lachlan McIlroy <lachlan@sgi.com> | 2008-10-30 02:15:38 -0400 |
commit | be97d9d5577f6c8a36588e2f262c772c5422b128 (patch) | |
tree | 9146f1872b61ccaf77b7268680320eb213bfdcdd /fs/xfs/linux-2.6/xfs_sync.c | |
parent | aacaa880bfac8fecd44b279a49688643890358f5 (diff) |
[XFS] make SYNC_ATTR no longer use xfs_sync
Continue to de-multiplex xfs_sync be replacing all SYNC_ATTR callers with
direct calls xfs_sync_inodes(). Add an assert into xfs_sync() to ensure we
caught all the SYNC_ATTR callers.
SGI-PV: 988140
SGI-Modid: xfs-linux-melb:xfs-kern:32308a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_sync.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_sync.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/fs/xfs/linux-2.6/xfs_sync.c b/fs/xfs/linux-2.6/xfs_sync.c index 3c31137cdc7f..002ccb6f0cbe 100644 --- a/fs/xfs/linux-2.6/xfs_sync.c +++ b/fs/xfs/linux-2.6/xfs_sync.c | |||
@@ -342,9 +342,8 @@ xfs_sync_fsdata( | |||
342 | * periodically. We also push the inodes and | 342 | * periodically. We also push the inodes and |
343 | * superblock if we can lock them without sleeping | 343 | * superblock if we can lock them without sleeping |
344 | * and they are not pinned. | 344 | * and they are not pinned. |
345 | * SYNC_ATTR - We need to flush the inodes. If SYNC_BDFLUSH is not | 345 | * SYNC_ATTR - We need to flush the inodes. Now handled by direct calls |
346 | * set, then we really want to lock each inode and flush | 346 | * to xfs_sync_inodes(). |
347 | * it. | ||
348 | * SYNC_WAIT - All the flushes that take place in this call should | 347 | * SYNC_WAIT - All the flushes that take place in this call should |
349 | * be synchronous. | 348 | * be synchronous. |
350 | * SYNC_DELWRI - This tells us to push dirty pages associated with | 349 | * SYNC_DELWRI - This tells us to push dirty pages associated with |
@@ -373,6 +372,8 @@ xfs_sync( | |||
373 | int last_error = 0; | 372 | int last_error = 0; |
374 | uint log_flags = XFS_LOG_FORCE; | 373 | uint log_flags = XFS_LOG_FORCE; |
375 | 374 | ||
375 | ASSERT(!(flags & SYNC_ATTR)); | ||
376 | |||
376 | /* | 377 | /* |
377 | * Get the Quota Manager to flush the dquots. | 378 | * Get the Quota Manager to flush the dquots. |
378 | * | 379 | * |
@@ -403,20 +404,18 @@ xfs_sync( | |||
403 | 404 | ||
404 | xfs_log_force(mp, (xfs_lsn_t)0, log_flags); | 405 | xfs_log_force(mp, (xfs_lsn_t)0, log_flags); |
405 | 406 | ||
406 | if (flags & (SYNC_ATTR|SYNC_DELWRI)) { | 407 | if (flags & SYNC_DELWRI) { |
407 | if (flags & SYNC_BDFLUSH) | 408 | if (flags & SYNC_BDFLUSH) |
408 | xfs_finish_reclaim_all(mp, 1, XFS_IFLUSH_DELWRI_ELSE_ASYNC); | 409 | xfs_finish_reclaim_all(mp, 1, XFS_IFLUSH_DELWRI_ELSE_ASYNC); |
409 | else | 410 | else |
410 | error = xfs_sync_inodes(mp, flags); | 411 | error = xfs_sync_inodes(mp, flags); |
411 | } | 412 | /* |
412 | 413 | * Flushing out dirty data above probably generated more | |
413 | /* | 414 | * log activity, so if this isn't vfs_sync() then flush |
414 | * Flushing out dirty data above probably generated more | 415 | * the log again. |
415 | * log activity, so if this isn't vfs_sync() then flush | 416 | */ |
416 | * the log again. | ||
417 | */ | ||
418 | if (flags & SYNC_DELWRI) | ||
419 | xfs_log_force(mp, 0, log_flags); | 417 | xfs_log_force(mp, 0, log_flags); |
418 | } | ||
420 | 419 | ||
421 | if (flags & SYNC_FSDATA) { | 420 | if (flags & SYNC_FSDATA) { |
422 | error = xfs_sync_fsdata(mp, flags); | 421 | error = xfs_sync_fsdata(mp, flags); |