Skip to content

Commit

Permalink
Merge from Linus' tree.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Mackerras committed Sep 25, 2005
2 parents d6a4c84 + ef6bd6e commit e5baa39
Show file tree
Hide file tree
Showing 319 changed files with 10,278 additions and 3,669 deletions.
2 changes: 1 addition & 1 deletion Documentation/DocBook/kernel-hacking.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@ static struct block_device_operations opt_fops = {
</listitem>
<listitem>
<para>
Function names as strings (__func__).
Function names as strings (__FUNCTION__).
</para>
</listitem>
<listitem>
Expand Down
73 changes: 73 additions & 0 deletions Documentation/device-mapper/snapshot.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
Device-mapper snapshot support
==============================

Device-mapper allows you, without massive data copying:

*) To create snapshots of any block device i.e. mountable, saved states of
the block device which are also writable without interfering with the
original content;
*) To create device "forks", i.e. multiple different versions of the
same data stream.


In both cases, dm copies only the chunks of data that get changed and
uses a separate copy-on-write (COW) block device for storage.


There are two dm targets available: snapshot and snapshot-origin.

*) snapshot-origin <origin>

which will normally have one or more snapshots based on it.
You must create the snapshot-origin device before you can create snapshots.
Reads will be mapped directly to the backing device. For each write, the
original data will be saved in the <COW device> of each snapshot to keep
its visible content unchanged, at least until the <COW device> fills up.


*) snapshot <origin> <COW device> <persistent?> <chunksize>

A snapshot is created of the <origin> block device. Changed chunks of
<chunksize> sectors will be stored on the <COW device>. Writes will
only go to the <COW device>. Reads will come from the <COW device> or
from <origin> for unchanged data. <COW device> will often be
smaller than the origin and if it fills up the snapshot will become
useless and be disabled, returning errors. So it is important to monitor
the amount of free space and expand the <COW device> before it fills up.

<persistent?> is P (Persistent) or N (Not persistent - will not survive
after reboot).


How this is used by LVM2
========================
When you create the first LVM2 snapshot of a volume, four dm devices are used:

1) a device containing the original mapping table of the source volume;
2) a device used as the <COW device>;
3) a "snapshot" device, combining #1 and #2, which is the visible snapshot
volume;
4) the "original" volume (which uses the device number used by the original
source volume), whose table is replaced by a "snapshot-origin" mapping
from device #1.

A fixed naming scheme is used, so with the following commands:

lvcreate -L 1G -n base volumeGroup
lvcreate -L 100M --snapshot -n snap volumeGroup/base

we'll have this situation (with volumes in above order):

# dmsetup table|grep volumeGroup

volumeGroup-base-real: 0 2097152 linear 8:19 384
volumeGroup-snap-cow: 0 204800 linear 8:19 2097536
volumeGroup-snap: 0 2097152 snapshot 254:11 254:12 P 16
volumeGroup-base: 0 2097152 snapshot-origin 254:11

# ls -lL /dev/mapper/volumeGroup-*
brw------- 1 root root 254, 11 29 ago 18:15 /dev/mapper/volumeGroup-base-real
brw------- 1 root root 254, 12 29 ago 18:15 /dev/mapper/volumeGroup-snap-cow
brw------- 1 root root 254, 13 29 ago 18:15 /dev/mapper/volumeGroup-snap
brw------- 1 root root 254, 10 29 ago 18:14 /dev/mapper/volumeGroup-base

4 changes: 2 additions & 2 deletions Documentation/sparse.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ or you don't get any checking at all.
Where to get sparse
~~~~~~~~~~~~~~~~~~~

With BK, you can just get it from
With git, you can just get it from

bk://sparse.bkbits.net/sparse
rsync://rsync.kernel.org/pub/scm/devel/sparse/sparse.git

and DaveJ has tar-balls at

Expand Down
74 changes: 31 additions & 43 deletions Documentation/usb/URB.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Revised: 2000-Dec-05.
Again: 2002-Jul-06
Again: 2005-Sep-19

NOTE:

Expand All @@ -18,8 +19,8 @@ called USB Request Block, or URB for short.
and deliver the data and status back.

