Andreas Dilger [Sun, 28 Apr 2002 12:28:40 +0000 (05:28 -0700)]
[PATCH] minor cleanup in ext3 code
The following patch is a _very minor_ cleanup in the ext3 code for
ext3_prepare_write(). It simply removes the setting of "handle" from
the current transaction handle, because "handle" is actually set again
a couple of lines later, where it properly allocates a new transaction
handle for this write. The code removed in this patch is probably left
over from some development version of ext3 where the transaction handle
was started before ext3_prepare_write was called.
The only reason I saw this was because I was trying to find where the
handle was allocated for an ext3 file write, and at first glance it
didn't appear to be allocated anywhere...
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...)
David Brownell [Fri, 26 Apr 2002 05:14:02 +0000 (22:14 -0700)]
[PATCH] PATCH 2.5.10 ehci.txt
USB ehci documentation update
It mostly updates the description of the EHCI driver to point out
that several non-NEC implementations are now expected to work,
and that (high speed) ISO is supported.
The patch cleans up the handling of connection checking to
match the truth that it's effectively tristate (connected, not,
and can't know) vs binary ("connected" and "can't know"
as the same value, since it was OK to ifup). Since ethtool
supports the tristate semantics, it matters now.
USB keyspan driver patch that fixes lots of different problems.
- Modified port open, port close, and send setup() logic to fix various data and endpoint
synchronization bugs and device LED status bugs.
- Changed keyspan_write_room() to accurately return transmit buffer availability.
- Changed forwardingLength from 1 to 16 for all adapters.
added CONFIG_USB_DYNAMIC_MINORS support to the USB core
Here's a patch that finishes off my previous patch that enabled us to
use less than 16 minor numbers per USB device that uses the USB major
number. This patch allows all such devices to share all 256 minor
numbers at once, much like the usbserial core shares the USB serial
major with all usb-serial drivers. This also solves Oliver's problem of
having 30 printers :)
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.