RETURN(err);
}
- if (pag) {
+ /* FIXME Because of the async nature of file i/o, we never know
+ * who is actually dirty the pages; and any process have chance
+ * to trigger dirty-flushing within its own process context. So
+ * for simplicity we simply use root's credential, we suppose root
+ * always have credential.
+ */
+ if (pag)
sec_flags = PTLRPC_SEC_FL_PAG;
- err = obd_set_info(obd->obd_self_export,
- strlen("sec_flags"), "sec_flags",
- sizeof(sec_flags), &sec_flags);
- if (err) {
- OBD_FREE(data, sizeof(*data));
- RETURN(err);
- }
+ else
+ sec_flags = PTLRPC_SEC_FL_OSS;
+
+ err = obd_set_info(obd->obd_self_export,
+ strlen("sec_flags"), "sec_flags",
+ sizeof(sec_flags), &sec_flags);
+ if (err) {
+ OBD_FREE(data, sizeof(*data));
+ RETURN(err);
}
err = obd_connect(&dt_conn, obd, &sbi->ll_sb_uuid, data, 0);
if (err)
GOTO(out_lmv, err);
+ /*connect GSS*/
err = lustre_init_crypto(sb, gkc, data, async);
if (err) {
CERROR("Could not connect to GSS err %d\n", err);
err = 0;
}
- /*connect GSS*/
+
err = lustre_init_root_inode(sb);
if (err)
GOTO(out_gks, err);
ll_gns_del_timer(sbi);
ll_close_thread_stop(sbi->ll_lcq);
- lustre_destroy_crypto(sb);
-
list_del(&sbi->ll_conn_chain);
obd_disconnect(sbi->ll_dt_exp, 0);
+
+ lustre_destroy_crypto(sb);
lprocfs_unregister_mountpoint(sbi);
if (sbi->ll_proc_root) {
cfg.cfg_instance = sbi->ll_instance;
cfg.cfg_uuid = sbi->ll_sb_uuid;
cfg.cfg_local_nid = lmd->lmd_local_nid;
+ cfg.cfg_flags |= CFG_MODIFY_UUID_FL;
err = lustre_process_log(lmd, lmd->lmd_profile, &cfg, 0);
if (err < 0) {
CERROR("Unable to process log: %s\n", lmd->lmd_profile);
}
if (sbi->ll_instance != NULL) {
+ cfg.cfg_flags |= CFG_MODIFY_UUID_FL;
cfg.cfg_instance = sbi->ll_instance;
cfg.cfg_uuid = sbi->ll_sb_uuid;
(struct lov_stripe_md **) &lli->lli_mea);
lli->lli_mea = NULL;
}
+
+ LASSERT(sbi->ll_crypto_info != NULL);
ll_crypto_destroy_inode_key(inode);
+
if (lli->lli_symlink_name) {
OBD_FREE(lli->lli_symlink_name,
strlen(lli->lli_symlink_name) + 1);
list_for_each_entry_safe(ocapa, tmp, &lli->lli_capas, u.client.lli_list)
capa_put(ocapa);
+ LASSERT(!mapping_has_pages(inode->i_mapping));
lli->lli_inode_magic = LLI_INODE_DEAD;
+
EXIT;
}