Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 167172
b: refs/heads/master
c: 69961a2
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig authored and Alex Elder committed Oct 8, 2009
1 parent 5b47f5e commit f71ce8f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c90b07e8dd9f263d2e2af1d9648ba269f4d0d8fd
refs/heads/master: 69961a26b82931601e07c9e3656bd90c598f2395
36 changes: 18 additions & 18 deletions trunk/fs/xfs/linux-2.6/xfs_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1148,31 +1148,31 @@ xfs_fs_put_super(
}

STATIC int
xfs_fs_sync_super(
xfs_fs_sync_fs(
struct super_block *sb,
int wait)
{
struct xfs_mount *mp = XFS_M(sb);
int error;

/*
* Treat a sync operation like a freeze. This is to work
* around a race in sync_inodes() which works in two phases
* - an asynchronous flush, which can write out an inode
* without waiting for file size updates to complete, and a
* synchronous flush, which wont do anything because the
* async flush removed the inode's dirty flag. Also
* sync_inodes() will not see any files that just have
* outstanding transactions to be flushed because we don't
* dirty the Linux inode until after the transaction I/O
* completes.
* Not much we can do for the first async pass. Writing out the
* superblock would be counter-productive as we are going to redirty
* when writing out other data and metadata (and writing out a single
* block is quite fast anyway).
*
* Try to asynchronously kick off quota syncing at least.
*/
if (wait || unlikely(sb->s_frozen == SB_FREEZE_WRITE))
error = xfs_quiesce_data(mp);
else
error = xfs_sync_fsdata(mp, 0);
if (!wait) {
xfs_qm_sync(mp, SYNC_TRYLOCK);
return 0;
}

error = xfs_quiesce_data(mp);
if (error)
return -error;

if (unlikely(laptop_mode)) {
if (laptop_mode) {
int prev_sync_seq = mp->m_sync_seq;

/*
Expand All @@ -1191,7 +1191,7 @@ xfs_fs_sync_super(
mp->m_sync_seq != prev_sync_seq);
}

return -error;
return 0;
}

STATIC int
Expand Down Expand Up @@ -1565,7 +1565,7 @@ static struct super_operations xfs_super_operations = {
.write_inode = xfs_fs_write_inode,
.clear_inode = xfs_fs_clear_inode,
.put_super = xfs_fs_put_super,
.sync_fs = xfs_fs_sync_super,
.sync_fs = xfs_fs_sync_fs,
.freeze_fs = xfs_fs_freeze,
.statfs = xfs_fs_statfs,
.remount_fs = xfs_fs_remount,
Expand Down

0 comments on commit f71ce8f

Please sign in to comment.