[SCSI] Return NEEDS_RETRY for eh commands with status BUSY

When the transport is busy and we're sending an EH command drivers
occasionally return 'BUSY'. As this in most cases is the TUR
command sent as part of the error recovery this is a sure way
to make the error recovery escalate. Returning 'NEEDS_RETRY'
here will just retry the TUR command and eventually abort the
original command, thus making error handling far smoother.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
random picks for block
Signed-off-by: scotthartbti <scott.hart.bti@gmail.com>

Conflicts:
	block/row-iosched.c
block: remove REQ_HARDBARRIER

REQ_HARDBARRIER is dead now, so remove the leftovers.  What's left
at this point is:

 - various checks inside the block layer.
 - sanity checks in bio based drivers.
 - now unused bio_empty_barrier helper.
 - Xen blockfront use of BLKIF_OP_WRITE_BARRIER - it's dead for a while,
   but Xen really needs to sort out it's barrier situaton.
 - setting of ordered tags in uas - dead code copied from old scsi
   drivers.
 - scsi different retry for barriers - it's dead and should have been
   removed when flushes were converted to FS requests.
 - blktrace handling of barriers - removed.  Someone who knows blktrace
   better should add support for REQ_FLUSH and REQ_FUA, though.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Signed-off-by: scotthartbti <scott.hart.bti@gmail.com>

Conflicts:
	drivers/block/loop.c
	drivers/scsi/scsi_error.c
	drivers/usb/storage/uas.c
[SCSI] scsi/block: increase flush/sync timeout

We have been seeing the flush request timeout with a wide
range of hardware from tgt+iser to FC targets from a major vendor.

After discussions about if the value should be configurable and
what the best value should be, this patch just increases the flush/sync
cache timeout to 1 minute. 2 minutes was determined to be too long, and
making it configurable was troublesome for users.

This patch was made over Linus's tree. It is not made over scsi-misc
or scsi-rc-fixes, because Linus's had block layer changes that my
patch was built over.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Acked-by: Jens Axboe <jaxboe@fusionio.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Revert "block: remove BLKDEV_IFL_WAIT"

This reverts commit dd3932eddf428571762596e17b65f5dc92ca361b.

Signed-off-by: scotthartbti <scott.hart.bti@gmail.com>

Conflicts:
	fs/jbd2/commit.c
[SCSI] scsi: Add missing command definitions

Add definitions for UNMAP, WRITE SAME{16,32} and GET LBA STATUS
commands.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: scotthartbti <scott.hart.bti@gmail.com>
SCSI: remove fake "address-of" expression

Fake "address-of" expressions that evaluate to NULL generally confuse
readers and can provoke compiler warnings.  This patch (as1411) removes
one such fake expression, using an "#ifdef" in its place.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
block: remove spurious uses of REQ_HARDBARRIER

REQ_HARDBARRIER is deprecated.  Remove spurious uses in the following
users.  Please note that other than osdblk, all other uses were
already spurious before deprecation.

* osdblk: osdblk_rq_fn() won't receive any request with
  REQ_HARDBARRIER set.  Remove the test for it.

* pktcdvd: use of REQ_HARDBARRIER in pkt_generic_packet() doesn't mean
  anything.  Removed.

* aic7xxx_old: Setting MSG_ORDERED_Q_TAG on REQ_HARDBARRIER is
  spurious.  Removed.

* sas_scsi_host: Setting TASK_ATTR_ORDERED on REQ_HARDBARRIER is
  spurious.  Removed.

* scsi_tcq: The ordered tag path wasn't being used anyway.  Removed.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Boaz Harrosh <bharrosh@panasas.com>
Cc: James Bottomley <James.Bottomley@suse.de>
Cc: Peter Osterlund <petero2@telia.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Revert "block, partition: add partition_meta_info to hd_struct"

This reverts commit 8aad2dcc76f94c147e9dd21097726fdb3f48c2a2.
shmem: reduce pagefault lock contention (upstream improvements)
Revert "TWEAK: added kernelizer tweaks"

This reverts commit 52128f61c8d3cfd35fe1e69374b6132ec7a7868d.
CFS: load balancing improvements

Signed-off-by: scotthartbti <scott.hart.bti@gmail.com>

Conflicts:
	kernel/sched_fair.c
ARM: Translate delay.S into (mostly) C
ARM: Allow machines to override __delay()
ARM: Implement a timer based __delay() loop
ARM: Add option to allow userspace PLE access
CONFIG_USER_L2_PLE=y
Signed-off-by: scotthartbti <scott.hart.bti@gmail.com>
Revert "Fixes for ROW"

This reverts commit c44bcc33cee649a826135d69612503fd65bd32fb.
add some optimization flags in arch/arm/Makefile
Disable debug_bugverbose
Signed-off-by: scotthartbti <scott.hart.bti@gmail.com>