summaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_vnode.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2006-06-09 06:58:38 +0200
committerNathan Scott <nathans@sgi.com>2006-06-09 06:58:38 +0200
commit7d04a335b6b2d79e3742ffd28bd651204574e794 (patch)
tree2b687202ae47c5e0c70a2b921b77135066131d8d /fs/xfs/linux-2.6/xfs_vnode.c
parent[XFS] getattr can return an error code, so propogate any from lower (diff)
downloadlinux-7d04a335b6b2d79e3742ffd28bd651204574e794.tar.xz
linux-7d04a335b6b2d79e3742ffd28bd651204574e794.zip
[XFS] Shutdown the filesystem if all device paths have gone. Made
shutdown vop flags consistent with sync vop flags declarations too. SGI-PV: 939911 SGI-Modid: xfs-linux-melb:xfs-kern:26096a Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_vnode.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_vnode.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/fs/xfs/linux-2.6/xfs_vnode.c b/fs/xfs/linux-2.6/xfs_vnode.c
index d27c25b27ccd..f17e39cff230 100644
--- a/fs/xfs/linux-2.6/xfs_vnode.c
+++ b/fs/xfs/linux-2.6/xfs_vnode.c
@@ -54,6 +54,22 @@ vn_iowake(
wake_up(vptosync(vp));
}
+/*
+ * Volume managers supporting multiple paths can send back ENODEV when the
+ * final path disappears. In this case continuing to fill the page cache
+ * with dirty data which cannot be written out is evil, so prevent that.
+ */
+void
+vn_ioerror(
+ struct vnode *vp,
+ int error,
+ char *f,
+ int l)
+{
+ if (unlikely(error == -ENODEV))
+ VFS_FORCE_SHUTDOWN(vp->v_vfsp, SHUTDOWN_DEVICE_REQ, f, l);
+}
+
struct vnode *
vn_initialize(
struct inode *inode)