[PATCH 35/50] x86/boot/e820: Simplify e820_reserve_resources()

2017-01-28 Thread Ingo Molnar
Remove unnecessary duplications of "e820_table->entries[i]." via a local variable, plus pass in 'entry' to the type_to_*() functions which further improves the readability of the code - and other small tweaks. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov

[PATCH 44/50] x86/boot/e820: Clean up __e820__update_table() et al

2017-01-28 Thread Ingo Molnar
The __e820__update_table() function has various weirdly named variables, such as 'pbios', 'biosmap' and 'pnr_map' which are pretty confusing and actively misleading at times. This weird naming found its way into other functions as well, such as __append_e820_table() and append_e820_table(). Stand

[PATCH 20/50] x86/boot/e820: Rename memblock_x86_fill() to e820__memblock_setup() and improve the explanations

2017-01-28 Thread Ingo Molnar
So memblock_x86_fill() is another E820 code misnomer: - nothing in its name tells us that it's part of the E820 subsystem ... - The 'fill' wording is ambiguous and doesn't tell us whether it's a single entry or some process - while the _real_ purpose of the function is hidden, which is to

[PATCH 05/50] x86/boot/e820: Clean up the E820_X_MAX definition

2017-01-28 Thread Ingo Molnar
E820_X_MAX is defined in a somewhat messy fashion: - there's a pretty pointless looking #ifndef __KERNEL__ define that makes no sense in the non-UAPI header anymore, - part of it is defined in api.h, which is not for type definitions, - plus it's defined in two headers and the main explana

[PATCH 28/50] x86/boot/e820: Rename update_e820() to e820__update_table()

2017-01-28 Thread Ingo Molnar
update_e820() should have 'e820' as a prefix as most of the other E820 functions have - but it's also a bit unclear about its purpose, as it's unclear what is updated - the whole table, or an entry? Also, the name does not express that it's a trivial wrapper around sanitize_e820_table() that also

[PATCH 14/50] x86/boot/e820: Rename 'e820_map' variables to 'e820_array'

2017-01-28 Thread Ingo Molnar
In line with the rename to 'struct e820_array', harmonize the naming of common e820 table variable names as well: e820 => e820_array e820_saved=> e820_array_saved e820_map => e820_array initial_e820 => e820_array_init This makes the variable names more consistent and

[PATCH 23/50] x86/boot/e820: Move the memblock_find_dma_reserve() function and rename it to memblock_set_dma_reserve()

2017-01-28 Thread Ingo Molnar
We introduced memblock_find_dma_reserve() in this commit: 6f2a75369e75 x86, memblock: Use memblock_memory_size()/memblock_free_memory_size() to get correct dma_reserve But there's several problems with it: - The changelog is full of typos and is incomprehensible in general, and the comme

[PATCH 26/50] x86/boot/e820: Clarify the role of finish_e820_parsing() and rename it to e820__finish_early_params()

2017-01-28 Thread Ingo Molnar
finish_e820_parsing() is closely related to parse_early_params(), but the name does not tell us this clearly, so rename it to e820__finish_early_params(). Also add a few comments to explain what the function does. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav P

[PATCH 47/50] x86/boot/e820: Rename e820_reserve_resources*() to e820__reserve_resources*()

2017-01-28 Thread Ingo Molnar
Also do some minor cleanups. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter

[PATCH 45/50] x86/boot/e820: Document e820__reserve_setup_data()

2017-01-28 Thread Ingo Molnar
Also clean it up a bit. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijls

[PATCH 37/50] x86/boot/e820: Use 'enum e820_type' in 'struct e820_entry'

2017-01-28 Thread Ingo Molnar
Use a stricter type for struct e820_entry. Add a build-time check to make sure the compiler won't ever pack the enum into a field smaller than 'int'. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc:

[PATCH 46/50] x86/boot/e820: Use bool in query APIs

2017-01-28 Thread Ingo Molnar
Change e820__mapped_any() and e820__mapped_all()'s return type and e820__range_remove()'s check_type parameter to bool. Propagate it into arch/x86/pci/mmconfig-shared.c as this change affects a function signature there too. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc:

[PATCH 36/50] x86/boot/e820: Introduce 'enum e820_type'

2017-01-28 Thread Ingo Molnar
Use an enum instead of CPP #define. Also fix various small annoyances in the descriptions of the various E820 types. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying

[PATCH 25/50] x86/boot/e820: Move e820_reserve_setup_data() to e820.c

2017-01-28 Thread Ingo Molnar
The e820_reserve_setup_data() is local to arch/x86/kernel/setup.c, but it is E820 functionality - so move it to e820.c to better isolate E820 functionality. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasen

Re: [PATCH 0/6] ncr5380: Miscellaneous minor patches

