• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/fs/hfs/

Lines Matching refs:extent

2  *  linux/fs/hfs/extent.c
34 * comparing extent B-tree entries, the file id is the most
72 * Find a block within an extent record
141 static inline int __hfs_ext_read_extent(struct hfs_find_data *fd, struct hfs_extent *extent,
156 hfs_bnode_read(fd->bnode, extent, fd->entryoffset, sizeof(hfs_extent_rec));
194 static void hfs_dump_extent(struct hfs_extent *extent)
200 dprint(DBG_EXTENT, " %u:%u", be16_to_cpu(extent[i].block),
201 be16_to_cpu(extent[i].count));
205 static int hfs_add_extent(struct hfs_extent *extent, u16 offset,
211 hfs_dump_extent(extent);
212 for (i = 0; i < 3; extent++, i++) {
213 count = be16_to_cpu(extent->count);
215 start = be16_to_cpu(extent->block);
219 extent++;
220 extent->block = cpu_to_be16(alloc_block);
223 extent->count = cpu_to_be16(block_count);
233 static int hfs_free_extents(struct super_block *sb, struct hfs_extent *extent,
239 hfs_dump_extent(extent);
240 for (i = 0; i < 3; extent++, i++) {
241 count = be16_to_cpu(extent->count);
252 start = be16_to_cpu(extent->block);
255 extent->block = 0;
256 extent->count = 0;
261 extent->count = cpu_to_be16(count);
267 extent--;
268 count = be16_to_cpu(extent->count);
277 struct hfs_extent *extent;
282 extent = file->ExtRec;
285 extent = file->RExtRec;
292 for (i = 0; i < 3; extent++, i++)
293 blocks += be16_to_cpu(extent[i].count);
295 res = hfs_free_extents(sb, extent, blocks, blocks);
303 res = __hfs_ext_read_extent(&fd, extent, cnid, total_blocks, type);
307 hfs_free_extents(sb, extent, total_blocks - start, total_blocks);
440 dprint(DBG_EXTENT, "insert new extent\n");