linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHSET pata-2.6] ide: rq->buffer, data, special and misc cleanups
@ 2009-03-24 16:06 Tejun Heo
  2009-03-24 16:06 ` [PATCH 01/14] block: clear req->errors on bio completion only for fs requests Tejun Heo
                   ` (14 more replies)
  0 siblings, 15 replies; 50+ messages in thread
From: Tejun Heo @ 2009-03-24 16:06 UTC (permalink / raw)
  To: bzolnier, linux-kernel, axboe, linux-ide

Hello, Bartlomiej, Jens.

This patchset contains mostly IDE cleanups around rq->buffer, data and
special usage.  Over time, the meanings of those three fields became
blurry.  Be default, they mean

->buffer  : kernel address of the current bio segment, NULL for !bio
	    requests and could be NULL if the address is high

->data    : direct data pointer specified by LLD for !fs requests

->special : LLD-specific pointer for special requests, opaque to block
	    layer, also used as general opaque pointer

Currently, IDE is the biggest offender to the above conventions and
uses all three fields as opaque pointers depending on situation.  This
complicates both IDE and block layer.  Also, with SCSI completely
switched over to bio for everything, there only very few places which
still use direct pointer for !fs requests.  This patchset updates IDE
such that it only uses special for opaque pointer and always uses bio
for data handling.

This patchset contains the following patches.

 0001-block-clear-req-errors-on-bio-completion-only-for.patch
 0002-block-reorganize-__-bio_map_kern.patch
 0003-block-implement-blk_rq_map_kern_prealloc.patch
 0004-ide-use-blk_run_queue-instead-of-blk_start_queuei.patch
 0005-ide-don-t-set-REQ_SOFTBARRIER.patch
 0006-ide-kill-unused-ide_cmd-special.patch
 0007-ide-cd-clear-sense-buffer-before-issuing-request-se.patch
 0008-ide-floppy-block-pc-always-uses-bio.patch
 0009-ide-taskfile-don-t-abuse-rq-buffer.patch
 0010-ide-atapi-don-t-abuse-rq-buffer.patch
 0011-ide-cd-don-t-abuse-rq-buffer.patch
 0012-ide-pm-don-t-abuse-rq-data.patch
 0013-ide-atapi-use-bio-for-request-sense.patch
 0014-ide-cd-use-bio-for-request-sense.patch

0001-0003 are block layer ones.  As IDE uses data requests which
aren't either FS or PC, 0001 update rq completion such that rq->errors
is not cleared accidentally for those requests.  0002-0003 implements
blk_rq_map_kern_prealloc() which will be used for bio-mapping sense
buffer.  This is necessary because IDE issues request sense from IRQ
context.  I think it would be best if this first three patches can go
through pata-2.6 as impact on other blk users is minimal (0001 has
possbility of affecting other users but all the current few users look
okay).  Jens, what do you think?

0004-0007 are misc cleanup patches.

0008 drops unnecessary rq->data handling path from
idefloppy_blockpc_cmd() as block PCs always use bio for data transfer.

0009-0014 clean up rq->buffer and data usages.  If it's used for
opaque pointer, rq->special is used instead.  If for data, the data is
mapped using either blk_rq_map_kern() or blk_rq_map_kern_prealloc().

