add: alot of patches and tweaks from CodeAurora regarding fs

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

Conflicts:
	fs/ext4/super.c
ADD: BLOCK driver backportefrom 2.6.36.1 kernel (by Imoseyon)
ADD: MTD driver backported from 2.6.36.1 kernel (by Imoseyon)
ADD: new WORKQUE code from 36.1 and rest of kernel patched dangerously by Imoseyon - modified governors by LorD ClockaN

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

Conflicts:
	drivers/cpufreq/cpufreq_brazilianwax.c
	drivers/cpufreq/cpufreq_interactive.c
	drivers/cpufreq/cpufreq_smartass.c
	drivers/video/msm/msm_fb.c
ADD: backport BLOCK driver code from kernel 3.0
Update defconfig
Signed-off-by: scotthartbti <scott.hart.bti@gmail.com>
Fixup
Signed-off-by: scotthartbti <scott.hart.bti@gmail.com>
Fix for new workqueue
Signed-off-by: scotthartbti <scott.hart.bti@gmail.com>
TCP: increase default initial receive window

Set initial window to a value enough for senders starting with
initial congestion window of TCP_DEFAULT_INIT_RCVWND. Place
a limit on the initial window when mss is larger than 1460.
block: add sysfs knob for turning off disk entropy contributions

There are two reasons for doing this:

- On SSD disks, the completion times aren't as random as they
  are for rotational drives. So it's questionable whether they
  should contribute to the random pool in the first place.

- Calling add_disk_randomness() has a lot of overhead.

This adds /sys/block/<dev>/queue/add_random that will allow you to
switch off on a per-device basis. The default setting is on, so there
should be no functional changes from this patch.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
block: add helpers for the trivial queue flag sysfs show/store entries

The code for nonrot, random, and io stats are completely identical.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
block: remove wrappers for request type/flags

Remove all the trivial wrappers for the cmd_type and cmd_flags fields in
struct requests.  This allows much easier grepping for different request
types instead of unwinding through macros.

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/cciss.c
	drivers/block/osdblk.c
	drivers/block/ps3disk.c
	drivers/block/ub.c
	drivers/block/virtio_blk.c
	drivers/block/xd.c
	drivers/block/xen-blkfront.c
block: unify flags for struct bio and struct request

Remove the current bio flags and reuse the request flags for the bio, too.
This allows to more easily trace the type of I/O from the filesystem
down to the block driver.  There were two flags in the bio that were
missing in the requests:  BIO_RW_UNPLUG and BIO_RW_AHEAD.  Also I've
renamed two request flags that had a superflous RW in them.

Note that the flags are in bio.h despite having the REQ_ name - as
blkdev.h includes bio.h that is the only way to go for now.

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:
	fs/gfs2/log.c
	include/linux/fs.h

Conflicts:
	drivers/block/aoe/aoeblk.c
	drivers/block/drbd/drbd_actlog.c
	drivers/block/drbd/drbd_main.c
	drivers/block/drbd/drbd_receiver.c
	drivers/block/drbd/drbd_req.c
	drivers/block/loop.c
	include/linux/blkdev.h
block: don't allocate a payload for discard request

Allocating a fixed payload for discard requests always was a horrible hack,
and it's not coming to byte us when adding support for discard in DM/MD.

So change the code to leave the allocation of a payload to the lowlevel
driver.  Unfortunately that means we'll need another hack, which allows
us to update the various block layer length fields indicating that we
have a payload.  Instead of hiding this in sd.c, which we already partially
do for UNMAP support add a documented helper in the core block layer for it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
gcc-4.6: block: fix unused but set variables in blk-merge

Just some dead code.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
block: fixup missing conversion from BIO_RW_DISCARD to REQ_DISCARD

Didn't cause a merge conflict, so fixed this one up manually
post merge.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
block: implement an unprep function corresponding directly to prep

Reviewed-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
block: introduce REQ_FLUSH flag

SCSI-ml needs a way to mark a request as flush request in
q->prepare_flush_fn because it needs to identify them later (e.g. in
q->request_fn or prep_rq_fn).

queue_flush sets REQ_HARDBARRIER in rq->cmd_flags however the block
layer also sends normal REQ_TYPE_FS requests with REQ_HARDBARRIER. So
SCSI-ml can't use REQ_HARDBARRIER to identify flush requests.

We could change the block layer to clear REQ_HARDBARRIER bit before
sending non flush requests to the lower layers. However, intorudcing
the new flag looks cleaner (surely easier).

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: James Bottomley <James.Bottomley@suse.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Alasdair G Kergon <agk@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
block: permit PREFLUSH and POSTFLUSH without prepare_flush_fn

This is preparation for removing q->prepare_flush_fn.

Temporarily, blk_queue_ordered() permits QUEUE_ORDERED_DO_PREFLUSH and
QUEUE_ORDERED_DO_POSTFLUSH without prepare_flush_fn.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
block: remove q->prepare_flush_fn completely

This removes q->prepare_flush_fn completely (changes the
blk_queue_ordered API).

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Reviewed-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/osdblk.c
	drivers/block/ps3disk.c
	drivers/block/virtio_blk.c
	drivers/ide/ide-disk.c
	drivers/md/dm.c
	drivers/scsi/sd.c

Conflicts:
	drivers/block/brd.c
	drivers/block/loop.c
	drivers/block/osdblk.c
	drivers/block/ps3disk.c
	drivers/block/virtio_blk.c
	drivers/block/xen-blkfront.c