2017-01-28 Thread Ondrej Zary
On Monday 16 January 2017 00:50:57 Finn Thain wrote: > This series removes some unused code and related comments, > addresses the warnings generated by 'make W=1' and 'make C=1' > and fixes a theoretical bug in the bus reset method in atari_scsi. > > There's also a patch to add a missing error chec

[PATCH 24/50] x86/boot/e820: Rename parse_e820_ext() to e820__memory_setup_extended()

2017-01-28 Thread Ingo Molnar
parse_e820_ext() is very similar to e820__memory_setup_default(), both are taking bootloader provided data, add it to the E820 table and then pass it sanitize_e820_table(). Rename it to e820__memory_setup_extended() to better signal their similar role. No change in functionality. Cc: Alex Thorlt

[PATCH 11/50] x86/boot/e820: Rename the basic e820 data types to 'struct e820_entry' and 'struct e820_array'

2017-01-28 Thread Ingo Molnar
The 'e820entry' and 'e820map' names have various annoyances: - the missing underscore departs from the usual kernel style and makes the code look weird, - in the past I kept confusing the 'map' with the 'entry', because a 'map' is ambiguous in that regard, - it's not really clear from t

[PATCH 27/50] x86/boot/e820: Rename early_reserve_e820() to e820__memblock_alloc() and document it

2017-01-28 Thread Ingo Molnar
early_reserve_e820() is an early hack for kexec that does a limited fixup of the mptable and passes it to the kexec kernel as if it was the real thing. For this it needs to allocate memory - but no memory allocator is available yet beyond the memblock allocator, so early_reserve_e820() is really a

[PATCH 40/50] x86/boot/e820: Clean up the E820 table size define names

2017-01-28 Thread Ingo Molnar
We've got a number of defines related to the E820 table and its size: E820MAP E820NR E820_X_MAX E820MAX The first two denote byte offsets into the zeropage (struct boot_params), and can are not used in the kernel and can be removed. The E820_*_MAX values have an i

[PATCH 39/50] x86/boot/e820: Prefix the E820_* type names with "E820_TYPE_"

2017-01-28 Thread Ingo Molnar
So there's a number of constants that start with "E820" but which are not types - these create a confusing mixture when seen together with 'enum e820_type' values: E820MAP E820NR E820_X_MAX E820MAX To better differentiate the 'enum e820_type' values prefix them wit

[PATCH 19/50] x86/boot/e820: Basic cleanup of e820.c

2017-01-28 Thread Ingo Molnar
Over the last decade or so e820.c has become an ureadable mess of tinkerware. Perform some very basic cleanups before doing more intricate cleanups, so that my eyes don't start bleeding when I look at it. Here's some of the excesses: - Total disregard of countless aspects of Documentation/Coding

[PATCH 30/50] x86/boot/e820: Rename e820_any_mapped()/e820_all_mapped() to e820__mapped_any()/e820__mapped_all()

2017-01-28 Thread Ingo Molnar
The 'any' and 'all' are modified to the 'mapped' concept, so move them last in the name. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Ju

[PATCH 13/50] x86/boot/e820: Remove e820_mark_nosave_regions() definition uglies

2017-01-28 Thread Ingo Molnar
The e820_mark_nosave_regions definition has a number of ugly #ifdef conditions that unnecessarily uglify both the header and the e820.c file. Make this function unconditional: most distro kernels have hibernation enabled. If LTO functionality is added in the future it will be able to eliminate unu

[PATCH 04/50] x86/boot/e820: Split minimal UAPI types out into uapi/asm/e820/types.h

2017-01-28 Thread Ingo Molnar
bootparam.h, which defines the legacy 'zeropage' boot parameter area, requires a small amount of e280 defines in the UAPI space - provide them. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Pe

[PATCH 43/50] x86/boot/e820: Simplify the e820__update_table() interface

