Merge branch 'for-linus' of git://git.kernel.dk/linux-block
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 19 Aug 2011 17:47:07 +0000 (10:47 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 19 Aug 2011 17:47:07 +0000 (10:47 -0700)
* 'for-linus' of git://git.kernel.dk/linux-block: (23 commits)
  Revert "cfq: Remove special treatment for metadata rqs."
  block: fix flush machinery for stacking drivers with differring flush flags
  block: improve rq_affinity placement
  blktrace: add FLUSH/FUA support
  Move some REQ flags to the common bio/request area
  allow blk_flush_policy to return REQ_FSEQ_DATA independent of *FLUSH
  xen/blkback: Make description more obvious.
  cfq-iosched: Add documentation about idling
  block: Make rq_affinity = 1 work as expected
  block: swim3: fix unterminated of_device_id table
  block/genhd.c: remove useless cast in diskstats_show()
  drivers/cdrom/cdrom.c: relax check on dvd manufacturer value
  drivers/block/drbd/drbd_nl.c: use bitmap_parse instead of __bitmap_parse
  bsg-lib: add module.h include
  cfq-iosched: Reduce linked group count upon group destruction
  blk-throttle: correctly determine sync bio
  loop: fix deadlock when sysfs and LOOP_CLR_FD race against each other
  loop: add BLK_DEV_LOOP_MIN_COUNT=%i to allow distros 0 pre-allocated loop devices
  loop: add management interface for on-demand device allocation
  loop: replace linked list of allocated devices with an idr index
  ...

1  2 
Documentation/kernel-parameters.txt
block/blk-core.c

@@@ -40,7 -40,6 +40,7 @@@ parameter is applicable
        ALSA    ALSA sound support is enabled.
        APIC    APIC support is enabled.
        APM     Advanced Power Management support is enabled.
 +      ARM     ARM architecture is enabled.
        AVR32   AVR32 architecture is enabled.
        AX25    Appropriate AX.25 support is enabled.
        BLACKFIN Blackfin architecture is enabled.
@@@ -50,7 -49,6 +50,7 @@@
        EFI     EFI Partitioning (GPT) is enabled
        EIDE    EIDE/ATAPI support is enabled.
        FB      The frame buffer device is enabled.
 +      FTRACE  Function tracing enabled.
        GCOV    GCOV profiling is enabled.
        HW      Appropriate hardware is enabled.
        IA-64   IA-64 architecture is enabled.
@@@ -71,7 -69,6 +71,7 @@@
                        Documentation/m68k/kernel-options.txt.
        MCA     MCA bus support is enabled.
        MDA     MDA console support is enabled.
 +      MIPS    MIPS architecture is enabled.
        MOUSE   Appropriate mouse support is enabled.
        MSI     Message Signaled Interrupts (PCI).
        MTD     MTD (Memory Technology Device) support is enabled.
        SPARC   Sparc architecture is enabled.
        SWSUSP  Software suspend (hibernation) is enabled.
        SUSPEND System suspend states are enabled.
 -      FTRACE  Function tracing enabled.
        TPM     TPM drivers are enabled.
        TS      Appropriate touchscreen support is enabled.
        UMS     USB Mass Storage support is enabled.
        X86-64  X86-64 architecture is enabled.
                        More X86-64 boot options can be found in
                        Documentation/x86/x86_64/boot-options.txt .
 -      X86     Either 32bit or 64bit x86 (same as X86-32+X86-64)
 +      X86     Either 32-bit or 64-bit x86 (same as X86-32+X86-64)
        XEN     Xen support is enabled
  
  In addition, the following text indicates that the option:
@@@ -165,11 -163,6 +165,11 @@@ bytes respectively. Such letter suffixe
  
                        See also Documentation/power/pm.txt, pci=noacpi
  
 +      acpi_rsdp=      [ACPI,EFI,KEXEC]
 +                      Pass the RSDP address to the kernel, mostly used
 +                      on machines running EFI runtime service to boot the
 +                      second kernel for kdump.
 +
        acpi_apic_instance=     [ACPI, IOAPIC]
                        Format: <int>
                        2: use 2nd APIC table, if available
        atkbd.softrepeat= [HW]
                        Use software keyboard repeat
  
 -      autotest        [IA64]
 +      autotest        [IA-64]
  
        baycom_epp=     [HW,AX25]
                        Format: <io>,<mode>
                        /proc/<pid>/coredump_filter.
                        See also Documentation/filesystems/proc.txt.
  
 +      cpuidle.off=1   [CPU_IDLE]
 +                      disable the cpuidle sub-system
 +
        cpcihp_generic= [HW,PCI] Generic port I/O CompactPCI driver
                        Format:
                        <first_slot>,<last_slot>,<port>,<enum_bit>[,<debug>]
                uart[8250],mmio32,<addr>[,options]
                        Start an early, polled-mode console on the 8250/16550
                        UART at the specified I/O port or MMIO address.
 -                      MMIO inter-register address stride is either 8bit (mmio)
 -                        or 32bit (mmio32).
 +                      MMIO inter-register address stride is either 8-bit
 +                      (mmio) or 32-bit (mmio32).
                        The options are the same as for ttyS, above.
  
        earlyprintk=    [X86,SH,BLACKFIN]
                        See Documentation/block/as-iosched.txt and
                        Documentation/block/deadline-iosched.txt for details.
  
 -      elfcorehdr=     [IA64,PPC,SH,X86]
 +      elfcorehdr=     [IA-64,PPC,SH,X86]
                        Specifies physical address of start of kernel core
                        image elf header. Generally kexec loader will
                        pass this option to capture kernel.
                        tracer at boot up. function-list is a comma separated
                        list of functions. This list can be changed at run
                        time by the set_ftrace_filter file in the debugfs
 -                      tracing directory. 
 +                      tracing directory.
  
        ftrace_notrace=[function-list]
                        [FTRACE] Do not trace the functions specified in
  
        hashdist=       [KNL,NUMA] Large hashes allocated during boot
                        are distributed across NUMA nodes.  Defaults on
 -                      for 64bit NUMA, off otherwise.
 +                      for 64-bit NUMA, off otherwise.
                        Format: 0 | 1 (for off | on)
  
        hcl=            [IA-64] SGI's Hardware Graph compatibility layer
                        DMA.
                forcedac [x86_64]
                        With this option iommu will not optimize to look
 -                      for io virtual address below 32 bit forcing dual
 +                      for io virtual address below 32-bit forcing dual
                        address cycle on pci bus for cards supporting greater
 -                      than 32 bit addressing. The default is to look
 -                      for translation below 32 bit and if not available
 +                      than 32-bit addressing. The default is to look
 +                      for translation below 32-bit and if not available
                        then look in the higher range.
                strict [Default Off]
                        With this option on every unmap_single operation will
                        off     disable Interrupt Remapping
                        nosid   disable Source ID checking
  
 -      inttest=        [IA64]
 +      inttest=        [IA-64]
  
        iomem=          Disable strict checking of access to MMIO memory
                strict  regions from userspace.
                nomerge
                forcesac
                soft
 -              pt      [x86, IA64]
 +              pt      [x86, IA-64]
  
        io7=            [HW] IO7 for Marvel based alpha systems
                        See comment before marvel_specify_io7 in
  
        kvm-amd.npt=    [KVM,AMD] Disable nested paging (virtualized MMU)
                        for all guests.
 -                      Default is 1 (enabled) if in 64bit or 32bit-PAE mode
 +                      Default is 1 (enabled) if in 64-bit or 32-bit PAE mode.
  
        kvm-intel.ept=  [KVM,Intel] Disable extended page tables
                        (virtualized MMU) support on capable Intel chips.
                        libata.dma=0      Disable all PATA and SATA DMA
                        libata.dma=1      PATA and SATA Disk DMA only
                        libata.dma=2      ATAPI (CDROM) DMA only
 -                      libata.dma=4      Compact Flash DMA only 
 +                      libata.dma=4      Compact Flash DMA only
                        Combinations also work, so libata.dma=3 enables DMA
                        for disks and CDROMs, but not CFs.
 -      
 +
        libata.ignore_hpa=      [LIBATA] Ignore HPA limit
                        libata.ignore_hpa=0       keep BIOS limits (default)
                        libata.ignore_hpa=1       ignore limits, using full disk
        ltpc=           [NET]
                        Format: <io>,<irq>,<dma>
  
 -      machvec=        [IA64] Force the use of a particular machine-vector
 +      machvec=        [IA-64] Force the use of a particular machine-vector
                        (machvec) in a generic kernel.
                        Example: machvec=hpzx1_swiotlb
  
                        it is equivalent to "nosmp", which also disables
                        the IO APIC.
  
-       max_loop=       [LOOP] Maximum number of loopback devices that can
-                       be mounted
-                       Format: <1-256>
+       max_loop=       [LOOP] The number of loop block devices that get
+       (loop.max_loop) unconditionally pre-created at init time. The default
+                       number is configured by BLK_DEV_LOOP_MIN_COUNT. Instead
+                       of statically allocating a predefined number, loop
+                       devices can be requested on-demand with the
+                       /dev/loop-control interface.
  
        mcatest=        [IA-64]
  
  
        nointroute      [IA-64]
  
 -      nojitter        [IA64] Disables jitter checking for ITC timers.
 +      nojitter        [IA-64] Disables jitter checking for ITC timers.
  
        no-kvmclock     [X86,KVM] Disable paravirtualized KVM clock driver
  
  
        nox2apic        [X86-64,APIC] Do not enable x2APIC mode.
  
 -      nptcg=          [IA64] Override max number of concurrent global TLB
 +      nptcg=          [IA-64] Override max number of concurrent global TLB
                        purges which is reported from either PAL_VM_SUMMARY or
                        SAL PALO.
  
                        Format: { parport<nr> | timid | 0 }
                        See also Documentation/parport.txt.
  
 -      pmtmr=          [X86] Manual setup of pmtmr I/O Port. 
 +      pmtmr=          [X86] Manual setup of pmtmr I/O Port.
                        Override pmtimer IOPort with a hex value.
                        e.g. pmtmr=0x508
  
                        [HW,MOUSE] Controls Logitech smartscroll autorepeat.
                        0 = disabled, 1 = enabled (default).
  
 +      pstore.backend= Specify the name of the pstore backend to use
 +
        pt.             [PARIDE]
                        See Documentation/blockdev/paride.txt.
  
        ro              [KNL] Mount root device read-only on boot
  
        root=           [KNL] Root filesystem
 +                      See name_to_dev_t comment in init/do_mounts.c.
  
        rootdelay=      [KNL] Delay (in seconds) to pause before attempting to
                        mount the root filesystem
                                        medium is write-protected).
                        Example: quirks=0419:aaf5:rl,0421:0433:rc
  
 +      user_debug=     [KNL,ARM]
 +                      Format: <int>
 +                      See arch/arm/Kconfig.debug help text.
 +                               1 - undefined instruction events
 +                               2 - system calls
 +                               4 - invalid data aborts
 +                               8 - SIGSEGV faults
 +                              16 - SIGBUS faults
 +                      Example: user_debug=31
 +
        userpte=
                        [X86] Flags controlling user PTE allocations.
  
        vmpoff=         [KNL,S390] Perform z/VM CP command after power off.
                        Format: <command>
  
 +      vsyscall=       [X86-64]
 +                      Controls the behavior of vsyscalls (i.e. calls to
 +                      fixed addresses of 0xffffffffff600x00 from legacy
 +                      code).  Most statically-linked binaries and older
 +                      versions of glibc use these calls.  Because these
 +                      functions are at fixed addresses, they make nice
 +                      targets for exploits that can control RIP.
 +
 +                      emulate     [default] Vsyscalls turn into traps and are
 +                                  emulated reasonably safely.
 +
 +                      native      Vsyscalls are native syscall instructions.
 +                                  This is a little bit faster than trapping
 +                                  and makes a few dynamic recompilers work
 +                                  better than they would in emulation mode.
 +                                  It also makes exploits much easier to write.
 +
 +                      none        Vsyscalls don't work at all.  This makes
 +                                  them quite hard to use for exploits but
 +                                  might break your system.
 +
        vt.cur_default= [VT] Default cursor shape.
                        Format: 0xCCBBAA, where AA, BB, and CC are the same as
                        the parameters of the <Esc>[?A;B;Cc escape sequence;
diff --combined block/blk-core.c
@@@ -1368,10 -1368,8 +1368,10 @@@ static bool should_fail_request(struct 
  
  static int __init fail_make_request_debugfs(void)
  {
 -      return init_fault_attr_dentries(&fail_make_request,
 -                                      "fail_make_request");
 +      struct dentry *dir = fault_create_debugfs_attr("fail_make_request",
 +                                              NULL, &fail_make_request);
 +
 +      return IS_ERR(dir) ? PTR_ERR(dir) : 0;
  }
  
  late_initcall(fail_make_request_debugfs);
@@@ -1702,6 -1700,7 +1702,7 @@@ EXPORT_SYMBOL_GPL(blk_rq_check_limits)
  int blk_insert_cloned_request(struct request_queue *q, struct request *rq)
  {
        unsigned long flags;
+       int where = ELEVATOR_INSERT_BACK;
  
        if (blk_rq_check_limits(q, rq))
                return -EIO;
         */
        BUG_ON(blk_queued_rq(rq));
  
-       add_acct_request(q, rq, ELEVATOR_INSERT_BACK);
+       if (rq->cmd_flags & (REQ_FLUSH|REQ_FUA))
+               where = ELEVATOR_INSERT_FLUSH;
+       add_acct_request(q, rq, where);
        spin_unlock_irqrestore(q->queue_lock, flags);
  
        return 0;
@@@ -2275,7 -2277,7 +2279,7 @@@ static bool blk_end_bidi_request(struc
   *     %false - we are done with this request
   *     %true  - still buffers pending for this request
   **/
static bool __blk_end_bidi_request(struct request *rq, int error,
+ bool __blk_end_bidi_request(struct request *rq, int error,
                                   unsigned int nr_bytes, unsigned int bidi_bytes)
  {
        if (blk_update_bidi_request(rq, error, nr_bytes, bidi_bytes))