fix swapfile
Signed-off-by: scotthartbti <scott.hart.bti@gmail.com>
workqueue: add and use WQ_MEM_RECLAIM flag

Add WQ_MEM_RECLAIM flag which currently maps to WQ_RESCUER, mark
WQ_RESCUER as internal and replace all external WQ_RESCUER usages to
WQ_MEM_RECLAIM.

This makes the API users express the intent of the workqueue instead
of indicating the internal mechanism used to guarantee forward
progress.  This is also to make it cleaner to add more semantics to
WQ_MEM_RECLAIM.  For example, if deemed necessary, memory reclaim
workqueues can be made highpri.

This patch doesn't introduce any functional change.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: scotthartbti <scott.hart.bti@gmail.com>

Conflicts:
	Documentation/workqueue.txt
	drivers/ata/libata-sff.c
	fs/gfs2/main.c
	fs/xfs/linux-2.6/xfs_buf.c
	include/linux/workqueue.h
[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>
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: revert bad fix for memory hotplug causing bounces"

This reverts commit 0a41a7295e266df134f5aa641f159d4649164911.
Revert "block: prevent merges of discard and write requests"

This reverts commit ee164179c68344ea0071971b44c2aa4e19f8b0f2.
Revert "block: set the bounce_pfn to the actual DMA limit rather than to max memory"

This reverts commit 72b9a8bdd20bd9e2676ae8880c73b12f80f899a8.
Revert "block: Prevent hang_check firing during long I/O"

This reverts commit 67fc69f9babdd0fabe251dd8de6a4441f1fa558f.
Revert "block: Fix race during disk initialization"

This reverts commit 4f29b8ec109939ec45afe0ad54ee7e603d9711ce.
grrrr
Signed-off-by: scotthartbti <scott.hart.bti@gmail.com>