diff options
author | David Chinner <david@fromorbit.com> | 2008-10-30 02:11:29 -0400 |
---|---|---|
committer | Lachlan McIlroy <lachlan@sgi.com> | 2008-10-30 02:11:29 -0400 |
commit | 6c7699c047c50403149ad91331dd39de47dea070 (patch) | |
tree | cb1be26f849f0d9c6014c311fde3c390b99c6cd3 /fs/xfs | |
parent | 60197e8df364df326dcbb987519f367ad0ee1a11 (diff) |
[XFS] remove the mount inode list
Now we've removed all users of the mount inode list, we can kill it. This
reduces the size of the xfs_inode by 2 pointers.
SGI-PV: 988139
SGI-Modid: xfs-linux-melb:xfs-kern:32293a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_iget.c | 42 | ||||
-rw-r--r-- | fs/xfs/xfs_inode.h | 8 | ||||
-rw-r--r-- | fs/xfs/xfs_mount.c | 5 | ||||
-rw-r--r-- | fs/xfs/xfs_mount.h | 1 |
4 files changed, 1 insertions, 55 deletions
diff --git a/fs/xfs/xfs_iget.c b/fs/xfs/xfs_iget.c index 4c92d190b3bd..1256746b249f 100644 --- a/fs/xfs/xfs_iget.c +++ b/fs/xfs/xfs_iget.c | |||
@@ -76,7 +76,6 @@ xfs_iget_core( | |||
76 | { | 76 | { |
77 | struct inode *old_inode; | 77 | struct inode *old_inode; |
78 | xfs_inode_t *ip; | 78 | xfs_inode_t *ip; |
79 | xfs_inode_t *iq; | ||
80 | int error; | 79 | int error; |
81 | unsigned long first_index, mask; | 80 | unsigned long first_index, mask; |
82 | xfs_perag_t *pag; | 81 | xfs_perag_t *pag; |
@@ -255,24 +254,6 @@ finish_inode: | |||
255 | 254 | ||
256 | write_unlock(&pag->pag_ici_lock); | 255 | write_unlock(&pag->pag_ici_lock); |
257 | radix_tree_preload_end(); | 256 | radix_tree_preload_end(); |
258 | |||
259 | /* | ||
260 | * Link ip to its mount and thread it on the mount's inode list. | ||
261 | */ | ||
262 | XFS_MOUNT_ILOCK(mp); | ||
263 | if ((iq = mp->m_inodes)) { | ||
264 | ASSERT(iq->i_mprev->i_mnext == iq); | ||
265 | ip->i_mprev = iq->i_mprev; | ||
266 | iq->i_mprev->i_mnext = ip; | ||
267 | iq->i_mprev = ip; | ||
268 | ip->i_mnext = iq; | ||
269 | } else { | ||
270 | ip->i_mnext = ip; | ||
271 | ip->i_mprev = ip; | ||
272 | } | ||
273 | mp->m_inodes = ip; | ||
274 | |||
275 | XFS_MOUNT_IUNLOCK(mp); | ||
276 | xfs_put_perag(mp, pag); | 257 | xfs_put_perag(mp, pag); |
277 | 258 | ||
278 | return_ip: | 259 | return_ip: |
@@ -493,36 +474,15 @@ xfs_iextract( | |||
493 | { | 474 | { |
494 | xfs_mount_t *mp = ip->i_mount; | 475 | xfs_mount_t *mp = ip->i_mount; |
495 | xfs_perag_t *pag = xfs_get_perag(mp, ip->i_ino); | 476 | xfs_perag_t *pag = xfs_get_perag(mp, ip->i_ino); |
496 | xfs_inode_t *iq; | ||
497 | 477 | ||
498 | write_lock(&pag->pag_ici_lock); | 478 | write_lock(&pag->pag_ici_lock); |
499 | radix_tree_delete(&pag->pag_ici_root, XFS_INO_TO_AGINO(mp, ip->i_ino)); | 479 | radix_tree_delete(&pag->pag_ici_root, XFS_INO_TO_AGINO(mp, ip->i_ino)); |
500 | write_unlock(&pag->pag_ici_lock); | 480 | write_unlock(&pag->pag_ici_lock); |
501 | xfs_put_perag(mp, pag); | 481 | xfs_put_perag(mp, pag); |
502 | 482 | ||
503 | /* | ||
504 | * Remove from mount's inode list. | ||
505 | */ | ||
506 | XFS_MOUNT_ILOCK(mp); | ||
507 | ASSERT((ip->i_mnext != NULL) && (ip->i_mprev != NULL)); | ||
508 | iq = ip->i_mnext; | ||
509 | iq->i_mprev = ip->i_mprev; | ||
510 | ip->i_mprev->i_mnext = iq; | ||
511 | |||
512 | /* | ||
513 | * Fix up the head pointer if it points to the inode being deleted. | ||
514 | */ | ||
515 | if (mp->m_inodes == ip) { | ||
516 | if (ip == iq) { | ||
517 | mp->m_inodes = NULL; | ||
518 | } else { | ||
519 | mp->m_inodes = iq; | ||
520 | } | ||
521 | } | ||
522 | |||
523 | /* Deal with the deleted inodes list */ | 483 | /* Deal with the deleted inodes list */ |
484 | XFS_MOUNT_ILOCK(mp); | ||
524 | list_del_init(&ip->i_reclaim); | 485 | list_del_init(&ip->i_reclaim); |
525 | |||
526 | mp->m_ireclaims++; | 486 | mp->m_ireclaims++; |
527 | XFS_MOUNT_IUNLOCK(mp); | 487 | XFS_MOUNT_IUNLOCK(mp); |
528 | } | 488 | } |
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h index 104623b7ec6e..55d50b888b68 100644 --- a/fs/xfs/xfs_inode.h +++ b/fs/xfs/xfs_inode.h | |||
@@ -233,16 +233,8 @@ typedef struct dm_attrs_s { | |||
233 | __uint16_t da_pad; /* DMIG extra padding */ | 233 | __uint16_t da_pad; /* DMIG extra padding */ |
234 | } dm_attrs_t; | 234 | } dm_attrs_t; |
235 | 235 | ||
236 | typedef struct { | ||
237 | struct xfs_inode *ip_mnext; /* next inode in mount list */ | ||
238 | struct xfs_inode *ip_mprev; /* ptr to prev inode */ | ||
239 | struct xfs_mount *ip_mount; /* fs mount struct ptr */ | ||
240 | } xfs_iptr_t; | ||
241 | |||
242 | typedef struct xfs_inode { | 236 | typedef struct xfs_inode { |
243 | /* Inode linking and identification information. */ | 237 | /* Inode linking and identification information. */ |
244 | struct xfs_inode *i_mnext; /* next inode in mount list */ | ||
245 | struct xfs_inode *i_mprev; /* ptr to prev inode */ | ||
246 | struct xfs_mount *i_mount; /* fs mount struct ptr */ | 238 | struct xfs_mount *i_mount; /* fs mount struct ptr */ |
247 | struct list_head i_reclaim; /* reclaim list */ | 239 | struct list_head i_reclaim; /* reclaim list */ |
248 | struct inode *i_vnode; /* vnode backpointer */ | 240 | struct inode *i_vnode; /* vnode backpointer */ |
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index 40338ff8fddd..43e5917465ae 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c | |||
@@ -1282,11 +1282,6 @@ xfs_unmountfs( | |||
1282 | xfs_unmountfs_wait(mp); /* wait for async bufs */ | 1282 | xfs_unmountfs_wait(mp); /* wait for async bufs */ |
1283 | xfs_log_unmount(mp); /* Done! No more fs ops. */ | 1283 | xfs_log_unmount(mp); /* Done! No more fs ops. */ |
1284 | 1284 | ||
1285 | /* | ||
1286 | * All inodes from this mount point should be freed. | ||
1287 | */ | ||
1288 | ASSERT(mp->m_inodes == NULL); | ||
1289 | |||
1290 | if ((mp->m_flags & XFS_MOUNT_NOUUID) == 0) | 1285 | if ((mp->m_flags & XFS_MOUNT_NOUUID) == 0) |
1291 | uuid_table_remove(&mp->m_sb.sb_uuid); | 1286 | uuid_table_remove(&mp->m_sb.sb_uuid); |
1292 | 1287 | ||
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h index f4644d715484..0ba052691126 100644 --- a/fs/xfs/xfs_mount.h +++ b/fs/xfs/xfs_mount.h | |||
@@ -248,7 +248,6 @@ typedef struct xfs_mount { | |||
248 | xfs_agnumber_t m_agirotor; /* last ag dir inode alloced */ | 248 | xfs_agnumber_t m_agirotor; /* last ag dir inode alloced */ |
249 | spinlock_t m_agirotor_lock;/* .. and lock protecting it */ | 249 | spinlock_t m_agirotor_lock;/* .. and lock protecting it */ |
250 | xfs_agnumber_t m_maxagi; /* highest inode alloc group */ | 250 | xfs_agnumber_t m_maxagi; /* highest inode alloc group */ |
251 | struct xfs_inode *m_inodes; /* active inode list */ | ||
252 | struct list_head m_del_inodes; /* inodes to reclaim */ | 251 | struct list_head m_del_inodes; /* inodes to reclaim */ |
253 | mutex_t m_ilock; /* inode list mutex */ | 252 | mutex_t m_ilock; /* inode list mutex */ |
254 | uint m_ireclaims; /* count of calls to reclaim*/ | 253 | uint m_ireclaims; /* count of calls to reclaim*/ |