2017-01-28 Thread Ingo Molnar
The e820__update_table() parameters are pretty complex: arch/x86/include/asm/e820/api.h:extern int e820__update_table(struct e820_entry *biosmap, int max_nr_map, u32 *pnr_map); But 90% of the usage is trivial: arch/x86/kernel/e820.c: if (e820__update_table(e820_table->entries, ARRAY

"isert: isert_setup_id: rdma_bind_addr() failed: -19" spam, followed by Recursive Fault on reboot

2017-01-28 Thread Stevie Trujillo
Hello I'm trying (failing) to get iSER working. After rebooting with some settings saved in targetcli, I got an endless stream of messages like this: [ 192.701299] isert: isert_setup_id: rdma_bind_addr() failed: -19 [ 192.702733] isert: isert_setup_id: rdma_bind_addr() failed: -19 [ 192.704021

Re: [PATCH 37/50] x86/boot/e820: Use 'enum e820_type' in 'struct e820_entry'

2017-01-28 Thread Linus Torvalds
On Sat, Jan 28, 2017 at 2:11 PM, Ingo Molnar wrote: > Use a stricter type for struct e820_entry. Add a build-time check to make > sure the compiler won't ever pack the enum into a field smaller than > 'int'. I'm not sure this is a good idea. In fact, I'm pretty sure it's a horrible idea. The com

Re: [PATCH v5 3/8] PCI: Don't block runtime PM for Thunderbolt host hotplug ports

2017-01-28 Thread Bjorn Helgaas
On Sun, Jan 15, 2017 at 09:03:45PM +0100, Lukas Wunner wrote: > Hotplug ports generally block their parents from suspending to D3hot as > otherwise their interrupts couldn't be delivered. Well, the hotplug ports don't actually block anything. We may decide not to suspend the parent because normal

[PATCH 08/50] x86/boot/e820: Clean up asm/e820/api.h

2017-01-28 Thread Ingo Molnar
Do a number of easy cleanups: - remove spurious linebreaks - remove spurious whitespace differences and inconsistent tabulation - remove unused and ugly 'struct setup_data;' pre-declaration - make all exported functionality 'extern' consistently - deobfuscate the (s,e) parameters of is_IS

Re: [PATCH v8 07/12] dt-bindings: i2c: i2c-mux-simple: document i2c-mux-simple bindings

2017-01-28 Thread Peter Rosin
On 2017-01-27 20:39, Rob Herring wrote: > On Wed, Jan 18, 2017 at 04:57:10PM +0100, Peter Rosin wrote: >> Describe how a generic multiplexer controller is used to mux an i2c bus. >> >> Acked-by: Jonathan Cameron >> Signed-off-by: Peter Rosin >> --- >> .../devicetree/bindings/i2c/i2c-mux-simple.t

[PATCH 02/50] x86/boot/e820: Clean up and improve comments in asm/e820/types.h

2017-01-28 Thread Ingo Molnar
Do some common-sense cleanups: - standardize on the kernel coding style consistently - tabulate definitions consistently - extend and clarify various descriptions - fix speling - update the header guard name according to the new position - etc. No change in functionality. Cc: Alex Tho

[PATCH 38/50] x86/boot/e820: Use 'enum e820_type' when handling the e820 region type

2017-01-28 Thread Ingo Molnar
The E820 region type is put into four different types (!) when used in function parameters or local variables: unsigned type; int type; unsigned long current_type; u32 type; Use 'enum e820_type' in all these cases instead. No change in functionality. Cc: Alex Tho

[PATCH 03/50] x86/boot/e820: Move asm/e820.h to asm/e820/api.h

2017-01-28 Thread Ingo Molnar
In line with asm/e820/types.h, move the e820 API declarations to asm/e820/api.h and update all usage sites. This is just a mechanical, obviously correct move & replace patch, there will be subsequent changes to clean up the code and to make better use of the new header organization. Cc: Alex Thor

[PATCH 41/50] x86/boot/e820: Clean up and standardize sizeof() uses

2017-01-28 Thread Ingo Molnar
There's various sizeof() uses in e820.c - standardize on the shortest and least error prone one, along the pattern of: - memset(entry, 0, sizeof(struct e820_entry)); + memset(entry, 0, sizeof(*entry)); ... because with this pattern in most cases it's immediately clear that we have use

[PATCH 21/50] x86/boot/e820: Consolidate 'struct e820_entry *entry' local variable names

2017-01-28 Thread Ingo Molnar
So the E820 code has a lot of cases of: struct e820_entry *ei; ... but the 'ei' name makes very little sense if you think about it, it's not an abbreviation of anything obviously related to E820 table entries. This results in weird looking lines such as: if (type && ei->t

Re: [PATCH v5 5/8] PM: Make requirements of dev_pm_domain_set() more precise

2017-01-28 Thread Bjorn Helgaas
On Sun, Jan 15, 2017 at 09:03:45PM +0100, Lukas Wunner wrote: > Since commit 989561de9b51 ("PM / Domains: add setter for dev.pm_domain") > a PM domain may only be assigned to unbound devices. > > The motivation was not made explicit in the changelog other than "in the > general case that can cause

[PATCH 00/50] x86: Clean up and reorganize the E820 table handling code

2017-01-28 Thread Ingo Molnar
When reviewing an E820 patch two days ago I noticed that our E820 code in arch/x86/kernel/e820.c has bitrotten quite a bit, and started cleaning it up a bit. Didn't suspect that I'd end up with 50 patches, but oh well ... The code got the usual treatments to turn it into a modern, cleanly structu

Re: [PATCH 22/50] x86/boot/e820: Convert printk(KERN_* ...) to pr_*()

2017-01-28 Thread Joe Perches
On Sat, 2017-01-28 at 23:11 +0100, Ingo Molnar wrote: > No change in functionality. Not true. > @@ -419,11 +419,11 @@ __e820_update_range(struct e820_table *table, u64 > start, u64 size, unsigned old_ > size = ULLONG_MAX - start; > > end = start + size; > - printk(KERN_

Re: [PATCH v5 7/8] thunderbolt: Power down controller when idle

2017-01-28 Thread Bjorn Helgaas
On Sun, Jan 15, 2017 at 09:03:45PM +0100, Lukas Wunner wrote: > Document and implement Apple's ACPI-based (but nonstandard) pm mechanism > for Thunderbolt. Briefly, an ACPI method provided by Apple is used to > cut power to the controller. A GPE is enabled while the controller is > powered down w

Re: [PATCH] clk: add more managed APIs

2017-01-28 Thread Russell King - ARM Linux
On Sat, Jan 28, 2017 at 01:44:35PM -0800, Guenter Roeck wrote: > On 01/28/2017 11:22 AM, Dmitry Torokhov wrote: > >Guenter, I know you are a coccinelle wizard, can you cook a script that > >can find current users of clk_enable() in probe paths? Then we can make > >informed decision on devm_clk_enab

[PATCH 17/50] x86/boot/e820: Rename default_machine_specific_memory_setup() to e820__memory_setup_default()

2017-01-28 Thread Ingo Molnar
The default_machine_specific_memory_setup() is a mouthful and despite the many words it doesn't actually tell us clearly what it does. The function is the x86 legacy memory layout setup code, based on E820-formatted memory layout information passed by the bootloader via the boot_params. Rename it

[PATCH 06/50] x86/boot/e820: Remove spurious asm/e820/api.h inclusions

2017-01-28 Thread Ingo Molnar
A commonly used lowlevel x86 header, asm/pgtable.h, includes asm/e820/api.h spuriously, without making direct use of it. Removing it is not simple: over the years various .c code learned to rely on this indirect inclusion. Remove the unnecessary include - this should speed up the kernel build a b

Re: ARM Linux Kernel Update

2017-01-28 Thread Linus Walleij
On Fri, Nov 13, 2015 at 12:46 AM, Satay Epic wrote: > I've an ARM SL3516 board with Linux 2.6.15 and I've tool-chain setup. > I could able to compile the GPL source. This board has red-boot. I have recently started to migrate the Gemini family to device tree. If you're still working on this bo

[PATCH] ipc/mqueue: add missing sparse annotation

2017-01-28 Thread Luc Van Oostenryck
CC: triv...@kernel.org Signed-off-by: Luc Van Oostenryck --- ipc/mqueue.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ipc/mqueue.c b/ipc/mqueue.c index 7a2d8f0c8..4fdd97031 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c @@ -558,6 +558,7 @@ static void wq_add(struct mqueue_inode_info *info,

[PATCH 0/2] iio: distance: devantech srf04 us ranger

2017-01-28 Thread Andreas Klinger
This patch series adds support for the devantech srf04 ultrasonic ranger as IIO device. The device is able to recognize objects in a range of 1 cm and 3 meters. The theoretical resolution is about 3 mm, practically more or less 1 cm. Use cases for this device are level metering in tanks or distan

[PATCH 1/2] iio: distance: add dt binding for devantech-srf04

2017-01-28 Thread Andreas Klinger
This patch adds dt binding for devantech ultrasonic ranger srf04. The vendor "devantech" was already added to the vendor list with "[PATCH v4 1/3] iio: distance: srf08: add trivial DT binding" Signed-off-by: Andreas Klinger --- .../bindings/iio/proximity/devantech-srf04.txt |

[PATCH 15/50] x86/boot/e820: Rename everything to e820_table

2017-01-28 Thread Ingo Molnar
No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysock

[PATCH 18/50] x86/boot/e820: Rename e820_table_saved to e820_table_firmware and improve the description

2017-01-28 Thread Ingo Molnar
So the 'e820_table_saved' is a bit of a misnomer that hides its real purpose. At first sight the name suggests that it's some sort save/restore mechanism, as this is how we typically name such facilities in the kernel. But that is not so, e820_table_saved is the original firmware version of the e

[PATCH 2/2] iio: distance: add devantech us ranger srf04

2017-01-28 Thread Andreas Klinger
This patch adds support for the ultrasonic ranger srf04 of devantech. This device is measuring the distance of objects in a range between 1 cm and 3 meters and a theoretical resolution of 3 mm. There are two GPIOs used: - trigger: set when the measurement should start - echo: set when the ult

[PATCH 07/50] x86/boot/e820: Remove assembly guard from asm/e820/types.h

2017-01-28 Thread Ingo Molnar
There's an assembly guard in asm/e820/types.h, and only a single .S file includes this header: arch/x86/boot/header.S, but it does not actually make use of any of the E820 defines. Remove the inclusion and remove the assembly guard as well. No change in functionality. Cc: Alex Thorlton Cc: Andy

[PATCH 09/50] x86/boot/e820: Remove unnecessary __ASSEMBLY__ guard

2017-01-28 Thread Ingo Molnar
asm/e820/api.h had a spurious __ASSEMBLY__ guard - but the API header is not included in any assembly files. Remove it. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Yi

[PATCH 05/60] staging: lustre: llite: check request != NULL in ll_migrate

2017-01-28 Thread James Simmons
From: wang di Check if the request is NULL, before retrieve reply body from the request. Signed-off-by: wang di Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7396 Reviewed-on: http://review.whamcloud.com/17079 Reviewed-by: John L. Hammond Reviewed-by: Andreas Dilger Signed-off-by: James

[PATCH 14/60] staging: lustre: lov: Ensure correct operation for large object sizes

2017-01-28 Thread James Simmons
From: Nathaniel Clark If a backing filesystem (ZFS) returns that it supports very large (LLONG_MAX) object sizes, that should be correctly supported. This fixes the check for unitialized stripe_maxbytes in lsm_unpackmd_common(), so that ZFS can return LLONG_MAX and it will be okay. This issue is

[PATCH 11/60] staging: lustre: obd: RCU stalls in lu_cache_shrink_count()

2017-01-28 Thread James Simmons
From: Ann Koehler The algorithm for counting freeable objects in the lu_cache shrinker does not scale with the number of cpus. The LU_SS_LRU_LEN counter for each cpu is read and summed at shrink time while holding the lu_sites_guard mutex. With a large number of cpus and low memory conditions, pr

[PATCH 09/60] staging: lustre: lmv: Correctly generate target_obd

2017-01-28 Thread James Simmons
From: Giuseppe Di Natale The target_obd debugfs file was not being generated correctly in cases where nonconsecutive MDT indices were used when generating a filesystem. Signed-off-by: Giuseppe Di Natale Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8100 Reviewed-on: http://review.whamclou

[PATCH 07/60] staging: lustre: ptlrpc: set proper mbits for EINPROGRESS resend

2017-01-28 Thread James Simmons
From: Niu Yawei Set mbits for EINPROGRESS resend in ptl_send_rpc(). Signed-off-by: Niu Yawei Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8193 Reviewed-on: http://review.whamcloud.com/20377 Reviewed-by: Liang Zhen Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: Jam

[PATCH 02/60] staging: lustre: statahead: drop support for remote entry

2017-01-28 Thread James Simmons
From: Lai Siyao This patch dropped support for remote entry statahead, because it needs 2 async RPCs to fetch both LOOKUP lock from parent MDT and UPDATE lock from client MDT, which is complicated. Plus not supporting remote entry statahead won't cause any issue. * pack child fid in statahead re

[PATCH 16/60] staging: lustre: llite: don't ignore layout for group lock request

2017-01-28 Thread James Simmons
From: Jinshan Xiong ignore_layout can be set for operations that layout won't be changed, typically page operations. Ignoring layout change in group lock request will confuse layout change code at LOV layer and hit assertion. Signed-off-by: Henri Doreau Signed-off-by: Jinshan Xiong Signed-off-

[PATCH 17/60] staging: lustre: obdclass: do not call lu_site_purge() for single object exceed

2017-01-28 Thread James Simmons
From: Alex Zhuravlev First of all, this is expensive procedure including a global mutex and per-bucket spinlocks. also, all the threads observed exceed will be calling lu_site_purge() and essentially serialized on that. instead we can let other threads to skip the whole procedure. Signed-off-by:

[PATCH 15/60] staging: lustre: hsm: stack overrun in hai_dump_data_field

2017-01-28 Thread James Simmons
From: frank zago The function hai_dump_data_field will do a stack buffer overrun when cat'ing /sys/fs/lustre/.../hsm/actions if an action has some data in it. hai_dump_data_field uses snprintf. But there is no check for truncation, and the value returned by snprintf is used as-is. The coordinat

[PATCH 12/60] staging: lustre: lmv: Error not handled for lmv_find_target

2017-01-28 Thread James Simmons
From: Ulka Vaze This issue is found by smatch; has been reported as- Unchecked usage of potential ERR_PTR result in lmv_hsm_req_count and lmv_hsm_req_build. Added ERR_PTR in both functions and also return value check added. Signed-off-by: Ulka Vaze Signed-off-by: Aditya Pandit Intel-bug-id: ht

[PATCH 18/60] staging: lustre: ptlrpc: skip lock if export failed

2017-01-28 Thread James Simmons
From: Alexander Boyko This patch resolves IO vs eviction race. After eviction failed export stayed at stale list, a client had IO processing and reconnected during it. A client sent brw rpc with last lock cookie and new connection. The lock with failed export was found and assert was happened. (

[PATCH 31/50] x86/boot/e820: Rename e820_setup_gap() to e820__setup_pci_gap()

2017-01-28 Thread Ingo Molnar
The e820_setup_gap() function name is unnecessarily silent about what kind of gap it sets up. Make it clear that it's about the PCI gap. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anv

[PATCH 10/50] x86/boot/e820: Move HIGH_MEMORY define to asm/e820/types.h

2017-01-28 Thread Ingo Molnar
The HIGH_MEMORY define was in the API header, while it conceptually belongs to the other physical memory ranges in the e820/types.h header. Move it there - and also convert the 1MB address to hexa, so that it lines up more nicely with the other memory address values. No change in functionality.

[PATCH 20/60] staging: lustre: llite: remove obsolete comment for ll_unlink()

2017-01-28 Thread James Simmons
From: "John L. Hammond" Remove obsolete comments about the behavior of ll_unlink() Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8003 Reviewed-on: http://review.whamcloud.com/19881 Reviewed-by: Andrew Perepechko Reviewed-by: James Simmons Reviewed-by: Oleg

[PATCH 21/60] staging: lustre: ptlrpc: correct use of list_add_tail()

2017-01-28 Thread James Simmons
From: "John L. Hammond" In sptlrpc_gc_add_sec() swap the arguments to list_add_tail() so that it does what we meant it to do. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8270 Reviewed-on: http://review.whamcloud.com/20784 Reviewed-by: Andreas Dilger Revie

[PATCH 24/60] staging: lustre: lustre: Remove old commented out code

2017-01-28 Thread James Simmons
From: Ben Evans These #if 0 blocks have been in place for years. Assume they are not used and remove them Signed-off-by: Ben Evans Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8058 Reviewed-on: http://review.whamcloud.com/20416 Reviewed-by: John L. Hammond Reviewed-by: Frank Zago Revie

[PATCH 27/60] staging: lustre: mgc: handle config_llog_data::cld_refcount properly

2017-01-28 Thread James Simmons
From: Fan Yong Originally, the logic of handling config_llog_data::cld_refcount is some confusing, it may cause the cld_refcount to be leaked or trigger "LASSERT(atomic_read(&cld->cld_refcount) > 0);" when put the reference. This patch clean related logic as following: 1) When the 'cld' is creat

[PATCH 26/60] staging: lustre: llite: Trust creates in revalidate too.

2017-01-28 Thread James Simmons
From: Oleg Drokin By forcing creates to always go via lookup we lose some important caching benefits too. Instead let's trust creates with positive cached entries. Then we have 3 possible outcomes: 1. Negative dentry - we go via atomic_open and do the create by name there. 2. Positive dentry,

[PATCH 22/60] staging: lustre: fid: fix race in fid allocation

2017-01-28 Thread James Simmons
From: Fan Yong There is race condition when allocating fid/seq in parallel as following: The thread1 will release the lcs_mutex via seq_fid_alloc_prep(), then another fid allocation thread2 can obtain the lcs_mutex and allocate FID in the new sequence that has just been allocated by the thread1

[PATCH 25/60] staging: lustre: llite: normal user can't set FS default stripe

2017-01-28 Thread James Simmons
From: Lai Siyao Current client doesn't check permission before updating filesystem default stripe on MGS, which isn't secure and obvious. Since we setattr on MDS first, and then set default stripe on MGS, we can just return error upon setattr failure. Now filesystem default stripe is stored in

[PATCH 19/60] staging: lustre: llite: handle inactive OSTs better in statfs

2017-01-28 Thread James Simmons
From: Andreas Dilger Change the order of checks for inactive OSCs in lov_prep_statfs_set() so that administratively disabled OSTs do not generate any output in "lfs df" at all, to avoid needlessly cluttering the output. Enable the lazystatfs mount option by default, so that "df" does not hang wh

[PATCH 13/60] staging: lustre: obdclass: health_check to report unhealthy upon LBUG

2017-01-28 Thread James Simmons
From: Bruno Faccini When a LBUG has occurred, without panic_on_lbug being set, health_check sysfs file must return an unhealthy state. Signed-off-by: Bruno Faccini Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7486 Reviewed-on: http://review.whamcloud.com/17981 Reviewed-by: Bobi Jam Revi

[PATCH 28/60] staging: lustre: ldlm: ASSERTION(flock->blocking_export!=0) failed

2017-01-28 Thread James Simmons
From: Andriy Skulysh Whole policy structure was zeroed twice. Once during enqueue and second time during resend or replay. Policy structure should be initialized with default values only in ldlm_lock_new(). Signed-off-by: Andriy Skulysh Signed-off-by: Ben Evans Intel-bug-id: https://jira.hpdd.

[PATCH 03/60] staging: lustre: clio: add cl_page LRU shrinker

2017-01-28 Thread James Simmons
From: Bobi Jam Register cache shrinker to reclaim memory from cl_page LRU list. Signed-off-by: Bobi Jam Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6842 Reviewed-on: http://review.whamcloud.com/15630 Reviewed-by: Andreas Dilger Reviewed-by: Jinshan Xiong Reviewed-by: Oleg Drokin Sign

[PATCH 29/60] staging: lustre: llite: Setting xattr are properly checked with and without ACLs

2017-01-28 Thread James Simmons
From: Dmitry Eremin Setting extended attributes permissions are properly checked with and without ACLs. In user.* namespace, only regular files and directories can have extended attributes. For sticky directories, only the owner and privileged user can write attributes. Signed-off-by: Dmitry Ere

[PATCH 30/60] staging: lustre: ptlrpc: comment for FLD_QUERY RPC reply swab

2017-01-28 Thread James Simmons
From: Fan Yong The 'fld_read_server' uses 'RMF_GENERIC_DATA' to hold the 'FLD_QUERY' RPC reply that is composed of 'struct lu_seq_range_array'. But there is not registered swabber function for 'RMF_GENERIC_DATA'. So the RPC peers need to handle the RPC reply with fixed little-endian format. In t

[PATCH 08/60] staging: lustre: ldlm: Restore connect flags on failure

2017-01-28 Thread James Simmons
From: Jeremy Filizetti Restore connect flags on failure of ptlrpc_connect_import() to prevent an LBUG due to flags mismatch. Signed-off-by: Jeremy Filizetti Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7185 Reviewed-on: http://review.whamcloud.com/16950 Reviewed-by: Andreas Dilger Revie

[PATCH 10/60] staging: lustre: obdclass: add more info to sysfs version string

2017-01-28 Thread James Simmons
From: Andreas Dilger Update the sysfs "version" file to print "lustre: " with the version number. Signed-off-by: Andreas Dilger Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5969 Reviewed-on: http://review.whamcloud.com/16721 Reviewed-by: James Simmons Reviewed-by: Dmitry Eremin Reviewe

[PATCH 31/60] staging: lustre: clio: sync write should update mtime

2017-01-28 Thread James Simmons
From: Niu Yawei Sync write should update m/ctime promptly, otherwise, stale m/ctime could be updated on the OST object by the sync write RPC. Signed-off-by: Niu Yawei Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7310 Reviewed-on: http://review.whamcloud.com/21063 Reviewed-by: John L. Ham

[PATCH 00/60] staging: lustre: batches of fixes for lustre client

2017-01-28 Thread James Simmons
Batch of missing fixes for lustre for the upstream client. Alex Zhuravlev (1): staging: lustre: obdclass: do not call lu_site_purge() for single object exceed Alexander Boyko (1): staging: lustre: ptlrpc: skip lock if export failed Andreas Dilger (3): staging: lustre: mdc: quiet console m

[PATCH 06/60] staging: lustre: clio: revise readahead to support 16MB IO

2017-01-28 Thread James Simmons
From: Jinshan Xiong Read ahead currently doesn't handle 16MB RPC packets correctly by assuming the packets are a default size instead of querying the size. This work adjust the read ahead policy to issue read ahead RPC by the underlying RPC size. Signed-off-by: Jinshan Xiong Signed-off-by: Gu Z

[PATCH 33/60] staging: lustre: libcfs: avoid stomping on module param cpu_pattern

2017-01-28 Thread James Simmons
From: Dmitry Eremin The function cfs_cpt_table_create_pattern() alters the string passed to it. Currently we are passing in the module parameter string cpu_pattern which is incorrect. Instead lets duplicate the module parameter string and pass that to the function cfs_cpt_table_create_pattern().

[PATCH 23/60] staging: lustre: lmv: remove unused placement parameter

2017-01-28 Thread James Simmons
From: "John L. Hammond" Remove the unused lmv.*.placement parameter along with supporting functions and struct members. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7674 Reviewed-on: http://review.whamcloud.com/18019 Reviewed-by: Ben Evans Reviewed-by: Fra

[PATCH 32/60] staging: lustre: osc: limits the number of chunks in write RPC

2017-01-28 Thread James Simmons
From: Jinshan Xiong OSC has to make sure that it won't issue write RPCs with too many chunks otherwise it will casue ZFS to create transactions much bigger than DMU_MAX_ACCESS in size, which will end up with write failure. Signed-off-by: Jinshan Xiong Signed-off-by: Dmitry Eremin Intel-bug-id:

[PATCH 04/60] staging: lustre: mdc: quiet console message for known -EINTR

2017-01-28 Thread James Simmons
From: Andreas Dilger If a user process is waiting for MDS recovery during close, but the process is interrupted, the file is still closed but it prints a message on the console. Quiet the console message for -EINTR, since this is expected behaviour. Signed-off-by: Andreas Dilger Intel-bug-id: h

[PATCH 36/60] staging: lustre: header: remove assert from interval_set()

2017-01-28 Thread James Simmons
In the case of interval_tree.h only interval_set() uses LASSERT which is removed in this patch and interval_set() instead reports a real error. The header libcfs.h for interval_tree.h is not needed anymore so we can just use the standard linux kernel headers instead.h Signed-off-by: James Simmons

[PATCH 35/60] staging: lustre: lov: ld_target could be NULL

2017-01-28 Thread James Simmons
From: Bobi Jam lov_device::ld_target[ost_idx] could be NULL if the OST target is not filled in lov_device::ld_lov::lov_tgt_desc[ost_idx] yet. Signed-off-by: Bobi Jam Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8018 Reviewed-on: http://review.whamcloud.com/21411 Reviewed-by: Jinshan Xion

[PATCH 34/60] staging: lustre: libcfs: default CPT matches NUMA topology

2017-01-28 Thread James Simmons
From: Dmitry Eremin Change default value of CPT pattern and make it match NUMA topology Signed-off-by: Liang Zhen Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5050 Reviewed-on: http://review.whamcloud.com/22377 Reviewed-by: James Simmons Reviewed-by: Olaf W

[PATCH 37/60] staging: lustre: llite: specify READA debug mask for ras_update

2017-01-28 Thread James Simmons
From: Bobi Jam So that debug log only contains relevant messages for debugging purpose. Signed-off-by: Bobi Jam Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8413 Reviewed-on: http://review.whamcloud.com/22753 Reviewed-by: Andreas Dilger Reviewed-by: Fan Yong Reviewed-by: Oleg Drokin S

[PATCH 39/60] staging: libcfs: remove integer types abstraction from libcfs

2017-01-28 Thread James Simmons
Replace the ulong_ptr_t and long_ptr_t with standard kernel types. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/20204 Reviewed-by: Frank Zago Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: Jam

[PATCH 42/60] staging: lustre: ptlrpc: allow blocking asts to be delayed

2017-01-28 Thread James Simmons
From: Vladimir Saveliev ptlrpc_import_delay_req() refuses to delay blocking asts when import is not in LUSTRE_IMP_FULL yet. That leads to client eviction assuming that it failed to respond. Allow delays for blocking asts being resent. Signed-off-by: Vladimir Saveliev Intel-bug-id: https://jira

[PATCH 45/60] staging: lustre: libcfs: Change positional struct initializers to C99

2017-01-28 Thread James Simmons
From: Steve Guminski This patch makes no functional changes. Struct initializers in the libcfs directory that use C89 or GCC-only syntax are updated to C99 syntax. The C99 syntax prevents incorrect initialization if values are accidently placed in the wrong position, allows changes in the struct

[PATCH 41/60] staging: lustre: osc: osc_match_base prototype differs from declaration

2017-01-28 Thread James Simmons
From: Steve Guminski The patch updates the prototype in osc_internal.h to match the enums used in the declaration. The osc_match_base declaration in lustre/osc/osc_request.c uses enums for stricter checking on the type and mode parameters: int osc_match_base(struct obd_export *exp,

[PATCH 43/60] staging: lustre: obd: remove OBD_NOTIFY_CREATE

2017-01-28 Thread James Simmons
From: "John L. Hammond" None of the obd_notify() handlers listen for the OBD_NOTIFY_CREATE event, so remove it and its sole use in lov_add_target(). Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8403 Reviewed-on: https://review.whamcloud.com/21420 Reviewed-b

[PATCH 49/60] staging: lustre: socklnd: remove socklnd_init_msg

2017-01-28 Thread James Simmons
Remove the inline function socklnd_init_msg. Its only used by the kernel code so no point keeping it in an UAPI header. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/18506 Reviewed-by: Dmitry Eremin Reviewed-by: Do

[PATCH 48/60] staging: lustre: ksocklnd: ignore timedout TX on closing connection

2017-01-28 Thread James Simmons
From: Liang Zhen ksocklnd reaper thread always tries to close the connection for the first timedout zero-copy TX. This is wrong if this connection is already being closed, because the reaper will see the same TX again and again and cannot find out other timedout zero-copy TXs and close connection

[PATCH 51/60] staging: lustre: ptlrpc: update MODULE_PARAM_DESC in ptlrpcd.c

2017-01-28 Thread James Simmons
From: Dmitry Eremin Update max_ptlrpcds module parameter descriptions to let users know its obsolete. Change cpt to CPT for the module parameter description ptlrpcd_per_cpt_max so it matches documentation. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8890 Rev

[PATCH 53/60] staging: lustre: ptlrpc: update replay cursor when close during replay

2017-01-28 Thread James Simmons
From: Niu Yawei The replay cursor should be updated properly when close happened during replay, otherwise, ptlrpc_replay_next() could run into a dead loop due to an invalid replay cursor: - replay cursor is moved to an open request during replay; - application close that open file, so the rq_rep

[PATCH 50/60] staging: lustre: ptlrpc: remove unused pc->pc_env

2017-01-28 Thread James Simmons
From: Dmitry Eremin Environment for request interpreters is not used any more. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8887 Reviewed-on: https://review.whamcloud.com/24061 Reviewed-by: John L. Hammond Reviewed-by: Bob Glossman Reviewed-by: Oleg Drokin

<    1   2   3   4   >