Benjamin LaHaise [Sun, 28 Apr 2002 12:15:46 +0000 (05:15 -0700)]
[PATCH] vsnprintf returns incorrect length
In conjunction with some of the earlier problems found in /proc code,
now it turns out that snprintf doesn't work correctly in the kernel...
Without the following patch, snprintf can return lengths greater than
the size argument passed. The net effect is that code using the return
value from snprintf can still buffer overrun. This is fixed by not
updating the pointer in the buffer unless there is actually space.
Russell King [Sun, 28 Apr 2002 12:15:14 +0000 (05:15 -0700)]
[PATCH] drop obsolete stat/waitpid/s(sg)etmask/signal from ARM build
The following patch drops the above functions from the ARM port; we've
already removed them from the syscall table on ARM, so we can safely
remove these from the ARM build.
Brian Gerst [Sun, 28 Apr 2002 12:03:00 +0000 (05:03 -0700)]
[PATCH] Removing SYMBOL_NAME part 1
The SYMBOL_NAME macro (and variations) have been obsolete since 2.1.0,
when the option to compile the kernel in a.out format was removed. This
patch starts the process of removing these macros, starting with x86.
Dave Jones [Sun, 28 Apr 2002 11:58:26 +0000 (04:58 -0700)]
[PATCH] get rid of some blk.h cruft
Originally by Christoph Hellwig back in February.
It recieved no objections when posted to l-k & Jens.
o remove DEVICE_REQUEST definitions - never used in blk.h itself.
o remove DEVICE_ON() - never used at all.
o define LOCAL_END_REQUEST when we do not want end_request() instead
of other hacks.
o remove DEVICE_OFF() - only used in floppy driver, thus one now has
a private end_request().
o use private end_request() functions for drivers not providing
randomness.
o remove TIMEOUT_VALUE - only ever used in hd.c
Dave Jones [Sun, 28 Apr 2002 11:57:35 +0000 (04:57 -0700)]
[PATCH] Dynamic LDT sizing.
Originally from Manfred Spraul.
* dynamically grow the LDT
Every app that's linked against libpthread right now allocates a full 64
kB LDT, without proper error handling, and always from the vmalloc area
Dave Jones [Sun, 28 Apr 2002 11:55:46 +0000 (04:55 -0700)]
[PATCH] PCI access method fallback.
Some SiS boards won't boot without pci=bios forcing their method.
The reason for this is in the probe method, we try the BIOS method, and it
succeeds and we store the pci_ops. We then try the direct access, it fails
and we trash the old pci_ops.
The patch stores the pci_ops when BIOS method succeeds and restores it
if the direct hardware access method fails.
Dave Jones [Sun, 28 Apr 2002 11:55:26 +0000 (04:55 -0700)]
[PATCH] fix xconfig.
We now have so many CONFIG_ options we overflow a buffer in xconfig.
Doubling the size should see us until someone either writes a replacement,
or can be bothered to make it dynamically allocate.
Dave Jones [Sun, 28 Apr 2002 11:54:56 +0000 (04:54 -0700)]
[PATCH] bluesmoke update.
o P4 thermal throttling is now compile time option
o ifdefs cleaned up due to above
o Only poke the LVT if thermal throttling is enabled.
o Remove bogus cache flushing as per previous discussion.
o Replace hard coded timer values with MCE_RATE
o Change default polling frequency from 5 to 15 seconds
o SMP fixes. (Don't readd timer)
o Compile time warning fixes.
o Add config helptext
Nathan Scott [Sun, 28 Apr 2002 11:46:35 +0000 (04:46 -0700)]
[PATCH] xattr locking
This is a patch from Andreas Gruenbacher (the ext2/ext3 EA patch
maintainer) which converts the extended attribute VFS code from
using the BKL to instead use the inode semaphore; please apply.
Douglas Gilbert [Sun, 28 Apr 2002 11:45:21 +0000 (04:45 -0700)]
[PATCH] Report Luns for scsi devices 2.5.10
Here's a patch for SCSI REPORT LUN scanning, including Douglas Gilbert's
recent changes to support a short INQUIRY followed by a longer INQUIRY.
Please apply, or let me know if you think it needs any modifications.
It's against linux-2.5.4. It does _not_ change the size of the linux lun.
A description of the 8 byte LUN layout can be found on page 35 of:
ftp://ftp.t10.org/t10/drafts/scc2/scc2r04.pdf
The above is a draft, but matches the layout seen on most disk arrays
(including EMC, IBM, LSI, and Hitachi). Later drafts (post SCSI-3) have
this information in the SCSI Architectural Model.
Patch description:
Adds REPORT LUN scanning.
Adds Douglas Gilbert's INQUIRY modification so broken devices that cannot handlean INQUIRY
of more than 36 bytes can be black-listed, plus saving the INQUIRY
result in Scsi_Device.
Adds scan_scsis_target function, replacing code in scan_scsis and parts
of scan_scsis_single. This cleans up the scanning code, and removes a
really ugly for loop. It would be difficult to add REPORT LUN scanning
without this change.
Adds missing scsi_release_commandblocks().
No longer sets max_dev_lun out of bounds for BLIST_FORCELUN devices.
Fixes scanning past LUN 7 for SCSI-3 devices (the patch in 2.4.17
for that fix will not cleanly apply against this code).
Douglas Gilbert [Sun, 28 Apr 2002 11:45:10 +0000 (04:45 -0700)]
[PATCH] scsi generic (sg) driver 2.5.10
Changes since 3.5.24 (20020319)
- use Scsi_Request::upper_private_data
- zero buffers for non-root users
Changes since 3.5.23 (20011231)
- change EACCES to EPERM when O_RDONLY is insufficient
- suppress newlines in host string
- fix xfer direction, old interface, short reply_len [Travers Carter]
Martin Dalecki [Sun, 28 Apr 2002 04:18:09 +0000 (21:18 -0700)]
[PATCH] 2.5.10 IDE 44
Reduce the "rain forest" of pointers a bit.
- Use the channel info from the drive instead of from hwgroup where possible.
Since we have now a direct association between a channel and irq, we can fix
the handler for unexpected interrupts to don't have to iterate over multiple
possibilities.
- Finally it was just possible to remove the circular list of channels
associated with a hwif. The hwif member of struct hwgroup_s as well as
next member if struct ata_channel are gone.
- Unify ide_build_sglist() and raw_build_sglist() in to one function. Use the
queue associated with a request in the case of a CMD request there instead of
referencing the device minor number. This will be pushed even further later.
Martin Dalecki [Sun, 28 Apr 2002 03:21:49 +0000 (20:21 -0700)]
[PATCH] 2.5.10 IDE 43
Some of the following is a bit of sensitive... but anyway it has to be done.
- Scarp "portability" macros ide_request_irq() and ide_free_irq(). What a
great of a surprise in the face of a kernel nowadays ported to nearly any
major CPU out there, but apparently no platform needs something special here.
All of them are just using the normal request_irq() and free_irq(). If some
unusual platform (read obsolete door blocker) I have overlooked intentionally
needs something special - please just hack the platform specific
request_irq() and free_irq()- they are *far off* from being performance
relevant. (Hint: You could use cooked default irq values to detect there
whatever the caller was the ATA driver to decide what to do about it.)
- Kill ide_check_region() ide_request_region() and ide_release_region()
altogether. Add comments explaining the code there. Same arguments as above
apply. Additionally we want to be able at some time to do for example mmapped
PCI address space access on IA32 instead of port IO.
- Rewrite the initialization code to don't use check_region at all. Add some
comments there, which explain what's actually happening.
- Fix creeping in of a c99 construct.
- Make the main interrupt handler take a channel as data instead of the
hwgroup. This is the entity an interrupt is physically associated with. PCI
interrupt sharing is handled in a generically anyway. Analogously the main
data entity of a device request queue (q->queuedata) is the device and not
the hwgroup. However right now we are only able to push it down to the
channel level. The intention is to advance the choose_drive() function to
just check for equal interrupt values for serialization of request and
thus to get rid of the hwgroup altogether.
NTFS: 2.0.4 - Cleanups and updates for kernel 2.5.11.
- Add documentation on how to use the MD driver to be able to use NTFS
stripe and volume sets in Linux and generally cleanup documentation
a bit.
Remove all uses of kdev_t in favour of struct block_device *:
- Change compress.c::ntfs_file_read_compressed_block() to use sb_getblk()
instead of getblk().
- Change super.c::ntfs_fill_suoer() to use bdev_hardsect_size() instead
of get_hardsect_size().
- No need to get old blocksize in super.c::ntfs_fill_super() as
fs/super.c::get_sb_bdev() already does this.
- Set bh->b_bdev instead of bh->b_dev throughout aops.c.
NTFS 2.0.3: Small bug fixes, cleanups, and performance improvements.
- Remove some dead code from mft.c.
- Optimize readpage and read_block functions throughout aops.c so that
only initialized blocks are read. Non-initialized ones have their
buffer head mapped, zeroed, and set up to date, without scheduling
any i/o. Thanks to Al Viro for advice on how to avoid the device i/o.
Thanks go to Andrew Morton for spotting the below:
- Fix buglet in allocate_compression_buffers() error code path.
- Call flush_dcache_page() after modifying page cache page contents in
ntfs_file_readpage().
- Check for existence of page buffers throughout aops.c before calling
create_empty_buffers(). This happens when an I/O error occurs and the
read is retried. (It also happens once writing is implemented so that
needed doing anyway but I had left it for later...)
- Don't BUG_ON() uptodate and/or mapped buffers throughout aops.c in
readpage and read_block functions. Reasoning same as above (i.e. I/O
error retries and future write code paths.)
Martin Dalecki [Fri, 26 Apr 2002 05:37:03 +0000 (22:37 -0700)]
[PATCH] 2.5.10 IDE 42
- Streamline the usage of sector_t over the strategy routines in question a
bit. Streamline the do_request code in ide-disk.c.
- Improve the readability of start_request in ide.c.
- Remove obsolete/nowhere used stuff from hdreg.h.
- Splitup special_t into classical flag field.
- Use only a single field to determine the capacity of a drive. Make this
field and the code paths it follows as far as possible use the sector_t
instead of a hard coded integer types. This increases the chances that at
some distant point in time we will indeed be able to use 64 bit wide sector_t
entities. (Disks are getting huge those times now...)
so when the first option is set to y, the second to m, we have e.g.
snd-pcm.o on both $(obj-y) and $(obj-m). We correctly don't build
the modular version in this case.
However, if snd-pcm.o was a multi-part object, we did automatically
generate a link rule for both the modular and the built-in version,
which caused a warning - that's now fixed.
Alexander Viro [Thu, 25 Apr 2002 06:51:13 +0000 (23:51 -0700)]
[PATCH] (14/15) big struct block_device * push (first series)
- bdevname() switched to struct block_device *. Old variant (taking
kdev_t) renamed to __bdevname() (very few callers remain). This
allow to drop ->b_dev conveniently - it's duplicated by ->b_bdev
and most of remaining users were bdevname(bh->b_dev) in various
places.
Alexander Viro [Thu, 25 Apr 2002 06:50:28 +0000 (23:50 -0700)]
[PATCH] (9/15) big struct block_device * push (first series)
- this one is interesting and will play in the next series as well;
affected place is fs/block_dev.c::do_open(). We check if bdev is
a partition (same way it is done in generic_make_request()) and
if it is - open entire disk and put pointer to its bdev into a
new field bdev->bd_contains. Otherwise (non-partition) we
set bdev->bd_contains to bdev. Corresponding cleanup done in
blkdev_put() (and failure path in do_open()) - when the last opener
goes away we close bdev->bd_contains if bdev is a partition (i.e.
not equal to its ->bd_contains) and set it to NULL.
Immediate effect is that we can get from bdev of partition to
bdev of disk when submitting a bio, but it also opens a way
to handle partition-parsing in a sane way. That will be done
in the next series.
Alexander Viro [Thu, 25 Apr 2002 06:49:34 +0000 (23:49 -0700)]
[PATCH] (3/15) big struct block_device * push (first series)
- new helpers: queue_hardsect_size() and bdev_hardsect_size(). Analogous
to get_hardsect_size() for queue and struct block_device * respectively
Most of get_hardsect_size() callers converted to these.
Martin Dalecki [Thu, 25 Apr 2002 06:36:23 +0000 (23:36 -0700)]
[PATCH] 2.5.10 IDE 41
- Revoke the TCQ stuff. Well having it for some time showed just nicely what
has to be done before it can be included cleanly. But it's just not ready
yet.
For more explanations please simply track the usage of the special field of
struct request - *both* in the generic request handling code and in overall
driver code.
Forward port changes from 2.4.19-pre, originally by Keith Owens.
This driver used to build a module target called "aic7xxx_mod.o" and
introduced the MOD_TARGET variable to rename it to "aic7xxx.o" at
modules_install time.
Now, we just build "aic7xxx.o" directly, which becomes possible after
renaming aic7xxx.c to aic7xxx_core.c, as done in 2.4.19-pre.
Hanna V. Linder [Wed, 24 Apr 2002 08:24:02 +0000 (01:24 -0700)]
[PATCH] FastWalk Dcache
Reduce cacheline bouncing when a dentry is in the cache.
Specifically, the d_count reference counter is not incremented and
decremented for every dentry in a path during path walking if the dentry
is in the dcache. Execcisve atomic inc/dec's are expensive on SMP
systems due to the cachline bouncing.
This patch fixes up some lose ends left over from the last x86-64 jumbo merge.
- make it compile again. ia32_ioctl was referencing IDE ioctls that got
remove in a merge race
- Use the memset/FXRSTOR way to initialize the FPU, as discussed.
- Fix semctl/shmctl ABI (thanks to Andreas Schwab)
- Other minor fixes.
This fixes compile errors. It has been tested with a weekend of Bonnie++ 8GB
runs on a RAID0 setup at the OSDL. This was built against and tested on 2.5.8
and applies cleanly to 2.5.9.
LSI told me they have a version 2.0 of the driver in development but
it would be really nice to have the dang thing working now ;-)