4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 only,
8 * as published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License version 2 for more details (a copy is included
14 * in the LICENSE file that accompanied this code).
16 * You should have received a copy of the GNU General Public License
17 * version 2 along with this program; If not, see
18 * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
20 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
21 * CA 95054 USA or visit www.sun.com if you need additional information or
27 * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
28 * Use is subject to license terms.
30 * Copyright (c) 2011, 2013, Intel Corporation.
33 * This file is part of Lustre, http://www.lustre.org/
34 * Lustre is a trademark of Sun Microsystems, Inc.
38 * linux/drivers/block/loop.c
40 * Written by Theodore Ts'o, 3/29/93
42 * Copyright 1993 by Theodore Ts'o. Redistribution of this file is
43 * permitted under the GNU General Public License.
45 * Modularized and updated for 1.1.16 kernel - Mitch Dsouza 28th May 1994
46 * Adapted for 1.3.59 kernel - Andries Brouwer, 1 Feb 1996
48 * Fixed do_loop_request() re-entrancy - Vincent.Renardias@waw.com Mar 20, 1997
50 * Added devfs support - Richard Gooch <rgooch@atnf.csiro.au> 16-Jan-1998
52 * Handle sparse backing files correctly - Kenn Humborg, Jun 28, 1998
54 * Loadable modules and other fixes by AK, 1998
56 * Maximum number of loop devices now dynamic via max_loop module parameter.
57 * Russell Kroll <rkroll@exploits.org> 19990701
59 * Maximum number of loop devices when compiled-in now selectable by passing
60 * max_loop=<1-255> to the kernel on boot.
61 * Erik I. Bols?, <eriki@himolde.no>, Oct 31, 1999
63 * Completely rewrite request handling to be make_request_fn style and
64 * non blocking, pushing work to a helper thread. Lots of fixes from
66 * Jens Axboe <axboe@suse.de>, Nov 2000
68 * Support up to 256 loop devices
69 * Heinz Mauelshagen <mge@sistina.com>, Feb 2002
71 * Support for falling back on the write file operation when the address space
72 * operations prepare_write and/or commit_write are not available on the
74 * Anton Altaparmakov, 16 Feb 2005
77 * - Advisory locking is ignored here.
78 * - Should use an own CAP_* category instead of CAP_SYS_ADMIN
82 #include <linux/module.h>
84 #include <linux/sched.h>
86 #include <linux/file.h>
87 #include <linux/stat.h>
88 #include <linux/errno.h>
89 #include <linux/major.h>
90 #include <linux/wait.h>
91 #include <linux/blkdev.h>
92 #include <linux/blkpg.h>
93 #include <linux/init.h>
94 #include <linux/swap.h>
95 #include <linux/slab.h>
96 #include <linux/suspend.h>
97 #include <linux/writeback.h>
98 #include <linux/buffer_head.h> /* for invalidate_bdev() */
99 #include <linux/completion.h>
100 #include <linux/highmem.h>
101 #include <linux/gfp.h>
102 #include <linux/swap.h>
103 #include <linux/pagevec.h>
105 #include <asm/uaccess.h>
107 #include <lustre_lib.h>
108 #include <lustre_lite.h>
109 #include "llite_internal.h"
111 #define LLOOP_MAX_SEGMENTS LNET_MAX_IOV
113 /* Possible states of device */
120 struct lloop_device {
126 int (*ioctl)(struct lloop_device *, int cmd,
129 struct file *lo_backing_file;
130 struct block_device *lo_device;
131 unsigned lo_blocksize;
137 struct bio *lo_biotail;
139 struct semaphore lo_sem;
140 struct mutex lo_ctl_mutex;
141 cfs_atomic_t lo_pending;
142 cfs_waitq_t lo_bh_wait;
144 struct request_queue *lo_queue;
146 const struct lu_env *lo_env;
148 struct ll_dio_pages lo_pvec;
150 /* data to handle bio for lustre. */
151 struct lo_request_data {
152 struct page *lrd_pages[LLOOP_MAX_SEGMENTS];
153 loff_t lrd_offsets[LLOOP_MAX_SEGMENTS];
161 LO_FLAGS_READ_ONLY = 1,
164 static int lloop_major;
165 #define MAX_LOOP_DEFAULT 16
166 static int max_loop = MAX_LOOP_DEFAULT;
167 static struct lloop_device *loop_dev;
168 static struct gendisk **disks;
169 static struct mutex lloop_mutex;
170 static void *ll_iocontrol_magic = NULL;
172 static loff_t get_loop_size(struct lloop_device *lo, struct file *file)
174 loff_t size, offset, loopsize;
176 /* Compute loopsize in bytes */
177 size = i_size_read(file->f_mapping->host);
178 offset = lo->lo_offset;
179 loopsize = size - offset;
180 if (lo->lo_sizelimit > 0 && lo->lo_sizelimit < loopsize)
181 loopsize = lo->lo_sizelimit;
184 * Unfortunately, if we want to do I/O on the device,
185 * the number of 512-byte sectors has to fit into a sector_t.
187 return loopsize >> 9;
190 static int do_bio_lustrebacked(struct lloop_device *lo, struct bio *head)
192 const struct lu_env *env = lo->lo_env;
193 struct cl_io *io = &lo->lo_io;
194 struct inode *inode = lo->lo_backing_file->f_dentry->d_inode;
195 struct cl_object *obj = ll_i2info(inode)->lli_clob;
200 obd_count page_count = 0;
201 struct bio_vec *bvec;
205 struct ll_dio_pages *pvec = &lo->lo_pvec;
206 struct page **pages = pvec->ldp_pages;
207 loff_t *offsets = pvec->ldp_offsets;
209 truncate_inode_pages(inode->i_mapping, 0);
211 /* initialize the IO */
212 memset(io, 0, sizeof(*io));
214 ret = cl_io_init(env, io, CIT_MISC, obj);
216 return io->ci_result;
217 io->ci_lockreq = CILR_NEVER;
219 LASSERT(head != NULL);
221 for (bio = head; bio != NULL; bio = bio->bi_next) {
222 LASSERT(rw == bio->bi_rw);
224 offset = (pgoff_t)(bio->bi_sector << 9) + lo->lo_offset;
225 bio_for_each_segment(bvec, bio, i) {
226 BUG_ON(bvec->bv_offset != 0);
227 BUG_ON(bvec->bv_len != PAGE_CACHE_SIZE);
229 pages[page_count] = bvec->bv_page;
230 offsets[page_count] = offset;
232 offset += bvec->bv_len;
234 LASSERT(page_count <= LLOOP_MAX_SEGMENTS);
237 ll_stats_ops_tally(ll_i2sbi(inode),
238 (rw == WRITE) ? LPROC_LL_BRW_WRITE : LPROC_LL_BRW_READ,
241 pvec->ldp_size = page_count << PAGE_CACHE_SHIFT;
242 pvec->ldp_nr = page_count;
244 /* FIXME: in ll_direct_rw_pages, it has to allocate many cl_page{}s to
245 * write those pages into OST. Even worse case is that more pages
246 * would be asked to write out to swap space, and then finally get here
248 * Unfortunately this is NOT easy to fix.
249 * Thoughts on solution:
250 * 0. Define a reserved pool for cl_pages, which could be a list of
251 * pre-allocated cl_pages;
252 * 1. Define a new operation in cl_object_operations{}, says clo_depth,
253 * which measures how many layers for this lustre object. Generally
254 * speaking, the depth would be 2, one for llite, and one for lovsub.
255 * However, for SNS, there will be more since we need additional page
257 * 2. Reserve the # of (page_count * depth) cl_pages from the reserved
258 * pool. Afterwards, the clio would allocate the pages from reserved
259 * pool, this guarantees we neeedn't allocate the cl_pages from
260 * generic cl_page slab cache.
261 * Of course, if there is NOT enough pages in the pool, we might
262 * be asked to write less pages once, this purely depends on
263 * implementation. Anyway, we should be careful to avoid deadlocking.
265 mutex_lock(&inode->i_mutex);
266 bytes = ll_direct_rw_pages(env, io, rw, inode, pvec);
267 mutex_unlock(&inode->i_mutex);
269 return (bytes == pvec->ldp_size) ? 0 : (int)bytes;
273 * Add bio to back of pending list
275 static void loop_add_bio(struct lloop_device *lo, struct bio *bio)
279 spin_lock_irqsave(&lo->lo_lock, flags);
280 if (lo->lo_biotail) {
281 lo->lo_biotail->bi_next = bio;
282 lo->lo_biotail = bio;
284 lo->lo_bio = lo->lo_biotail = bio;
285 spin_unlock_irqrestore(&lo->lo_lock, flags);
287 cfs_atomic_inc(&lo->lo_pending);
288 if (cfs_waitq_active(&lo->lo_bh_wait))
289 cfs_waitq_signal(&lo->lo_bh_wait);
293 * Grab first pending buffer
295 static unsigned int loop_get_bio(struct lloop_device *lo, struct bio **req)
299 unsigned int count = 0;
300 unsigned int page_count = 0;
303 spin_lock_irq(&lo->lo_lock);
305 if (unlikely(first == NULL)) {
306 spin_unlock_irq(&lo->lo_lock);
310 /* TODO: need to split the bio, too bad. */
311 LASSERT(first->bi_vcnt <= LLOOP_MAX_SEGMENTS);
315 while (*bio && (*bio)->bi_rw == rw) {
316 CDEBUG(D_INFO, "bio sector %llu size %u count %u vcnt%u \n",
317 (unsigned long long)(*bio)->bi_sector, (*bio)->bi_size,
318 page_count, (*bio)->bi_vcnt);
319 if (page_count + (*bio)->bi_vcnt > LLOOP_MAX_SEGMENTS)
323 page_count += (*bio)->bi_vcnt;
325 bio = &(*bio)->bi_next;
328 /* Some of bios can't be mergable. */
332 /* Hit the end of queue */
333 lo->lo_biotail = NULL;
337 spin_unlock_irq(&lo->lo_lock);
342 loop_make_request(struct request_queue *q, struct bio *old_bio)
344 struct lloop_device *lo = q->queuedata;
345 int rw = bio_rw(old_bio);
351 CDEBUG(D_INFO, "submit bio sector %llu size %u\n",
352 (unsigned long long)old_bio->bi_sector, old_bio->bi_size);
354 spin_lock_irq(&lo->lo_lock);
355 inactive = (lo->lo_state != LLOOP_BOUND);
356 spin_unlock_irq(&lo->lo_lock);
361 if (lo->lo_flags & LO_FLAGS_READ_ONLY)
363 } else if (rw == READA) {
365 } else if (rw != READ) {
366 CERROR("lloop: unknown command (%x)\n", rw);
369 loop_add_bio(lo, old_bio);
372 cfs_bio_io_error(old_bio, old_bio->bi_size);
376 #ifdef HAVE_REQUEST_QUEUE_UNPLUG_FN
378 * kick off io on the underlying address space
380 static void loop_unplug(struct request_queue *q)
382 struct lloop_device *lo = q->queuedata;
384 clear_bit(QUEUE_FLAG_PLUGGED, &q->queue_flags);
385 blk_run_address_space(lo->lo_backing_file->f_mapping);
389 static inline void loop_handle_bio(struct lloop_device *lo, struct bio *bio)
392 ret = do_bio_lustrebacked(lo, bio);
394 struct bio *tmp = bio->bi_next;
396 cfs_bio_endio(bio, bio->bi_size, ret);
401 static inline int loop_active(struct lloop_device *lo)
403 return cfs_atomic_read(&lo->lo_pending) ||
404 (lo->lo_state == LLOOP_RUNDOWN);
408 * worker thread that handles reads/writes to file backed loop devices,
409 * to avoid blocking in our make_request_fn.
411 static int loop_thread(void *data)
413 struct lloop_device *lo = data;
416 unsigned long times = 0;
417 unsigned long total_count = 0;
423 set_user_nice(current, -20);
425 lo->lo_state = LLOOP_BOUND;
427 env = cl_env_get(&refcheck);
429 GOTO(out, ret = PTR_ERR(env));
432 memset(&lo->lo_pvec, 0, sizeof(lo->lo_pvec));
433 lo->lo_pvec.ldp_pages = lo->lo_requests[0].lrd_pages;
434 lo->lo_pvec.ldp_offsets = lo->lo_requests[0].lrd_offsets;
437 * up sem, we are running
442 cfs_wait_event(lo->lo_bh_wait, loop_active(lo));
443 if (!cfs_atomic_read(&lo->lo_pending)) {
445 spin_lock_irq(&lo->lo_lock);
446 exiting = (lo->lo_state == LLOOP_RUNDOWN);
447 spin_unlock_irq(&lo->lo_lock);
453 count = loop_get_bio(lo, &bio);
455 CWARN("lloop(minor: %d): missing bio\n", lo->lo_number);
459 total_count += count;
460 if (total_count < count) { /* overflow */
466 if ((times & 127) == 0) {
467 CDEBUG(D_INFO, "total: %lu, count: %lu, avg: %lu\n",
468 total_count, times, total_count / times);
471 LASSERT(bio != NULL);
472 LASSERT(count <= cfs_atomic_read(&lo->lo_pending));
473 loop_handle_bio(lo, bio);
474 cfs_atomic_sub(count, &lo->lo_pending);
476 cl_env_put(env, &refcheck);
483 static int loop_set_fd(struct lloop_device *lo, struct file *unused,
484 struct block_device *bdev, struct file *file)
487 struct address_space *mapping;
492 if (!cfs_try_module_get(THIS_MODULE))
496 if (lo->lo_state != LLOOP_UNBOUND)
499 mapping = file->f_mapping;
500 inode = mapping->host;
503 if (!S_ISREG(inode->i_mode) || inode->i_sb->s_magic != LL_SUPER_MAGIC)
506 if (!(file->f_mode & FMODE_WRITE))
507 lo_flags |= LO_FLAGS_READ_ONLY;
509 size = get_loop_size(lo, file);
511 if ((loff_t)(sector_t)size != size) {
516 /* remove all pages in cache so as dirty pages not to be existent. */
517 truncate_inode_pages(mapping, 0);
519 set_device_ro(bdev, (lo_flags & LO_FLAGS_READ_ONLY) != 0);
521 lo->lo_blocksize = PAGE_CACHE_SIZE;
522 lo->lo_device = bdev;
523 lo->lo_flags = lo_flags;
524 lo->lo_backing_file = file;
526 lo->lo_sizelimit = 0;
527 lo->old_gfp_mask = mapping_gfp_mask(mapping);
528 mapping_set_gfp_mask(mapping, lo->old_gfp_mask & ~(__GFP_IO|__GFP_FS));
530 lo->lo_bio = lo->lo_biotail = NULL;
533 * set queue make_request_fn, and add limits based on lower level
536 blk_queue_make_request(lo->lo_queue, loop_make_request);
537 lo->lo_queue->queuedata = lo;
538 #ifdef HAVE_REQUEST_QUEUE_UNPLUG_FN
539 lo->lo_queue->unplug_fn = loop_unplug;
542 /* queue parameters */
543 CLASSERT(PAGE_CACHE_SIZE < (1 << (sizeof(unsigned short) * 8)));
544 blk_queue_logical_block_size(lo->lo_queue,
545 (unsigned short)PAGE_CACHE_SIZE);
546 blk_queue_max_hw_sectors(lo->lo_queue,
547 LLOOP_MAX_SEGMENTS << (PAGE_CACHE_SHIFT - 9));
548 blk_queue_max_segments(lo->lo_queue, LLOOP_MAX_SEGMENTS);
550 set_capacity(disks[lo->lo_number], size);
551 bd_set_size(bdev, size << 9);
553 set_blocksize(bdev, lo->lo_blocksize);
555 kthread_run(loop_thread, lo, "lloop%d", lo->lo_number);
560 /* This is safe: open() is still holding a reference. */
561 cfs_module_put(THIS_MODULE);
565 static int loop_clr_fd(struct lloop_device *lo, struct block_device *bdev,
568 struct file *filp = lo->lo_backing_file;
569 int gfp = lo->old_gfp_mask;
571 if (lo->lo_state != LLOOP_BOUND)
574 if (lo->lo_refcnt > count) /* we needed one fd for the ioctl */
580 spin_lock_irq(&lo->lo_lock);
581 lo->lo_state = LLOOP_RUNDOWN;
582 spin_unlock_irq(&lo->lo_lock);
583 cfs_waitq_signal(&lo->lo_bh_wait);
586 lo->lo_backing_file = NULL;
588 lo->lo_device = NULL;
590 lo->lo_sizelimit = 0;
592 ll_invalidate_bdev(bdev, 0);
593 set_capacity(disks[lo->lo_number], 0);
594 bd_set_size(bdev, 0);
595 mapping_set_gfp_mask(filp->f_mapping, gfp);
596 lo->lo_state = LLOOP_UNBOUND;
598 /* This is safe: open() is still holding a reference. */
599 cfs_module_put(THIS_MODULE);
603 #ifdef HAVE_BLKDEV_PUT_2ARGS
604 static int lo_open(struct block_device *bdev, fmode_t mode)
606 struct lloop_device *lo = bdev->bd_disk->private_data;
608 static int lo_open(struct inode *inode, struct file *file)
610 struct lloop_device *lo = inode->i_bdev->bd_disk->private_data;
613 mutex_lock(&lo->lo_ctl_mutex);
615 mutex_unlock(&lo->lo_ctl_mutex);
620 #ifdef HAVE_BLKDEV_PUT_2ARGS
621 static int lo_release(struct gendisk *disk, fmode_t mode)
623 struct lloop_device *lo = disk->private_data;
625 static int lo_release(struct inode *inode, struct file *file)
627 struct lloop_device *lo = inode->i_bdev->bd_disk->private_data;
630 mutex_lock(&lo->lo_ctl_mutex);
632 mutex_unlock(&lo->lo_ctl_mutex);
637 /* lloop device node's ioctl function. */
638 #ifdef HAVE_BLKDEV_PUT_2ARGS
639 static int lo_ioctl(struct block_device *bdev, fmode_t mode,
640 unsigned int cmd, unsigned long arg)
642 struct lloop_device *lo = bdev->bd_disk->private_data;
643 struct inode *inode = NULL;
646 static int lo_ioctl(struct inode *inode, struct file *unused,
647 unsigned int cmd, unsigned long arg)
649 struct lloop_device *lo = inode->i_bdev->bd_disk->private_data;
650 struct block_device *bdev = inode->i_bdev;
654 mutex_lock(&lloop_mutex);
656 case LL_IOC_LLOOP_DETACH: {
657 err = loop_clr_fd(lo, bdev, 2);
659 ll_blkdev_put(bdev, 0); /* grabbed in LLOOP_ATTACH */
663 case LL_IOC_LLOOP_INFO: {
666 LASSERT(lo->lo_backing_file != NULL);
668 inode = lo->lo_backing_file->f_dentry->d_inode;
669 if (lo->lo_state == LLOOP_BOUND)
670 fid = ll_i2info(inode)->lli_fid;
674 if (copy_to_user((struct lu_fid *)arg, &fid, sizeof(fid)))
683 mutex_unlock(&lloop_mutex);
688 static struct block_device_operations lo_fops = {
689 .owner = THIS_MODULE,
691 .release = lo_release,
695 /* dynamic iocontrol callback.
696 * This callback is registered in lloop_init and will be called by
699 * This is a llite regular file ioctl function. It takes the responsibility
700 * of attaching or detaching a file by a lloop's device numner.
702 static enum llioc_iter lloop_ioctl(struct inode *unused, struct file *file,
703 unsigned int cmd, unsigned long arg,
704 void *magic, int *rcp)
706 struct lloop_device *lo = NULL;
707 struct block_device *bdev = NULL;
711 if (magic != ll_iocontrol_magic)
715 GOTO(out1, err = -ENODEV);
717 CWARN("Enter llop_ioctl\n");
719 mutex_lock(&lloop_mutex);
721 case LL_IOC_LLOOP_ATTACH: {
722 struct lloop_device *lo_free = NULL;
725 for (i = 0; i < max_loop; i++, lo = NULL) {
727 if (lo->lo_state == LLOOP_UNBOUND) {
732 if (lo->lo_backing_file->f_dentry->d_inode ==
733 file->f_dentry->d_inode)
737 GOTO(out, err = -EBUSY);
740 dev = MKDEV(lloop_major, lo->lo_number);
742 /* quit if the used pointer is writable */
743 if (put_user((long)old_encode_dev(dev), (long*)arg))
744 GOTO(out, err = -EFAULT);
746 bdev = blkdev_get_by_dev(dev, file->f_mode, NULL);
748 GOTO(out, err = PTR_ERR(bdev));
751 err = loop_set_fd(lo, NULL, bdev, file);
754 ll_blkdev_put(bdev, 0);
760 case LL_IOC_LLOOP_DETACH_BYDEV: {
763 dev = old_decode_dev(arg);
764 if (MAJOR(dev) != lloop_major)
765 GOTO(out, err = -EINVAL);
768 if (minor > max_loop - 1)
769 GOTO(out, err = -EINVAL);
771 lo = &loop_dev[minor];
772 if (lo->lo_state != LLOOP_BOUND)
773 GOTO(out, err = -EINVAL);
775 bdev = lo->lo_device;
776 err = loop_clr_fd(lo, bdev, 1);
778 ll_blkdev_put(bdev, 0); /* grabbed in LLOOP_ATTACH */
789 mutex_unlock(&lloop_mutex);
796 static int __init lloop_init(void)
799 unsigned int cmdlist[] = {
801 LL_IOC_LLOOP_DETACH_BYDEV,
804 if (max_loop < 1 || max_loop > 256) {
805 max_loop = MAX_LOOP_DEFAULT;
806 CWARN("lloop: invalid max_loop (must be between"
807 " 1 and 256), using default (%u)\n", max_loop);
810 lloop_major = register_blkdev(0, "lloop");
814 CDEBUG(D_CONFIG, "registered lloop major %d with %u minors\n",
815 lloop_major, max_loop);
817 ll_iocontrol_magic = ll_iocontrol_register(lloop_ioctl, 2, cmdlist);
818 if (ll_iocontrol_magic == NULL)
821 OBD_ALLOC_WAIT(loop_dev, max_loop * sizeof(*loop_dev));
825 OBD_ALLOC_WAIT(disks, max_loop * sizeof(*disks));
829 for (i = 0; i < max_loop; i++) {
830 disks[i] = alloc_disk(1);
835 mutex_init(&lloop_mutex);
837 for (i = 0; i < max_loop; i++) {
838 struct lloop_device *lo = &loop_dev[i];
839 struct gendisk *disk = disks[i];
841 lo->lo_queue = blk_alloc_queue(GFP_KERNEL);
845 mutex_init(&lo->lo_ctl_mutex);
846 sema_init(&lo->lo_sem, 0);
847 cfs_waitq_init(&lo->lo_bh_wait);
849 spin_lock_init(&lo->lo_lock);
850 disk->major = lloop_major;
851 disk->first_minor = i;
852 disk->fops = &lo_fops;
853 sprintf(disk->disk_name, "lloop%d", i);
854 disk->private_data = lo;
855 disk->queue = lo->lo_queue;
858 /* We cannot fail after we call this, so another loop!*/
859 for (i = 0; i < max_loop; i++)
865 blk_cleanup_queue(loop_dev[i].lo_queue);
870 OBD_FREE(disks, max_loop * sizeof(*disks));
872 OBD_FREE(loop_dev, max_loop * sizeof(*loop_dev));
874 unregister_blkdev(lloop_major, "lloop");
875 ll_iocontrol_unregister(ll_iocontrol_magic);
876 CERROR("lloop: ran out of memory\n");
880 static void lloop_exit(void)
884 ll_iocontrol_unregister(ll_iocontrol_magic);
885 for (i = 0; i < max_loop; i++) {
886 del_gendisk(disks[i]);
887 blk_cleanup_queue(loop_dev[i].lo_queue);
890 if (ll_unregister_blkdev(lloop_major, "lloop"))
891 CWARN("lloop: cannot unregister blkdev\n");
893 CDEBUG(D_CONFIG, "unregistered lloop major %d\n", lloop_major);
895 OBD_FREE(disks, max_loop * sizeof(*disks));
896 OBD_FREE(loop_dev, max_loop * sizeof(*loop_dev));
899 module_init(lloop_init);
900 module_exit(lloop_exit);
902 CFS_MODULE_PARM(max_loop, "i", int, 0444, "maximum of lloop_device");
903 MODULE_AUTHOR("Sun Microsystems, Inc. <http://www.lustre.org/>");
904 MODULE_DESCRIPTION("Lustre virtual block device");
905 MODULE_LICENSE("GPL");