1. 29 10月, 2009 1 次提交
    • A
      loop: fix NULL dereference if mount fails · cf6e6932
      Alexey Dobriyan 提交于
      Commit bb214884 ("[PATCH] switch loop")
      started to pass NULL bdev to ioctl hook.
      
      Steps to reproduce:
      
      	[boot with loop.max_part=1]
      	[mount -o loop something so mount fails]
      
      BUG: unable to handle kernel NULL pointer dereference at 00000000000000b8
      IP: [<ffffffff811486ee>] blkdev_ioctl+0x2e/0xa30
      PGD 0
      Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
      last sysfs file: /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:35/ACPI0003:00/power_supply/ACAD/online
      CPU 0
      Modules linked in: zfs nvidia(P) [last unloaded: zfs]
      Pid: 15177, comm: mount Tainted: P           2.6.32-rc4-zfs #2 Satellite X200
      RIP: 0010:[<ffffffff811486ee>]  [<ffffffff811486ee>] blkdev_ioctl+0x2e/0xa30
      RSP: 0018:ffff88003b3d5bb8  EFLAGS: 00010286
      RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
      RDX: 000000000000125f RSI: 0000000000000000 RDI: 0000000000000000
      RBP: ffff88003b3d5ce8 R08: 0000000000000000 R09: 0000000000000000
      R10: 0000000000000000 R11: 0000000000000000 R12: 00007ffffffff000
      R13: 0000000000000000 R14: ffff880071cef280 R15: 00000000000200da
      FS:  00007fd77cfe7740(0000) GS:ffff880001600000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
      CR2: 00000000000000b8 CR3: 0000000001001000 CR4: 00000000000026f0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      Process mount (pid: 15177, threadinfo ffff88003b3d4000, task ffff88007572f920)
      Stack:
       ffff88003b3d5c38 ffffffff812f95f5 ffff88007eeb6600 0000000000000000
      <0> 0000000000000000 ffff88003b3d5c18 ffffffff811547d9 ffff88001bf11ef0
      <0> 7fffffffffffffff ffff88001bf11ee8 ffff88001bf11ef0 0000000000000000
      Call Trace:
       [<ffffffff812f95f5>] ? schedule_timeout+0x1f5/0x250
       [<ffffffff811547d9>] ? rb_insert_color+0x109/0x140
       [<ffffffff812fb754>] ? _spin_unlock_irq+0x14/0x40
       [<ffffffff812f84c6>] ? wait_for_common+0x66/0x170
       [<ffffffff8105a280>] ? default_wake_function+0x0/0x10
       [<ffffffff810f8258>] ioctl_by_bdev+0x38/0x50
       [<ffffffff811d2481>] loop_clr_fd+0x1e1/0x210
       [<ffffffff811d2522>] lo_release+0x72/0x80
       [<ffffffff810f934c>] __blkdev_put+0x1ac/0x1d0
       [<ffffffff810f937b>] blkdev_put+0xb/0x10
       [<ffffffff810f93b9>] blkdev_close+0x39/0x60
       [<ffffffff810ccef3>] __fput+0xd3/0x230
       [<ffffffff810cd06d>] fput+0x1d/0x30
       [<ffffffff810c9680>] filp_close+0x50/0x80
       [<ffffffff81061f11>] put_files_struct+0x81/0x100
       [<ffffffff81061fde>] exit_files+0x4e/0x60
       [<ffffffff81063ec5>] do_exit+0x6b5/0x730
       [<ffffffff8107b279>] ? up_read+0x9/0x10
       [<ffffffff8104c86e>] ? do_page_fault+0x18e/0x2a0
       [<ffffffff81063f81>] do_group_exit+0x41/0xc0
       [<ffffffff81064012>] sys_exit_group+0x12/0x20
       [<ffffffff81030deb>] system_call_fastpath+0x16/0x1b
      Code: f8 48 89 e5 48 81 ec 30 01 00 00 48 89 5d d8 4c 89 6d e8 4c 89 65 e0 4c 89 75 f0 4c 89 7d f8 48 89 bd e8 fe ff ff 49 89 cd 89 f3 <49> 8b 88 b8 00 00 00 81 fa 68 12 00 00 0f 84 57 05 00 00 0f 86
      RIP  [<ffffffff811486ee>] blkdev_ioctl+0x2e/0xa30
       RSP <ffff88003b3d5bb8>
      CR2: 00000000000000b8
      ---[ end trace c0b4d3c3118d1427 ]---
      Fixing recursive fault but reboot is needed!
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cf6e6932
  2. 22 9月, 2009 1 次提交
  3. 11 9月, 2009 1 次提交
  4. 13 7月, 2009 1 次提交
  5. 11 5月, 2009 1 次提交
  6. 28 4月, 2009 1 次提交
  7. 07 4月, 2009 1 次提交
  8. 01 4月, 2009 1 次提交
    • J
      loop: add ioctl to resize a loop device · 53d66608
      J. R. Okajima 提交于
      Add the ability to 'resize' the loop device on the fly.
      
      One practical application is a loop file with XFS filesystem, already
      mounted: You can easily enlarge the file (append some bytes) and then call
      ioctl(fd, LOOP_SET_CAPACITY, new); The loop driver will learn about the
      new size and you can use xfs_growfs later on, which will allow you to use
      full capacity of the loop file without the need to unmount.
      
      Test app:
      
      #include <linux/fs.h>
      #include <linux/loop.h>
      #include <sys/ioctl.h>
      #include <sys/stat.h>
      #include <sys/types.h>
      #include <assert.h>
      #include <errno.h>
      #include <fcntl.h>
      #include <stdio.h>
      #include <stdlib.h>
      #include <unistd.h>
      
      #define _GNU_SOURCE
      #include <getopt.h>
      
      char *me;
      
      void usage(FILE *f)
      {
      	fprintf(f, "%s [options] loop_dev [backend_file]\n"
      		"-s, --set new_size_in_bytes\n"
      		"\twhen backend_file is given, "
      		"it will be expanded too while keeping the original contents\n",
      		me);
      }
      
      struct option opts[] = {
      	{
      		.name		= "set",
      		.has_arg	= 1,
      		.flag		= NULL,
      		.val		= 's'
      	},
      	{
      		.name		= "help",
      		.has_arg	= 0,
      		.flag		= NULL,
      		.val		= 'h'
      	}
      };
      
      void err_size(char *name, __u64 old)
      {
      	fprintf(stderr, "size must be larger than current %s (%llu)\n",
      		name, old);
      }
      
      int main(int argc, char *argv[])
      {
      	int fd, err, c, i, bfd;
      	ssize_t ssz;
      	size_t sz;
      	__u64 old, new, append;
      	char a[BUFSIZ];
      	struct stat st;
      	FILE *out;
      	char *backend, *dev;
      
      	err = EINVAL;
      	out = stderr;
      	me = argv[0];
      	new = 0;
      	while ((c = getopt_long(argc, argv, "s:h", opts, &i)) != -1) {
      		switch (c) {
      		case 's':
      			errno = 0;
      			new = strtoull(optarg, NULL, 0);
      			if (errno) {
      				err = errno;
      				perror(argv[i]);
      				goto out;
      			}
      			break;
      
      		case 'h':
      			err = 0;
      			out = stdout;
      			goto err;
      
      		default:
      			perror(argv[i]);
      			goto err;
      		}
      	}
      
      	if (optind < argc)
      		dev = argv[optind++];
      	else
      		goto err;
      
      	fd = open(dev, O_RDONLY);
      	if (fd < 0) {
      		err = errno;
      		perror(dev);
      		goto out;
      	}
      
      	err = ioctl(fd, BLKGETSIZE64, &old);
      	if (err) {
      		err = errno;
      		perror("ioctl BLKGETSIZE64");
      		goto out;
      	}
      
      	if (!new) {
      		printf("%llu\n", old);
      		goto out;
      	}
      
      	if (new < old) {
      		err = EINVAL;
      		err_size(dev, old);
      		goto out;
      	}
      
      	if (optind < argc) {
      		backend = argv[optind++];
      		bfd = open(backend, O_WRONLY|O_APPEND);
      		if (bfd < 0) {
      			err = errno;
      			perror(backend);
      			goto out;
      		}
      		err = fstat(bfd, &st);
      		if (err) {
      			err = errno;
      			perror(backend);
      			goto out;
      		}
      		if (new < st.st_size) {
      			err = EINVAL;
      			err_size(backend, st.st_size);
      			goto out;
      		}
      		append = new - st.st_size;
      		sz = sizeof(a);
      		while (append > 0) {
      			if (append < sz)
      				sz = append;
      			ssz = write(bfd, a, sz);
      			if (ssz != sz) {
      				err = errno;
      				perror(backend);
      				goto out;
      			}
      			append -= sz;
      		}
      		err = fsync(bfd);
      		if (err) {
      			err = errno;
      			perror(backend);
      			goto out;
      		}
      	}
      
      	err = ioctl(fd, LOOP_SET_CAPACITY, new);
      	if (err) {
      		err = errno;
      		perror("ioctl LOOP_SET_CAPACITY");
      	}
      	goto out;
      
       err:
      	usage(out);
       out:
      	return err;
      }
      Signed-off-by: NJ. R. Okajima <hooanon05@yahoo.co.jp>
      Signed-off-by: NTomas Matejicek <tomas@slax.org>
      Cc: <util-linux-ng@vger.kernel.org>
      Cc: Karel Zak <kzak@redhat.com>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Akinobu Mita <akinobu.mita@gmail.com>
      Cc: <linux-api@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      53d66608
  9. 26 3月, 2009 1 次提交
    • N
      loop: fix circular locking in loop_clr_fd() · f028f3b2
      Nikanth Karthikesan 提交于
      With CONFIG_PROVE_LOCKING enabled
      
      $ losetup /dev/loop0 file
      $ losetup -o 32256 /dev/loop1 /dev/loop0
      
      $ losetup -d /dev/loop1
      $ losetup -d /dev/loop0
      
      triggers a [ INFO: possible circular locking dependency detected ]
      
      I think this warning is a false positive.
      
      Open/close on a loop device acquires bd_mutex of the device before
      acquiring lo_ctl_mutex of the same device. For ioctl(LOOP_CLR_FD) after
      acquiring lo_ctl_mutex, fput on the backing_file might acquire the bd_mutex of
      a device, if backing file is a device and this is the last reference to the
      file being dropped . But it is guaranteed that it is impossible to have a
      circular list of backing devices.(say loop2->loop1->loop0->loop2 is not
      possible), which guarantees that this can never deadlock.
      
      So this warning should be suppressed. It is very difficult to annotate lockdep
      not to warn here in the correct way. A simple way to silence lockdep could be
      to mark the lo_ctl_mutex in ioctl to be a sub class, but this might mask some
      other real bugs.
      
      @@ -1164,7 +1164,7 @@ static int lo_ioctl(struct block_device *bdev, fmode_t mode,
       	struct loop_device *lo = bdev->bd_disk->private_data;
       	int err;
      
      -	mutex_lock(&lo->lo_ctl_mutex);
      +	mutex_lock_nested(&lo->lo_ctl_mutex, 1);
       	switch (cmd) {
       	case LOOP_SET_FD:
       		err = loop_set_fd(lo, mode, bdev, arg);
      
      Or actually marking the bd_mutex after lo_ctl_mutex as a sub class could be
      a better solution.
      
      Luckily it is easy to avoid calling fput on backing file with lo_ctl_mutex
      held, so no lockdep annotation is required.
      
      If you do not like the special handling of the lo_ctl_mutex just for the
      LOOP_CLR_FD ioctl in lo_ioctl(), the mutex handling could be moved inside
      each of the individual ioctl handlers and I could send you another patch.
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      f028f3b2
  10. 24 3月, 2009 1 次提交
  11. 05 3月, 2009 1 次提交
  12. 29 12月, 2008 2 次提交
    • M
      loop: Do not call loop_unplug for not configured loop device. · 8ae30b89
      Milan Broz 提交于
      In loop_unplug() function is expected that mapping is set
      and lo->lo_backing_file is not NULL.
      
      Unfortunately loop_set_fd() set the request queue unplug function,
      but loop_clr_fd() doesn't clear that.
      
      Loop device allows open of non-configured loop in some situations.
      If the unplug on request queue is called, loop module oopses because
      of missing lo_backing_file.
      
      Simple reproducer:
      	losetup /dev/loop0 /xxx
      	losetup -d /dev/loop0
      	dmsetup create x --table "0 1 linear /dev/loop0 0"
      
       EIP is at loop_unplug+0x1d/0x3b
       ...
        Call Trace:
         blk_unplug+0x57/0x5e
         dm_table_unplug_all+0x34/0x77 [dm_mod]
         destroy_inode+0x27/0x38
         generic_delete_inode+0xd5/0xd9
         iput+0x4b/0x4e
         dm_resume+0xca/0xfe [dm_mod]
         dev_suspend+0x143/0x165 [dm_mod]
         dm_ctl_ioctl+0x18e/0x1cf [dm_mod]
         dev_suspend+0x0/0x165 [dm_mod]
         dm_ctl_ioctl+0x0/0x1cf [dm_mod]
         vfs_ioctl+0x22/0x69
         do_vfs_ioctl+0x39d/0x3c7
         trace_hardirqs_on+0xb/0xd
         remove_vma+0x50/0x56
         do_munmap+0x21c/0x237
         sys_ioctl+0x2c/0x45
         sysenter_do_call+0x12/0x31
      
      Several reports here
      http://www.kerneloops.org/search.php?search=loop_unplug
      
      Fix it by simply clear unplug function together with
      removing of backing file.
      Signed-off-by: NMilan Broz <mbroz@redhat.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      8ae30b89
    • M
      loop: Flush possible running bios when loop device is released. · 14f27939
      Milan Broz 提交于
      When there are still queued bios and reference count
      drops to zero, loop device must flush all queued bios.
      
      Otherwise it can lead to situation that caller
      closes the device, but some bios are still running
      and endio() function call later OOpses when uses
      unallocated mempool.
      
      This happens for example when running dm-crypt over loop,
      here is typical oops backtrace:
      
       Oops: 0000 [#1] PREEMPT SMP
       EIP is at mempool_free+0x12/0x6b
      ...
       crypt_dec_pending+0x50/0x54 [dm_crypt]
       crypt_endio+0x9f/0xa7 [dm_crypt]
       crypt_endio+0x0/0xa7 [dm_crypt]
       bio_endio+0x2b/0x2e
       loop_thread+0x37a/0x3b1
       do_lo_send_aops+0x0/0x165
       autoremove_wake_function+0x0/0x33
       loop_thread+0x0/0x3b1
       kthread+0x3b/0x61
       kthread+0x0/0x61
       kernel_thread_helper+0x7/0x10
      
      (But crash is reproducible with different dm targets
      running over loop device too.)
      
      Patch fixes it by flushing the bios in release call,
      reusing the flush mechanism for switching backing store.
      Signed-off-by: NMilan Broz <mbroz@redhat.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      14f27939
  13. 14 11月, 2008 1 次提交
  14. 31 10月, 2008 1 次提交
  15. 21 10月, 2008 3 次提交
    • A
      511de73f
    • A
      [PATCH] switch loop · bb214884
      Al Viro 提交于
      ioctl doesn't need BKL here
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      bb214884
    • A
      [PATCH] beginning of methods conversion · d4430d62
      Al Viro 提交于
      To keep the size of changesets sane we split the switch by drivers;
      to keep the damn thing bisectable we do the following:
      	1) rename the affected methods, add ones with correct
      prototypes, make (few) callers handle both.  That's this changeset.
      	2) for each driver convert to new methods.  *ALL* drivers
      are converted in this series.
      	3) kill the old (renamed) methods.
      
      Note that it _is_ a flagday; all in-tree drivers are converted and by the
      end of this series no trace of old methods remain.  The only reason why
      we do that this way is to keep the damn thing bisectable and allow per-driver
      debugging if anything goes wrong.
      
      New methods:
      	open(bdev, mode)
      	release(disk, mode)
      	ioctl(bdev, mode, cmd, arg)		/* Called without BKL */
      	compat_ioctl(bdev, mode, cmd, arg)
      	locked_ioctl(bdev, mode, cmd, arg)	/* Called with BKL, legacy */
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      d4430d62
  16. 29 4月, 2008 1 次提交
  17. 21 4月, 2008 1 次提交
    • L
      loop: manage partitions in disk image · 476a4813
      Laurent Vivier 提交于
      This patch allows to use loop device with partitionned disk image.
      
      Original behavior of loop is not modified.
      
      A new parameter is introduced to define how many partition we want to be
      able to manage per loop device. This parameter is "max_part".
      
      For instance, to manage 63 partitions / loop device, we will do:
      # modprobe loop max_part=63
      # ls -l /dev/loop?*
      brw-rw---- 1 root disk 7,   0 2008-03-05 14:55 /dev/loop0
      brw-rw---- 1 root disk 7,  64 2008-03-05 14:55 /dev/loop1
      brw-rw---- 1 root disk 7, 128 2008-03-05 14:55 /dev/loop2
      brw-rw---- 1 root disk 7, 192 2008-03-05 14:55 /dev/loop3
      brw-rw---- 1 root disk 7, 256 2008-03-05 14:55 /dev/loop4
      brw-rw---- 1 root disk 7, 320 2008-03-05 14:55 /dev/loop5
      brw-rw---- 1 root disk 7, 384 2008-03-05 14:55 /dev/loop6
      brw-rw---- 1 root disk 7, 448 2008-03-05 14:55 /dev/loop7
      
      And to attach a raw partitionned disk image, the original losetup is used:
      
      # losetup -f etch.img
      # ls -l /dev/loop?*
      brw-rw---- 1 root disk 7,   0 2008-03-05 14:55 /dev/loop0
      brw-rw---- 1 root disk 7,   1 2008-03-05 14:57 /dev/loop0p1
      brw-rw---- 1 root disk 7,   2 2008-03-05 14:57 /dev/loop0p2
      brw-rw---- 1 root disk 7,   5 2008-03-05 14:57 /dev/loop0p5
      brw-rw---- 1 root disk 7,  64 2008-03-05 14:55 /dev/loop1
      brw-rw---- 1 root disk 7, 128 2008-03-05 14:55 /dev/loop2
      brw-rw---- 1 root disk 7, 192 2008-03-05 14:55 /dev/loop3
      brw-rw---- 1 root disk 7, 256 2008-03-05 14:55 /dev/loop4
      brw-rw---- 1 root disk 7, 320 2008-03-05 14:55 /dev/loop5
      brw-rw---- 1 root disk 7, 384 2008-03-05 14:55 /dev/loop6
      brw-rw---- 1 root disk 7, 448 2008-03-05 14:55 /dev/loop7
      # mount /dev/loop0p1 /mnt
      # ls /mnt
      bench  cdrom  home        lib         mnt   root     srv  usr
      bin    dev    initrd      lost+found  opt   sbin     sys  var
      boot   etc    initrd.img  media       proc  selinux  tmp  vmlinuz
      # umount /mnt
      # losetup -d /dev/loop0
      
      Of course, the same behavior can be done using kpartx on a loop device,
      but modifying loop avoids to stack several layers of block device (loop +
      device mapper), this is a very light modification (40% of modifications
      are to manage the new parameter).
      Signed-off-by: NLaurent Vivier <Laurent.Vivier@bull.net>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      476a4813
  18. 07 2月, 2008 1 次提交
    • D
      Allow auto-destruction of loop devices · 96c58655
      David Woodhouse 提交于
      This allows a flag to be set on loop devices so that when they are
      closed for the last time, they'll self-destruct.
      
      In general, so that we can automatically allocate loop devices (as with
      losetup -f) and have them disappear when we're done with them.
      
      In particular, right now, so that we can stop relying on the hackish
      special-case in umount(8) which kills off loop devices which were set up by
      'mount -oloop'.  That means we can stop putting crap in /etc/mtab which
      doesn't belong there, which means it can be a symlink to /proc/mounts, which
      means yet another writable file on the root filesystem is eliminated and the
      'stateless' folks get happier...  and OLPC trac #356 can be closed.
      
      The mount(8) side of that is at
      http://marc.info/?l=util-linux-ng&m=119362955431694&w=2
      
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      Cc: Bernardo Innocenti <bernie@codewiz.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      96c58655
  19. 11 1月, 2008 1 次提交
  20. 20 10月, 2007 1 次提交
  21. 17 10月, 2007 3 次提交
  22. 10 10月, 2007 1 次提交
  23. 24 7月, 2007 1 次提交
  24. 18 7月, 2007 2 次提交
  25. 10 7月, 2007 3 次提交
  26. 09 6月, 2007 1 次提交
  27. 14 5月, 2007 1 次提交
    • A
      fix deadlock in loop.c · 705962cc
      Al Viro 提交于
      ... doh
      
      Jeremy Fitzhardinge noted that the recent loop.c cleanups worked, but
      cause lockdep to complain.
      
      Ouch.  OK, the deadlock is real and yes, I'm an idiot.  Speaking of which,
      we probably want to s/lock/pin/ in drivers/base/map.c to avoid such
      brainos again.  And yes, this stuff needs clear documentation.  Will try
      to put one together once I get some sleep...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      705962cc
  28. 13 5月, 2007 1 次提交
  29. 10 5月, 2007 1 次提交
    • N
      fs: convert core functions to zero_user_page · 01f2705d
      Nate Diller 提交于
      It's very common for file systems to need to zero part or all of a page,
      the simplist way is just to use kmap_atomic() and memset().  There's
      actually a library function in include/linux/highmem.h that does exactly
      that, but it's confusingly named memclear_highpage_flush(), which is
      descriptive of *how* it does the work rather than what the *purpose* is.
      So this patchset renames the function to zero_user_page(), and calls it
      from the various places that currently open code it.
      
      This first patch introduces the new function call, and converts all the
      core kernel callsites, both the open-coded ones and the old
      memclear_highpage_flush() ones.  Following this patch is a series of
      conversions for each file system individually, per AKPM, and finally a
      patch deprecating the old call.  The diffstat below shows the entire
      patchset.
      
      [akpm@linux-foundation.org: fix a few things]
      Signed-off-by: NNate Diller <nate.diller@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      01f2705d
  30. 09 5月, 2007 1 次提交
    • K
      remove artificial software max_loop limit · 73285082
      Ken Chen 提交于
      Remove artificial maximum 256 loop device that can be created due to a
      legacy device number limit.  Searching through lkml archive, there are
      several instances where users complained about the artificial limit that
      the loop driver impose.  There is no reason to have such limit.
      
      This patch rid the limit entirely and make loop device and associated block
      queue instantiation on demand.  With on-demand instantiation, it also gives
      the benefit of not wasting memory if these devices are not in use (compare
      to current implementation that always create 8 loop devices), a net
      improvement in both areas.  This version is both tested with creation of
      large number of loop devices and is compatible with existing losetup/mount
      user land tools.
      
      There are a number of people who worked on this and provided valuable
      suggestions, in no particular order, by:
      
      Jens Axboe
      Jan Engelhardt
      Christoph Hellwig
      Thomas M
      Signed-off-by: NKen Chen <kenchen@google.com>
      Cc: Jan Engelhardt <jengelh@linux01.gwdg.de>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      73285082
  31. 08 5月, 2007 1 次提交
  32. 09 12月, 2006 1 次提交