Steven Toth [Tue, 3 Oct 2006 00:35:40 +0000 (21:35 -0300)]
V4L/DVB (4699): CX24109 patch to eliminate the weird mis-tunings
A number of people have been reporting wierd tuning problems with various
cards. Yeasah tracked down the problem to a miss-read datasheet. This
resolves the problems.
Hans Verkuil [Sun, 1 Oct 2006 20:56:32 +0000 (17:56 -0300)]
V4L/DVB (4688): Fix msp343xG handling (regression from 2.6.16)
The msp3430G and msp3435G models cannot do Automatic Standard Detection.
So these should be forced to BTSC. These chips are early production versions
for the msp34xxG series and are quite rare.
The workaround for kernel 2.6.18 is to use 'standard=32' as msp3400
module option. Due to broken handling of the 'standard' option in 2.6.17 there is
no workaround possible for that kernel.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
V4L/DVB (4685): Fix compiler warning in drivers/media/video/video-buf.c
Using a double cast to avoid compiler warnings when building for PAE.
Compiler doesn't like direct casting of a 32 bit ptr to 64 bit integer.
Signed-off-by: Martin J. Bligh <mbligh@google.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
V4L/DVB (4681): Cx88: fix analog capture notch filter
This patch changes the setting of the cx2388x notch filter to match that of
the video capture sample frequency, removing some annoying interference
lines THAT would appear when capturing composite video. This has been tested
in PAL and NTSC TV norms.
It sets the Y/C separation luma notch filter, which removes the chroma signal
from the luma signal when using a composite input.
The luma notch filter operates at the video decoder's frequency, not the ADC's
frequency or at the frequency of the scaled video. Y/C separation happens after
the sample rate converter, before video scaling.
The datasheet provides plots of the filter response for three _video decoder_
frequencies, 4x Fsc, square pixel, and ccir601. These are the same three
frequencies for the notch filter control. It seems pretty clear that this
filter should be set based on the video decoder frequency. The cx88 driver
always uses a video decoder frequency of 4xFsc.
Signed-off-by: Lars Gjesse Kjellberg <lars.g.kjellberg@get2net.dk> Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
V4L/DVB (4673): Mark the two newer ioctls as experimental
VIDIOC_ENUM_FRAMESIZES and VIDIOC_ENUM_FRAMEINTERVALS ioctls are meant
to be used to provide better support for webcams. Currently, it is not yet
used on kernel drivers.
Better to keep it marked as experimental, until we have several kernel drivers
supporting those features.
Petr Baudis [Tue, 26 Sep 2006 19:53:53 +0000 (16:53 -0300)]
V4L/DVB (4671): Support for SAA7134-based AVerTV Hybrid A16AR
This adds support for a hybrid PAL/DVB/FM card. Unfortunately I tested
only the DVB since I don't have any proper antenna available and I can
receive even the DVB just barely so; I can hear noise in the FM part but I
couldn't catch any station, then again I don't have an FM antenna either.
The PAL/FM and IR control data are based on what I harvested on the 'net.
Perhaps I or someone else will fix them if they turn out to be wrong.
Signed-off-by: Petr Baudis <pasky@ucw.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
David Hardeman [Tue, 26 Sep 2006 19:39:00 +0000 (16:39 -0300)]
V4L/DVB (4670): Allow RC5 codes 64 - 127 in ir-kbd-i2c.c
The RC5 coding has for a long time supported commands 64-127 in addition
to 0-63. This is controlled by the second bit of the RC5 packet (see
The attached patch modifies ir-kbd-i2c.c to allow for commands 64-127,
tested with a PVR350 card in combination with a programmable remote.
Signed-off-by: David Hardeman <david@hardeman.nu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Michael Krufky [Mon, 25 Sep 2006 17:09:10 +0000 (14:09 -0300)]
V4L/DVB (4668): Cx88: rename mpeg capability flags from CX88_BOARD_FOO to CX88_MPEG_FOO
The flags for mpeg capabilities are sub-optimally named as
CX88_BOARD_DVB and CX88_BOARD_BLACKBIRD, which creates some confusion.
This patch renames the above to CX88_MPEG_DVB and CX88_MPEG_BLACKBIRD.
Steven Toth [Mon, 25 Sep 2006 15:43:45 +0000 (12:43 -0300)]
V4L/DVB (4667): Changed cx88_board .dvb and .register to an enum.
Some basic cleanup in preperation for a future patch where
the cx88-mpeg functions have to deal with the port being
used by multiple frontends in (mpeg2 hw encoder and dvb demod).
Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Steven Toth [Mon, 25 Sep 2006 15:41:53 +0000 (12:41 -0300)]
V4L/DVB (4665): Add frontend structure callback for bus acquisition.
This patch enables generic bus arbitration callbacks enabling
dvbcore frontend_open and frontend_release to pass 'acquire'
and 'release' hardware messages back into the DVB bridge frameworks.
Frameworks like cx88 can then implement single bus multiple demod
card sharing features, which would prohibit two frontends from attempting
to use a single transport bus at the same time.
Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Mike Isely [Sun, 24 Sep 2006 01:30:50 +0000 (22:30 -0300)]
V4L/DVB (4663): Pvrusb2: Get rid of private global context array brain damage
A previous attempt to deal with the upcoming loss of
video_set_drvdata() and video_get_drvdata() resulted in logic which
causes a circular locking dependency - also known as a deadlock. This
changeset attacks the problem in a different manner, using a technique
that no longer requires the problematic mutex (or that private global
array either).
Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Implement VIDIOC_INT_SET_REGISTER and VIDIOC_INT_GET_REGISTER for the
pvrusb2 driver. This is a debugging aid which will not be enabled
unless CONFIG_VIDEO_ADV_DEBUG has been enabled.
Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
V4L/DVB (4660): Some cleanups at helper chips menu
Rearranged itens, so that decoders came first;
cx25840 is, in fact, an audio and video decoder;
Fixed some incorrect upercases;
Removed the word "chip" for some audio processors at item name;
Removed the word "driver" for some item names;
V4L/DVB (4648): Hauppauge Nova-T 500 support added
This changeset finalizes the support of the Hauppauge Nova-T 500 (Dual DVB-T).
It adds correct AGC setting for the 3000P, correct firmware download state
detection.
Additionally it fixes the mt2060-driver to be able to be used with dvb_attach.
Signed-off-by: Patrick Boettcher <pb@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
V4L/DVB (4647): Added module for DiB0700 based devices
Added module for DiB0700 based USB devices. This module is preliminary and
untested (because of a lack of test devices) but should work.
Further commits will be necessary to make it work properly.
Signed-off-by: Patrick Boettcher <pb@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Changed the attach-function of the dib3000mc-driver to return only one
frontend. In case of multiple dib3000-chips on one board, one has to call the
i2c-enumeration manually before.
Added a field to Microtune 2060 config to output the clock to other
tuners/device on a board.
Signed-off-by: Patrick Boettcher <pb@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
V4L/DVB (4643): Multi-input patch for DVB-USB device
This patch is the first commit of the Multiple Input Patch for the DVB-USB frame
work.
It changes the DVB-USB-device to be able to have more than one streaming input
(e.g. multiple DVB-T sources) on one device. This is a necessary feature for
the upcoming DiB7700 driven devices.
Signed-off-by: Patrick Boettcher <pb@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Linus Torvalds [Tue, 3 Oct 2006 16:45:46 +0000 (09:45 -0700)]
x86: Fix booting with "no387 nofxsr"
Jesper Juhl reported that testing the software math-emulation by forcing
"no387" doesn't work on modern CPU's.
The reason was two-fold:
- you also need to pass in "nofxsr" to make sure that we not only don't
touch the old i387 legacy hardware, it also needs to disable the
modern XMM/FXSR sequences
- "nofxsr" didn't actually clear the capability bits immediately,
leaving the early boot sequence still using FXSR until we got to
the identify_cpu() stage.
This fixes the "nofxsr" flag to take effect immediately on the boot CPU.
Linus Torvalds [Tue, 3 Oct 2006 16:14:00 +0000 (09:14 -0700)]
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm:
[ARM] 3848/1: pxafb: Add option of fixing video modes and spitz QVGA mode support
[ARM] 3880/1: remove the last trace of iop31x support
[ARM] 3879/1: ep93xx: instantiate platform devices for ep93xx ethernet
[ARM] 3809/3: get rid of 4 megabyte kernel image size limit
[ARM] Fix XIP_KERNEL build error in arch/arm/mm/mmu.c
[ARM] 3874/1: Remove leftover usage of asm/timeofday.h
* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6:
sh: Fixup __raw_read_trylock().
sh: Kill off remaining config.h references.
sh: Initial gitignore list
sh: build fixes for defconfigs.
sh: Kill off more dead headers.
sh: Set pclk default for SH7705.
sh: defconfig updates.
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
[SPARC64]: Update defconfig.
[SPARC64]: Do not include compat.h from asm-sparc64/signal.h any more.
[SPARC64]: Move signal compat bits to new header file.
* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (29 commits)
[POWERPC] Fix rheap alignment problem
[POWERPC] Use check_legacy_ioport() for ISAPnP
[POWERPC] Avoid NULL pointer in gpio1_interrupt
[POWERPC] Enable generic rtc hook for the MPC8349 mITX
[POWERPC] Add powerpc get/set_rtc_time interface to new generic rtc class
[POWERPC] Create a "wrapper" script and use it in arch/powerpc/boot
[POWERPC] fix spin lock nesting in hvc_iseries
[POWERPC] EEH failure to mark pci slot as frozen.
[POWERPC] update powerpc defconfig files after libata kconfig breakage
[POWERPC] enable sysrq in pmac32_defconfig
[POWERPC] UPIO_TSI cleanup
[POWERPC] rewrite mkprep and mkbugboot in sane C
[POWERPC] maple/pci iomem annotations
[POWERPC] powerpc oprofile __user annotations
[POWERPC] cell spufs iomem annotations
[POWERPC] NULL noise removal: spufs
[POWERPC] ppc math-emu needs -fno-builtin-fabs for math.c and fabs.c
[POWERPC] update mpc8349_itx_defconfig and remove some debug settings
[POWERPC] Always call cede in pseries dedicated idle loop
[POWERPC] Fix loop logic in irq_alloc_virt()
...
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild:
kbuild: trivial documentation fixes
kconfig: fix saving alternate kconfig file in parent dir
kbuild: make modpost processing configurable
kconfig/menuconfig: do not let ncurses clutter screen on exit
kconfig/lxdialog: clear long menu lines
kbuild: do not build mconf & lxdialog unless needed
kconfig/lxdialog: fix make mrproper
kconfig/lxdialog: support resize
kconfig/lxdialog: let <ESC><ESC> behave as expected
kconfig/menuconfig: lxdialog is now built-in
kconfig/lxdialog: add a new theme bluetitle which is now default
kconfig/lxdialog: add support for color themes and add blackbg theme
kconfig/lxdialog: refactor color support
Andrew Morton [Tue, 3 Oct 2006 08:16:15 +0000 (01:16 -0700)]
[PATCH] isdn: more pr_debug() fixes
drivers/isdn/sc/event.c: In function 'indicate_status':
drivers/isdn/sc/event.c:49: error: 'events' undeclared (first use in this function)
drivers/isdn/sc/event.c:49: error: (Each undeclared identifier is reported only once
drivers/isdn/sc/event.c:49: error: for each function it appears in.)
drivers/isdn/sc/event.c:49: warning: format '%d' expects type 'int', but argument 4 has type 'ulong'
drivers/isdn/sc/interrupt.c: In function 'interrupt_handler':
drivers/isdn/sc/interrupt.c:97: warning: format '%x' expects type 'unsigned int', but argument 4 has type 'long unsigned int'
drivers/isdn/sc/timer.c: In function 'check_reset':
drivers/isdn/sc/timer.c:80: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
Acked-by: Karsten Keil <kkeil@suse.de> Cc: Zach Brown <zach.brown@oracle.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Tue, 3 Oct 2006 08:16:14 +0000 (01:16 -0700)]
[PATCH] isdn-debug-build-fix
When pr_debug() is enabled:
drivers/isdn/sc/command.c: In function 'command':
drivers/isdn/sc/command.c:107: error: 'commands' undeclared (first use in this function)
drivers/isdn/sc/command.c:107: error: (Each undeclared identifier is reported only once
drivers/isdn/sc/command.c:107: error: for each function it appears in.)
drivers/isdn/sc/command.c:122: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'long unsigned int'
drivers/isdn/sc/command.c: In function 'dial':
drivers/isdn/sc/command.c:199: warning: format '%d' expects type 'int', but argument 4 has type 'long unsigned int'
drivers/isdn/sc/command.c: In function 'answer':
drivers/isdn/sc/command.c:221: warning: format '%s' expects type 'char *', but argument 3 has type 'long unsigned int'
drivers/isdn/sc/command.c: In function 'hangup':
drivers/isdn/sc/command.c:244: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
drivers/isdn/sc/command.c: In function 'setl2':
drivers/isdn/sc/command.c:265: error: 'l2protos' undeclared (first use in this function)
drivers/isdn/sc/command.c: In function 'setl3':
drivers/isdn/sc/command.c:297: error: 'l3protos' undeclared (first use in this function)
drivers/isdn/sc/command.c:297: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
drivers/isdn/sc/command.c: In function 'acceptb':
drivers/isdn/sc/command.c:315: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
drivers/isdn/sc/command.c: In function 'clreaz':
drivers/isdn/sc/command.c:330: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
drivers/isdn/sc/command.c: In function 'seteaz':
drivers/isdn/sc/command.c:345: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
Cc: Zach Brown <zach.brown@oracle.com> Acked-by: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
It looks like Zach Brown's patch pr_debug-check-pr_debug-arguments
worked as inteded. That is, it doesn't "allow completely incorrect code
to build." :).
The arm build fails with the following message:
CC arch/arm/vfp/vfpsingle.o
arch/arm/vfp/vfpsingle.c: In function `__vfp_single_normaliseround':
arch/arm/vfp/vfpsingle.c:201: error: `func' undeclared (first use in
this function)
arch/arm/vfp/vfpsingle.c:201: error: (Each undeclared identifier is
reported only once
arch/arm/vfp/vfpsingle.c:201: error: for each function it appears in.)
make[1]: *** [arch/arm/vfp/vfpsingle.o] Error 1
make: *** [arch/arm/vfp] Error 2
The following patch fixes the issue by using func only when DEBUG is
defined.
Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Zach Brown <zach.brown@oracle.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Zach Brown [Tue, 3 Oct 2006 08:16:08 +0000 (01:16 -0700)]
[PATCH] pr_debug: tipar: repair nonexistant pr_debug argument use
tipar: repair nonexistant pr_debug argument use
I guessed what the pr_debug meant by 'data'. Signed-off-by: Zach Brown <zach.brown@oracle.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Tue, 3 Oct 2006 08:15:59 +0000 (01:15 -0700)]
[PATCH] md: remove MAX_MD_DEVS which is an arbitrary limit
Once upon a time we needed to fixed limit to the number of md devices,
probably because we preallocated some array. This need no longer exists, but
we still have an arbitrary limit.
So remove MAX_MD_DEVS and allow as many devices as we can fit into the 'minor'
part of a device number.
Also remove some useless noise at init time (which reports MAX_MD_DEVS) and
remove MD_THREAD_NAME_MAX which hasn't been used for a while.
Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Tue, 3 Oct 2006 08:15:58 +0000 (01:15 -0700)]
[PATCH] md: fix duplicity of levels in md.txt
md.txt has two sections describing the 'level' sysfs attribute, and some of
the text is out-of-date. So make just one section, and make it right.
Cc: Christian Kujau <evil@g-house.de> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Tue, 3 Oct 2006 08:15:57 +0000 (01:15 -0700)]
[PATCH] md: make messages about resync/recovery etc more specific
It is possible to request a 'check' of an md/raid array where the whole array
is read and consistancies are reported.
This uses the same mechanisms as 'resync' and so reports in the kernel logs
that a resync is being started. This understandably confuses/worries people.
Also the text in /proc/mdstat suggests a 'resync' is happen when it is just a
check.
This patch changes those messages to be more specific about what is happening.
Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Tue, 3 Oct 2006 08:15:54 +0000 (01:15 -0700)]
[PATCH] md: define ->congested_fn for raid1, raid10, and multipath
raid1, raid10 and multipath don't report their 'congested' status through
bdi_*_congested, but should.
This patch adds the appropriate functions which just check the 'congested'
status of all active members (with appropriate locking).
raid1 read_balance should be modified to prefer devices where
bdi_read_congested returns false. Then we could use the '&' branch rather
than the '|' branch. However that should would need some benchmarking first
to make sure it is actually a good idea.
Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Tue, 3 Oct 2006 08:15:53 +0000 (01:15 -0700)]
[PATCH] md: define backing_dev_info.congested_fn for raid0 and linear
Each backing_dev needs to be able to report whether it is congested, either by
modulating BDI_*_congested in ->state, or by defining a ->congested_fn.
md/raid did neither of these. This patch add a congested_fn which simply
checks all component devices to see if they are congested.
Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Tue, 3 Oct 2006 08:15:53 +0000 (01:15 -0700)]
[PATCH] md: Improve locking around error handling
The error handling routines don't use proper locking, and so two concurrent
errors could trigger a problem.
So:
- use test-and-set and test-and-clear to synchonise
the In_sync bits with the ->degraded count
- use the spinlock to protect updates to the
degraded count (could use an atomic_t but that
would be a bigger change in code, and isn't
really justified)
- remove un-necessary locking in raid5
Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Paul Clements [Tue, 3 Oct 2006 08:15:49 +0000 (01:15 -0700)]
[PATCH] md: new sysfs interface for setting bits in the write-intent-bitmap
Add a new sysfs interface that allows the bitmap of an array to be dirtied.
The interface is write-only, and is used as follows:
echo "1000" > /sys/block/md2/md/bitmap
(dirty the bit for chunk 1000 [offset 0] in the in-memory and on-disk
bitmaps of array md2)
echo "1000-2000" > /sys/block/md1/md/bitmap
(dirty the bits for chunks 1000-2000 in md1's bitmap)
This is useful, for example, in cluster environments where you may need to
combine two disjoint bitmaps into one (following a server failure, after a
secondary server has taken over the array). By combining the bitmaps on
the two servers, a full resync can be avoided (This was discussed on the
list back on March 18, 2005, "[PATCH 1/2] md bitmap bug fixes" thread).
Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Tue, 3 Oct 2006 08:15:46 +0000 (01:15 -0700)]
[PATCH] md: replace magic numbers in sb_dirty with well defined bit flags
Instead of magic numbers (0,1,2,3) in sb_dirty, we have
some flags instead:
MD_CHANGE_DEVS
Some device state has changed requiring superblock update
on all devices.
MD_CHANGE_CLEAN
The array has transitions from 'clean' to 'dirty' or back,
requiring a superblock update on active devices, but possibly
not on spares
MD_CHANGE_PENDING
A superblock update is underway.
We wait for an update to complete by waiting for all flags to be clear. A
flag can be set at any time, even during an update, without risk that the
change will be lost.
Stop exporting md_update_sb - isn't needed.
Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Adrian Bunk [Tue, 3 Oct 2006 08:15:44 +0000 (01:15 -0700)]
[PATCH] md: the scheduled removal of the START_ARRAY ioctl for md
This patch contains the scheduled removal of the START_ARRAY ioctl for md.
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Bryn Reeves [Tue, 3 Oct 2006 08:15:43 +0000 (01:15 -0700)]
[PATCH] dm table: add target flush
This patch adds support for a per-target dm_flush_fn method. This is needed
to allow dm-loop to invalidate page cache mappings in response to BLKFLSBUF
ioctl commands.
Signed-off-by: Bryn Reeves <breeves@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Stefan Bader [Tue, 3 Oct 2006 08:15:41 +0000 (01:15 -0700)]
[PATCH] dm: use private biosets
I found a problem within device-mapper that occurs in low-mem situations. It
was found using a mirror target but I think in theory it would hit any setup
that stacks device-mapper devices (like LVM on top of multipath).
Since device-mapper core uses the common fs_bioset in clone_bio(), and a
private, but still global, bio_set in split_bvec() it is possible that the
filesystem and the first level target successfully get bios but the lower
level target doesn't because there is no more memory and the pool was drained
by upper layers. So the remapping will be stuck forever. To solve this
device-mapper core needs to use a private bio_set for each device.
Signed-off-by: Stefan Bader <Stefan.Bader@de.ibm.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Milan Broz [Tue, 3 Oct 2006 08:15:39 +0000 (01:15 -0700)]
[PATCH] dm crypt: move io to workqueue
This patch is designed to help dm-crypt comply with the
new constraints imposed by the following patch in -mm:
md-dm-reduce-stack-usage-with-stacked-block-devices.patch
Under low memory the existing implementation relies upon waiting for I/O
submitted recursively to generic_make_request() completing before the original
generic_make_request() call can return.
This patch moves the I/O submission to a workqueue so the original
generic_make_request() can return immediately.
Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Milan Broz [Tue, 3 Oct 2006 08:15:37 +0000 (01:15 -0700)]
[PATCH] dm crypt: add key msg
Add the facility to wipe the encryption key from memory (for example while a
laptop is suspended) and reinstate it later (when the laptop gets resumed).
Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Hannes Reinecke [Tue, 3 Oct 2006 08:15:35 +0000 (01:15 -0700)]
[PATCH] dm: add uevent change event on resume
Device-mapper devices are not accessible until a 'resume' ioctl has been
issued. For userspace to find out when this happens we need to generate an
uevent for udev to take appropriate action.
As discussed at OLS we should send 'change' events for 'resume'. We can think
of no useful purpose served by also having 'suspend' events.
Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
If a snapshot became invalid while there are outstanding pending_exceptions,
when pending_complete() processes each one it forgets to remove the
corresponding exception from its exception table before freeing it.
Fix this by moving the 'out:' label up one statement so that
remove_exception() is always called. Then __invalidate_exception() no longer
needs to call it and its 'pe' argument become superfluous.
Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>