Whamcloud - gitweb
- configurable stack size fo x86_64
[fs/lustre-release.git] / lustre / kernel_patches / patches / invalidate_show-2.4.21-sles8sp3.patch
1
2
3
4  fs/inode.c         |   21 ++++++++++++++-------
5  fs/smbfs/inode.c   |    2 +-
6  fs/super.c         |    4 ++--
7  include/linux/fs.h |    2 +-
8  4 files changed, 18 insertions(+), 11 deletions(-)
9
10 Index: linux-2.4.21/fs/inode.c
11 ===================================================================
12 --- linux-2.4.21.orig/fs/inode.c        2004-04-24 02:38:51.000000000 -0400
13 +++ linux-2.4.21/fs/inode.c     2004-04-26 19:41:58.000000000 -0400
14 @@ -651,7 +651,8 @@
15  /*
16   * Invalidate all inodes for a device.
17   */
18 -static int invalidate_list(struct list_head *head, struct super_block * sb, struct list_head * dispose)
19 +static int invalidate_list(struct list_head *head, struct super_block * sb,
20 +                          struct list_head * dispose, int show)
21  {
22         struct list_head *next;
23         int busy = 0, count = 0;
24 @@ -676,6 +677,11 @@
25                         count++;
26                         continue;
27                 }
28 +               if (show)
29 +                       printk(KERN_ERR
30 +                              "inode busy: dev %s:%lu (%p) mode %o count %u\n",
31 +                              kdevname(sb->s_dev), inode->i_ino, inode,
32 +                              inode->i_mode, atomic_read(&inode->i_count));
33                 busy = 1;
34         }
35         /* only unused inodes may be cached with i_count zero */
36 @@ -694,22 +700,23 @@
37  /**
38   *     invalidate_inodes       - discard the inodes on a device
39   *     @sb: superblock
40 + *     @show: whether we should display any busy inodes found
41   *
42   *     Discard all of the inodes for a given superblock. If the discard
43   *     fails because there are busy inodes then a non zero value is returned.
44   *     If the discard is successful all the inodes have been discarded.
45   */
46   
47 -int invalidate_inodes(struct super_block * sb)
48 +int invalidate_inodes(struct super_block * sb, int show)
49  {
50         int busy;
51         LIST_HEAD(throw_away);
52  
53         spin_lock(&inode_lock);
54 -       busy = invalidate_list(&inode_in_use, sb, &throw_away);
55 -       busy |= invalidate_list(&inode_unused, sb, &throw_away);
56 -       busy |= invalidate_list(&sb->s_dirty, sb, &throw_away);
57 -       busy |= invalidate_list(&sb->s_locked_inodes, sb, &throw_away);
58 +       busy = invalidate_list(&inode_in_use, sb, &throw_away, show);
59 +       busy |= invalidate_list(&inode_unused, sb, &throw_away, show);
60 +       busy |= invalidate_list(&sb->s_dirty, sb, &throw_away, show);
61 +       busy |= invalidate_list(&sb->s_locked_inodes, sb, &throw_away, show);
62         spin_unlock(&inode_lock);
63  
64         dispose_list(&throw_away);
65 @@ -735,7 +742,7 @@
66                  * hold).
67                  */
68                 shrink_dcache_sb(sb);
69 -               res = invalidate_inodes(sb);
70 +               res = invalidate_inodes(sb, 0);
71                 drop_super(sb);
72         }
73         invalidate_buffers(dev);
74 Index: linux-2.4.21/fs/super.c
75 ===================================================================
76 --- linux-2.4.21.orig/fs/super.c        2004-04-24 02:38:51.000000000 -0400
77 +++ linux-2.4.21/fs/super.c     2004-04-26 19:41:58.000000000 -0400
78 @@ -932,7 +932,7 @@
79         lock_super(sb);
80         lock_kernel();
81         sb->s_flags &= ~MS_ACTIVE;
82 -       invalidate_inodes(sb);  /* bad name - it should be evict_inodes() */
83 +       invalidate_inodes(sb, 0);  /* bad name - it should be evict_inodes() */
84         if (sop) {
85                 if (sop->write_super && sb->s_dirt)
86                         sop->write_super(sb);
87 @@ -941,7 +941,7 @@
88         }
89  
90         /* Forget any remaining inodes */
91 -       if (invalidate_inodes(sb)) {
92 +       if (invalidate_inodes(sb, 1)) {
93                 printk(KERN_ERR "VFS: Busy inodes after unmount. "
94                         "Self-destruct in 5 seconds.  Have a nice day...\n");
95         }
96 Index: linux-2.4.21/fs/smbfs/inode.c
97 ===================================================================
98 --- linux-2.4.21.orig/fs/smbfs/inode.c  2004-04-24 02:38:44.000000000 -0400
99 +++ linux-2.4.21/fs/smbfs/inode.c       2004-04-26 19:41:58.000000000 -0400
100 @@ -167,7 +167,7 @@
101  {
102         VERBOSE("\n");
103         shrink_dcache_sb(SB_of(server));
104 -       invalidate_inodes(SB_of(server));
105 +       invalidate_inodes(SB_of(server), 0);
106  }
107  
108  /*
109 Index: linux-2.4.21/fs/ntfs/super.c
110 ===================================================================
111 --- linux-2.4.21.orig/fs/ntfs/super.c   2004-04-24 02:38:38.000000000 -0400
112 +++ linux-2.4.21/fs/ntfs/super.c        2004-04-26 19:42:12.000000000 -0400
113 @@ -1604,7 +1604,7 @@
114          * method again... FIXME: Do we need to do this twice now because of
115          * attribute inodes? I think not, so leave as is for now... (AIA)
116          */
117 -       if (invalidate_inodes(sb)) {
118 +       if (invalidate_inodes(sb, 0)) {
119                 ntfs_error(sb, "Busy inodes left. This is most likely a NTFS "
120                                 "driver bug.");
121                 /* Copied from fs/super.c. I just love this message. (-; */
122 Index: linux-2.4.21/include/linux/fs.h
123 ===================================================================
124 --- linux-2.4.21.orig/include/linux/fs.h        2004-04-26 19:06:32.000000000 -0400
125 +++ linux-2.4.21/include/linux/fs.h     2004-04-26 19:41:58.000000000 -0400
126 @@ -1401,7 +1401,7 @@
127  extern void set_buffer_flushtime(struct buffer_head *);
128  extern void balance_dirty(void);
129  extern int check_disk_change(kdev_t);
130 -extern int invalidate_inodes(struct super_block *);
131 +extern int invalidate_inodes(struct super_block *, int);
132  extern int invalidate_device(kdev_t, int);
133  extern void invalidate_inode_pages(struct inode *);
134  extern void invalidate_inode_pages2(struct address_space *);