Skip to content

Commit

Permalink
ocfs2: fiemap support
Browse files Browse the repository at this point in the history
Plug ocfs2 into ->fiemap. Some portions of ocfs2_get_clusters() had to be
refactored so that the extent cache can be skipped in favor of going
directly to the on-disk records. This makes it easier for us to determine
which extent is the last one in the btree. Also, I'm not sure we want to be
caching fiemap lookups anyway as they're not directly related to data
read/write.

Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: ocfs2-devel@oss.oracle.com
Cc: linux-fsdevel@vger.kernel.org
  • Loading branch information
Mark Fasheh authored and Theodore Ts'o committed Oct 3, 2008
1 parent c4b929b commit 00dc417
Show file tree
Hide file tree
Showing 5 changed files with 306 additions and 62 deletions.
9 changes: 0 additions & 9 deletions fs/ocfs2/alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -989,15 +989,6 @@ static int ocfs2_grow_tree(struct inode *inode, handle_t *handle,
return ret;
}

/*
* This is only valid for leaf nodes, which are the only ones that can
* have empty extents anyway.
*/
static inline int ocfs2_is_empty_extent(struct ocfs2_extent_rec *rec)
{
return !rec->e_leaf_clusters;
}

/*
* This function will discard the rightmost extent record.
*/
Expand Down
9 changes: 9 additions & 0 deletions fs/ocfs2/alloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,13 @@ static inline unsigned int ocfs2_rec_clusters(struct ocfs2_extent_list *el,
return le16_to_cpu(rec->e_leaf_clusters);
}

/*
* This is only valid for leaf nodes, which are the only ones that can
* have empty extents anyway.
*/
static inline int ocfs2_is_empty_extent(struct ocfs2_extent_rec *rec)
{
return !rec->e_leaf_clusters;
}

#endif /* OCFS2_ALLOC_H */
Loading

0 comments on commit 00dc417

Please sign in to comment.