- 28 Oct, 2002 13 commits
-
-
Jens Axboe authored
Make merge_bvec_fn() return number of bytes we can accept at a given offset, instead of a bool.
-
Jens Axboe authored
o Remove some ide compile warnings, old suspend stuff is not used at all, for instance. o If elv_next_request() returns NULL, remember to clear hwgroup->busy if we don't have pending commands. This is important. If a queue prep function kills a request, we would before quit with hwgroup busy. This essentially froze the hwgroup. o Don't do own list manipulation in ide_do_drive_cmd(). Use the new and great elv_add_request() functions o Fix race on inspection of request after io completion by bumping the request reference count prior to ioscheduler insertion. o Make ide-floppy understand a REQ_BLOCK_PC eject. More may follow, it's ATAPI after all. o Clear hw before passing to ide_init_hwif_ports(). Fixes oops on non-pci controllers.
-
Jens Axboe authored
This adds an end_that_request_chunk() helper, that puts the core functionality in __end_that_request_first(). This one deals in bytes. end_that_request_first() does the 512 multiply, and then end_that_request_chunk() can just use it directly. This enables ide-cd to do proper dma in sizes that are not sector aligned. Some of the most important CD functions (ripping audio dma, burning audio cds, burning raw cds) _require_ this or we will be in pio. That stinks. We simply cannot use pio for these, not on writers much that are fast!
-
Jens Axboe authored
o Always use list_del_init() on request queuelist, this allows us to sanity check the integrity of the request on insertion and removal. So we can complain loudly instead of silently corrupting memory. o Add references to requests. This is cheap, since we dont have to use an atomic variable for it (all puts are inside queue lock). We've had a bug in IDE for years where we want to inspect request state after io completion, but this is not possible to do race free right now. REQ_BLOCK_PC and sgio will need this too, for checking io residual etc. This is not just a theoretical race, I've seen it happen.
-
Jens Axboe authored
Cleanup the last_merge logic. There are two reasons for clearing last_merge when we are dealing with integrity, and these are: o Clear when handing the request to the driver, so we don't merge on a started request. o Clear when a request is taken off the list. This cannot be done from the driver (above case would already have been hit), but it can happen when we merge two requests. This makes it a lot nicer, it was always peculiar how we cleared in put_request.
-
Jens Axboe authored
Make it possible for a device to specify the dma alignment restrictions it has. This will be used by future infrastructure when mapping in user pages, and allows us to dma to on ATAPI even though user address and length is not sector size aligned.
-
Jens Axboe authored
Extend q->prep_rq_fn() to return one of three values: o BLKPREP_OK: request is good, return it o BLKPREP_KILL: request is bad, end it completely o BLKPREP_DEFER: request is good, but we can't take it now We maintain compatability with old prep functions (if any, outside of ide-cd). This change is needed or SCSI to use prep function for command init, if sg table allocation fails we can just defer the request.
-
Jens Axboe authored
Add some missing bits, and make it generally a bit more useful outside of REQ_PC requests.
-
Jens Axboe authored
Request insertion in the current tree is a mess. We have all sorts of variants of *elv_add_request*, and it's not at all clear who does what and with what locks (or not). This patch cleans it up to be: o __elv_add_request(queue, request, at_end, plug) Core function, requires queue lock to be held o elv_add_request(queue, request, at_end, plug) Like __elv_add_request(), but grabs queue lock o __elv_add_request_pos(queue, request, position) Insert request at a given location, lock must be held
-
Jens Axboe authored
We must return -EIO if the command fails (the 5/20/00 sense check is just helping return more sane info), not -EINVAL. Getting -EINVAL return on an ioctl if a command fails is less than helpful for applications...
-
Jens Axboe authored
o Split blk_queue_bounce() into a slow and fast path. The fast path is inlined, only if we actually need to check the bio for possible bounces (and bounce) do we enter __blk_queue_bounce() slow path. o Fix a nasty bug that could cause corruption for file systems not using PAGE_CACHE_SIZE blok size! We were not correctly setting the 'to' bv_offset correctly. o Add BIO_BOUNCE flag. Later patches will use this for debug checking.
-
Jens Axboe authored
Make deadline_merge() prefetch the next entry on the list.
-
Manfred Spraul authored
wake_up_interruptible() and _sync() calls are reversed in pipe_read(). The attached patches only calls _sync if a schedule() call follows.
-
- 18 Oct, 2002 27 commits
-
-
Linus Torvalds authored
-
Patrick Mochel authored
The problem was that when the refcount hit 0, it was unconditionally assuming that it had been added, which is wrong. The patch below corrects that, and fixes the Oops when loading the floppy driver.
-
bk://linuxusb.bkbits.net/pnp-2.5Linus Torvalds authored
into home.transmeta.com:/home/torvalds/v2.5/linux
-
Linus Torvalds authored
into home.transmeta.com:/home/torvalds/v2.5/linux
-
Andi Kleen authored
Several ports (x86-64,ppc64,sparc64) which do 32bit ioctl emulation have functions for drivers to let them define their own translation handlers. So far it was a bit complicated to use because there was no standard include file that declares the prototypes for this stuff. Then drivers and other subsystems can start to declare their own ioctl translation handlers. This patch add include/linux/ioctl32.h to fix this. The actual implementation is in arch specific code. It has been coordinated with DaveM and Anton. This patch is needed for the x86-64 merge I sent in separate mail. There is currently no preprocessor symbol that the drivers can test to see if they should use this. So far they have to check arch symbols. This will be fixed later when all 64bit ports that need it add the dynamic ioctl registration API too (that's ia64,s390x,mips64)
-
Andi Kleen authored
This fixes a few files that got lost with the last merge and merges with 2.5.43/i386. Only changes architecture specific files. It depends on one other patch (for linux/ioctl32.h) which I'm sending separately. Changes: - Include missing files (pageattr.c) and Makefile changes - Update IA32 subsystem. Various small fixes and a big merge with sparc64. - Change HZ to 1000 - Merge some of the 2.5.43/i386 profiling changes. No full oprofile yet. - Fix many warnings - Update defconfig - Various other smaller cleanups and bugfixes.
-
Alexander Viro authored
* switched to private queues * set ->queue
-
Linus Torvalds authored
into home.transmeta.com:/home/torvalds/v2.5/linux
-
Alexander Viro authored
* switched to private queues * set ->queue and ->private_data * switched to use of ->bd_disk/->rq_disk * merged private blocksize, etc. arrays into nbd_dev[] * cleaned up
-
Alexander Viro authored
* switched to private queues * set ->queue and ->private_data * switched to use of ->rq_disk
-
Alexander Viro authored
sbpcd.c: removes bogus duplicate definition of sbpcd_lock, use of CURRENT (we are using private queue) and call of invalidate_buffers() in ->media_changed() (caller does it itself). That went in a changeset from davej - looks like a merge problem... sr.c: braino in ifdefed printk - s/disk/cd->disk/. Thanks to jejb for spotting that one...
-
bk://linux-bt.bkbits.net/bt-2.5Linus Torvalds authored
into home.transmeta.com:/home/torvalds/v2.5/linux
-
Linus Torvalds authored
into home.transmeta.com:/home/torvalds/v2.5/linux
-
David S. Miller authored
into nuts.ninka.net:/home/davem/src/BK/sparc-2.5
-
David S. Miller authored
-
Linus Torvalds authored
-
Dipankar Sarma authored
This adds a set of list macros that make handling of list protected by RCU simpler. The interfaces added are - list_add_rcu list_add_tail_rcu - Adds an element by taking care of memory barrier (wmb()). list_del_rcu - Deletes an element but doesn't re-initialize the pointers in the element for supporting RCU based traversal. list_for_each_rcu __list_for_each_rcu - Traversal of RCU protected list - takes care of memory barriers transparently.
-
Dipankar Sarma authored
This first RCU helper patch adds a read_barrier_depends() primitive to all archs which is NOP for archs that doesn't require an rmb() for data dependent reads when writes are ordered using a wmb(). In reality, only alpha requires an rmb(), the rest are NOPs. It is likely to be necessary in most situations that would use RCU. Please apply. Description : Sometime ago, during a discussion on lock-free lookups, it was agreed that an additional memory barrier interface, read_barrier_depends() that is lighter than an rmb(), is necessary to make sure that data-dependent reads are not re-ordered over this barrier. For many processors, data-dependency enforces order, so this interface is a NOP, but for those that don't (like alpha), it can be a rmb(). For example, the following code would force ordering (the initial value of "a" is zero, "b" is one, and "p" is "&a"): CPU 0 CPU 1 b = 2; memory_barrier(); p = &b; q = p; read_barrier_depends(); d = *q; because the read of "*q" depends on the read of "p" and these two reads should be separated by a read_barrier_depends(). However, the following code, with the same initial values for "a" and "b": CPU 0 CPU 1 a = 2; memory_barrier(); b = 3; y = b; read_barrier_depends(); x = a; does not enforce ordering, since there is no data dependency between the read of "a" and the read of "b". Therefore, on some CPUs, such as Alpha, "y" could be set to 3 and "x" to 0. rmb() needs to be used here, not read_barrier_depends(). The original discussion can be found at - http://marc.theaimsgroup.com/?t=100259422200002&r=1&w=2 Explanation of the need for read_barrier_depends() can be found at http://lse.sf.net/locking/wmbdd.html
-
David S. Miller authored
-
Frank Davis authored
This fixes a 'used but not declared' compile error
-
David S. Miller authored
It ends up trying to list_del() from an uninitialized list_head.
-
Steven Whitehouse authored
-
Hideaki Yoshifuji authored
- Ignore queries for invalid addresses - MLD for link-local addresses
-
Hideaki Yoshifuji authored
-
David S. Miller authored
-
David S. Miller authored
into nuts.ninka.net:/home/davem/src/BK/net-2.5
-
http://linux-lksctp.bkbits.net/lksctp-2.5David S. Miller authored
into nuts.ninka.net:/home/davem/src/BK/sctp-2.5
-