xfs
[Top] [All Lists]

TAKE - Rework xfs metadata flushing

To: linux-xfs@xxxxxxxxxxx
Subject: TAKE - Rework xfs metadata flushing
From: Steve Lord <lord@xxxxxxx>
Date: Thu, 1 May 2003 16:04:42 -0500
Sender: linux-xfs-bounce@xxxxxxxxxxx
Rework of how xfs syncs metadata to disk. This has a number of
benefits: We no longer walk the list of all the inodes in the
filesystem everytime the write_super is called. If you type
sync and then reset the box then everything is definitely
recovered afterwards. We remove a lot of calls to
mark_inode_dirty which did not really do us any good, and
replace them with a single one which does. kupdated does
less work in xfs now, freeing it to do other things.
Finally, get the dummy log record code working, this
means that after a period of inactivity with everything
on disk, we clean the log so that recovery does not 
have any work to do.

This seems to fix a number of things, being as complex
as it is, it probably introduces a couple too.


Date:  Thu May  1 14:05:53 PDT 2003
Workarea:  penguin.americas.sgi.com:/src/lord/xfs-linux.2.4

The following file(s) were checked into:
  bonnie.engr.sgi.com:/isms/slinx/2.4.x-xfs


Modid:  2.4.x-xfs:slinx:147673a
linux/fs/xfs/linux/xfs_syncd.c - 1.1
        - New syncd thread which does metadata flushing periodically

linux/fs/xfs/xfs_rw.c - 1.378
        - remove timer associated with refcache purging

linux/fs/xfs/xfs_vnodeops.c - 1.590
        - Change flush flags used in the write_inode path, if an inode is in
          the log, start the write immediately, if not, do a delayed write.
          Add a new list the i_reclaim list to hold inodes being reclaimed.

linux/fs/xfs/xfs_vfsops.c - 1.419
        - restructure xfs_syncsub so it is a little easier to
          read. Move the inode flush component used from various places into
          its own function. In the SYNC_BDFLUSH no longer walk the inode
          chain, just the deleted inode list. Control refcache purging
          with a different flag. When writing a dummy record into an
          idle log, start it off to disk right away rather than waiting
          for the next sync to come along and find it.

linux/fs/xfs/xfs_iget.c - 1.187
        - process the i_reclaim list of unlinked inodes 

linux/fs/xfs/xfs_mount.h - 1.171
        - add m_del_inodes list and remove m_sbdirty_timer from xfs_mount_t

linux/fs/xfs/xfs_mount.c - 1.327
        - no need for timers to dirty the super block anymore

linux/fs/xfs/xfs_inode.c - 1.372
        - when an inode gets unpinned, mark it dirty so write_inode will
          be called.

linux/fs/xfs/xfs_inode.h - 1.180
        - add i_reclaim list

linux/fs/xfs/linux/xfs_vfs.c - 1.45
        - new vfs fields for the syncd thread need initializing

linux/fs/xfs/linux/xfs_globals.c - 1.47
        - add new sync_interval to the xfs_params, controls rate of
          operation of the xfs_syncd thread.

linux/fs/xfs/linux/Makefile - 1.71
        - add new file xfs_syncd.c

linux/fs/xfs/linux/xfs_super.h - 1.44
        - prototypes for linvfs_start_syncd and linvfs_stop_syncd

linux/fs/xfs/linux/xfs_super.c - 1.251
        - stop and start the syncd thread on mount and unmount,
          clear s_dirt after write_super calls into xfs rather than
          before, do not set the sb_dirt flag if write_inode fails to
          flush an inode.

linux/fs/xfs/linux/xfs_iops.c - 1.191
        - remove all mark_inode_dirty_sync calls, they were all on inodes
          which were being logged, the inode is only flushable after the
          log hits the disk.

linux/fs/xfs/linux/xfs_vnode.h - 1.78
        - VMODIFY no longer marks the inode dirty

linux/fs/xfs/linux/xfs_vfs.h - 1.39
        - new vfs fields for the syncd thread 

linux/fs/xfs/linux/xfs_sysctl.h - 1.12
        - add XFS_SYNC_INTERVAL

linux/fs/xfs/linux/xfs_sysctl.c - 1.18
        - add new XFS_SYNC_INTERVAL to sysctl tables



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