Skip to content

Commit

Permalink
Merge branch 'integration' into for-linus
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Mason committed Jul 27, 2011
2 parents 02f8c6a + 75c195a commit ff95acb
Show file tree
Hide file tree
Showing 23 changed files with 965 additions and 1,010 deletions.
16 changes: 14 additions & 2 deletions fs/btrfs/btrfs_inode.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ struct btrfs_inode {
*/
struct btrfs_key location;

/* Lock for counters */
spinlock_t lock;

/* the extent_tree has caches of all the extent mappings to disk */
struct extent_map_tree extent_tree;

Expand Down Expand Up @@ -134,8 +137,8 @@ struct btrfs_inode {
* items we think we'll end up using, and reserved_extents is the number
* of extent items we've reserved metadata for.
*/
atomic_t outstanding_extents;
atomic_t reserved_extents;
unsigned outstanding_extents;
unsigned reserved_extents;

/*
* ordered_data_close is set by truncate when a file that used
Expand Down Expand Up @@ -184,4 +187,13 @@ static inline void btrfs_i_size_write(struct inode *inode, u64 size)
BTRFS_I(inode)->disk_i_size = size;
}

static inline bool btrfs_is_free_space_inode(struct btrfs_root *root,
struct inode *inode)
{
if (root == root->fs_info->tree_root ||
BTRFS_I(inode)->location.objectid == BTRFS_FREE_INO_OBJECTID)
return true;
return false;
}

#endif
Loading

0 comments on commit ff95acb

Please sign in to comment.