#include <linux/module.h>
#include <linux/random.h>
#include <linux/version.h>
+
#include <linux/lustre_lite.h>
#include <linux/lustre_ha.h>
#include <linux/lustre_dlm.h>
-#include <linux/init.h>
-#include <linux/fs.h>
#include <linux/lprocfs_status.h>
#include "llite_internal.h"
GOTO(out_root, err = -EBADF);
}
+ err = ll_close_thread_start(&sbi->ll_lcq);
+ if (err) {
+ CERROR("cannot start close thread: rc %d\n", err);
+ GOTO(out_root, err);
+ }
+
sb->s_root = d_alloc_root(root);
RETURN(err);
struct hlist_node *tmp, *next;
ENTRY;
+ ll_close_thread_shutdown(sbi->ll_lcq);
+
list_del(&sbi->ll_conn_chain);
obd_disconnect(sbi->ll_osc_exp, 0);
sema_init(&lli->lli_open_sem, 1);
lli->lli_flags = 0;
lli->lli_maxbytes = PAGE_CACHE_MAXBYTES;
+ spin_lock_init(&lli->lock);
+ INIT_LIST_HEAD(&lli->lli_pending_write_llaps);
}
int ll_fill_super(struct super_block *sb, void *data, int silent)
/* XXX when we fix the AST intents to pass the discard-range
* XXX extent, make ast_flags always LDLM_AST_DISCARD_DATA
* XXX here. */
- if (extent.start == 0)
+ if (attr->ia_size == 0)
ast_flags = LDLM_AST_DISCARD_DATA;
/* bug 1639: avoid write/truncate i_sem/DLM deadlock */
set_bit(LLI_F_HAVE_OST_SIZE_LOCK,
&ll_i2info(inode)->lli_flags);
+ //ll_try_done_writing(inode);
+
/* unlock now as we don't mind others file lockers racing with
* the mds updates below? */
err = ll_extent_unlock(NULL, inode, lsm, LCK_PW, &lockh);
LL_CDEBUG_PAGE(page, "io complete, unlocking\n");
unlock_page(page);
+
+ if (0 && cmd == OBD_BRW_WRITE) {
+ llap_write_complete(page->mapping->host, llap);
+ ll_try_done_writing(page->mapping->host);
+ }
+
page_cache_release(page);
}
POISON_PAGE(iobuf->maplist[i], 0x0d);
}
- oa.o_id = lsm->lsm_object_id;
- oa.o_valid = OBD_MD_FLID;
- obdo_from_inode(&oa, inode, OBD_MD_FLTYPE | OBD_MD_FLATIME |
- OBD_MD_FLMTIME | OBD_MD_FLCTIME);
+ ll_inode_fill_obdo(inode, rw, &oa);
if (rw == WRITE)
lprocfs_counter_add(ll_i2sbi(inode)->ll_stats,