* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, 2012, Intel Corporation.
+ * Copyright (c) 2011, 2013, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
#include <lustre_lite.h>
#include "llite_internal.h"
-#define LLOOP_MAX_SEGMENTS PTLRPC_MAX_BRW_PAGES
+#define LLOOP_MAX_SEGMENTS LNET_MAX_IOV
/* Possible states of device */
enum {
int refcheck;
int ret = 0;
- daemonize("lloop%d", lo->lo_number);
-
set_user_nice(current, -20);
lo->lo_state = LLOOP_BOUND;
set_capacity(disks[lo->lo_number], size);
bd_set_size(bdev, size << 9);
- set_blocksize(bdev, lo->lo_blocksize);
+ set_blocksize(bdev, lo->lo_blocksize);
- cfs_create_thread(loop_thread, lo, CLONE_KERNEL);
+ kthread_run(loop_thread, lo, "lloop%d", lo->lo_number);
down(&lo->lo_sem);
- return 0;
+ return 0;
- out:
+out:
/* This is safe: open() is still holding a reference. */
cfs_module_put(THIS_MODULE);
return error;