* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
static struct buffer_head *
iam_load_idle_blocks(struct iam_container *c, iam_ptr_t blk)
static struct buffer_head *
iam_load_idle_blocks(struct iam_container *c, iam_ptr_t blk)
idle_blocks = (__u32 *)(c->ic_root_bh->b_data +
c->ic_descr->id_root_gap +
sizeof(struct dx_countlimit));
idle_blocks = (__u32 *)(c->ic_root_bh->b_data +
c->ic_descr->id_root_gap +
sizeof(struct dx_countlimit));
bh = iam_load_idle_blocks(c, le32_to_cpu(*idle_blocks));
if (bh != NULL && IS_ERR(bh))
result = PTR_ERR(bh);
else
c->ic_idle_bh = bh;
bh = iam_load_idle_blocks(c, le32_to_cpu(*idle_blocks));
if (bh != NULL && IS_ERR(bh))
result = PTR_ERR(bh);
else
c->ic_idle_bh = bh;
void iam_path_init(struct iam_path *path, struct iam_container *c,
struct iam_path_descr *pd)
void iam_path_init(struct iam_path *path, struct iam_container *c,
struct iam_path_descr *pd)
int iam_node_read(struct iam_container *c, iam_ptr_t ptr,
handle_t *h, struct buffer_head **bh)
int iam_node_read(struct iam_container *c, iam_ptr_t ptr,
handle_t *h, struct buffer_head **bh)
return dynlock_lock(&ic->ic_tree_lock, value, lt, GFP_NOFS);
}
return dynlock_lock(&ic->ic_tree_lock, value, lt, GFP_NOFS);
}
-struct iam_entry *iam_find_position(struct iam_path *path,
- struct iam_frame *frame)
+static struct iam_entry *iam_find_position(struct iam_path *path,
+ struct iam_frame *frame)
-int iam_lookup_lock(struct iam_path *path,
- struct dynlock_handle **dl, enum dynlock_type lt)
+static int iam_lookup_lock(struct iam_path *path,
+ struct dynlock_handle **dl, enum dynlock_type lt)
iam_new_node(handle_t *h, struct iam_container *c, iam_ptr_t *b, int *e)
{
struct inode *inode = c->ic_object;
iam_new_node(handle_t *h, struct iam_container *c, iam_ptr_t *b, int *e)
{
struct inode *inode = c->ic_object;
bh = ldiskfs_bread(NULL, inode, *b, 0, e);
if (bh == NULL)
return NULL;
bh = ldiskfs_bread(NULL, inode, *b, 0, e);
if (bh == NULL)
return NULL;
iam_lock_bh(c->ic_root_bh);
*idle_blocks = head->iih_next;
iam_unlock_bh(c->ic_root_bh);
iam_lock_bh(c->ic_root_bh);
*idle_blocks = head->iih_next;
iam_unlock_bh(c->ic_root_bh);
- bh = ldiskfs_append(h, inode, b, e);
+ bh = osd_ldiskfs_append(h, inode, b, e);
struct iam_entry *entries; /* old block contents */
struct iam_entry *entries2; /* new block contents */
struct iam_entry *entries; /* old block contents */
struct iam_entry *entries2; /* new block contents */
- struct iam_frame *frame, *safe;
- struct buffer_head *bh_new[DX_MAX_TREE_HEIGHT] = {0};
+ struct iam_frame *frame, *safe;
+ struct buffer_head *bh_new[DX_MAX_TREE_HEIGHT] = {NULL};
u32 newblock[DX_MAX_TREE_HEIGHT] = {0};
struct dynlock_handle *lock[DX_MAX_TREE_HEIGHT] = {NULL,};
struct dynlock_handle *new_lock[DX_MAX_TREE_HEIGHT] = {NULL,};
u32 newblock[DX_MAX_TREE_HEIGHT] = {0};
struct dynlock_handle *lock[DX_MAX_TREE_HEIGHT] = {NULL,};
struct dynlock_handle *new_lock[DX_MAX_TREE_HEIGHT] = {NULL,};
++ frame;
assert_inv(dx_node_check(path, frame));
bh_new[0] = NULL; /* buffer head is "consumed" */
++ frame;
assert_inv(dx_node_check(path, frame));
bh_new[0] = NULL; /* buffer head is "consumed" */
dxtrace(dx_show_index ("node", frame->entries));
dxtrace(dx_show_index ("node",
((struct dx_node *) bh2->b_data)->entries));
dxtrace(dx_show_index ("node", frame->entries));
dxtrace(dx_show_index ("node",
((struct dx_node *) bh2->b_data)->entries));
if (rc != 0)
CWARN("%.16s: idle blocks failed, will lose the blk %u\n",
LDISKFS_SB(inode->i_sb)->s_es->s_volume_name, blk);
if (rc != 0)
CWARN("%.16s: idle blocks failed, will lose the blk %u\n",
LDISKFS_SB(inode->i_sb)->s_es->s_volume_name, blk);
assert_corr(iam_it_container(it)->ic_descr->id_ikey_size <= sizeof pos);
return iam_it_iget(it, (struct iam_ikey *)&pos);
}
assert_corr(iam_it_container(it)->ic_descr->id_ikey_size <= sizeof pos);
return iam_it_iget(it, (struct iam_ikey *)&pos);
}