Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124833
b: refs/heads/master
c: cb56a4b
h: refs/heads/master
i:
  124831: 67ad61a
v: v3
  • Loading branch information
David Chinner authored and Lachlan McIlroy committed Oct 30, 2008
1 parent b6045bc commit 2dc0284
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 41 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: e9f1c6ee12955fd8657f6f0f9a3d09112b1f1fdd
refs/heads/master: cb56a4b995d44b7990ca3acd18db571eedd0649f
10 changes: 0 additions & 10 deletions trunk/fs/xfs/linux-2.6/xfs_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1026,16 +1026,6 @@ xfs_fs_put_super(
error = xfs_unmount_flush(mp, 0);
WARN_ON(error);

/*
* If we're forcing a shutdown, typically because of a media error,
* we want to make sure we invalidate dirty pages that belong to
* referenced vnodes as well.
*/
if (XFS_FORCED_SHUTDOWN(mp)) {
error = xfs_sync(mp, SYNC_WAIT | SYNC_CLOSE);
ASSERT(error != EFSCORRUPTED);
}

if (mp->m_flags & XFS_MOUNT_DMAPI) {
XFS_SEND_UNMOUNT(mp, rip, DM_RIGHT_NULL, 0, 0,
unmount_event_flags);
Expand Down
31 changes: 2 additions & 29 deletions trunk/fs/xfs/linux-2.6/xfs_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ xfs_sync_inodes_ag(
if (flags & SYNC_WAIT)
fflag = 0; /* synchronous overrides all */

if (flags & (SYNC_DELWRI | SYNC_CLOSE)) {
if (flags & SYNC_DELWRI) {
/*
* We need the I/O lock if we're going to call any of
* the flush/inval routines.
Expand Down Expand Up @@ -117,7 +117,7 @@ xfs_sync_inodes_ag(
}

/* nothing to sync during shutdown */
if (XFS_FORCED_SHUTDOWN(mp) && !(flags & SYNC_CLOSE)) {
if (XFS_FORCED_SHUTDOWN(mp)) {
read_unlock(&pag->pag_ici_lock);
return 0;
}
Expand Down Expand Up @@ -152,20 +152,6 @@ xfs_sync_inodes_ag(
* If we need to drop the lock, insert a marker if we
* have not already done so.
*/
if (flags & SYNC_CLOSE) {
xfs_iunlock(ip, XFS_ILOCK_SHARED);
if (XFS_FORCED_SHUTDOWN(mp))
xfs_tosspages(ip, 0, -1, FI_REMAPF);
else
error = xfs_flushinval_pages(ip, 0, -1,
FI_REMAPF);
/* wait for I/O on freeze */
if (flags & SYNC_IOWAIT)
vn_iowait(ip);

xfs_ilock(ip, XFS_ILOCK_SHARED);
}

if ((flags & SYNC_DELWRI) && VN_DIRTY(inode)) {
xfs_iunlock(ip, XFS_ILOCK_SHARED);
error = xfs_flush_pages(ip, 0, -1, fflag, FI_NONE);
Expand Down Expand Up @@ -390,8 +376,6 @@ xfs_quiesce_data(
* inodes. SYNC_WAIT and SYNC_BDFLUSH are used to
* determine if they should be flushed sync, async, or
* delwri.
* SYNC_CLOSE - This flag is passed when the system is being
* unmounted. We should sync and invalidate everything.
* SYNC_FSDATA - This indicates that the caller would like to make
* sure the superblock is safe on disk. We can ensure
* this by simply making sure the log gets flushed
Expand Down Expand Up @@ -472,17 +456,6 @@ xfs_sync(
return error;
}

/*
* When shutting down, we need to insure that the AIL is pushed
* to disk or the filesystem can appear corrupt from the PROM.
*/
if ((flags & (SYNC_CLOSE|SYNC_WAIT)) == (SYNC_CLOSE|SYNC_WAIT)) {
XFS_bflush(mp->m_ddev_targp);
if (mp->m_rtdev_targp) {
XFS_bflush(mp->m_rtdev_targp);
}
}

return XFS_ERROR(last_error);
}

Expand Down
1 change: 0 additions & 1 deletion trunk/fs/xfs/linux-2.6/xfs_sync.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ typedef struct bhv_vfs_sync_work {
} bhv_vfs_sync_work_t;

#define SYNC_ATTR 0x0001 /* sync attributes */
#define SYNC_CLOSE 0x0002 /* close file system down */
#define SYNC_DELWRI 0x0004 /* look at delayed writes */
#define SYNC_WAIT 0x0008 /* wait for i/o to complete */
#define SYNC_BDFLUSH 0x0010 /* BDFLUSH is calling -- don't block */
Expand Down

0 comments on commit 2dc0284

Please sign in to comment.