* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2012, Intel Corporation.
+ * Copyright (c) 2012, 2013, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
int rc = 0;
ENTRY;
- CDEBUG(D_RPCTRACE, "Canceling %d in log "LPX64"\n",
- index, loghandle->lgh_id.lgl_oid);
+ CDEBUG(D_RPCTRACE, "Canceling %d in log "DOSTID"\n",
+ index, POSTID(&loghandle->lgh_id.lgl_oi));
if (index == 0) {
CERROR("Can't cancel index 0 which is header\n");
spin_unlock(&loghandle->lgh_hdr_lock);
rc = llog_destroy(env, loghandle);
if (rc < 0) {
- CERROR("%s: can't destroy empty llog #"LPX64"#"LPX64
+ CERROR("%s: can't destroy empty llog #"DOSTID
"#%08x: rc = %d\n",
loghandle->lgh_ctxt->loc_obd->obd_name,
- loghandle->lgh_id.lgl_oid,
- loghandle->lgh_id.lgl_oseq,
+ POSTID(&loghandle->lgh_id.lgl_oi),
loghandle->lgh_id.lgl_ogen, rc);
GOTO(out_err, rc);
}
rc = llog_write(env, loghandle, &llh->llh_hdr, NULL, 0, NULL, 0);
if (rc < 0) {
- CERROR("%s: fail to write header for llog #"LPX64"#"LPX64
+ CERROR("%s: fail to write header for llog #"DOSTID
"#%08x: rc = %d\n",
loghandle->lgh_ctxt->loc_obd->obd_name,
- loghandle->lgh_id.lgl_oid,
- loghandle->lgh_id.lgl_oseq,
+ POSTID(&loghandle->lgh_id.lgl_oi),
loghandle->lgh_id.lgl_ogen, rc);
GOTO(out_err, rc);
}
struct lu_env env;
int rc;
- cfs_daemonize_ctxt("llog_process_thread");
+ unshare_fs_struct();
/* client env has no keys, tags is just 0 */
rc = lu_env_init(&env, LCT_LOCAL | LCT_MG_THREAD);
* init the new one in llog_process_thread_daemonize. */
lpi->lpi_env = NULL;
init_completion(&lpi->lpi_completion);
- rc = cfs_create_thread(llog_process_thread_daemonize, lpi,
- CFS_DAEMON_FLAGS);
- if (rc < 0) {
+ rc = PTR_ERR(kthread_run(llog_process_thread_daemonize, lpi,
+ "llog_process_thread"));
+ if (IS_ERR_VALUE(rc)) {
CERROR("%s: cannot start thread: rc = %d\n",
loghandle->lgh_ctxt->loc_obd->obd_name, rc);
OBD_FREE_PTR(lpi);