Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 206355
b: refs/heads/master
c: dc935be
h: refs/heads/master
i:
  206353: 484f3c9
  206351: 19219cd
v: v3
  • Loading branch information
Ryusuke Konishi committed Jul 23, 2010
1 parent 5a3f0ab commit b9c2e40
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e7c274f8083793f8f861def63c02a0839b34d26d
refs/heads/master: dc935be2a094087bc561d80f8cf9e66bbc1f7b18
7 changes: 7 additions & 0 deletions trunk/fs/nilfs2/bmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,13 @@ static inline void nilfs_bmap_abort_end_ptr(struct nilfs_bmap *bmap,
nilfs_dat_abort_end(dat, &req->bpr_req);
}

static inline void nilfs_bmap_set_target_v(struct nilfs_bmap *bmap, __u64 key,
__u64 ptr)
{
bmap->b_last_allocated_key = key;
bmap->b_last_allocated_ptr = ptr;
}

__u64 nilfs_bmap_data_get_key(const struct nilfs_bmap *,
const struct buffer_head *);

Expand Down
11 changes: 2 additions & 9 deletions trunk/fs/nilfs2/btree.c
Original file line number Diff line number Diff line change
Expand Up @@ -917,13 +917,6 @@ static __u64 nilfs_btree_find_target_v(const struct nilfs_bmap *btree,
return nilfs_bmap_find_target_in_group(btree);
}

static void nilfs_btree_set_target_v(struct nilfs_bmap *btree, __u64 key,
__u64 ptr)
{
btree->b_last_allocated_key = key;
btree->b_last_allocated_ptr = ptr;
}

static int nilfs_btree_prepare_insert(struct nilfs_bmap *btree,
struct nilfs_btree_path *path,
int *levelp, __u64 key, __u64 ptr,
Expand Down Expand Up @@ -1084,7 +1077,7 @@ static void nilfs_btree_commit_insert(struct nilfs_bmap *btree,
set_buffer_nilfs_volatile((struct buffer_head *)((unsigned long)ptr));
ptr = path[NILFS_BTREE_LEVEL_DATA].bp_newreq.bpr_ptr;
if (NILFS_BMAP_USE_VBN(btree)) {
nilfs_btree_set_target_v(btree, key, ptr);
nilfs_bmap_set_target_v(btree, key, ptr);
dat = nilfs_bmap_get_dat(btree);
}

Expand Down Expand Up @@ -1662,7 +1655,7 @@ nilfs_btree_commit_convert_and_insert(struct nilfs_bmap *btree,
}

if (NILFS_BMAP_USE_VBN(btree))
nilfs_btree_set_target_v(btree, key, dreq->bpr_ptr);
nilfs_bmap_set_target_v(btree, key, dreq->bpr_ptr);
}

/**
Expand Down
9 changes: 1 addition & 8 deletions trunk/fs/nilfs2/direct.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,6 @@ nilfs_direct_find_target_v(const struct nilfs_bmap *direct, __u64 key)
return nilfs_bmap_find_target_in_group(direct);
}

static void nilfs_direct_set_target_v(struct nilfs_bmap *direct,
__u64 key, __u64 ptr)
{
direct->b_last_allocated_key = key;
direct->b_last_allocated_ptr = ptr;
}

static int nilfs_direct_insert(struct nilfs_bmap *bmap, __u64 key, __u64 ptr)
{
union nilfs_bmap_ptr_req req;
Expand Down Expand Up @@ -152,7 +145,7 @@ static int nilfs_direct_insert(struct nilfs_bmap *bmap, __u64 key, __u64 ptr)
nilfs_bmap_set_dirty(bmap);

if (NILFS_BMAP_USE_VBN(bmap))
nilfs_direct_set_target_v(bmap, key, req.bpr_ptr);
nilfs_bmap_set_target_v(bmap, key, req.bpr_ptr);

nilfs_bmap_add_blocks(bmap, 1);
}
Expand Down

0 comments on commit b9c2e40

Please sign in to comment.