1. 31 May, 2011 1 commit
  2. 30 May, 2011 1 commit
    • Jens Axboe's avatar
      Revert "block: Remove extra discard_alignment from hd_struct." · a1706ac4
      Jens Axboe authored
      It was not a good idea to start dereferencing disk->queue from
      the fs sysfs strategy for displaying discard alignment. We ran
      into first a NULL pointer deref, and after fixing that we sometimes
      see unvalid disk->queue pointer values.
      
      Since discard is the only one of the bunch actually looking into
      the queue, just revert the change.
      
      This reverts commit 23ceb5b7.
      
      Conflicts:
      	fs/partitions/check.c
      a1706ac4
  3. 28 May, 2011 8 commits
    • Namhyung Kim's avatar
      nbd: adjust 'max_part' according to part_shift · 5988ce23
      Namhyung Kim authored
      The 'max_part' parameter determines how many partitions are supported
      on each nbd device. However the actual number can be changed to the
      power of 2 minus 1 form during the module initialization as
      alloc_disk() is called with (1 << part_shift) for some reason.
      
      So adjust 'max_part' also at least for consistency with loop and brd.
      It is exported via sysfs already, and a user should check this value
      after module loading if [s]he wants to use that number correctly
      (i.e. fdisk or something).
      Signed-off-by: default avatarNamhyung Kim <namhyung@gmail.com>
      Cc: Laurent Vivier <Laurent.Vivier@bull.net>
      Cc: Paul Clements <Paul.Clements@steeleye.com>
      Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
      5988ce23
    • Namhyung Kim's avatar
      nbd: limit module parameters to a sane value · 3b271082
      Namhyung Kim authored
      The 'max_part' parameter controls the number of maximum partition
      a nbd device can have. However if a user specifies very large
      value it would exceed the limitation of device minor number and
      can cause a kernel oops (or, at least, produce invalid device
      nodes in some cases).
      
      In addition, specifying large 'nbds_max' value causes same
      problem for the same reason.
      
      On my desktop, following command results to the kernel bug:
      
      $ sudo modprobe nbd max_part=100000
       kernel BUG at /media/Linux_Data/project/linux/fs/sysfs/group.c:65!
       invalid opcode: 0000 [#1] SMP
       last sysfs file: /sys/devices/virtual/block/nbd4/range
       CPU 1
       Modules linked in: nbd(+) bridge stp llc kvm_intel kvm asus_atk0110 sg sr_mod cdrom
      
       Pid: 2522, comm: modprobe Tainted: G        W   2.6.39-leonard+ #159 System manufacturer System Product Name/P5G41TD-M PRO
       RIP: 0010:[<ffffffff8115aa08>]  [<ffffffff8115aa08>] internal_create_group+0x2f/0x166
       RSP: 0018:ffff8801009f1de8  EFLAGS: 00010246
       RAX: 00000000ffffffef RBX: ffff880103920478 RCX: 00000000000a7bd3
       RDX: ffffffff81a2dbe0 RSI: 0000000000000000 RDI: ffff880103920478
       RBP: ffff8801009f1e38 R08: ffff880103920468 R09: ffff880103920478
       R10: ffff8801009f1de8 R11: ffff88011eccbb68 R12: ffffffff81a2dbe0
       R13: ffff880103920468 R14: 0000000000000000 R15: ffff880103920400
       FS:  00007f3c49de9700(0000) GS:ffff88011f800000(0000) knlGS:0000000000000000
       CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
       CR2: 00007f3b7fe7c000 CR3: 00000000cd58d000 CR4: 00000000000406e0
       DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
       DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
       Process modprobe (pid: 2522, threadinfo ffff8801009f0000, task ffff8801009a93a0)
       Stack:
        ffff8801009f1e58 ffffffff812e8f6e ffff8801009f1e58 ffffffff812e7a80
        ffff880000000010 ffff880103920400 ffff8801002fd0c0 ffff880103920468
        0000000000000011 ffff880103920400 ffff8801009f1e48 ffffffff8115ab6a
       Call Trace:
        [<ffffffff812e8f6e>] ? device_add+0x4f1/0x5e4
        [<ffffffff812e7a80>] ? dev_set_name+0x41/0x43
        [<ffffffff8115ab6a>] sysfs_create_group+0x13/0x15
        [<ffffffff810b857e>] blk_trace_init_sysfs+0x14/0x16
        [<ffffffff811ee58b>] blk_register_queue+0x4c/0xfd
        [<ffffffff811f3bdf>] add_disk+0xe4/0x29c
        [<ffffffffa007e2ab>] nbd_init+0x2ab/0x30d [nbd]
        [<ffffffffa007e000>] ? 0xffffffffa007dfff
        [<ffffffff8100020f>] do_one_initcall+0x7f/0x13e
        [<ffffffff8107ab0a>] sys_init_module+0xa1/0x1e3
        [<ffffffff814f3542>] system_call_fastpath+0x16/0x1b
       Code: 41 57 41 56 41 55 41 54 53 48 83 ec 28 0f 1f 44 00 00 48 89 fb 41 89 f6 49 89 d4 48 85 ff 74 0b 85 f6 75 0b 48 83
        7f 30 00 75 14 <0f> 0b eb fe b9 ea ff ff ff 48 83 7f 30 00 0f 84 09 01 00 00 49
       RIP  [<ffffffff8115aa08>] internal_create_group+0x2f/0x166
        RSP <ffff8801009f1de8>
       ---[ end trace 753285ffbf72c57c ]---
      Signed-off-by: default avatarNamhyung Kim <namhyung@gmail.com>
      Cc: Laurent Vivier <Laurent.Vivier@bull.net>
      Cc: Paul Clements <Paul.Clements@steeleye.com>
      Cc: stable@kernel.org
      Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
      3b271082
    • Namhyung Kim's avatar
      nbd: pass MSG_* flags to kernel_recvmsg() · 35fbf5bc
      Namhyung Kim authored
      Unlike kernel_sendmsg(), kernel_recvmsg() requires passing flags explicitly
      via last parameter instead of struct msghdr.msg_flags. Therefore calls to
      sock_xmit(lo, 0, ..., MSG_WAITALL) have not been processed properly by tcp
      layer wrt. the flag. Fix it.
      Signed-off-by: default avatarNamhyung Kim <namhyung@gmail.com>
      Cc: Paul Clements <Paul.Clements@steeleye.com>
      Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
      35fbf5bc
    • Andreas Gruenbacher's avatar
      block: improve the bio_add_page() and bio_add_pc_page() descriptions · 6df87e65
      Andreas Gruenbacher authored
      The descriptions of bio_add_page() and bio_add_pc_page() are slightly
      inconsistent; improve them.
      Signed-off-by: default avatarAndreas Gruenbacher <agruen@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
      6df87e65
    • Linus Torvalds's avatar
      Merge git://git.infradead.org/mtd-2.6 · 29a6ccca
      Linus Torvalds authored
      * git://git.infradead.org/mtd-2.6: (97 commits)
        mtd: kill CONFIG_MTD_PARTITIONS
        mtd: remove add_mtd_partitions, add_mtd_device and friends
        mtd: convert remaining users to mtd_device_register()
        mtd: samsung onenand: convert to mtd_device_register()
        mtd: omap2 onenand: convert to mtd_device_register()
        mtd: txx9ndfmc: convert to mtd_device_register()
        mtd: tmio_nand: convert to mtd_device_register()
        mtd: socrates_nand: convert to mtd_device_register()
        mtd: sharpsl: convert to mtd_device_register()
        mtd: s3c2410 nand: convert to mtd_device_register()
        mtd: ppchameleonevb: convert to mtd_device_register()
        mtd: orion_nand: convert to mtd_device_register()
        mtd: omap2: convert to mtd_device_register()
        mtd: nomadik_nand: convert to mtd_device_register()
        mtd: ndfc: convert to mtd_device_register()
        mtd: mxc_nand: convert to mtd_device_register()
        mtd: mpc5121_nfc: convert to mtd_device_register()
        mtd: jz4740_nand: convert to mtd_device_register()
        mtd: h1910: convert to mtd_device_register()
        mtd: fsmc_nand: convert to mtd_device_register()
        ...
      
      Fixed up trivial conflicts in
       - drivers/mtd/maps/integrator-flash.c: removed in ARM tree
       - drivers/mtd/maps/physmap.c: addition of afs partition probe type
         clashing with removal of CONFIG_MTD_PARTITIONS
      29a6ccca
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 · 42604831
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (60 commits)
        [SCSI] lpfc 8.3.24: Extend BSG infrastructure and add link diagnostics
        [SCSI] lpfc 8.3.24: Add resource extent support
        [SCSI] lpfc 8.3.24: Add request-firmware support
        [SCSI] lpfc 8.3.24: Add SR-IOV control
        [SCSI] lpfc 8.3.24: Extended hardware support and support dump images
        [SCSI] lpfc 8.3.24: Miscellaneous Fixes and Corrections
        [SCSI] libsas: Add option for SATA soft reset
        [SCSI] libsas: check dev->gone before submitting sata i/o
        [SCSI] libsas: fix/amend device gone notification in sas_deform_port()
        [SCSI] MAINTAINERS update for SCSI (new email address)
        [SCSI] Fix Ultrastor asm snippet
        [SCSI] osst: fix warning
        [SCSI] osst: wrong index used in inner loop
        [SCSI] aic94xx: world-writable sysfs update_bios file
        [SCSI] MAINTAINERS: Add drivers/target/ entry
        [SCSI] target: Convert TASK_ATTR to scsi_tcq.h definitions
        [SCSI] target: Convert REPORT_LUNs to use int_to_scsilun
        [SCSI] target: Fix task->task_execute_queue=1 clear bug + LUN_RESET OOPs
        [SCSI] target: Fix bug with task_sg chained transport_free_dev_tasks release
        [SCSI] target: Fix interrupt context bug with stats_lock and core_tmr_alloc_req
        ...
      42604831
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm · 2a56d222
      Linus Torvalds authored
      * 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (45 commits)
        ARM: 6945/1: Add unwinding support for division functions
        ARM: kill pmd_off()
        ARM: 6944/1: mm: allow ASID 0 to be allocated to tasks
        ARM: 6943/1: mm: use TTBR1 instead of reserved context ID
        ARM: 6942/1: mm: make TTBR1 always point to swapper_pg_dir on ARMv6/7
        ARM: 6941/1: cache: ensure MVA is cacheline aligned in flush_kern_dcache_area
        ARM: add sendmmsg syscall
        ARM: 6863/1: allow hotplug on msm
        ARM: 6832/1: mmci: support for ST-Ericsson db8500v2
        ARM: 6830/1: mach-ux500: force PrimeCell revisions
        ARM: 6829/1: amba: make hardcoded periphid override hardware
        ARM: 6828/1: mach-ux500: delete SSP PrimeCell ID
        ARM: 6827/1: mach-netx: delete hardcoded periphid
        ARM: 6940/1: fiq: Briefly document driver responsibilities for suspend/resume
        ARM: 6938/1: fiq: Refactor {get,set}_fiq_regs() for Thumb-2
        ARM: 6914/1: sparsemem: fix highmem detection when using SPARSEMEM
        ARM: 6913/1: sparsemem: allow pfn_valid to be overridden when using SPARSEMEM
        at91: drop at572d940hf support
        at91rm9200: introduce at91rm9200_set_type to specficy cpu package
        at91: drop boot_params and PLAT_PHYS_OFFSET
        ...
      2a56d222
    • Linus Torvalds's avatar
      ALSA: fix hda AZX_DCAPS_NO_TCSEL quirk check in driver_caps · 46f2cc80
      Linus Torvalds authored
      Commit 9477c58e ("ALSA: hda - Reorganize controller quriks with bit
      flags") changed the driver type compares into various quirk bits.
      However, the check for AZX_DCAPS_NO_TCSEL got reverted: instead of
      clearing TCSEL for chipsets that have that standard capability, it
      cleared then when the NO_TCSEL bit was set.
      
      This can lead to noise and repeated sounds - a weird "echo" behavior.
      As the comment just above says: "Ensuring these bits are 0 clears
      playback static on some HD Audio codecs".  Which is definitely true at
      least on my Core i5 Westmere system.
      
      Cc: Takashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      46f2cc80
  4. 27 May, 2011 30 commits