aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-01-16Btrfs: add skip_balance mount optionIlya Dryomov3-5/+17
Since restriper kthread starts involuntarily on mount and can suck cpu and memory bandwidth add a mount option to forcefully skip it. The restriper in that case hangs around in paused state and can be resumed from userspace when it's convenient. Signed-off-by: Ilya Dryomov <[email protected]>
2012-01-16Btrfs: recover balance on mountIlya Dryomov3-2/+139
On mount, if balance item is found, resume balance in a separate kernel thread. Try to be smart to continue roughly where previous balance (or convert) was interrupted. For chunk types that were being converted to some profile we turn on soft convert, in case of a simple balance we turn on usage filter and relocate only less-than-90%-full chunks of that type. These are just heuristics but they help quite a bit, and can be improved in future. Signed-off-by: Ilya Dryomov <[email protected]>
2012-01-16Btrfs: save balance parameters to diskIlya Dryomov2-1/+231
Introduce a new btree objectid for storing balance item. The reason is to be able to resume restriper after a crash with the same parameters. Balance item has a very high objectid and goes into tree of tree roots. The key for the new item is as follows: [ BTRFS_BALANCE_OBJECTID ; BTRFS_BALANCE_ITEM_KEY ; 0 ] Older kernels simply ignore it so it's safe to mount with an older kernel and then go back to the newer one. Signed-off-by: Ilya Dryomov <[email protected]>
2012-01-16Btrfs: soft profile changing mode (aka soft convert)Ilya Dryomov2-0/+29
When doing convert from one profile to another if soft mode is on restriper won't touch chunks that already have the profile we are converting to. This is useful if e.g. half of the FS was converted earlier. The soft mode switch is (like every other filter) per-type. This means that we can convert for example meta chunks the "hard" way while converting data chunks selectively with soft switch. Signed-off-by: Ilya Dryomov <[email protected]>
2012-01-16Btrfs: implement online profile changingIlya Dryomov3-1/+129
Profile changing is done by launching a balance with BTRFS_BALANCE_CONVERT bits set and target fields of respective btrfs_balance_args structs initialized. Profile reducing code in this case will pick restriper's target profile if it's available instead of doing a blind reduce. If target profile is not yet available it goes back to a plain reduce. Signed-off-by: Ilya Dryomov <[email protected]>
2012-01-16Btrfs: do not reduce profile in do_chunk_alloc()Ilya Dryomov2-1/+19
Every caller of do_chunk_alloc() feeds it the reduced allocation profile, so stop trying to reduce it one more time. Instead check the validity of the passed profile. Signed-off-by: Ilya Dryomov <[email protected]>
2012-01-16Btrfs: virtual address space subset filterIlya Dryomov2-0/+21
Select chunks which have at least one byte located inside a given [vstart, vend) virtual address space range. Signed-off-by: Ilya Dryomov <[email protected]>
2012-01-16Btrfs: devid subset filterIlya Dryomov2-0/+47
Select chunks which have at least one byte of at least one stripe located on a device with devid X in a given [pstart,pend) physical address range. This filter only works when devid filter is turned on. Signed-off-by: Ilya Dryomov <[email protected]>
2012-01-16Btrfs: devid filterIlya Dryomov2-0/+24
Relocate chunks which have at least one stripe located on a device with devid X. Signed-off-by: Ilya Dryomov <[email protected]>
2012-01-16Btrfs: usage filterIlya Dryomov2-0/+37
Select chunks that are less than X percent full. Signed-off-by: Ilya Dryomov <[email protected]>
2012-01-16Btrfs: profiles filterIlya Dryomov2-0/+28
Select chunks based on a given profile mask. Signed-off-by: Ilya Dryomov <[email protected]>
2012-01-16Btrfs: add basic infrastructure for selective balancingIlya Dryomov3-2/+71
This allows to have a separate set of filters for each chunk type (data,meta,sys). The code however is generic and switch on chunk type is only done once. This commit also adds a type filter: it allows to balance for example meta and system chunks w/o touching data ones. Signed-off-by: Ilya Dryomov <[email protected]>
2012-01-16Btrfs: add basic restriper infrastructureIlya Dryomov6-41/+281
Add basic restriper infrastructure: extended balancing ioctl and all related ioctl data structures, add data structure for tracking restriper's state to fs_info, etc. The semantics of the old balancing ioctl are fully preserved. Explicitly disallow any volume operations when balance is in progress. Signed-off-by: Ilya Dryomov <[email protected]>
2012-01-16Btrfs: make avail_*_alloc_bits fields dynamicIlya Dryomov1-0/+20
Currently when new chunks are created respective avail_alloc_bits field is updated to reflect profiles of all chunks present in the system. However when chunks are removed profile bits are never cleared. This patch clears profile bit of respective avail_alloc_bits field when the last chunk with that profile is removed. Restriper needs this to properly operate when "downgrading". Signed-off-by: Ilya Dryomov <[email protected]>
2012-01-16Btrfs: add BTRFS_AVAIL_ALLOC_BIT_SINGLE bitIlya Dryomov2-9/+36
Right now on-disk BTRFS_BLOCK_GROUP_* profile bits are used for avail_{data,metadata,system}_alloc_bits fields, which gather info about available allocation profiles in the FS. When chunk is created or read from disk, its profile is OR'ed with the corresponding avail_alloc_bits field. Since SINGLE is denoted by 0 in the on-disk format, currently there is no way to tell when such chunks become avaialble. Restriper needs that information, so add a separate bit for SINGLE profile. This bit is going to be in-memory only, it should never be written out to disk, so it's not a disk format change. However to avoid remappings in future, reserve corresponding on-disk bit. Signed-off-by: Ilya Dryomov <[email protected]>
2012-01-16Btrfs: introduce masks for chunk type and profileIlya Dryomov3-27/+22
Chunk's type and profile are encoded in u64 flags field. Introduce masks to easily access them. Also fix the type of BTRFS_BLOCK_GROUP_* constants, it should be ULL. Signed-off-by: Ilya Dryomov <[email protected]>
2012-01-16Btrfs: get rid of *_alloc_profile fieldsIlya Dryomov4-16/+6
{data,metadata,system}_alloc_profile fields have been unused for a long time now. Get rid of them. Signed-off-by: Ilya Dryomov <[email protected]>
2012-01-16mac80211: fix tx->skb NULL pointer dereferenceYoni Divinsky3-9/+22
In function ieee80211_tx_h_encrypt the var info was initialized from tx->skb, since the fucntion is called after the function ieee80211_tx_h_fragment tx->skb is not valid anymore. Signed-off-by: Yoni Divinsky <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-16wireless: iwlwifi: iwl-scan.c: Fix build warningFabio Estevam1-1/+1
Fix the following build warning: drivers/net/wireless/iwlwifi/iwl-scan.c: In function ‘iwlagn_request_scan’: drivers/net/wireless/iwlwifi/iwl-scan.c:572: warning: ‘cmd_len’ may be used uninitialized in this function Signed-off-by: Fabio Estevam <[email protected]> Acked-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-16Net, mac80211: Fix resource leak in ieee80211_rx_h_mesh_fwding()Jesper Juhl1-0/+1
We may leak the 'fwd_skb' we skb_copy() in ieee80211_rx_h_mesh_fwding() if we take the 'else' branch in the 'if' statement just below. If we take that branch we'll end up returning from the function and since we've not assigned 'fwd_skb' to anything at that point, we leak it when the variable goes out of scope. The simple fix seems to be to just kfree_skb(fwd_skb); just before we return. That is what this patch does. Signed-off-by: Jesper Juhl <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-16ath9k_hw: fix interpretation of the rx KeyMiss flagFelix Fietkau2-4/+6
Documentation states that the KeyMiss flag is only valid if RxFrameOK is unset, however empirical evidence has shown that this is false. When KeyMiss is set (and RxFrameOK is 1), the hardware passes a valid frame which has not been decrypted. The driver then falsely marks the frame as decrypted, and when using CCMP this corrupts the rx CCMP PN, leading to connection hangs. Signed-off-by: Felix Fietkau <[email protected]> Cc: [email protected] Signed-off-by: John W. Linville <[email protected]>
2012-01-16bcma: invalidate the mapped core over suspend/resumeRafał Miłecki1-0/+3
This clears the currently mapped core when suspending, to force re-mapping after resume. Without that we were touching default core registers believing some other core is mapped. Such a behaviour resulted in lockups on some machines. Cc: [email protected] Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-16MAINTAINERS: add b43 mailing listRafał Miłecki1-0/+1
Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-16MAINTAINERS: move BCMA to keep the list sortedRafał Miłecki1-7/+7
Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-16random: Adjust the number of loops when initializingH. Peter Anvin1-1/+1
When we are initializing using arch_get_random_long() we only need to loop enough times to touch all the bytes in the buffer; using poolwords for that does twice the number of operations necessary on a 64-bit machine, since in the random number generator code "word" means 32 bits. Signed-off-by: H. Peter Anvin <[email protected]> Cc: "Theodore Ts'o" <[email protected]> Link: http://lkml.kernel.org/r/[email protected]
2012-01-16random: Use arch-specific RNG to initialize the entropy storeTheodore Ts'o1-0/+6
If there is an architecture-specific random number generator (such as RDRAND for Intel architectures), use it to initialize /dev/random's entropy stores. Even in the worst case, if RDRAND is something like AES(NSA_KEY, counter++), it won't hurt, and it will definitely help against any other adversaries. Signed-off-by: "Theodore Ts'o" <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: H. Peter Anvin <[email protected]>
2012-01-16tracepoints/module: Fix disabling tracepoints with taint CRAP or OOTSteven Rostedt1-3/+4
Tracepoints are disabled for tainted modules, which is usually because the module is either proprietary or was forced, and we don't want either of them using kernel tracepoints. But, a module can also be tainted by being in the staging directory or compiled out of tree. Either is fine for use with tracepoints, no need to punish them. I found this out when I noticed that my sample trace event module, when done out of tree, stopped working. Cc: [email protected] # 3.2 Cc: Mathieu Desnoyers <[email protected]> Cc: Ben Hutchings <[email protected]> Cc: Dave Jones <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Rusty Russell <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
2012-01-16gpio-ml-ioh: cleanup __iomem annotation usageMárton Németh1-3/+3
The __iomem annotation is to be used together with pointers used in iowrite32() but not for pointers returned by kzalloc(). For more details see [1] and [2]. This patch will remove the following sparse warning (i.e. when copiling with "make C=1"): * warning: incorrect type in assignment (different address spaces) References: [1] A new I/O memory access mechanism (Sep 15, 2004) http://lwn.net/Articles/102232/ [2] Being more anal about iospace accesses (Sep 15, 2004) http://lwn.net/Articles/102240/ Signed-off-by: Márton Németh <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2012-01-16gpio-ml-ioh: cleanup NULL pointer checkingMárton Németh1-1/+1
This patch will remove the following sparse warning ("make C=1"): * warning: Using plain integer as NULL pointer Signed-off-by: Márton Németh <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2012-01-16gpio-pch: cleanup __iomem annotation usageMárton Németh1-1/+1
The __iomem annotation is to be used together with pointers used as iowrite32() parameter. For more details see [1] and [2]. This patch will remove the following sparse warnings ("make C=1"): * warning: incorrect type in assignment (different address spaces) * warning: incorrect type in argument 1 (different address spaces) * warning: incorrect type in argument 2 (different address spaces) References: [1] A new I/O memory access mechanism (Sep 15, 2004) http://lwn.net/Articles/102232/ [2] Being more anal about iospace accesses (Sep 15, 2004) http://lwn.net/Articles/102240/ Signed-off-by: Márton Németh <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2012-01-16gpio-pch: cleanup NULL pointer checkingMárton Németh1-1/+1
This patch will remove the following sparse warning ("make C=1"): * warning: Using plain integer as NULL pointer Signed-off-by: Márton Németh <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2012-01-16ASoC: core - Free platform DAPM context at platform removal.Liam Girdwood1-0/+4
Fix platform removal by freeing the platform DAPM resources and remove it from the DAPM list. Signed-off-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2012-01-16ASoC: dapm - Fix check for codec context in dapm_power_widgets().Liam Girdwood1-1/+1
Fixes a NULL pointer dereference in dapm_power_widgets() if the dapm context has no codec. Signed-off-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2012-01-16ASoC: sgtl5000: update author email addressZeng Zhaoming1-1/+1
Update MODULE_AUTHOR email address. Signed-off-by: Zeng Zhaoming <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2012-01-16ARM: make BSYM macro assembly onlyRob Herring1-2/+2
BSYM macro is only needed for assembly files and its usage in c files is wrong, so only define it for assembly. Signed-off-by: Rob Herring <[email protected]> Acked-by: Dave Martin <[email protected]>
2012-01-16ARM: highbank: remove incorrect BSYM usageRob Herring1-2/+1
BSYM macro is only needed for assembly files and its usage in c files is wrong, so remove it. The linker will correctly set bit 0 for Thumb2 kernels. Signed-off-by: Rob Herring <[email protected]> Acked-by: Dave Martin <[email protected]>
2012-01-16ARM: imx: remove incorrect BSYM usageRob Herring1-2/+1
BSYM macro is only needed for assembly files and its usage in c files is wrong, so remove it. The linker will correctly set bit 0 for Thumb2 kernels. Signed-off-by: Rob Herring <[email protected]> Cc: Sascha Hauer <[email protected]> Acked-by: Shawn Guo <[email protected]> Acked-by: Dave Martin <[email protected]>
2012-01-16[media] cxd2820r: do not allow get_frontend() when demod is not initializedAntti Palosaari1-0/+5
This fixes bug introduced by multi-frontend to single-frontend change. Finally HAS_LOCK is got back! We are not allowed to access hardware in sleep mode... Chip did not like when .get_frontend() reads some registers while chip was sleeping and due to that HAS_LOCK bit was never gained. TODO: We should add logic for dvb-core to drop out illegal calls like that. Signed-off-by: Antti Palosaari <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-01-16[media] cxd2820r: wait demod lock for DVB-C tooAntti Palosaari1-0/+1
Fix yet another bug introduced be recent cxd2820r multi-frontend to single-frontend change. Finally, we have at least almost working picture for DVB-C too. Signed-off-by: Antti Palosaari <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-01-16[media] tda18271c2dd: Remove pointless linux/version.h includeJesper Juhl1-1/+0
As pointed out by 'make versioncheck', there's no need for drivers/media/dvb/frontends/tda18271c2dd.c to Signed-off-by: Jesper Juhl <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-01-16[media] cxd2820r: do not switch to DVB-T when DVB-C failsAntti Palosaari1-2/+2
Fix another bug introduced by recent multi-frontend to single-frontend change. Signed-off-by: Antti Palosaari <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-01-16[media] anysee: do not attach same frontend twiceAntti Palosaari1-13/+7
cxd2820r implements only one frontend currently which handles all the standards. Signed-off-by: Antti Palosaari <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-01-16[media] tlg2300: fix up check_firmware() returnDan Carpenter1-2/+2
The caller doesn't check the return value of check_firmware() but static checkers complain. It currently returns negative error codes, or zero or greater on success but since the return type is boolean the values are truncated to one or zero. I've changed it to return an int, negative on error and zero on success. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-01-16ARM: exynos: remove incorrect BSYM usageRob Herring2-3/+4
BSYM macro is only needed for assembly files and its usage in c files is wrong, so remove it. The linker will correctly set bit 0 for Thumb2 kernels. Signed-off-by: Rob Herring <[email protected]> Cc: Dave Martin <[email protected]> Cc: Kukjin Kim <[email protected]>
2012-01-16ARM: ux500: add missing ENDPROC to headsmp.SRob Herring1-0/+2
Once the ENDPROC is in place, BSYM() in not longer necessary to get correct pointer to u8500_secondary_startup(). Signed-off-by: Rob Herring <[email protected]> Cc: Srinidhi Kasagar <[email protected]> Cc: Linus Walleij <[email protected]>
2012-01-16ARM: msm: Add missing ENDPROC to headsmp.SRob Herring1-0/+1
Once the ENDPROC is in place, BSYM() in not longer necessary to get correct pointer to msm_secondary_startup(). Signed-off-by: Rob Herring <[email protected]> Cc: David Brown <[email protected]> Cc: Daniel Walker <[email protected]>
2012-01-16[media] saa7164: remove duplicate initializationDan Carpenter1-4/+0
These were initialized twice by mistake. They were defined the same way both times so this doesn't change how the code works. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-01-16ARM: versatile: Add missing ENDPROC to headsmp.SPawel Moll3-5/+3
Once the ENDPROC is in place, BSYM() in not longer necessary to get correct pointer to versatile_secondary_startup(). Tested-by: Jon Medhurst <[email protected]> Signed-off-by: Pawel Moll <[email protected]> Acked-by: Dave Martin <[email protected]>
2012-01-16[media] Add registers names to XC2028 tuner from datahseet and use themMiroslav Slugen1-6/+21
Signed-off-by: Miroslav Slugen <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-01-16[media] xc4000: add support for signal strength measuresMiroslav Slugen1-0/+86
In xc4000 chipsets real signal and noise level is stored in register 0x0A and 0x0B,so we can use those registers to monitor signal strength. I tested this patch on 2 different cards Leadtek DVR3200 and DTV2000H Plus, both with same results, I used special antenna hubs (toner 4x, 6x, 8x and 12x) with mesured signal lost, both registers are in dB value, first represent signal with limit value -113.5dB (should be -114dB) and exactly match with test results. Second represents noise level also in dB and there is no maximum value, but from tests we can drop everything above 32dB which tuner realy can't use, signal was usable till 20dB noise level. In digital mode we can take signal strength but sadly noise level is not relevant and real value is stored in demodulator for now just zl10353, also digital mode is just for testing, because it needs changing other parts of code which reads data only from demodulator. In analog mode I was able to test only FM radio, signal level is not important, it says something about cable and hub losts, but nothing about real quality of reception, so even if we have signal level at minimum 113dB we can still here radio, because of that it is displaied only in debug mode, but for real signal level is used noise register which is again very accurate, radio noise level was betwen 6-20dB for good signal, 20-25dB for medium signal, and above 25dB signal is unusable. For now real benefit of this patch is only for FM radio mode. Signed-off-by: Miroslav Slugen <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>