1. 16 7月, 2008 1 次提交
  2. 05 7月, 2008 2 次提交
  3. 04 7月, 2008 5 次提交
  4. 03 7月, 2008 6 次提交
  5. 21 6月, 2008 2 次提交
  6. 13 6月, 2008 1 次提交
  7. 06 6月, 2008 1 次提交
  8. 30 5月, 2008 2 次提交
  9. 25 5月, 2008 1 次提交
    • M
      brd: don't show ramdisks in /proc/partitions · 53978d0a
      Marcin Krol 提交于
      In 2.6.25, ramdisk devices show up in /proc/partitions, which is a
      behaviour change from the old rd.c.  Add GENHD_FL_SUPPRESS_PARTITION_INFO,
      which was present in rd.c.
      
      All kernels prior to 2.6.25 weren't displaying ramdisks in
      /proc/partitions.  Since there are many userspace tools using information
      from /proc/partitions some of them may now behave incorrectly (I didn't
      tested any though).  For example before 2.6.25 /proc/partitions was empty
      if no block devices like hard disks and such were detected by kernel.  Now
      all 16 ramdisks are always visible there.  Some software may rely on such
      information (I mean, on empty /proc/partitions).
      
      There was quite similar situation back in 2004, and ramdisks were excluded
      back from displaying.  Thats why I called this a regression (maybe a bit
      unfortunate).  See this patch for info:
      http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.3-rc2/2.6.3-rc2-mm1/broken-out/nbd-proc-partitions-fix.patch
      
      I also think that someone somewhere (long time ago) excluded ramdisks from
      /proc/partitions for good reasons.  It is possible that now such new
      "feature" is harmless, but I think there are more chances that someone
      will say "hey, /proc/partitions has changed, now my software doesn't work"
      then "hey where did my new 2.6.25 feature go".  nbd devices are also
      excluded, maybe for very same (unknown to me) reasons.
      Signed-off-by: NMarcin Krol <hawk@pld-linux.org>
      Signed-off-by: NNick Piggin <npiggin@suse.de>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      53978d0a
  10. 23 5月, 2008 1 次提交
  11. 19 5月, 2008 1 次提交
  12. 07 5月, 2008 1 次提交
  13. 03 5月, 2008 4 次提交
  14. 02 5月, 2008 5 次提交
    • R
      virtio: add virtio disk geometry feature · 48e4043d
      Ryan Harper 提交于
      Rather than faking up some geometry, allow the backend to push the disk
      geometry via virtio pci config option.  Keep the old geo code around for
      compatibility.
      Signed-off-by: NRyan Harper <ryanh@us.ibm.com>
      Reviewed-by: NAnthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (modified to single struct)
      48e4043d
    • R
      virtio: explicit advertisement of driver features · c45a6816
      Rusty Russell 提交于
      A recent proposed feature addition to the virtio block driver revealed
      some flaws in the API: in particular, we assume that feature
      negotiation is complete once a driver's probe function returns.
      
      There is nothing in the API to require this, however, and even I
      didn't notice when it was violated.
      
      So instead, we require the driver to specify what features it supports
      in a table, we can then move the feature negotiation into the virtio
      core.  The intersection of device and driver features are presented in
      a new 'features' bitmap in the struct virtio_device.
      
      Note that this highlights the difference between Linux unsigned-long
      bitmaps where each unsigned long is in native endian, and a
      straight-forward little-endian array of bytes.
      
      Drivers can still remove feature bits in their probe routine if they
      really have to.
      
      API changes:
      - dev->config->feature() no longer gets and acks a feature.
      - drivers should advertise their features in the 'feature_table' field
      - use virtio_has_feature() for extra sanity when checking feature bits
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      c45a6816
    • R
      virtio: change config to guest endian. · 72e61eb4
      Rusty Russell 提交于
      A recent proposed feature addition to the virtio block driver revealed
      some flaws in the API, in particular how easy it is to break big
      endian machines.
      
      The virtio config space was originally chosen to be little-endian,
      because we thought the config might be part of the PCI config space
      for virtio_pci.  It's actually a separate mmio region, so that
      argument holds little water; as only x86 is currently using the virtio
      mechanism, we can change this (but must do so now, before the
      impending s390 merge).
      
      API changes:
      - __virtio_config_val() just becomes a striaght vdev->config_get() call.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      72e61eb4
    • M
      virtio-blk: fix remove oops · 2e895e4c
      Marcelo Tosatti 提交于
      Do not unregister the major at device remove, since there might be
      another device instances around.
      
      (qemu) pci_del 0 11
      (qemu) ACPI: PCI interrupt for device 0000:00:0b.0 disabled
      (qemu) pci_del 0 10
      (qemu) ------------[ cut here ]------------
      WARNING: at block/genhd.c:126 unregister_blkdev+0x74/0x9e()
      ACPI: PCI interrupt for device 0000:00:0a.0 disabled
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      2e895e4c
    • R
      virtio: de-structify virtio_block status byte · cb38fa23
      Rusty Russell 提交于
      Ron Minnich points out that a struct containing a char is not always
      sizeof(char); simplest to remove the structure to avoid confusion.
      
      Cc: "ron minnich" <rminnich@gmail.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      cb38fa23
  15. 01 5月, 2008 1 次提交
  16. 30 4月, 2008 1 次提交
    • L
      brd: modify ramdisk device to be able to manage partitions · d7853d1f
      Laurent Vivier 提交于
      This patch adds partition management for Block RAM Device (BRD).
      
      This patch is done to keep in sync BRD and loop device drivers.
      
      This patch adds a parameter to the module, max_part, to specify
      the maximum number of partitions per RAM device.
      
      Example:
      
      # modprobe brd max_part=63
      # ls -l /dev/ram*
      brw-rw---- 1 root disk 1,   0 2008-04-03 13:39 /dev/ram0
      brw-rw---- 1 root disk 1,  64 2008-04-03 13:39 /dev/ram1
      brw-rw---- 1 root disk 1, 640 2008-04-03 13:39 /dev/ram10
      brw-rw---- 1 root disk 1, 704 2008-04-03 13:39 /dev/ram11
      brw-rw---- 1 root disk 1, 768 2008-04-03 13:39 /dev/ram12
      brw-rw---- 1 root disk 1, 832 2008-04-03 13:39 /dev/ram13
      brw-rw---- 1 root disk 1, 896 2008-04-03 13:39 /dev/ram14
      brw-rw---- 1 root disk 1, 960 2008-04-03 13:39 /dev/ram15
      brw-rw---- 1 root disk 1, 128 2008-04-03 13:39 /dev/ram2
      brw-rw---- 1 root disk 1, 192 2008-04-03 13:39 /dev/ram3
      brw-rw---- 1 root disk 1, 256 2008-04-03 13:39 /dev/ram4
      brw-rw---- 1 root disk 1, 320 2008-04-03 13:39 /dev/ram5
      brw-rw---- 1 root disk 1, 384 2008-04-03 13:39 /dev/ram6
      brw-rw---- 1 root disk 1, 448 2008-04-03 13:39 /dev/ram7
      brw-rw---- 1 root disk 1, 512 2008-04-03 13:39 /dev/ram8
      brw-rw---- 1 root disk 1, 576 2008-04-03 13:39 /dev/ram9
      # fdisk /dev/ram0
      Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
      Building a new DOS disklabel. Changes will remain in memory only,
      until you decide to write them. After that, of course, the previous
      content won't be recoverable.
      
      Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
      
      Command (m for help): o
      Building a new DOS disklabel. Changes will remain in memory only,
      until you decide to write them. After that, of course, the previous
      content won't be recoverable.
      
      Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
      
      Command (m for help): n
      Command action
         e   extended
         p   primary partition (1-4)
      p
      Partition number (1-4): 1
      First cylinder (1-2, default 1): 1
      Last cylinder or +size or +sizeM or +sizeK (1-2, default 2): 2
      
      Command (m for help): w
      The partition table has been altered!
      
      Calling ioctl() to re-read partition table.
      Syncing disks.
      # ls -l /dev/ram0*
      brw-rw---- 1 root disk 1, 0 2008-04-03 13:40 /dev/ram0
      brw-rw---- 1 root disk 1, 1 2008-04-03 13:40 /dev/ram0p1
      # mkfs /dev/ram0p1
      mke2fs 1.40-WIP (14-Nov-2006)
      Filesystem label=
      OS type: Linux
      Block size=1024 (log=0)
      Fragment size=1024 (log=0)
      4016 inodes, 16032 blocks
      801 blocks (5.00%) reserved for the super user
      First data block=1
      Maximum filesystem blocks=16515072
      2 block groups
      8192 blocks per group, 8192 fragments per group
      2008 inodes per group
      Superblock backups stored on blocks:
      	8193
      
      Writing inode tables: done
      Writing superblocks and filesystem accounting information: done
      
      This filesystem will be automatically checked every 26 mounts or
      180 days, whichever comes first.  Use tune2fs -c or -i to override.
      # mount /dev/ram0p1 /mnt
      df /mnt
      Filesystem           1K-blocks      Used Available Use% Mounted on
      /dev/ram0p1              15521       138     14582   1% /mnt
      # ls -l /mnt
      total 12
      drwx------ 2 root root 12288 2008-04-03 13:41 lost+found
      # umount /mnt
      # rmmod brd
      Signed-off-by: NLaurent Vivier <Laurent.Vivier@bull.net>
      Acked-by: NNick Piggin <nickpiggin@yahoo.com.au>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d7853d1f
  17. 29 4月, 2008 5 次提交
    • H
      drivers/block: use get_unaligned_* helpers · f885f8d1
      Harvey Harrison 提交于
      Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Cc: Ed L. Cashin <ecashin@coraid.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>
      f885f8d1
    • H
      Remove duplicated unlikely() in IS_ERR() · 801678c5
      Hirofumi Nakagawa 提交于
      Some drivers have duplicated unlikely() macros.  IS_ERR() already has
      unlikely() in itself.
      
      This patch cleans up such pointless code.
      Signed-off-by: NHirofumi Nakagawa <hnakagawa@miraclelinux.com>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Acked-by: NJeff Garzik <jeff@garzik.org>
      Cc: Paul Clements <paul.clements@steeleye.com>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: David Brownell <david-b@pacbell.net>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Michael Halcrow <mhalcrow@us.ibm.com>
      Cc: Anton Altaparmakov <aia21@cantab.net>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Carsten Otte <cotte@de.ibm.com>
      Cc: Patrick McHardy <kaber@trash.net>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Jaroslav Kysela <perex@perex.cz>
      Cc: Takashi Iwai <tiwai@suse.de>
      Acked-by: NMike Frysinger <vapier@gentoo.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      801678c5
    • A
      remove aoedev_isbusy() · 03021904
      Adrian Bunk 提交于
      Remove the no longer used aoedev_isbusy().
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Cc: "Ed L. Cashin" <ecashin@coraid.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      03021904
    • L
      NBD: add partition support · d71a6d73
      Laurent Vivier 提交于
      Permit the use of partitions with network block devices (NBD).
      
      A new parameter is introduced to define how many partition we want to be able
      to manage per network block device.  This parameter is "max_part".
      
      For instance, to manage 63 partitions / loop device, we will do:
      
         [on the server side]
      # nbd-server 1234 /dev/sdb
         [on the client side]
      # modprobe nbd max_part=63
      # ls -l /dev/nbd*
      brw-rw---- 1 root disk 43,   0 2008-03-25 11:14 /dev/nbd0
      brw-rw---- 1 root disk 43,  64 2008-03-25 11:11 /dev/nbd1
      brw-rw---- 1 root disk 43, 640 2008-03-25 11:11 /dev/nbd10
      brw-rw---- 1 root disk 43, 704 2008-03-25 11:11 /dev/nbd11
      brw-rw---- 1 root disk 43, 768 2008-03-25 11:11 /dev/nbd12
      brw-rw---- 1 root disk 43, 832 2008-03-25 11:11 /dev/nbd13
      brw-rw---- 1 root disk 43, 896 2008-03-25 11:11 /dev/nbd14
      brw-rw---- 1 root disk 43, 960 2008-03-25 11:11 /dev/nbd15
      brw-rw---- 1 root disk 43, 128 2008-03-25 11:11 /dev/nbd2
      brw-rw---- 1 root disk 43, 192 2008-03-25 11:11 /dev/nbd3
      brw-rw---- 1 root disk 43, 256 2008-03-25 11:11 /dev/nbd4
      brw-rw---- 1 root disk 43, 320 2008-03-25 11:11 /dev/nbd5
      brw-rw---- 1 root disk 43, 384 2008-03-25 11:11 /dev/nbd6
      brw-rw---- 1 root disk 43, 448 2008-03-25 11:11 /dev/nbd7
      brw-rw---- 1 root disk 43, 512 2008-03-25 11:11 /dev/nbd8
      brw-rw---- 1 root disk 43, 576 2008-03-25 11:11 /dev/nbd9
      # nbd-client localhost 1234 /dev/nbd0
      Negotiation: ..size = 80418240KB
      bs=1024, sz=80418240
      
      -------NOTE, RFC: partition table is not automatically read.
      The driver sets bdev->bd_invalidated to 1 to force the read of the partition
      table of the device, but this is done only on an open of the device.
      So we have to do a "touch /dev/nbdX" or something like that.
      It can't be done from the nbd-client or nbd driver because at this
      level we can't ask to read the partition table and to serve the request
      at the same time (-> deadlock)
      
      If someone has a better idea, I'm open to any suggestion.
      -------NOTE, RFC
      
      # fdisk -l /dev/nbd0
      
      Disk /dev/nbd0: 82.3 GB, 82348277760 bytes
      255 heads, 63 sectors/track, 10011 cylinders
      Units = cylinders of 16065 * 512 = 8225280 bytes
      
           Device Boot      Start         End      Blocks   Id  System
      /dev/nbd0p1   *           1        9965    80043831   83  Linux
      /dev/nbd0p2            9966       10011      369495    5  Extended
      /dev/nbd0p5            9966       10011      369463+  82  Linux swap / Solaris
      
      # ls -l /dev/nbd0*
      brw-rw---- 1 root disk 43,   0 2008-03-25 11:16 /dev/nbd0
      brw-rw---- 1 root disk 43,   1 2008-03-25 11:16 /dev/nbd0p1
      brw-rw---- 1 root disk 43,   2 2008-03-25 11:16 /dev/nbd0p2
      brw-rw---- 1 root disk 43,   5 2008-03-25 11:16 /dev/nbd0p5
      # mount /dev/nbd0p1 /mnt
      # ls /mnt
      bin    dev   initrd      lost+found  opt   sbin     sys  var
      boot   etc   initrd.img  media       proc  selinux  tmp  vmlinuz
      cdrom  home  lib         mnt         root  srv      usr
      # umount /mnt
      # nbd-client -d /dev/nbd0
      # ls -l /dev/nbd0*
      brw-rw---- 1 root disk 43, 0 2008-03-25 11:16 /dev/nbd0
      -------NOTE
      On "nbd-client -d", we can do an iocl(BLKRRPART) to update partition table:
      as the size of the device is 0, we don't have to serve the partition manager
      request (-> no deadlock).
      -------NOTE
      Signed-off-by: NPaul Clements <paul.clements@steeleye.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>
      d71a6d73
    • L
      NBD: allow nbd to be used locally · 48cf6061
      Laurent Vivier 提交于
      This patch allows Network Block Device to be mounted locally (nbd-client to
      nbd-server over 127.0.0.1).
      
      It creates a kthread to avoid the deadlock described in NBD tools
      documentation.  So, if nbd-client hangs waiting for pages, the kblockd thread
      can continue its work and free pages.
      
      I have tested the patch to verify that it avoids the hang that always occurs
      when writing to a localhost nbd connection.  I have also tested to verify that
      no performance degradation results from the additional thread and queue.
      
      Patch originally from Laurent Vivier.
      Signed-off-by: NPaul Clements <paul.clements@steeleye.com>
      Signed-off-by: NLaurent Vivier <Laurent.Vivier@bull.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      48cf6061