Blame view
fs/ocfs2/extent_map.h
2.78 KB
ccd979bdb [PATCH] OCFS2: Th... |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
/* -*- mode: c; c-basic-offset: 8; -*- * vim: noexpandtab sw=8 ts=8 sts=0: * * extent_map.h * * In-memory file extent mappings for OCFS2. * * Copyright (C) 2004 Oracle. 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, version 2, as published by the Free Software Foundation. * * This program is distributed in the hope that it will 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 to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 021110-1307, USA. */ #ifndef _EXTENT_MAP_H #define _EXTENT_MAP_H |
834189788 ocfs2: Cache exte... |
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
struct ocfs2_extent_map_item { unsigned int ei_cpos; unsigned int ei_phys; unsigned int ei_clusters; unsigned int ei_flags; struct list_head ei_list; }; #define OCFS2_MAX_EXTENT_MAP_ITEMS 3 struct ocfs2_extent_map { unsigned int em_num_items; struct list_head em_list; }; void ocfs2_extent_map_init(struct inode *inode); void ocfs2_extent_map_trunc(struct inode *inode, unsigned int cluster); void ocfs2_extent_map_insert_rec(struct inode *inode, struct ocfs2_extent_rec *rec); |
9517bac6c ocfs2: teach ocfs... |
46 |
int ocfs2_get_clusters(struct inode *inode, u32 v_cluster, u32 *p_cluster, |
49cb8d2d4 ocfs2: Read from ... |
47 |
u32 *num_clusters, unsigned int *extent_flags); |
363041a5f ocfs2: temporaril... |
48 |
int ocfs2_extent_map_get_blocks(struct inode *inode, u64 v_blkno, u64 *p_blkno, |
4f902c377 ocfs2: Fix extent... |
49 |
u64 *ret_count, unsigned int *extent_flags); |
ccd979bdb [PATCH] OCFS2: Th... |
50 |
|
00dc417fa ocfs2: fiemap sup... |
51 52 |
int ocfs2_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, u64 map_start, u64 map_len); |
93862d5e1 ocfs2: Implement ... |
53 |
int ocfs2_seek_data_hole_offset(struct file *file, loff_t *offset, int origin); |
f56654c43 ocfs2: Add extent... |
54 55 |
int ocfs2_xattr_get_clusters(struct inode *inode, u32 v_cluster, u32 *p_cluster, u32 *num_clusters, |
1061f9c1c ocfs2: Return ext... |
56 57 |
struct ocfs2_extent_list *el, unsigned int *extent_flags); |
f56654c43 ocfs2: Add extent... |
58 |
|
a8549fb5a ocfs2: Wrap virtu... |
59 60 61 62 |
int ocfs2_read_virt_blocks(struct inode *inode, u64 v_block, int nr, struct buffer_head *bhs[], int flags, int (*validate)(struct super_block *sb, struct buffer_head *bh)); |
e73a819db ocfs2: Add suppor... |
63 64 65 66 67 |
int ocfs2_figure_hole_clusters(struct ocfs2_caching_info *ci, struct ocfs2_extent_list *el, struct buffer_head *eb_bh, u32 v_cluster, u32 *num_clusters); |
a8549fb5a ocfs2: Wrap virtu... |
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
static inline int ocfs2_read_virt_block(struct inode *inode, u64 v_block, struct buffer_head **bh, int (*validate)(struct super_block *sb, struct buffer_head *bh)) { int status = 0; if (bh == NULL) { printk("ocfs2: bh == NULL "); status = -EINVAL; goto bail; } status = ocfs2_read_virt_blocks(inode, v_block, 1, bh, 0, validate); bail: return status; } |
ccd979bdb [PATCH] OCFS2: Th... |
87 |
#endif /* _EXTENT_MAP_H */ |