xfs
[Top] [All Lists]

[patch 19/22] kill vn_ioerror

To: xfs@xxxxxxxxxxx
Subject: [patch 19/22] kill vn_ioerror
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Tue, 02 Dec 2008 11:04:49 -0500
References: <20081202160430.775774000@xxxxxxxxxxxxxxxxxxxxxx>
User-agent: quilt/0.46-1
There's just one caller of this helper, and it's much cleaner to just merge
the xfs_do_force_shutdown call into it.


Signed-off-by: Christoph Hellwig <hch@xxxxxx>

Index: xfs-master/fs/xfs/linux-2.6/xfs_aops.c
===================================================================
--- xfs-master.orig/fs/xfs/linux-2.6/xfs_aops.c 2008-12-02 11:24:34.000000000 
+0100
+++ xfs-master/fs/xfs/linux-2.6/xfs_aops.c      2008-12-02 11:26:38.000000000 
+0100
@@ -146,16 +146,25 @@ xfs_destroy_ioend(
        xfs_ioend_t             *ioend)
 {
        struct buffer_head      *bh, *next;
+       struct xfs_inode        *ip = XFS_I(ioend->io_inode);
 
        for (bh = ioend->io_buffer_head; bh; bh = next) {
                next = bh->b_private;
                bh->b_end_io(bh, !ioend->io_error);
        }
-       if (unlikely(ioend->io_error)) {
-               vn_ioerror(XFS_I(ioend->io_inode), ioend->io_error,
-                               __FILE__,__LINE__);
+
+       /*
+        * 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.
+        */
+       if (unlikely(ioend->io_error == -ENODEV)) {
+               xfs_do_force_shutdown(ip->i_mount, SHUTDOWN_DEVICE_REQ,
+                                     __FILE__, __LINE__);
        }
-       vn_iowake(XFS_I(ioend->io_inode));
+
+       vn_iowake(ip);
        mempool_free(ioend, xfs_ioend_pool);
 }
 
Index: xfs-master/fs/xfs/linux-2.6/xfs_vnode.c
===================================================================
--- xfs-master.orig/fs/xfs/linux-2.6/xfs_vnode.c        2008-12-02 
11:24:34.000000000 +0100
+++ xfs-master/fs/xfs/linux-2.6/xfs_vnode.c     2008-12-02 11:26:38.000000000 
+0100
@@ -66,22 +66,6 @@ vn_iowake(
                wake_up(vptosync(ip));
 }
 
-/*
- * 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(
-       xfs_inode_t     *ip,
-       int             error,
-       char            *f,
-       int             l)
-{
-       if (unlikely(error == -ENODEV))
-               xfs_do_force_shutdown(ip->i_mount, SHUTDOWN_DEVICE_REQ, f, l);
-}
-
 #ifdef XFS_INODE_TRACE
 
 #define KTRACE_ENTER(ip, vk, s, line, ra)                      \
Index: xfs-master/fs/xfs/linux-2.6/xfs_vnode.h
===================================================================
--- xfs-master.orig/fs/xfs/linux-2.6/xfs_vnode.h        2008-12-02 
11:24:59.000000000 +0100
+++ xfs-master/fs/xfs/linux-2.6/xfs_vnode.h     2008-12-02 11:26:38.000000000 
+0100
@@ -63,7 +63,6 @@ extern void   vn_init(void);
  */
 extern void    vn_iowait(struct xfs_inode *ip);
 extern void    vn_iowake(struct xfs_inode *ip);
-extern void    vn_ioerror(struct xfs_inode *ip, int error, char *f, int l);
 
 #define IHOLD(ip) \
 do { \

-- 

<Prev in Thread] Current Thread [Next in Thread>