Marton Nemeth [Sun, 4 Oct 2009 16:54:48 +0000 (13:54 -0300)]
V4L/DVB (13119): gspca - pac7311: remove magic value for USB_BUF_SZ
The length check in reg_w_var() function is because the buffer contents
is copied to gspca_dev->usb_buf which has the size of USB_BUF_SZ bytes as
defined in drivers/media/video/gspca/gspca.h. Replace the number with
symbol for better readability and maintainability.
Michael Krufky [Mon, 28 Sep 2009 02:10:20 +0000 (23:10 -0300)]
V4L/DVB (13111): tda18271: more signedness fixes
Convert tda18271_rf_tracking_filter_cal.rf_[ab][12] from int to s32.
Convert tda18271_priv.tm_rfcal from unsigned int to u8.
Cast subtractions between u32 values as s32.
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This adds a forgotten module_param macro needed to set a deemphasis of 50us.
It is the standard setting for commercial FM radio broadcasts outside the US.
Andy Walls [Sun, 27 Sep 2009 23:55:41 +0000 (20:55 -0300)]
V4L/DVB (13100): cx23885: Add IR input keypress handling and enable for the HVR-1850
This changes adds IR Rx keypress input event handling to the CX23885 module.
This change specifically only adds input handling for IR devices implemented as
v4l2_subdevices, using only the pulse width mode (for now), and only with
RC-5 remotes. The V4L-DVB infrastructure is missing too much to support RC-6
mode 6A as used in many media center remotes. The grey Hauppauge RC-5 remote
and HVR-1850 IR receiver work now.
Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andy Walls [Sun, 27 Sep 2009 21:31:37 +0000 (18:31 -0300)]
V4L/DVB (13097): cx23885: Complete CX23888 IR subdev implementation for Rx & almost for Tx
This change completes the v4l2_subdev implementation for IR receive for the
IR controller built into the CX23888.
This changes almost completes the IR transmit side also, but doesn't. Instead
notes in the comments describe what needs to be done for IR Tx to work in the
subdevice implementation.
The current Tx behavior is skeletal and benign. If left alone, it does nothing.
It will only ever generate a Tx interrupt on Tx init by a caller or when the
tx_write() method is called. The ISR, when called, will then disable the Tx
FIFO service interrupt.
Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andy Walls [Sun, 27 Sep 2009 20:50:04 +0000 (17:50 -0300)]
V4L/DVB (13096): v4l2-subdev: Add v4l2_subdev_ir_ops and IR notify defines for v4l2_device
Add v4l2_subdev_ir_ops and IR notify defines for v4l2_device. This change
is specifically needed at this time to support the integrated IR controller in
the CX2388[58] chips.
Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andy Walls [Sun, 27 Sep 2009 03:14:33 +0000 (00:14 -0300)]
V4L/DVB (13091): cx23885: Enable HVR-1850 CX23888 A/V core to get VID_CLK running for IR
For the IR controller on the CX23888 to work for the HVR-1850 and in
general, the A/V core must be initialized to get the VID_CLK going.
The VID_CLK is the timing reference for the CX23888's integrated
IR controller.
Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andy Walls [Sun, 27 Sep 2009 03:00:48 +0000 (00:00 -0300)]
V4L/DVB (13090): cx25840: Init PLLs properly for CX2388[578] A/V cores
The SYS and AUX PLLs need to be initialized to different values based on
the chip: CX23885, CX23887, CX23888, as each uses a different crystal
frequency: 28.6363 MHz, 25.0 MHz, 50.0 MHz.
Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andy Walls [Sun, 27 Sep 2009 02:54:20 +0000 (23:54 -0300)]
V4L/DVB (13089): cx25840: Separate set_audclk_freq functionality for the different chips
Separate out the set_audclk_freq() function into separate functions for the
four families of cores. These cores all use slightly different sample clock
schemes and may be assuming slightly (+/- 3 Hz) different reference frequencies.
The code resuse was not worth the maintenance and testing headache of have all
chips use the same function peppered with conditional logic.
Added comments on how PLL and SRC parameters values are computed. Fixed a few
bugs related to the shared code having a large number of conditional statements.
Noted inconsistencies with FIXME in the comments.
This is done in preparation for getting the CX2388[578] PLL/clock setting logic
cleaned up for CX23888 analog video and IR (which need the VID PLL set right).
Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andy Walls [Sun, 27 Sep 2009 02:47:21 +0000 (23:47 -0300)]
V4L/DVB (13088): cx25840: Convert chip/core family checks to static inline functions
Change logic to check for various chip or core families to inline functions.
Checks for specific chips should be made against the state->id field now. This
is in preparation for chip/core specific code for setting up PLLs for the
CX2388[578] family of cores, that all run with different crystal frequencies.
Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andy Walls [Sun, 27 Sep 2009 02:32:54 +0000 (23:32 -0300)]
V4L/DVB (13087): cx25840: Improve detection of CX2388[578] A/V cores
Add improved logic to detect the exact CX2388[578] A/V core that is being
probed. Also cleaned up detection and logging for CX2310[12], CX2583[67],
and CX2584[0123] cores and chips.
Also added code to identify a CX2388[578] A/V decoder core that is not
responding properly. Typical symptoms include registers 0x00-0xff
responding properly but all other registers returning the same value
(0x13 and 0x5 have been observed). This state will cause proper detection of
'885 vs. '887 vs. '888 to fail and the chip won't respond to get configured
properly anyway. I have no method of reseting the core to a working state at
this time; but I didn't try too hard to work one out either. The problem
likely only occurs in development. I suspect configuring the SYS PLL VCO to
oscillate too slowly (286.3 MHz?) before post divide may be the root cause,
when encountered.
Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andy Walls [Sun, 27 Sep 2009 02:17:30 +0000 (23:17 -0300)]
V4L/DVB (13086): cx23885: Add skeleton v4l2_subdev for the CX23888 integrated IR controller
This change adds a skeletal implementation of a v4l2_subdevice to provide
encapsulation and abstraction of the CX23888's integrated consumer infrared
controller. This change also instantiates the cx23888_ir subdev for the
HVR-1850 which has IR hardware physically wired up to a CX23888.
The cx23888_ir subdev code is being written with long-term objectives to:
1. port it to the cx25840 module for the CX2584x, CX2583x, CX23885, & CX231xx
IR controllers
2. possibly port it to the cx18 module for the CX23418 IR controller
3. have the IR subdevice accessed abstractly in the cx23885 module, so the
driver can ignore the difference between the CX23885 and CX23888.
Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andy Walls [Sun, 27 Sep 2009 01:50:44 +0000 (22:50 -0300)]
V4L/DVB (13085): cx23885: Fix support for v4l2-dbg access to CX2388[578] and CX23417 regs
This changes corrects the ioctl() operations for both the CX2388[578] analog
video and MPEG video device nodes to properly and consistently support
VIDIOC_G_CHIP_IDENT, VIDIOC_DBG_G_REGISTER and VIDIOC_DBG_S_REGISTER ioctl()s.
This caused some ioctl() support routines to be broken out into a separate
source file.
Now v4l2-dbg can be used to manipulate CX2388[578] and CX23417 registers
including the CX2388[57] functions handled by the cx25840 module.
This was done in anticipation of developing a new v4l2_subdev for the
integrated IR controller of the CX23888.
Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andy Walls [Sun, 27 Sep 2009 01:07:10 +0000 (22:07 -0300)]
V4L/DVB (13084): v4l2-chip-ident: Add ID's needed for the cx23885 and cx25840 modules
Add identifiers for CX2388[578] chips, CX2310[012] chips, integrated
A/V decoders cores, integrated IR controller core, and the CX23417
MPEG encoder. The cx23885 module and cx25840 module will use these
identifiers in upcoming changes.
Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Uroš Vampl [Thu, 1 Oct 2009 01:53:37 +0000 (22:53 -0300)]
V4L/DVB (13078): em28xx: fix support for Terratec Cinergy T XS (005e)
Make analog audio, dvb and the remote work on a Terratec Cinergy Hybrid
XS (em2882).
Note by djh: Thanks go out fo Andrej Suligoi for his contribution in providing
and testing pretty much the exact same patch as provided by Uros. Between
the two of them, they got all the core functionality working for the device.
V4L/DVB (13077): em28xx: Add support for new variant of KWorld 2800d
Seems that the reference design used for the KWorld 2800d switched from the
em2860 to em2862, so we need to add the new USB id (and the i2c hash remains
so all we need is the default em2862 id.
Thanks to Ian Young for reporting the issue and testing the fix.
Cc: Ian Young <ian@duffrecords.com> Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Mon, 21 Sep 2009 23:52:44 +0000 (20:52 -0300)]
V4L/DVB (13057): af9015: add MSI DIGIVOX mini III remote
Support for MSI DIGIVOX mini III remote.
Thanks to Aleksandr V. Piskunov <aleksandr.v.piskunov@gmail.com>
Thanks to Roman <lists@hasnoname.de>
Cc: Aleksandr V. Piskunov <aleksandr.v.piskunov@gmail.com> Cc: Roman <lists@hasnoname.de> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
V4L/DVB (13051): DiB7000P: improve rebostness of HAS_LOCK indicator
Update the dib7000p:
The status is HAS_LOCK only if the demod is able to decode the TPS. Sometimes, there is a TPS data lock, even if the demod is not able to decode it (ex: no RF signal).
For the STK7770P: correct value for the charge pump
dib8000: the SNR is in 10th of dB (not in dB)
dib7000p and dib8000: added the pid filtering. This feature is enabled by module option (dvb-usb module).
Linus Torvalds [Sat, 5 Dec 2009 17:53:36 +0000 (09:53 -0800)]
Merge branch 'tracing-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'tracing-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (40 commits)
tracing: Separate raw syscall from syscall tracer
ring-buffer-benchmark: Add parameters to set produce/consumer priorities
tracing, function tracer: Clean up strstrip() usage
ring-buffer benchmark: Run producer/consumer threads at nice +19
tracing: Remove the stale include/trace/power.h
tracing: Only print objcopy version warning once from recordmcount
tracing: Prevent build warning: 'ftrace_graph_buf' defined but not used
ring-buffer: Move access to commit_page up into function used
tracing: do not disable interrupts for trace_clock_local
ring-buffer: Add multiple iterations between benchmark timestamps
kprobes: Sanitize struct kretprobe_instance allocations
tracing: Fix to use __always_unused attribute
compiler: Introduce __always_unused
tracing: Exit with error if a weak function is used in recordmcount.pl
tracing: Move conditional into update_funcs() in recordmcount.pl
tracing: Add regex for weak functions in recordmcount.pl
tracing: Move mcount section search to front of loop in recordmcount.pl
tracing: Fix objcopy revision check in recordmcount.pl
tracing: Check absolute path of input file in recordmcount.pl
tracing: Correct the check for number of arguments in recordmcount.pl
...
Linus Torvalds [Sat, 5 Dec 2009 17:53:21 +0000 (09:53 -0800)]
Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
tracing: Fix trace_marker output
tracing: Fix event format export
tracing: Fix return value of tracing_stats_read()
Linus Torvalds [Sat, 5 Dec 2009 17:52:14 +0000 (09:52 -0800)]
Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (31 commits)
rcu: Make RCU's CPU-stall detector be default
rcu: Add expedited grace-period support for preemptible RCU
rcu: Enable fourth level of TREE_RCU hierarchy
rcu: Rename "quiet" functions
rcu: Re-arrange code to reduce #ifdef pain
rcu: Eliminate unneeded function wrapping
rcu: Fix grace-period-stall bug on large systems with CPU hotplug
rcu: Eliminate __rcu_pending() false positives
rcu: Further cleanups of use of lastcomp
rcu: Simplify association of forced quiescent states with grace periods
rcu: Accelerate callback processing on CPUs not detecting GP end
rcu: Mark init-time-only rcu_bootup_announce() as __init
rcu: Simplify association of quiescent states with grace periods
rcu: Rename dynticks_completed to completed_fqs
rcu: Enable synchronize_sched_expedited() fastpath
rcu: Remove inline from forward-referenced functions
rcu: Fix note_new_gpnum() uses of ->gpnum
rcu: Fix synchronization for rcu_process_gp_end() uses of ->completed counter
rcu: Prepare for synchronization fixes: clean up for non-NO_HZ handling of ->completed counter
rcu: Cleanup: balance rcu_irq_enter()/rcu_irq_exit() calls
...
Linus Torvalds [Sat, 5 Dec 2009 17:50:22 +0000 (09:50 -0800)]
Merge branch 'core-printk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-printk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
ratelimit: Make suppressed output messages more useful
printk: Remove ratelimit.h from kernel.h
ratelimit: Fix/allow use in atomic contexts
ratelimit: Use per ratelimit context locking
Linus Torvalds [Sat, 5 Dec 2009 17:49:59 +0000 (09:49 -0800)]
Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
mutex: Fix missing conditions to build mutex_spin_on_owner()
mutex: Better control mutex adaptive spinning config
locking, task_struct: Reduce size on TRACE_IRQFLAGS and 64bit
locking: Use __[SPIN|RW]_LOCK_UNLOCKED in [spin|rw]_lock_init()
locking: Remove unused prototype
locking: Reduce ifdefs in kernel/spinlock.c
locking: Make inlining decision Kconfig based
Linus Torvalds [Sat, 5 Dec 2009 17:49:07 +0000 (09:49 -0800)]
Merge branch 'core-iommu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-iommu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (63 commits)
x86, Calgary IOMMU quirk: Find nearest matching Calgary while walking up the PCI tree
x86/amd-iommu: Remove amd_iommu_pd_table
x86/amd-iommu: Move reset_iommu_command_buffer out of locked code
x86/amd-iommu: Cleanup DTE flushing code
x86/amd-iommu: Introduce iommu_flush_device() function
x86/amd-iommu: Cleanup attach/detach_device code
x86/amd-iommu: Keep devices per domain in a list
x86/amd-iommu: Add device bind reference counting
x86/amd-iommu: Use dev->arch->iommu to store iommu related information
x86/amd-iommu: Remove support for domain sharing
x86/amd-iommu: Rearrange dma_ops related functions
x86/amd-iommu: Move some pte allocation functions in the right section
x86/amd-iommu: Remove iommu parameter from dma_ops_domain_alloc
x86/amd-iommu: Use get_device_id and check_device where appropriate
x86/amd-iommu: Move find_protection_domain to helper functions
x86/amd-iommu: Simplify get_device_resources()
x86/amd-iommu: Let domain_for_device handle aliases
x86/amd-iommu: Remove iommu specific handling from dma_ops path
x86/amd-iommu: Remove iommu parameter from __(un)map_single
x86/amd-iommu: Make alloc_new_range aware of multiple IOMMUs
...
* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw: (31 commits)
GFS2: Fix glock refcount issues
writeback: remove unused nonblocking and congestion checks (gfs2)
GFS2: drop rindex glock to refresh rindex list
GFS2: Tag all metadata with jid
GFS2: Locking order fix in gfs2_check_blk_state
GFS2: Remove dirent_first() function
GFS2: Display nobarrier option in /proc/mounts
GFS2: add barrier/nobarrier mount options
GFS2: remove division from new statfs code
GFS2: Improve statfs and quota usability
GFS2: Use dquot_send_warning()
VFS: Export dquot_send_warning
GFS2: Add set_xquota support
GFS2: Add get_xquota support
GFS2: Clean up gfs2_adjust_quota() and do_glock()
GFS2: Remove constant argument from qd_get()
GFS2: Remove constant argument from qdsb_get()
GFS2: Add proper error reporting to quota sync via sysfs
GFS2: Add get_xstate quota function
GFS2: Remove obsolete code in quota.c
...
Linus Torvalds [Sat, 5 Dec 2009 17:44:57 +0000 (09:44 -0800)]
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: (30 commits)
TOMOYO: Add recursive directory matching operator support.
remove CONFIG_SECURITY_FILE_CAPABILITIES compile option
SELinux: print denials for buggy kernel with unknown perms
Silence the existing API for capability version compatibility check.
LSM: Move security_path_chmod()/security_path_chown() to after mutex_lock().
SELinux: header generation may hit infinite loop
selinux: Fix warnings
security: report the module name to security_module_request
Config option to set a default LSM
sysctl: require CAP_SYS_RAWIO to set mmap_min_addr
tpm: autoload tpm_tis based on system PnP IDs
tpm_tis: TPM_STS_DATA_EXPECT workaround
define convenient securebits masks for prctl users (v2)
tpm: fix header for modular build
tomoyo: improve hash bucket dispersion
tpm add default function definitions
LSM: imbed ima calls in the security hooks
SELinux: add .gitignore files for dynamic classes
security: remove root_plug
SELinux: fix locking issue introduced with c6d3aaa4e35c71a3
...
David Daney [Sat, 5 Dec 2009 01:44:51 +0000 (17:44 -0800)]
x86: Convert BUG() to use unreachable()
Use the new unreachable() macro instead of for(;;);. When
allyesconfig is built with a GCC-4.5 snapshot on i686 the size of the
text segment is reduced by 3987 bytes (from 6827019 to 6823032).
Signed-off-by: David Daney <ddaney@caviumnetworks.com> Acked-by: "H. Peter Anvin" <hpa@zytor.com> CC: Thomas Gleixner <tglx@linutronix.de> CC: Ingo Molnar <mingo@redhat.com> CC: x86@kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Daney [Sat, 5 Dec 2009 01:44:50 +0000 (17:44 -0800)]
Add support for GCC-4.5's __builtin_unreachable() to compiler.h (v2)
Starting with version 4.5, GCC has a new built-in function
__builtin_unreachable() that can be used in places like the kernel's
BUG() where inline assembly is used to transfer control flow. This
eliminated the need for an endless loop in these places.
The patch adds a new macro 'unreachable()' that will expand to either
__builtin_unreachable() or an endless loop depending on the compiler
version.
Change from v1: Simplify unreachable() for non-GCC 4.5 case.
This patch fixes some ref counting issues. Firstly by moving
the point at which we drop the ref count after a dlm lock
operation has completed we ensure that we never call
gfs2_glock_hold() on a lock with a zero ref count.
Secondly, by using atomic_dec_and_lock() in gfs2_glock_put()
we ensure that at no time will a glock with zero ref count
appear on the lru_list. That means that we can remove the
check for this in our shrinker (which was racy).
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Wu Fengguang [Wed, 18 Nov 2009 10:09:41 +0000 (18:09 +0800)]
writeback: remove unused nonblocking and congestion checks (gfs2)
No one is calling wb_writeback and write_cache_pages with
wbc.nonblocking=1 any more. And lumpy pageout will want to do
nonblocking writeback without the congestion wait.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
When a gfs2 filesystem is grown, it needs to rebuild the rindex list to be able
to use the new space. gfs2 does this when the rindex is marked not uptodate,
which happens when the rindex glock is dropped. However, on a single node
setup, there is never any reason to drop the rindex glock, so gfs2 never
invalidates the the rindex. This patch makes gfs2 automatically drop the
rindex glock after filesystem grows, so it can refresh the rindex list.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
There are two spare field in the header common to all GFS2
metadata. One is just the right size to fit a journal id
in it, and this patch updates the journal code so that each
time a metadata block is modified, we tag it with the journal
id of the node which is performing the modification.
The reason for this is that it should make it much easier to
debug issues which arise if we can tell which node was the
last to modify a particular metadata block.
Since the field is updated before the block is written into
the journal, each journal should only contain metadata which
is tagged with its own journal id. The one exception to this
is the journal header block, which might have a different node's
id in it, if that journal was recovered by another node in the
cluster.
Thus each journal will contain a record of which nodes recovered
it, via the journal header.
The other field in the metadata header could potentially be
used to hold information about what kind of operation was
performed, but for the time being we just zero it on each
transaction so that if we use it for that in future, we'll
know that the information (where it exists) is reliable.
I did consider using the other field to hold the journal
sequence number, however since in GFS2's journaling we write
the modified data into the journal and not the original
data, this gives no information as to what action caused the
modification, so I think we can probably come up with a better
use for those 64 bits in the future.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
This function only had one caller left, and that caller only
called it for leaf blocks, hence one branch of the "if" was
never taken. In addition the call to get_left had already
verified the metadata type, so the function can be reduced
to a single line of code in its caller.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Currently gfs2 issues barrier unconditionally. There are various reasons
to disable them, be that just for testing or for stupid devices flushing
large battert backed caches. Add a nobarrier option that matches xfs and
btrfs for this. Also add a symmetric barrier option to turn it back on
at remount time.
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
GFS2 now has three new mount options, statfs_quantum, quota_quantum and
statfs_percent. statfs_quantum and quota_quantum simply allow you to
set the tunables of the same name. Setting setting statfs_quantum to 0
will also turn on the statfs_slow tunable. statfs_percent accepts an
integer between 0 and 100. Numbers between 1 and 100 will cause GFS2 to
do any early sync when the local number of blocks free changes by at
least statfs_percent from the totoal number of blocks free. Setting
statfs_percent to 0 disables this.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
This adds support to GFS2 to send quota warnings via netlink.
Also it removes a stray \r which was left over from when the
code used to print warnings on the console.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Sending a message to userspace in a generic format to warn
of events (e.g. quota exceeded) in the quota subsystem is
a generically useful feature. This patch makes some minor
changes to the send_message function from dquot.c renaming
it quota_send_message, moving it to quota.c and exporting it
for use by filesystems which do not use the dquot code.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
This adds support for viewing the current GFS2 quota settings
via the XFS quota API. The setting of quotas will be addressed
in a later patch. Fields which are not supported here are left
set to zero.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> Reviewed-by: Bob Peterson <rpeterso@redhat.com>
Both of these functions contained confusing and in one case
duplicate code. This patch adds a new check in do_glock()
so that we report -ENOENT if we are asked to sync a quota
entry which doesn't exist. Due to the previous patch this is
now reported correctly to userspace.
Also there are a few new comments, and I hope that the code
is easier to understand now.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>