EXIT;
}
+#if 0
/* If we know the file size and have the cookies:
* - send a DONE_WRITING rpc
*
static void ll_close_done_writing(struct inode *inode)
{
struct ll_inode_info *lli = ll_i2info(inode);
- struct ldlm_extent extent = { .start = 0, .end = OBD_OBJECT_EOF };
+ ldlm_policy_data_t policy = { .l_extent = {0, OBD_OBJECT_EOF } };
struct lustre_handle lockh = { 0 };
struct obdo obdo;
obd_flag valid;
if (test_bit(LLI_F_HAVE_OST_SIZE_LOCK, &lli->lli_flags))
goto rpc;
- rc = ll_extent_lock_no_validate(NULL, inode, lli->lli_smd, LCK_PW,
- &extent, &lockh, ast_flags);
- if (rc != ELDLM_OK) {
+ rc = ll_extent_lock(NULL, inode, lli->lli_smd, LCK_PW, &policy, &lockh,
+ ast_flags);
+ if (rc != 0) {
CERROR("lock acquisition failed (%d): unable to send "
"DONE_WRITING for inode %lu/%u\n", rc, inode->i_ino,
inode->i_generation);
obdo.o_blocks = inode->i_blocks;
obdo.o_valid = OBD_MD_FLID | OBD_MD_FLSIZE | OBD_MD_FLBLOCKS;
- rc = mdc_done_writing(ll_i2sbi(inode)->ll_mdc_exp, &obdo);
+ rc = md_done_writing(ll_i2sbi(inode)->ll_mdc_exp, &obdo);
out:
- iput(inode);
}
+#endif
static struct ll_inode_info *ll_close_next_lli(struct ll_close_queue *lcq)
{
while (1) {
struct l_wait_info lwi = { 0 };
struct ll_inode_info *lli;
- struct inode *inode;
+ //struct inode *inode;
l_wait_event_exclusive(lcq->lcq_waitq,
(lli = ll_close_next_lli(lcq)) != NULL,
if (IS_ERR(lli))
break;
- inode = ll_info2i(lli);
- ll_close_done_writing(inode);
+ //inode = ll_info2i(lli);
+ //ll_close_done_writing(inode);
+ //iput(inode);
}
complete(&lcq->lcq_comp);