- Execution of an URB is inherently an asynchronous operation, i.e. the
usb_submit_urb(urb) call returns immediately after it has successfully queued
the requested action.
usb_submit_urb(urb) call returns immediately after it has successfully
queued the requested action.

- Transfers for one URB can be canceled with usb_unlink_urb(urb) at any time.

Expand Down Expand Up @@ -94,8 +95,9 @@ To free an URB, use

void usb_free_urb(struct urb *urb)

You may not free an urb that you've submitted, but which hasn't yet been
returned to you in a completion callback.
You may free an urb that you've submitted, but which hasn't yet been
returned to you in a completion callback. It will automatically be
deallocated when it is no longer in use.


1.4. What has to be filled in?
Expand Down Expand Up @@ -145,48 +147,48 @@ to get seamless ISO streaming.

1.6. How to cancel an already running URB?

For an URB which you've submitted, but which hasn't been returned to
your driver by the host controller, call
There are two ways to cancel an URB you've submitted but which hasn't
been returned to your driver yet. For an asynchronous cancel, call

int usb_unlink_urb(struct urb *urb)

It removes the urb from the internal list and frees all allocated
HW descriptors. The status is changed to reflect unlinking. After
usb_unlink_urb() returns with that status code, you can free the URB
with usb_free_urb().
HW descriptors. The status is changed to reflect unlinking. Note
that the URB will not normally have finished when usb_unlink_urb()
returns; you must still wait for the completion handler to be called.

There is also an asynchronous unlink mode. To use this, set the
the URB_ASYNC_UNLINK flag in urb->transfer flags before calling
usb_unlink_urb(). When using async unlinking, the URB will not
normally be unlinked when usb_unlink_urb() returns. Instead, wait
for the completion handler to be called.
To cancel an URB synchronously, call

void usb_kill_urb(struct urb *urb)

It does everything usb_unlink_urb does, and in addition it waits
until after the URB has been returned and the completion handler
has finished. It also marks the URB as temporarily unusable, so
that if the completion handler or anyone else tries to resubmit it
they will get a -EPERM error. Thus you can be sure that when
usb_kill_urb() returns, the URB is totally idle.


1.7. What about the completion handler?

The handler is of the following type:

typedef void (*usb_complete_t)(struct urb *);
typedef void (*usb_complete_t)(struct urb *, struct pt_regs *)

i.e. it gets just the URB that caused the completion call.
I.e., it gets the URB that caused the completion call, plus the
register values at the time of the corresponding interrupt (if any).
In the completion handler, you should have a look at urb->status to
detect any USB errors. Since the context parameter is included in the URB,
you can pass information to the completion handler.

Note that even when an error (or unlink) is reported, data may have been
transferred. That's because USB transfers are packetized; it might take
sixteen packets to transfer your 1KByte buffer, and ten of them might
have transferred succesfully before the completion is called.
have transferred succesfully before the completion was called.


NOTE: ***** WARNING *****
Don't use urb->dev field in your completion handler; it's cleared
as part of giving urbs back to drivers. (Addressing an issue with
ownership of periodic URBs, which was otherwise ambiguous.) Instead,
use urb->context to hold all the data your driver needs.

NOTE: ***** WARNING *****
Also, NEVER SLEEP IN A COMPLETION HANDLER. These are normally called
NEVER SLEEP IN A COMPLETION HANDLER. These are normally called
during hardware interrupt processing. If you can, defer substantial
work to a tasklet (bottom half) to keep system latencies low. You'll
probably need to use spinlocks to protect data structures you manipulate
Expand Down Expand Up @@ -229,24 +231,10 @@ ISO data with some other event stream.
Interrupt transfers, like isochronous transfers, are periodic, and happen
in intervals that are powers of two (1, 2, 4 etc) units. Units are frames
for full and low speed devices, and microframes for high speed ones.

Currently, after you submit one interrupt URB, that urb is owned by the
host controller driver until you cancel it with usb_unlink_urb(). You
may unlink interrupt urbs in their completion handlers, if you need to.

After a transfer completion is called, the URB is automagically resubmitted.
THIS BEHAVIOR IS EXPECTED TO BE REMOVED!!

