mirror of
https://github.com/torvalds/linux.git
synced 2024-11-05 11:32:04 +00:00
2a82b8be8a
In media spaces, video is often stored in a frame-per-file format. When dealing with uncompressed realtime HD video streams in this format, it is crucial that files do not get fragmented and that multiple files a placed contiguously on disk. When multiple streams are being ingested and played out at the same time, it is critical that the filesystem does not cross the streams and interleave them together as this creates seek and readahead cache miss latency and prevents both ingest and playout from meeting frame rate targets. This patch set creates a "stream of files" concept into the allocator to place all the data from a single stream contiguously on disk so that RAID array readahead can be used effectively. Each additional stream gets placed in different allocation groups within the filesystem, thereby ensuring that we don't cross any streams. When an AG fills up, we select a new AG for the stream that is not in use. The core of the functionality is the stream tracking - each inode that we create in a directory needs to be associated with the directories' stream. Hence every time we create a file, we look up the directories' stream object and associate the new file with that object. Once we have a stream object for a file, we use the AG that the stream object point to for allocations. If we can't allocate in that AG (e.g. it is full) we move the entire stream to another AG. Other inodes in the same stream are moved to the new AG on their next allocation (i.e. lazy update). Stream objects are kept in a cache and hold a reference on the inode. Hence the inode cannot be reclaimed while there is an outstanding stream reference. This means that on unlink we need to remove the stream association and we also need to flush all the associations on certain events that want to reclaim all unreferenced inodes (e.g. filesystem freeze). SGI-PV: 964469 SGI-Modid: xfs-linux-melb:xfs-kern:29096a Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Barry Naujok <bnaujok@sgi.com> Signed-off-by: Donald Douwsma <donaldd@sgi.com> Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Tim Shimmin <tes@sgi.com> Signed-off-by: Vlad Apostolov <vapo@sgi.com>
46 lines
1.3 KiB
C
46 lines
1.3 KiB
C
/*
|
|
* Copyright (c) 2000-2003,2005 Silicon Graphics, Inc.
|
|
* All Rights Reserved.
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License as
|
|
* published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it would be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write the Free Software Foundation,
|
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*/
|
|
#ifndef __XFS_H__
|
|
#define __XFS_H__
|
|
|
|
#ifdef CONFIG_XFS_DEBUG
|
|
#define STATIC
|
|
#define DEBUG 1
|
|
#define XFS_BUF_LOCK_TRACKING 1
|
|
/* #define QUOTADEBUG 1 */
|
|
#endif
|
|
|
|
#ifdef CONFIG_XFS_TRACE
|
|
#define XFS_ALLOC_TRACE 1
|
|
#define XFS_ATTR_TRACE 1
|
|
#define XFS_BLI_TRACE 1
|
|
#define XFS_BMAP_TRACE 1
|
|
#define XFS_BMBT_TRACE 1
|
|
#define XFS_DIR2_TRACE 1
|
|
#define XFS_DQUOT_TRACE 1
|
|
#define XFS_ILOCK_TRACE 1
|
|
#define XFS_LOG_TRACE 1
|
|
#define XFS_RW_TRACE 1
|
|
#define XFS_BUF_TRACE 1
|
|
#define XFS_VNODE_TRACE 1
|
|
#define XFS_FILESTREAMS_TRACE 1
|
|
#endif
|
|
|
|
#include <linux-2.6/xfs_linux.h>
|
|
#endif /* __XFS_H__ */
|