1. 29 12月, 2008 1 次提交
  2. 21 10月, 2008 2 次提交
    • A
      [PATCH] switch nbd · a8cdc308
      Al Viro 提交于
      NB: nbd_ioctl() appears to be racy; BKL is held, but doesn't really
      help, AFAICS.  Left as-is for now, but it'll need fixing.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      a8cdc308
    • 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
  3. 20 10月, 2008 1 次提交
    • P
      x86: sysfs: kill owner field from attribute · 01e8ef11
      Parag Warudkar 提交于
      Tejun's commit 7b595756 made sysfs
      attribute->owner unnecessary.  But the field was left in the structure to
      ease the merge.  It's been over a year since that change and it is now
      time to start killing attribute->owner along with its users - one arch at
      a time!
      
      This patch is attempt #1 to get rid of attribute->owner only for
      CONFIG_X86_64 or CONFIG_X86_32 .  We will deal with other arches later on
      as and when possible - avr32 will be the next since that is something I
      can test.  Compile (make allyesconfig / make allmodconfig / custom config)
      and boot tested.
      
      akpm: the idea is that we put the declaration of sttribute.owner inside
      `#ifndef CONFIG_X86'.  But that proved to be too ambitious for now because
      new usages kept on turning up in subsystem trees.
      
      [akpm: remove the ifdef for now]
      Signed-off-by: NParag Warudkar <parag.lkml@gmail.com>
      Cc: Greg KH <greg@kroah.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Tejun Heo <htejun@gmail.com>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Cc: Jean Delvare <khali@linux-fr.org>
      Cc: Roland Dreier <rolandd@cisco.com>
      Cc: David Brownell <david-b@pacbell.net>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      01e8ef11
  4. 09 10月, 2008 1 次提交
  5. 21 8月, 2008 1 次提交
  6. 29 4月, 2008 4 次提交
    • 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
    • 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
    • F
      block: use blk_rq_init() to initialize the request · 4f54eec8
      FUJITA Tomonori 提交于
      Any path needs to call it to initialize the request.
      
      This is a preparation for large command support, which needs to
      initialize the request in a proper way (that is, just doing a memset()
      will not work).
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      4f54eec8
  7. 03 4月, 2008 1 次提交
  8. 24 2月, 2008 1 次提交
  9. 09 2月, 2008 1 次提交
  10. 28 1月, 2008 1 次提交
  11. 25 1月, 2008 1 次提交
    • K
      Driver core: convert block from raw kobjects to core devices · edfaa7c3
      Kay Sievers 提交于
      This moves the block devices to /sys/class/block. It will create a
      flat list of all block devices, with the disks and partitions in one
      directory. For compatibility /sys/block is created and contains symlinks
      to the disks.
      
        /sys/class/block
        |-- sda -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda
        |-- sda1 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1
        |-- sda10 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda10
        |-- sda5 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5
        |-- sda6 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6
        |-- sda7 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda7
        |-- sda8 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda8
        |-- sda9 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda9
        `-- sr0 -> ../../devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sr0
      
        /sys/block/
        |-- sda -> ../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda
        `-- sr0 -> ../devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sr0
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      edfaa7c3
  12. 13 11月, 2007 1 次提交
  13. 20 10月, 2007 2 次提交
  14. 17 10月, 2007 4 次提交
  15. 10 10月, 2007 2 次提交
  16. 24 7月, 2007 1 次提交
  17. 17 7月, 2007 1 次提交
  18. 10 7月, 2007 1 次提交
    • B
      [PATCH] fix request->cmd == INT cases · e654bc43
      Boaz Harrosh 提交于
       - I have unearthed very old bugs in stale drivers that still
         used request->cmd as a READ|WRITE int
       - This patch is maybe a proof that these drivers have not been
         used for a long time. Should they be removed completely?
      
      Drivers that currently do not work for sure:
       drivers/acorn/block/fd1772.c |    2 +-
       drivers/acorn/block/mfmhd.c  |    8 ++++----
       drivers/cdrom/aztcd.c        |    2 +-
       drivers/cdrom/cm206.c        |    2 +-
       drivers/cdrom/gscd.c         |    2 +-
       drivers/cdrom/mcdx.c         |    2 +-
       drivers/cdrom/optcd.c        |    2 +-
       drivers/cdrom/sjcd.c         |    2 +-
      
      Drivers with cosmetic fixes only:
        b/drivers/block/amiflop.c
        b/drivers/block/nbd.c
        b/drivers/ide/legacy/hd.c
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      e654bc43
  19. 10 5月, 2007 1 次提交
  20. 09 12月, 2006 1 次提交
  21. 08 12月, 2006 1 次提交
  22. 01 10月, 2006 1 次提交
    • J
      [PATCH] Split struct request ->flags into two parts · 4aff5e23
      Jens Axboe 提交于
      Right now ->flags is a bit of a mess: some are request types, and
      others are just modifiers. Clean this up by splitting it into
      ->cmd_type and ->cmd_flags. This allows introduction of generic
      Linux block message types, useful for sending generic Linux commands
      to block devices.
      Signed-off-by: NJens Axboe <axboe@suse.de>
      4aff5e23
  23. 01 8月, 2006 2 次提交
  24. 02 7月, 2006 1 次提交
  25. 27 6月, 2006 4 次提交
  26. 26 6月, 2006 1 次提交
  27. 26 3月, 2006 1 次提交