Skip to content

Commit

Permalink
xfs: Kill filestreams cache flush
Browse files Browse the repository at this point in the history
The filestreams cache flush is not needed in the sync code as it
does not affect data writeback, and it is now not used by the growfs
code, either, so kill it.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
  • Loading branch information
dchinner authored and Alex Elder committed Jan 15, 2010
1 parent 0fa800f commit b657fc8
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 20 deletions.
3 changes: 0 additions & 3 deletions fs/xfs/linux-2.6/xfs_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,9 +451,6 @@ xfs_quiesce_data(
xfs_sync_data(mp, SYNC_WAIT);
xfs_qm_sync(mp, SYNC_WAIT);

/* drop inode references pinned by filestreams */
xfs_filestream_flush(mp);

/* write superblock and hoover up shutdown errors */
error = xfs_sync_fsdata(mp, SYNC_WAIT);

Expand Down
14 changes: 0 additions & 14 deletions fs/xfs/xfs_filestream.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,20 +454,6 @@ xfs_filestream_unmount(
xfs_mru_cache_destroy(mp->m_filestream);
}

/*
* If the mount point's m_perag tree is going to be modified, all
* outstanding cache entries must be flushed to avoid accessing reference count
* addresses that have been freed. The call to xfs_filestream_flush() must be
* made inside the block that holds the m_perag_lock in write mode to do the
* reallocation.
*/
void
xfs_filestream_flush(
xfs_mount_t *mp)
{
xfs_mru_cache_flush(mp->m_filestream);
}

/*
* Return the AG of the filestream the file or directory belongs to, or
* NULLAGNUMBER otherwise.
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/xfs_filestream.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ int xfs_filestream_init(void);
void xfs_filestream_uninit(void);
int xfs_filestream_mount(struct xfs_mount *mp);
void xfs_filestream_unmount(struct xfs_mount *mp);
void xfs_filestream_flush(struct xfs_mount *mp);
xfs_agnumber_t xfs_filestream_lookup_ag(struct xfs_inode *ip);
int xfs_filestream_associate(struct xfs_inode *dip, struct xfs_inode *ip);
void xfs_filestream_deassociate(struct xfs_inode *ip);
Expand Down
2 changes: 1 addition & 1 deletion fs/xfs/xfs_mru_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ xfs_mru_cache_create(
* guaranteed that all the free functions for all the elements have finished
* executing and the reaper is not running.
*/
void
static void
xfs_mru_cache_flush(
xfs_mru_cache_t *mru)
{
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/xfs_mru_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ void xfs_mru_cache_uninit(void);
int xfs_mru_cache_create(struct xfs_mru_cache **mrup, unsigned int lifetime_ms,
unsigned int grp_count,
xfs_mru_cache_free_func_t free_func);
void xfs_mru_cache_flush(xfs_mru_cache_t *mru);
void xfs_mru_cache_destroy(struct xfs_mru_cache *mru);
int xfs_mru_cache_insert(struct xfs_mru_cache *mru, unsigned long key,
void *value);
Expand Down

0 comments on commit b657fc8

Please sign in to comment.