ide-cd and floppy are tested.  I don't have access to ide tape device,
so it hasn't been tested but given that atapi changes are shared
between floppy and tape, I don't think too much could be broken for
tape.  I'm trying to get a IDE tape drive but it's quite difficult to
come by over here.  :-(

This patchset will allow further IDE and block layer cleanup and ease
future improvements to block layer.

This patchset is on top of linux-next pata-2.6 tree as of 2009-03-23.
Git tree is available at the following vector but please DO NOT pull
from the following git tree as pata-2.6 tree is quilt-based and the
base tree I used isn't the one which is gonna go upstream.  The
following tree is for review only.

 git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc.git ide-phase1

Bartlomiej, if you're okay with the changes and Jens acks the patches
and pushing the first three patches via pata-2.6, please feel free to
include these patches into your tree.

This patchset contains the following changes.

 block/blk-core.c           |   10 +++--
 block/blk-map.c            |   50 ++++++++++++++++++++++++++++
 drivers/ide/ide-atapi.c    |   42 +++++++++++++----------
 drivers/ide/ide-cd.c       |   51 ++++++++++++++---------------
 drivers/ide/ide-disk.c     |    1
 drivers/ide/ide-floppy.c   |   16 +++------
 drivers/ide/ide-io.c       |    7 +--
 drivers/ide/ide-ioctls.c   |    1
 drivers/ide/ide-park.c     |    7 +--
 drivers/ide/ide-pm.c       |   36 +++++++-------------
 drivers/ide/ide-tape.c     |   10 +++--
 drivers/ide/ide-taskfile.c |   18 ++++++----
 fs/bio.c                   |   79 ++++++++++++++++++++++++++-------------------
 include/linux/bio.h        |    3 +
 include/linux/blkdev.h     |    4 ++
 include/linux/ide.h        |    4 +-
 16 files changed, 205 insertions(+), 134 deletions(-)

Thanks.

--
tejun

^ permalink raw reply	[flat|nested] 50+ messages in thread

end of thread, other threads:[~2009-04-13 14:16 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-24 16:06 [PATCHSET pata-2.6] ide: rq->buffer, data, special and misc cleanups Tejun Heo
2009-03-24 16:06 ` [PATCH 01/14] block: clear req->errors on bio completion only for fs requests Tejun Heo
2009-03-24 16:06 ` [PATCH 02/14] block: reorganize [__]bio_map_kern() Tejun Heo
2009-03-24 16:06 ` [PATCH 03/14] block: implement blk_rq_map_kern_prealloc() Tejun Heo
2009-03-25 15:18   ` Boaz Harrosh
2009-03-26  2:10     ` Tejun Heo
2009-03-26  7:42       ` Tejun Heo
2009-03-26  8:05         ` Boaz Harrosh
2009-03-26  8:10           ` Boaz Harrosh
2009-03-26 10:19             ` Tejun Heo
2009-03-26 11:23               ` Boaz Harrosh
2009-03-26 12:07                 ` Tejun Heo
2009-03-26 14:44                   ` Boaz Harrosh
2009-03-27  2:26                     ` Tejun Heo
2009-04-13 10:07           ` FUJITA Tomonori
2009-03-24 16:06 ` [PATCH 04/14] ide: use blk_run_queue() instead of blk_start_queueing() Tejun Heo
2009-03-24 16:06 ` [PATCH 05/14] ide: don't set REQ_SOFTBARRIER Tejun Heo
2009-03-24 16:06 ` [PATCH 06/14] ide kill unused ide_cmd->special Tejun Heo
2009-03-24 16:06 ` [PATCH 07/14] ide-cd: clear sense buffer before issuing request sense Tejun Heo
2009-03-26  7:20   ` Borislav Petkov
2009-03-26  7:26     ` Tejun Heo
2009-03-24 16:06 ` [PATCH 08/14] ide-floppy: block pc always uses bio Tejun Heo
2009-03-24 16:06 ` [PATCH 09/14] ide-taskfile: don't abuse rq->buffer Tejun Heo
2009-03-24 16:06 ` [PATCH 10/14] ide-atapi: " Tejun Heo
2009-03-24 16:06 ` [PATCH 11/14] ide-cd: " Tejun Heo
2009-03-26  8:34   ` Borislav Petkov
2009-03-24 16:06 ` [PATCH 12/14] ide-pm: don't abuse rq->data Tejun Heo
2009-03-24 16:06 ` [PATCH 13/14] ide-atapi: use bio for request sense Tejun Heo
2009-03-28  8:43   ` Borislav Petkov
2009-03-24 16:06 ` [PATCH 14/14] ide-cd: " Tejun Heo
2009-04-13  8:52   ` Borislav Petkov
2009-03-28 13:51 ` [PATCHSET pata-2.6] ide: rq->buffer, data, special and misc cleanups Bartlomiej Zolnierkiewicz
2009-03-28 14:04   ` Borislav Petkov
2009-03-30  9:12     ` Tejun Heo
2009-03-30 11:14       ` Boaz Harrosh
2009-03-30 17:20         ` Tejun Heo
2009-03-31  8:43           ` Boaz Harrosh
2009-03-31  9:05             ` Tejun Heo
2009-03-31  9:10               ` Tejun Heo
2009-03-31 13:04               ` Boaz Harrosh
2009-03-31 13:43                 ` Tejun Heo
2009-04-01 11:50                   ` Boaz Harrosh
2009-04-13  7:41                 ` FUJITA Tomonori
2009-04-13  7:54                   ` Jeff Garzik
2009-04-13  8:22                     ` FUJITA Tomonori
2009-04-13  8:31                       ` Jeff Garzik
2009-04-13 10:07                         ` FUJITA Tomonori
2009-04-13 14:16                         ` James Bottomley
2009-03-30 14:50       ` Bartlomiej Zolnierkiewicz
2009-03-30 17:21         ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).