Interrupt transfers may only send (or receive) the "maxpacket" value for
the given interrupt endpoint; if you need more data, you will need to
copy that data out of (or into) another buffer. Similarly, you can't
queue interrupt transfers.
THESE RESTRICTIONS ARE EXPECTED TO BE REMOVED!!

Note that this automagic resubmission model does make it awkward to use
interrupt OUT transfers. The portable solution involves unlinking those
OUT urbs after the data is transferred, and perhaps submitting a final
URB for a short packet.

The usb_submit_urb() call modifies urb->interval to the implemented interval
value that is less than or equal to the requested interval value.

In Linux 2.6, unlike earlier versions, interrupt URBs are not automagically
restarted when they complete. They end when the completion handler is
called, just like other URBs. If you want an interrupt URB to be restarted,
your completion handler must resubmit it.
20 changes: 18 additions & 2 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1063,8 +1063,6 @@ M: wli@holomorphy.com
S: Maintained

I2C SUBSYSTEM
P: Greg Kroah-Hartman
M: greg@kroah.com
P: Jean Delvare
M: khali@linux-fr.org
L: lm-sensors@lm-sensors.org
Expand Down Expand Up @@ -1404,6 +1402,18 @@ L: linux-kernel@vger.kernel.org
L: fastboot@osdl.org
S: Maintained

KPROBES
P: Prasanna S Panchamukhi
M: prasanna@in.ibm.com
P: Ananth N Mavinakayanahalli
M: ananth@in.ibm.com
P: Anil S Keshavamurthy
M: anil.s.keshavamurthy@intel.com
P: David S. Miller
M: davem@davemloft.net
L: linux-kernel@vger.kernel.org
S: Maintained

LANMEDIA WAN CARD DRIVER
P: Andrew Stanley-Jones
M: asj@lanmedia.com
Expand Down Expand Up @@ -2266,6 +2276,12 @@ M: kristen.c.accardi@intel.com
L: pcihpd-discuss@lists.sourceforge.net
S: Maintained

SKGE, SKY2 10/100/1000 GIGABIT ETHERNET DRIVERS
P: Stephen Hemminger
M: shemminger@osdl.org
L: netdev@vger.kernel.org
S: Maintained

SPARC (sparc32):
P: William L. Irwin
M: wli@holomorphy.com
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 14
EXTRAVERSION =-rc1
EXTRAVERSION =-rc2
NAME=Affluent Albatross

# *DOCUMENTATION*
Expand Down
9 changes: 6 additions & 3 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ CONFIGURING the kernel:
"make gconfig" X windows (Gtk) based configuration tool.
"make oldconfig" Default all questions based on the contents of
your existing ./.config file.
"make silentoldconfig"
Like above, but avoids cluttering the screen
with questions already answered.

NOTES on "make config":
- having unnecessary drivers will make the kernel bigger, and can
Expand All @@ -169,9 +172,6 @@ CONFIGURING the kernel:
should probably answer 'n' to the questions for
"development", "experimental", or "debugging" features.

- Check the top Makefile for further site-dependent configuration
(default SVGA mode etc).

COMPILING the kernel:

- Make sure you have gcc 2.95.3 available.
Expand Down Expand Up @@ -199,6 +199,9 @@ COMPILING the kernel:
are installing a new kernel with the same version number as your
working kernel, make a backup of your modules directory before you
do a "make modules_install".
Alternatively, before compiling, use the kernel config option
"LOCALVERSION" to append a unique suffix to the regular kernel version.
LOCALVERSION can be set in the "General Setup" menu.

- In order to boot your new kernel, you'll need to copy the kernel
image (e.g. .../linux/arch/i386/boot/bzImage after compilation)
Expand Down
4 changes: 4 additions & 0 deletions arch/alpha/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ common_shutdown_1(void *generic_ptr)
/* If booted from SRM, reset some of the original environment. */
if (alpha_using_srm) {
#ifdef CONFIG_DUMMY_CONSOLE
/* If we've gotten here after SysRq-b, leave interrupt
context before taking over the console. */
if (in_interrupt())
irq_exit();
/* This has the effect of resetting the VGA video origin. */
take_over_console(&dummy_con, 0, MAX_NR_CONSOLES-1, 1);
#endif
Expand Down
Loading

0 comments on commit e5baa39

Please sign in to comment.