08 Aug, 2010
40 commits
-
This removes q->prepare_flush_fn completely (changes the
blk_queue_ordered API).Signed-off-by: FUJITA Tomonori
Reviewed-by: Christoph Hellwig
Signed-off-by: Jens Axboe -
use REQ_FLUSH flag instead.
Signed-off-by: FUJITA Tomonori
Acked-by: David S. Miller
Reviewed-by: Christoph Hellwig
Signed-off-by: Jens Axboe -
use REQ_FLUSH flag instead.
Signed-off-by: FUJITA Tomonori
Cc: Rusty Russell
Reviewed-by: Christoph Hellwig
Signed-off-by: Jens Axboe -
use REQ_FLUSH flag instead.
Signed-off-by: FUJITA Tomonori
Cc: Alasdair G Kergon
Reviewed-by: Christoph Hellwig
Signed-off-by: Jens Axboe -
REQ_FLUSH flag enables us to kill ps3disk_prepare_flush().
Signed-off-by: FUJITA Tomonori
Reviewed-by: Christoph Hellwig
Signed-off-by: Jens Axboe -
use REQ_FLUSH flag instead.
Signed-off-by: FUJITA Tomonori
Reviewed-by: Christoph Hellwig
Signed-off-by: Jens Axboe -
scsi-ml builds flush requests via q->prepare_flush_fn(), however,
builds discard requests via q->prep_rq_fn.Using two different mechnisms for the similar requests (building
commands in SCSI ULD) doesn't make sense.Handing both via q->prep_rq_fn makes the code design simpler.
Signed-off-by: FUJITA Tomonori
Cc: James Bottomley
Reviewed-by: Christoph Hellwig
Signed-off-by: Jens Axboe -
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
Reviewed-by: Christoph Hellwig
Signed-off-by: Jens Axboe -
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
Cc: James Bottomley
Cc: David S. Miller
Cc: Rusty Russell
Cc: Alasdair G Kergon
Reviewed-by: Christoph Hellwig
Signed-off-by: Jens Axboe -
- sd_done isn't called for pc request so we never call the code.
- we use sd_unprep to free discard page now.Signed-off-by: FUJITA Tomonori
Signed-off-by: Jens Axboe -
This fixes discard page leak by using q->unprep_rq_fn facility.
q->unprep_rq_fn is called when all the data buffer (req->bio and
scsi_data_buffer) in the request is freed.sd_unprep() uses rq->buffer to free discard page allocated in
sd_prepare_discard().Signed-off-by: FUJITA Tomonori
Signed-off-by: Jens Axboe -
Reviewed-by: FUJITA Tomonori
Signed-off-by: Jens Axboe
-
- add pr_fmt.
- convert printks to pr_
- add if (0) and printf argument checking to cdinfo
- coalesce consecutive printks to single pr_
- fix a typo "back ground" to "background"
- convert printks without level to pr_info
- remove VIOCD_ prefixes and use pr_fmt/pr_
- add a missing newline to an OS/400 message
Signed-off-by: Joe Perches
Signed-off-by: Andrew MortonFolded in tab indentation fix from Andrew.
Signed-off-by: Jens Axboe
-
Didn't cause a merge conflict, so fixed this one up manually
post merge.Signed-off-by: Jens Axboe
-
Fix extra brace typo that is causing build errors.
Signed-off-by: Randy Dunlap
Signed-off-by: Jens Axboe -
No real bugs I believe, just some dead code, and some
shut up code.Signed-off-by: Andi Kleen
Cc: Eric Paris
Signed-off-by: Andrew Morton
Signed-off-by: Jens Axboe -
Just some dead code.
Signed-off-by: Andi Kleen
Signed-off-by: Andrew Morton
Signed-off-by: Jens Axboe -
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
Acked-by: Mike Snitzer
Signed-off-by: Jens Axboe -
Move all code for the writeback thread into fs/fs-writeback.c instead of
splitting it over two functions in two files.Signed-off-by: Christoph Hellwig
Signed-off-by: Jens Axboe -
The wb_list member of struct backing_device_info always has exactly one
element. Just use the direct bdi->wb pointer instead and simplify some
code.Also remove bdi_task_init which is now trivial to prepare for the next
patch.Signed-off-by: Christoph Hellwig
Signed-off-by: Jens Axboe -
Signed-off-by: Christoph Hellwig
Signed-off-by: Jens Axboe -
On compilation, gcc correctly detects that we do not handle
all types:In function ‘blk_done’:
warning: enumeration value ‘REQ_TYPE_FS’ not handled in switch
warning: enumeration value ‘REQ_TYPE_SENSE’ not handled in switch
warning: enumeration value ‘REQ_TYPE_PM_SUSPEND’ not handled in switch
warning: enumeration value ‘REQ_TYPE_PM_RESUME’ not handled in switch
warning: enumeration value ‘REQ_TYPE_PM_SHUTDOWN’ not handled in switch
warning: enumeration value ‘REQ_TYPE_LINUX_BLOCK’ not handled in switch
warning: enumeration value ‘REQ_TYPE_ATA_TASKFILE’ not handled in switch
warning: enumeration value ‘REQ_TYPE_ATA_PC’ not handled in switchwhich is a bit pointless since this is at the end of the request
processessing. Add a default case that just breaks out.Signed-off-by: Jens Axboe
-
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
Signed-off-by: Jens Axboe -
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
Signed-off-by: Jens Axboe -
Architectures don't need to define ISA_DMA_THRESHOLD anymore.
Signed-off-by: FUJITA Tomonori
Acked-by: James Bottomley
Acked-by: David Howells
Signed-off-by: Jens Axboe -
block uses ISA_DMA_THRESHOLD for BLK_BOUNCE_ISA. Only SCSI uses
ISA_DMA_THRESHOLD for ancient drivers with non-zero
unchecked_isa_dma. Nowadays drivers (and subsystems) use dma_mask
properly instead of ISA_DMA_THRESHOLD.Documentation/scsi/scsi_mid_low_api.txt says:
unchecked_isa_dma - 1=>only use bottom 16 MB of ram (ISA DMA addressing
restriction), 0=>can use full 32 bit (or better) DMA
address spaceSo block simply uses DMA_BIT_MASK(24) for BLK_BOUNCE_ISA for SCSI.
Signed-off-by: FUJITA Tomonori
Acked-by: James Bottomley
Signed-off-by: Jens Axboe -
We can safely remove ISA_DMA_THRESHOLD usage in aha1542. aha1542 uses
ISA_DMA_THRESHOLD to see if:- the buffers in scatter/list are below 16MB.
- scsi_host is below 16MB.Both checkings were added in the ancient times but aren't necessary
nowadays since we properly bounce the buffers and allocate scsi_host
below 16MB with non-zero unchecked_isa_dma.Signed-off-by: FUJITA Tomonori
Acked-by: James Bottomley
Signed-off-by: Jens Axboe -
A barrier request should by defintion have priority in get_request
and let the queue be unplugged immediately as it's blocking all forward
progress due to the queue draining.Most filesystems already get this implicitly by the way how submit_bh
treats the buffer_ordered flag, and gfs2 sets it explicitly. But btrfs
and XFS are still forgetting to set the flag, as is blkdev_issue_flush
and some places in DM/MD.For XFS on metadata heavy workloads this gives a consistent speedup
in the 2-3% range.Signed-off-by: Christoph Hellwig
Signed-off-by: Jens Axboe -
Convert assertions to use WARN(). There are several error checks in the
code for things that should never happen. Convert them to standard
warnings so kerneloops.org will see them.Signed-off-by: Stephen Hemminger
Signed-off-by: Andrew Morton
Signed-off-by: Jens Axboe -
Convert wait loops to use wait_event_ macros.
Signed-off-by: Stephen Hemminger
Signed-off-by: Andrew Morton
Signed-off-by: Jens Axboe -
Ioctl cmd value is unsigned, so change normalize_ioctl
Signed-off-by: Stephen Hemminger
Signed-off-by: Andrew Morton
Signed-off-by: Jens Axboe -
As reported by sparse, cmos attribute is local.
Signed-off-by: Stephen Hemminger
Signed-off-by: Andrew Morton
Signed-off-by: Jens Axboe -
The usage_count was being protected by a lock which was only there to
create an atomic counter.Signed-off-by: Stephen Hemminger
Signed-off-by: Andrew Morton
Signed-off-by: Jens Axboe -
The first thing the floppy does is read block 0 to test geometry and to
test for disk presence. If disk is not present this causes a console
warning message about failed I/O. Set flag to silence.Signed-off-by: Stephen Hemminger
Signed-off-by: Andrew Morton
Signed-off-by: Jens Axboe -
These routines are all big enough that is better to let the compiler
decide to inline or not.Signed-off-by: Stephen Hemminger
Signed-off-by: Andrew Morton
Signed-off-by: Jens Axboe -
Set debug jiffies offset at initialization. Avoids wierd values showing
up if debugging enabled.Signed-off-by: Stephen Hemminger
Signed-off-by: Andrew Morton
Signed-off-by: Jens Axboe -
Change the command padding on 32-bit systems to 0 since setting it to 32
has the identical effect.Signed-off-by: Mike Miller
Cc: Stephen M. Cameron
Signed-off-by: Andrew Morton
Signed-off-by: Jens Axboe -
Remove a debug statement left behind by accident Ths debug statement got
left behind. It was commented out after use but not deleted.Signed-off-by: Mike Miller
Cc: Stephen M. Cameron
Signed-off-by: Andrew Morton
Signed-off-by: Jens Axboe -
The definition of next_command also ended up in wrong place It ended up
inside an "#ifdef CONFIG_PROCFS". Already caught by Randy Dunlap and a
couple others. Tried to put it somewhere that made sense.Signed-off-by: Mike Miller
Cc: Stephen M. Cameron
Signed-off-by: Andrew Morton
Signed-off-by: Jens Axboe -
call to put_controller_in_performant_mode was in the wrong place
The call inadvertently ended up in an error path.Signed-off-by: Mike Miller
Cc: Stephen M. Cameron
Signed-off-by: Andrew Morton
Signed-off-by: Jens Axboe