1. 23 Apr, 2012 6 commits
    • Dan Williams's avatar
      [SCSI] libsas, libata: fix start of life for a sas ata_port · b2024459
      Dan Williams authored
      This changes the ordering of initialization and probing events from:
        1/ allocate rphy in PORTE_BYTES_DMAED, DISCE_REVALIDATE_DOMAIN
        2/ allocate ata_port and schedule port probe in DISCE_PROBE
      ...to:
        1/ allocate ata_port in PORTE_BYTES_DMAED, DISCE_REVALIDATE_DOMAIN
        2/ allocate rphy in PORTE_BYTES_DMAED, DISCE_REVALIDATE_DOMAIN
        3/ schedule port probe in DISCE_PROBE
      
      This ordering prevents PHYE_SIGNAL_LOSS_EVENTS from sneaking in to
      destrory ata devices before they have been fully initialized:
      
        BUG: unable to handle kernel paging request at 0000000000003b10
        IP: [<ffffffffa0053d7e>] sas_ata_end_eh+0x12/0x5e [libsas]
        ...
        [<ffffffffa004d1af>] sas_unregister_common_dev+0x78/0xc9 [libsas]
        [<ffffffffa004d4d4>] sas_unregister_dev+0x4f/0xad [libsas]
        [<ffffffffa004d5b1>] sas_unregister_domain_devices+0x7f/0xbf [libsas]
        [<ffffffffa004c487>] sas_deform_port+0x61/0x1b8 [libsas]
        [<ffffffffa004bed0>] sas_phye_loss_of_signal+0x29/0x2b [libsas]
      
      ...and kills the awkward "sata domain_device briefly existing in the
      domain without an ata_port" state.
      Reported-by: default avatarMichal Kosciowski <michal.kosciowski@intel.com>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      Acked-by: default avatarJeff Garzik <jgarzik@redhat.com>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
      b2024459
    • Dan Williams's avatar
      [SCSI] libsas: fix ata_eh clobbering ex_phys via smp_ata_check_ready · 0f3fce5c
      Dan Williams authored
      The check_ready implementation in the expander-attached ata device case
      polls on sas_ex_phy_discover().  The effect is that the ex_phy fields
      (critically ->attached_sas_addr) can change.  When ata_eh ends and
      libsas comes along to revalidate the domain
      sas_unregister_devs_sas_addr() can fail to lookup devices to remove, or
      fail to re-add an ata device that ata_eh marked as disabled.  So change
      the code to skip the sas_address and change count updates when ata_eh is
      active.
      
      Cc: Jack Wang <jack_wang@usish.com>
      Tested-by: default avatarMaciej Patelczyk <maciej.patelczyk@intel.com>
      Tested-by: default avatarBartek Nowakowski <bartek.nowakowski@intel.com>
      Tested-by: default avatarJacek Danecki <jacek.danecki@intel.com>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
      0f3fce5c
    • Dan Williams's avatar
      [SCSI] libsas: unify domain_device sas_rphy lifetimes · 9487669f
      Dan Williams authored
      Since the domain_device can out live the scsi_target we need the rphy to
      follow suit otherwise we run into issues like:
      
        BUG: unable to handle kernel NULL pointer dereference at 0000000000000050
        IP: [<ffffffffa011561b>] sas_ata_printk+0x43/0x6f [libsas]
        PGD 0
        Oops: 0000 [#1] SMP
        CPU 1
        Modules linked in: ses enclosure isci libsas scsi_transport_sas fuse sunrpc cpufreq_ondemand acpi_cpufreq freq_table mperf microcode pcspkr igb joydev iTCO_wdt ioatdma iTCO_vendor_support i2c_i801 i2c_core dca wmi hed ipv6 pata_acpi ata_generic [last unloaded: scsi_wait_scan]
      
        Pid: 129, comm: kworker/u:3 Not tainted 3.3.0-rc5-isci+ #1 Intel Corporation SandyBridge Platform/To be filled by O.E.M.
        RIP: 0010:[<ffffffffa011561b>] [<ffffffffa011561b>] sas_ata_printk+0x43/0x6f [libsas]
        RSP: 0018:ffff88042232dd70 EFLAGS: 00010282
        RAX: 0000000000000000 RBX: ffff8804283165b8 RCX: ffff88042232dda0
        RDX: ffff88042232dd78 RSI: ffff8804283165b8 RDI: ffffffffa01188d7
        RBP: ffff88042232ddd0 R08: ffff880388454000 R09: ffff8803edfde1f8
        R10: ffff8803edfde1f8 R11: ffff8803edfde1f8 R12: ffff880428316750
        R13: ffff880388454000 R14: ffff8803f88b31d0 R15: ffff8803f8b21d50
        FS: 0000000000000000(0000) GS:ffff88042ee20000(0000) knlGS:0000000000000000
        CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
        CR2: 0000000000000050 CR3: 0000000001a05000 CR4: 00000000000406e0
        DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
        DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
        Process kworker/u:3 (pid: 129, threadinfo ffff88042232c000, task ffff88042230c920)
        Stack:
        0000000000000000 ffff880400000018 ffff88042232dde0 ffff88042232dda0
        ffffffffa01188c4 ffff88042ee93af0 ffff88042232ddb0 ffffffff8100e047
        ffff88042232de10 ffff880420e5a2c8 ffff8803f8b21d50 ffff8803edfde1f8
        Call Trace:
        [<ffffffff8100e047>] ? load_TLS+0xb/0xf
        [<ffffffffa01156ad>] async_sas_ata_eh+0x66/0x95 [libsas]
        [<ffffffff810655e1>] async_run_entry_fn+0x9e/0x131
      Reported-by: default avatarTom Jackson <thomas.p.jackson@intel.com>
      Tested-by: default avatarTom Jackson <thomas.p.jackson@intel.com>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
      9487669f
    • Dan Williams's avatar
      [SCSI] libsas: fix sas_get_port_device regression · ec236e52
      Dan Williams authored
      Commit 899fcf40 "[SCSI] libsas: set attached device type and target
      protocols for local phys" setup 'phy' to be dereferenced after
      list_for_each_entry(phy, &port->phy_list, port_phy_el) (i.e. phy ==
      &port->phy_list) resulting in reports like:
      
        BUG: unable to handle kernel NULL pointer dereference at 00000000000002b0
        IP: [<ffffffffa00ce948>] sas_discover_domain+0x29e/0x4fb [libsas]
      
      ...fix by deferring sas_phy_set_target() to the end of
      sas_get_port_device().
      Reported-by: default avatarTom Jackson <thomas.p.jackson@intel.com>
      Tested-by: default avatarTom Jackson <thomas.p.jackson@intel.com>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
      ec236e52
    • Thomas Jackson's avatar
      [SCSI] libsas: fix sas_find_bcast_phy() in the presence of 'vacant' phys · 1699490d
      Thomas Jackson authored
      If an expander reports 'PHY VACANT' for a phy index prior to the one
      that generated a BCN libsas fails rediscovery.  Since a vacant phy is
      defined as a valid phy index that will never have an attached device
      just continue the search.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarThomas Jackson <thomas.p.jackson@intel.com>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
      1699490d
    • Dan Williams's avatar
      [SCSI] libsas: introduce sas_work to fix sas_drain_work vs sas_queue_work · 22b9153f
      Dan Williams authored
      When requeuing work to a draining workqueue the last work instance may
      not be idle, so sas_queue_work() must not touch work->entry.  Introduce
      sas_work with a drain_node list_head to have a private list for
      collecting work deferred due to drain collision.
      
      Fixes reports like:
        BUG: unable to handle kernel NULL pointer dereference at           (null)
        IP: [<ffffffff810410d4>] process_one_work+0x2e/0x338
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
      22b9153f
  2. 22 Apr, 2012 2 commits
  3. 19 Apr, 2012 20 commits
  4. 18 Apr, 2012 9 commits
  5. 17 Apr, 2012 3 commits
    • Linus Torvalds's avatar
      Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · 592fe898
      Linus Torvalds authored
      Pull ext4 regression fixes from Ted Ts'o:
       "This fixes a scalability problem reported by Andi Kleen and Tim Chen;
        they were quite secretive about the precise nature of their workload,
        but they later admitted that it only showed up when they were using a
        large sparse file, so the amount of data I/O that was needed was close
        to zero.
      
        I'm not sure how realistic this is and it's only a regression if you
        consider changes made since 2.6.39 to be a "regression" vis-a-vis the
        policy regarding post-merge window bug fixes, but Linus agreed it was
        worth fixing, so I'm including it in this pull request.
      
        This also fixes the journalled quota mount options, which I
        accidentally broke while I was cleaning up the mount option handling."
      
      * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        ext4: fix handling of journalled quota options
        ext4: address scalability issue by removing extent cache statistics
      592fe898
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · d44c6d4f
      Linus Torvalds authored
      Pull vfs fixes from Al Viro:
       "A bunch of endianness fixes and a couple of nfsd error value fixes.
      
        Speaking of endianness stuff, I'm rather tempted to slap
      
      	ccflags-y += -D__CHECK_ENDIAN__
      
        in fs/Makefile, if not making it default for the entire tree; nfsd
        regressions I've caught make one hell of a pile and we'd obviously
        benefit from having that kind of stuff caught earlier..."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        lockd: fix the endianness bug
        ocfs2: ->e_leaf_clusters endianness breakage
        ocfs2: ->rl_count endianness breakage
        ocfs: ->rl_used breakage on big-endian
        ocfs2: ->l_next_free_req breakage on big-endian
        btrfs: btrfs_root_readonly() broken on big-endian
        ext4: fix endianness breakage in ext4_split_extent_at()
        nfsd: fix compose_entry_fh() failure exits
        nfsd: fix error value on allocation failure in nfsd4_decode_test_stateid()
        nfsd: fix endianness breakage in TEST_STATEID handling
        nfsd: fix error values returned by nfsd4_lockt() when nfsd_open() fails
        nfsd: fix b0rken error value for setattr on read-only mount
      d44c6d4f
    • Linus Torvalds's avatar
      Merge git://git.samba.org/sfrench/cifs-2.6 · bc0cf58e
      Linus Torvalds authored
      Pull CIFS fixes from Steve French.
      
      * git://git.samba.org/sfrench/cifs-2.6:
        Fix number parsing in cifs_parse_mount_options
        Cleanup handling of NULL value passed for a mount option
      bc0cf58e