10 Oct, 2007
17 commits
-
The floppy ioctls are used by multiple drivers, so they should be
handled in a shared location. Also, add minor cleanups.Signed-off-by: Arnd Bergmann
Signed-off-by: Jens Axboe -
These are shared by all cd-rom drivers and should have common
handlers. Do slight cosmetic cleanups in the process.Signed-off-by: Arnd Bergmann
Signed-off-by: Jens Axboe -
BLKPG is common to all block devices, so it should be handled
by common code.Signed-off-by: Arnd Bergmann
Signed-off-by: Jens Axboe -
These are common to multiple block drivers, so they should
be handled by the block layer.Signed-off-by: Arnd Bergmann
Signed-off-by: Jens Axboe -
blk_trace_setup is broken on x86_64 compat systems,
this makes the code work correctly on all 64 bit architectures
in compat mode.Signed-off-by: Arnd Bergmann
Signed-off-by: Jens Axboe -
Handle those blockdev ioctl calls that are compatible
directly from the compat_blkdev_ioctl() function, instead
of having to go through the compat_ioctl hash lookup.Signed-off-by: Arnd Bergmann
Signed-off-by: Jens Axboe -
Make compat_blkdev_ioctl and blkdev_ioctl reflect the respective
native versions. This is somewhat more efficient and makes it easier
to keep the two in sync.Also get rid of the bogus handling for broken_blkgetsize and the
duplicate entry for BLKRASET.Signed-off-by: Arnd Bergmann
Signed-off-by: Jens Axboe -
As bi_end_io is only called once when the reqeust is complete,
the 'size' argument is now redundant. Remove it.Now there is no need for bio_endio to subtract the size completed
from bi_size. So don't do that either.While we are at it, change bi_end_io to return void.
Signed-off-by: Neil Brown
Signed-off-by: Jens Axboe -
The only caller of bio_endio that does not pass the full bi_size
is end_that_request_first. Also, no ->bi_end_io method is really
interested in bi_size being decremented.So move the decrement and related code into ll_rw_blk and merge it
with order_bio_endio to form req_bio_endio which does endio functionality
specific to request completion.As some ->bi_end_io methods do check bi_size of 0, we set it thus for
now, but that will go in the next patch.Signed-off-by: Neil Brown
### Diffstat output
./block/ll_rw_blk.c | 42 +++++++++++++++++++++++++++---------------
./fs/bio.c | 23 +++++++++++------------
2 files changed, 38 insertions(+), 27 deletions(-)diff .prev/block/ll_rw_blk.c ./block/ll_rw_blk.c
Signed-off-by: Jens Axboe -
The entire function of flush_dry_bio_endio is to undo the effects
of bio_endio (when called on a barrier request). So remove the
function and the call to bio_endio.This allows us to remove "bi_size" from "struct request_queue".
Signed-off-by: Neil Brown
### Diffstat output
./block/ll_rw_blk.c | 39 ++-------------------------------------
./include/linux/blkdev.h | 1 -
2 files changed, 2 insertions(+), 38 deletions(-)diff .prev/block/ll_rw_blk.c ./block/ll_rw_blk.c
Signed-off-by: Jens Axboe -
blk_cpu_notifier is marked as __devinitdata, but __devinitdata need not
be __init even if HOTPLUG_CPU=n, which wastes space. It should be marked
__cpuinitdata, and the callback itself as __cpuinit.Signed-off-by: Satyam Sharma
Signed-off-by: Andrew Morton
Signed-off-by: Jens Axboe -
Remove one level of nesting where appropriate.
Signed-off-by: Jens Axboe
-
These have very similar functions and should share code where
possible.Signed-off-by: Neil Brown
diff .prev/block/ll_rw_blk.c ./block/ll_rw_blk.c
Signed-off-by: Jens Axboe -
blk_rq_bio_prep is exported for use in exactly
one place. That place can benefit from using
the new blk_rq_append_bio instead.
So
- change dm-emc to call blk_rq_append_bio
- stop exporting blk_rq_bio_prep, and
- initialise rq_disk in blk_rq_bio_prep,
as dm-emc needs it.Signed-off-by: Neil Brown
diff .prev/block/ll_rw_blk.c ./block/ll_rw_blk.c
Signed-off-by: Jens Axboe -
ll_back_merge_fn is currently exported to SCSI where is it used,
together with blk_rq_bio_prep, in exactly the same way these
functions are used in __blk_rq_map_user.So move the common code into a new function (blk_rq_append_bio), and
don't export ll_back_merge_fn any longer.Signed-off-by: Neil Brown
diff .prev/block/ll_rw_blk.c ./block/ll_rw_blk.c
Signed-off-by: Jens Axboe -
Every usage of rq_for_each_bio wraps a usage of
bio_for_each_segment, so these can be combined into
rq_for_each_segment.We define "struct req_iterator" to hold the 'bio' and 'index' that
are needed for the double iteration.Signed-off-by: Neil Brown
Various compile fixes by me...
Signed-off-by: Jens Axboe
-
blk_recalc_rq_segments calls blk_recount_segments on each bio,
then does some extra calculations to handle segments that overlap
two bios.If we merge the code from blk_recount_segments into
blk_recalc_rq_segments, we can process the whole request one bio_vec
at a time, and not need the messy cross-bio calculations.Then blk_recount_segments can be implemented by calling
blk_recalc_rq_segments, passing it a simple on-stack request which
stores just the bio.Signed-off-by: Neil Brown
diff .prev/block/ll_rw_blk.c ./block/ll_rw_blk.c
Signed-off-by: Jens Axboe
15 Sep, 2007
1 commit
-
Should add some comments for the tag barriers (they won't be so important
if we can switch over to the explicit _lock bitops, but for now we should
make it clear).Jens' original patch said a barrier after the test_and_clear_bit was also
required. I can't see why (and it would prevent the use of the _lock bitop).Acked-by: Jens Axboe
Signed-off-by: Linus Torvalds
--
13 Sep, 2007
1 commit
-
There's a race condition in blk_queue_end_tag() for shared tag maps,
users include stex (promise supertrak thingy) and qla2xxx. The former
at least has reported bugs in this area, not sure why we haven't seen
any for the latter. It could be because the window is narrow and that
other conditions in the qla2xxx code hide this. It's a real bug,
though, as the stex smp users can attest.We need to ensure two things - the tag bit clearing needs to happen
AFTER we cleared the tag pointer, as the tag bit clearing/setting is
what protects this map. Secondly, we need to ensure that the visibility
of the tag pointer and tag bit clear are ordered properly.[ I removed the SMP barriers - "test_and_clear_bit()" already implies
all the required barriers. -- Linus ]Also see http://bugzilla.kernel.org/show_bug.cgi?id=7842
Signed-off-by: Jens Axboe
Signed-off-by: Linus Torvalds
12 Aug, 2007
1 commit
-
This patch provides more information concerning REMAP operations on block
IOs. The additional information provides clearer details at the user level,
and supports post-processing analysis in btt.o Adds in partition remaps on the same device.
o Fixed up the remap information in DM to be in the right order
o Sent up mapped-from and mapped-to device informationSigned-off-by: Alan D. Brunelle
Signed-off-by: Jens Axboe
31 Jul, 2007
1 commit
-
This updates sg_io_v4 structure (based on Doug's RFC, release 1.3).
The major changes are:
- add dout_resid field
- increase tag size to 64 bits to comply with SAM-4 and SRP
- add dout_iovec_count and din_iovec_countdout_iovec_count and din_iovec_count aren't supported now. I'm not
sure whether they will be supported or not but they were added for the
possible future changes.Signed-off-by: FUJITA Tomonori
Signed-off-by: James Bottomley
30 Jul, 2007
1 commit
-
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (28 commits)
[SCSI] mpt fusion: Changes in mptctl.c for logging support
[SCSI] mpt fusion: Changes in mptfc.c mptlan.c mptsas.c and mptspi.c for logging support
[SCSI] mpt fusion: Changes in mptscsih.c for logging support
[SCSI] mpt fusion: Changes in mptbase.c for logging support
[SCSI] mpt fusion: logging support in Kconfig, Makefile, mptbase.h and addition of mptdebug.h
[SCSI] libsas: Fix potential NULL dereference in sas_smp_get_phy_events()
[SCSI] bsg: Fix build for CONFIG_BLOCK=n
[SCSI] aacraid: fix Sunrise Lake reset handling
[SCSI] aacraid: add SCSI SYNCHONIZE_CACHE range checking
[SCSI] add easyRAID to the no report luns blacklist
[SCSI] advansys: lindent and other large, uninteresting changes
[SCSI] aic79xx, aic7xxx: Fix incorrect width setting
[SCSI] qla2xxx: fix to honor ignored parameters in sysfs attributes
[SCSI] aacraid: draw line in sand, sundry cleanup and version update
[SCSI] iscsi_tcp: Turn off bounce buffers
[SCSI] libiscsi: fix cmd seqeunce number checking
[SCSI] iscsi_tcp, ib_iser Enable module refcounting for iscsi host template
[SCSI] libiscsi: make sure session is not blocked when removing host
[SCSI] libsas: Remove PCI dependencies
[SCSI] simscsi: convert to use the data buffer accessors
...
28 Jul, 2007
1 commit
-
BLK_DEV_BSG was added outside of the if BLOCK check, which allows it to
be enabled when CONFIG_BLOCK=n. This leads to many screenlengths of
errors, starting with a parse error on the request_queue_t definition.
Obviously this wasn't intended for CONFIG_BLOCK=n usage, so just move the
option back in to the block.Caught with a randconfig on sh.
Signed-off-by: Paul Mundt
Acked-by: Jens Axboe
Acked-by: FUJITA Tomonori
Signed-off-by: James Bottomley
27 Jul, 2007
2 commits
-
use cpu_clock() instead of sched_clock(). (the latter is not a proper
clock-source)Signed-off-by: Ingo Molnar
Signed-off-by: Jens Axboe -
BLK_DEV_BSG was added outside of the if BLOCK check, which allows it to
be enabled when CONFIG_BLOCK=n. This leads to many screenlengths of
errors, starting with a parse error on the request_queue_t definition.
Obviously this wasn't intended for CONFIG_BLOCK=n usage, so just move the
option back in to the block.Caught with a randconfig on sh.
Signed-off-by: Paul Mundt
--
block/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Signed-off-by: Jens Axboe
24 Jul, 2007
3 commits
-
Some of the code has been gradually transitioned to using the proper
struct request_queue, but there's lots left. So do a full sweet of
the kernel and get rid of this typedef and replace its uses with
the proper type.Signed-off-by: Jens Axboe
-
- kill uhdr in bsg_command structure
- it's not necessary to put SG v4 stuff to block/scsi_ioctl.cSigned-off-by: FUJITA Tomonori
Signed-off-by: James Bottomley -
This replaces the current linear search for a unique minor number with
lib/idr.c.Signed-off-by: FUJITA Tomonori
Acked-by: Jens Axboe
Signed-off-by: James Bottomley
23 Jul, 2007
1 commit
-
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (60 commits)
[SCSI] libsas: make ATA functions selectable by a config option
[SCSI] bsg: unexport sg v3 helper functions
[SCSI] bsg: fix bsg_unregister_queue
[SCSI] bsg: make class backlinks
[SCSI] 3w-9xxx: add support for 9690SA
[SCSI] bsg: fix bsg_register_queue error path
[SCSI] ESP: Increase ESP_BUS_TIMEOUT to 275.
[SCSI] libsas: fix scr_read/write users and update the libata documentation
[SCSI] mpt fusion: update Kconfig help
[SCSI] scsi_transport_sas: add destructor for bsg
[SCSI] iscsi_tcp: buggered kmalloc()
[SCSI] qla2xxx: Update version number to 8.02.00-k2.
[SCSI] qla2xxx: Add ISP25XX support.
[SCSI] qla2xxx: Use pci_try_set_mwi().
[SCSI] qla2xxx: Use PCI-X/PCI-Express read control interfaces.
[SCSI] qla2xxx: Re-factor isp_operations to static structures.
[SCSI] qla2xxx: Validate mid-layer 'underflow' during check-condition handling.
[SCSI] qla2xxx: Correct setting of 'current' and 'supported' speeds during FDMI registration.
[SCSI] qla2xxx: Generalize iIDMA support.
[SCSI] qla2xxx: Generalize FW-Interface-2 support.
...
22 Jul, 2007
1 commit
-
blk_fill_sghdr_rq, blk_unmap_sghdr_rq, and blk_complete_sghdr_rq were
exported for bsg, however bsg was changed to support only sg v4.Signed-off-by: FUJITA Tomonori
Signed-off-by: James Bottomley
21 Jul, 2007
3 commits
-
scsi_sysfs_add_sdev ignores the bsg_register_queue failure, so
bsg_unregister_queue must check whether the queue has a bsg device.Signed-off-by: FUJITA Tomonori
Signed-off-by: James Bottomley -
Currently, bsg doesn't make class backlinks (a process whereby you'd get
a link to bsg in the device directory in the same way you get one for
sg). This is because the bsg device is uninitialised, so the class
device has nothing it can attach to. The fix is to make the bsg device
point to the cdevice of the entity creating the bsg, necessitating
changing the bsg_register_queue() prototype into a form that takes the
generic device.Acked-by: FUJITA Tomonori
Signed-off-by: James Bottomley -
unfortunately, if IS_ERR(class_dev) is true, that means class_dev isn't
null and the check in the error leg is pointless ... it's also asking
for trouble to request unregistration of a device we haven't actually
created (although it works currently). Fix by using explicit gotos and
unregisters.Acked-by: FUJITA Tomonori
Signed-off-by: James Bottomley
20 Jul, 2007
5 commits
-
There are some leftover bits from the task cooperator patch, that was
yanked out again. While it will get reintroduced, no point in having
this write-only stuff in the tree. So yank it.Signed-off-by: Jens Axboe
-
If we have two processes with different ioprio_class, but the same
ioprio_data, their async requests will fall into the same queue. I guess
such behavior is not expected, because it's not right to put real-time
requests and best-effort requests in the same queue.The attached patch fixes the problem by introducing additional *cfqq
fields on cfqd, pointing to per-(class,priority) async queues.Signed-off-by: Jens Axboe
-
Slab destructors were no longer supported after Christoph's
c59def9f222d44bb7e2f0a559f2906191a0862d7 change. They've been
BUGs for both slab and slub, and slob never supported them
either.This rips out support for the dtor pointer from kmem_cache_create()
completely and fixes up every single callsite in the kernel (there were
about 224, not including the slab allocator definitions themselves,
or the documentation references).Signed-off-by: Paul Mundt
-
This patch moves the bsg registration into SCSI so that bsg no longer
has a dependency on the scsi_interface_register API.This can be viewed as a temporary expedient until we can get universal
bsg binding sorted out properly. Also use the sdev bus_id as the
generic bsg name (to avoid clashes with the queue name).Acked-by: FUJITA Tomonori
Acked-by: Jens Axboe
Signed-off-by: James Bottomley -
Transform some calls to kmalloc/memset to a single kzalloc (or kcalloc).
Here is a short excerpt of the semantic patch performing
this transformation:@@
type T2;
expression x;
identifier f,fld;
expression E;
expression E1,E2;
expression e1,e2,e3,y;
statement S;
@@x =
- kmalloc
+ kzalloc
(E1,E2)
... when != \(x->fld=E;\|y=f(...,x,...);\|f(...,x,...);\|x=E;\|while(...) S\|for(e1;e2;e3) S\)
- memset((T2)x,0,E1);@@
expression E1,E2,E3;
@@- kzalloc(E1 * E2,E3)
+ kcalloc(E1,E2,E3)[akpm@linux-foundation.org: get kcalloc args the right way around]
Signed-off-by: Yoann Padioleau
Cc: Richard Henderson
Cc: Ivan Kokshaysky
Acked-by: Russell King
Cc: Bryan Wu
Acked-by: Jiri Slaby
Cc: Dave Airlie
Acked-by: Roland Dreier
Cc: Jiri Kosina
Acked-by: Dmitry Torokhov
Cc: Benjamin Herrenschmidt
Acked-by: Mauro Carvalho Chehab
Acked-by: Pierre Ossman
Cc: Jeff Garzik
Cc: "David S. Miller"
Acked-by: Greg KH
Cc: James Bottomley
Cc: "Antonino A. Daplas"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
18 Jul, 2007
2 commits
-
* 'bsg' of git://git.kernel.dk/data/git/linux-2.6-block:
bsg: fix missing space in version print
Don't define empty struct bsg_class_device if !CONFIG_BLK_DEV_BSG
bsg: Kconfig updates
bsg: minor cleanup
bsg: device hash table cleanup
bsg: fix initialization error handling bugs
bsg: mark FUJITA Tomonori as bsg maintainer
bsg: convert to dynamic major
bsg: address various review comments -
Put WARN_ON and fixed all callers of unregister_blkdev(). Now we can make
unregister_blkdev return void.Cc: Jens Axboe
Signed-off-by: Akinobu Mita
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds