aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_buf.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2005-11-01 22:58:39 -0500
committerNathan Scott <nathans@sgi.com>2005-11-01 22:58:39 -0500
commit7b71876980d87c8f237b94d8529ee7fcc05ec2d9 (patch)
tree7fd3f1425e8946b3b2c1defeba0b4889f19b6290 /fs/xfs/linux-2.6/xfs_buf.c
parenta844f4510dce23c07f3923cb42138f5fdd745017 (diff)
[XFS] Update license/copyright notices to match the prefered SGI
boilerplate. SGI-PV: 913862 SGI-Modid: xfs-linux:xfs-kern:23903a Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_buf.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_buf.c62
1 files changed, 11 insertions, 51 deletions
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c
index 660c24acb640..e22cce1a9d5d 100644
--- a/fs/xfs/linux-2.6/xfs_buf.c
+++ b/fs/xfs/linux-2.6/xfs_buf.c
@@ -1,46 +1,20 @@
1/* 1/*
2 * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. 2 * Copyright (c) 2000-2005 Silicon Graphics, Inc.
3 * All Rights Reserved.
3 * 4 *
4 * This program is free software; you can redistribute it and/or modify it 5 * This program is free software; you can redistribute it and/or
5 * under the terms of version 2 of the GNU General Public License as 6 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
7 * 8 *
8 * This program is distributed in the hope that it would be useful, but 9 * This program is distributed in the hope that it would be useful,
9 * WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
11 * 13 *
12 * Further, this software is distributed without any warranty that it is 14 * You should have received a copy of the GNU General Public License
13 * free of the rightful claim of any third person regarding infringement 15 * along with this program; if not, write the Free Software Foundation,
14 * or the like. Any license provided herein, whether implied or 16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
15 * otherwise, applies only to this software file. Patent licenses, if
16 * any, provided herein do not apply to combinations of this program with
17 * other software, or any other product whatsoever.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write the Free Software Foundation, Inc., 59
21 * Temple Place - Suite 330, Boston MA 02111-1307, USA.
22 *
23 * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
24 * Mountain View, CA 94043, or:
25 *
26 * http://www.sgi.com
27 *
28 * For further information regarding this notice, see:
29 *
30 * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
31 */ 17 */
32
33/*
34 * The xfs_buf.c code provides an abstract buffer cache model on top
35 * of the Linux page cache. Cached metadata blocks for a file system
36 * are hashed to the inode for the block device. xfs_buf.c assembles
37 * buffers (xfs_buf_t) on demand to aggregate such cached pages for I/O.
38 *
39 * Written by Steve Lord, Jim Mostek, Russell Cattelan
40 * and Rajagopal Ananthanarayanan ("ananth") at SGI.
41 *
42 */
43
44#include <linux/stddef.h> 18#include <linux/stddef.h>
45#include <linux/errno.h> 19#include <linux/errno.h>
46#include <linux/slab.h> 20#include <linux/slab.h>
@@ -55,13 +29,8 @@
55#include <linux/blkdev.h> 29#include <linux/blkdev.h>
56#include <linux/hash.h> 30#include <linux/hash.h>
57#include <linux/kthread.h> 31#include <linux/kthread.h>
58
59#include "xfs_linux.h" 32#include "xfs_linux.h"
60 33
61/*
62 * File wide globals
63 */
64
65STATIC kmem_cache_t *pagebuf_zone; 34STATIC kmem_cache_t *pagebuf_zone;
66STATIC kmem_shaker_t pagebuf_shake; 35STATIC kmem_shaker_t pagebuf_shake;
67STATIC int xfsbufd_wakeup(int, gfp_t); 36STATIC int xfsbufd_wakeup(int, gfp_t);
@@ -70,10 +39,6 @@ STATIC void pagebuf_delwri_queue(xfs_buf_t *, int);
70STATIC struct workqueue_struct *xfslogd_workqueue; 39STATIC struct workqueue_struct *xfslogd_workqueue;
71struct workqueue_struct *xfsdatad_workqueue; 40struct workqueue_struct *xfsdatad_workqueue;
72 41
73/*
74 * Pagebuf debugging
75 */
76
77#ifdef PAGEBUF_TRACE 42#ifdef PAGEBUF_TRACE
78void 43void
79pagebuf_trace( 44pagebuf_trace(
@@ -112,10 +77,6 @@ ktrace_t *pagebuf_trace_buf;
112# define PB_GET_OWNER(pb) do { } while (0) 77# define PB_GET_OWNER(pb) do { } while (0)
113#endif 78#endif
114 79
115/*
116 * Pagebuf allocation / freeing.
117 */
118
119#define pb_to_gfp(flags) \ 80#define pb_to_gfp(flags) \
120 ((((flags) & PBF_READ_AHEAD) ? __GFP_NORETRY : \ 81 ((((flags) & PBF_READ_AHEAD) ? __GFP_NORETRY : \
121 ((flags) & PBF_DONT_BLOCK) ? GFP_NOFS : GFP_KERNEL) | __GFP_NOWARN) 82 ((flags) & PBF_DONT_BLOCK) ? GFP_NOFS : GFP_KERNEL) | __GFP_NOWARN)
@@ -123,7 +84,6 @@ ktrace_t *pagebuf_trace_buf;
123#define pb_to_km(flags) \ 84#define pb_to_km(flags) \
124 (((flags) & PBF_DONT_BLOCK) ? KM_NOFS : KM_SLEEP) 85 (((flags) & PBF_DONT_BLOCK) ? KM_NOFS : KM_SLEEP)
125 86
126
127#define pagebuf_allocate(flags) \ 87#define pagebuf_allocate(flags) \
128 kmem_zone_alloc(pagebuf_zone, pb_to_km(flags)) 88 kmem_zone_alloc(pagebuf_zone, pb_to_km(flags))
129#define pagebuf_deallocate(pb) \ 89#define pagebuf_deallocate(pb) \