platform/kernel/linux-rpi.git
7 years agostaging: most: aim-network: setup mac address before ifup has finished
Andrey Shvetsov [Tue, 4 Oct 2016 15:10:17 +0000 (17:10 +0200)]
staging: most: aim-network: setup mac address before ifup has finished

The networking AIM implements a non-standard behavior as it starts the
networking interface with an invalid MAC address and changes it by the time
a valid one is available.

This patch introduces a completion object to set the MAC address of the
networking interface before the .ndo_open callback (ifup) of the net_device
returns.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: most: aim-network: fix startup scenario.
Andrey Shvetsov [Tue, 4 Oct 2016 15:10:16 +0000 (17:10 +0200)]
staging: most: aim-network: fix startup scenario.

In case the networking interface (running on MediaLB) is being started
before the MOST network is, it remains disabled even after the MOST network
has transitioned to active mode.

This patch removes the dependency on the MOST link status to keep the
networking queue active and the networking interface working for the
case described above.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: most: core: update examples on how to link channels
Andrey Shvetsov [Tue, 4 Oct 2016 15:10:15 +0000 (17:10 +0200)]
staging: most: core: update examples on how to link channels

This patch updates the comments with examples on how to use the "add_link"
and "remove_link" properties.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: most: core: remove processing of deprecated names
Andrey Shvetsov [Tue, 4 Oct 2016 15:10:14 +0000 (17:10 +0200)]
staging: most: core: remove processing of deprecated names

The USB HDM does not use the "@" character for channel names anymore. This
patch cleans up the code processing such names and adapts the corresponding
examples on how to use the properties "add_link" and "remove_link".

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: most: core: remove read option from remove_link
Andrey Shvetsov [Tue, 4 Oct 2016 15:10:13 +0000 (17:10 +0200)]
staging: most: core: remove read option from remove_link

The attribute "remove_link" returns the latest link that has been removed
of a certain channel. Since this piece information isn't particulary
useful this patch is going to remove it.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: most: core: remove member add_link
Andrey Shvetsov [Tue, 4 Oct 2016 15:10:12 +0000 (17:10 +0200)]
staging: most: core: remove member add_link

This patch removes the unused field add_link of struct most_aim_obj.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging: fwserial: remove unused function fill_unplug_req
Bhumika Goyal [Fri, 7 Oct 2016 14:21:28 +0000 (19:51 +0530)]
Staging: fwserial: remove unused function fill_unplug_req

The function fill_unplug_req is not used anywhere in the kernel, so
remove it. Done using Coccinelle.

@r1@
identifier func;
type T;
@@
static T func(...)
{
...
}

@r@
identifier r1.func;
@@
func

@delete depends on !r@
identifier r1.func;
type r1.T;
@@
- static T func(...){...}

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging: fbtft: Fixed open parenthesis alignment check
Harman Kalra [Sun, 9 Oct 2016 14:44:05 +0000 (20:14 +0530)]
Staging: fbtft: Fixed open parenthesis alignment check

This patch resolves all the following CHECKs caught by checkpatch.pl
CHECK: Alignment should match open parenthesis

Signed-off-by: Harman Kalra <harman4linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging: emxx_udc: constify usb_ep_ops structure
Bhumika Goyal [Sun, 9 Oct 2016 07:56:28 +0000 (13:26 +0530)]
Staging: emxx_udc: constify usb_ep_ops structure

Declare the structure usb_ep_ops as constant as it is only stored in the
ops field of a usb_ep structure which is a field of a nbu2ss_ep structure.
The ops field is of type const struct usb_ep_ops *, so usb_ep_ops
structures having this property can be decalared as const.
Done using coccinelle:

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct usb_ep_ops i@p = {...};

@ok1@
identifier r1.i;
position p;
struct nbu2ss_ep s;
@@
s.ep.ops=&i@p

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct usb_ep_ops i={...};

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct usb_ep_ops i;

File size before:
   text    data     bss     dec     hex filename
  16007     376    3720   20103    4e87
drivers/staging/emxx_udc/emxx_udc.o

File size after:
   text    data     bss     dec     hex filename
  16095     280    3720   20095    4e7f
drivers/staging/emxx_udc/emxx_udc.o

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging: emxx_udc: Remove useless type conversion
Bhumika Goyal [Sat, 8 Oct 2016 09:59:54 +0000 (15:29 +0530)]
Staging: emxx_udc: Remove useless type conversion

Some type conversions like casting a pointer to a pointer of same type,
casting to the original type using addressof(&) operator etc. are not
needed. Therefore, remove them. Done using coccinelle:

@@
type t;
t *p;
t a;
@@
(
- (t)(a)
+ a
|
- (t *)(p)
+ p
|
- (t *)(&a)
+ &a
)

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging: skein: skein_api: Remove useless type conversion
Bhumika Goyal [Sat, 8 Oct 2016 10:28:04 +0000 (15:58 +0530)]
Staging: skein: skein_api: Remove useless type conversion

Some type conversions like casting a pointer to a pointer of same type,
casting to the original type using addressof(&) operator etc. are not
needed. Therefore, remove them. Done using coccinelle:

@@
type t;
t *p;
t a;
@@
(
- (t)(a)
+ a
|
- (t *)(p)
+ p
|
- (t *)(&a)
+ &a
)

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: comedi: Align the * on block comments
Jakub Jedelsky [Tue, 4 Oct 2016 22:32:55 +0000 (00:32 +0200)]
staging: comedi: Align the * on block comments

Block comments should align the * on each line as reported by checkpatch

Signed-off-by: Jakub Jedelsky <jakub.jedelsky@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: i4l: add blank line after declarations
Elizabeth Ferdman [Thu, 6 Oct 2016 21:44:28 +0000 (14:44 -0700)]
staging: i4l: add blank line after declarations

Fix checkpatch error "missing blank line after declarations" to conform
to kernel coding style.

Signed-off-by: Elizabeth Ferdman <gnudevliz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: i4l: move open brace to previous line
Elizabeth Ferdman [Thu, 6 Oct 2016 21:41:18 +0000 (14:41 -0700)]
staging: i4l: move open brace to previous line

Fix checkpatch error "open brace should be on previous line" since only
functions should have their opening brace on a new line.

Signed-off-by: Elizabeth Ferdman <gnudevliz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: dgnc: make find_board_by_major static
Benoit Hiller [Sat, 8 Oct 2016 19:49:55 +0000 (15:49 -0400)]
staging: dgnc: make find_board_by_major static

Fixes the following sparse warning:
drivers/staging/dgnc/dgnc_tty.c:933:19: warning: symbol 'find_board_by_major' was not declared. Should it be static?

Signed-off-by: Benoit Hiller <benoit.hiller@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rts5208: xd.c: Remove multiple assignments
Wayne Porter [Mon, 3 Oct 2016 23:18:55 +0000 (23:18 +0000)]
staging: rts5208: xd.c: Remove multiple assignments

Checkpatch found multiple assignments on one line so move
them to their own lines.

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rts5208: xd.c: Fix CamelCase
Wayne Porter [Mon, 3 Oct 2016 23:18:38 +0000 (23:18 +0000)]
staging: rts5208: xd.c: Fix CamelCase

Covert CamelCase as checkpatch suggests

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rts5208: xd.c: Clean up comparison to NULL
Wayne Porter [Mon, 3 Oct 2016 23:18:20 +0000 (23:18 +0000)]
staging: rts5208: xd.c: Clean up comparison to NULL

Checkpatch recommended changes

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rts5208: xd.c: Remove unnecessary parentheses
Wayne Porter [Mon, 3 Oct 2016 23:18:01 +0000 (23:18 +0000)]
staging: rts5208: xd.c: Remove unnecessary parentheses

Issues found with checkpatch

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rts5208: Logical continuation fixes
Wayne Porter [Mon, 3 Oct 2016 23:17:26 +0000 (23:17 +0000)]
staging: rts5208: Logical continuation fixes

Checkpatch detected multiple instances of logical continuation warnings

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rts5208: Alignment fix
Wayne Porter [Mon, 3 Oct 2016 23:17:05 +0000 (23:17 +0000)]
staging: rts5208: Alignment fix

Coding style checks found by checkpatch

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rts5208: xd.h: Alignment fix
Wayne Porter [Mon, 3 Oct 2016 23:16:43 +0000 (23:16 +0000)]
staging: rts5208: xd.h: Alignment fix

Change alignment to match open parenthesis

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging: media: radio-bcm2048: constify v4l2_ioctl_ops structure
Bhumika Goyal [Sun, 9 Oct 2016 10:35:23 +0000 (16:05 +0530)]
Staging: media: radio-bcm2048: constify v4l2_ioctl_ops structure

Declare the structure v4l2_ioctl_ops as const as it is only stored in
the ioctl_ops field of video_device structure. As this field is of type
const struct v4l2_ioctl_ops *, so v4l2_ioctl_ops structures having this
property can also be made const.
Done using coccinelle:

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct v4l2_ioctl_ops i@p = {...};

@ok1@
identifier r1.i;
position p;
struct video_device s;
@@
s.ioctl_ops=&i@p;

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct v4l2_ioctl_ops i={...};

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct v4l2_ioctl_ops i;

File size before:
   text    data     bss     dec     hex filename
  20465    3220      32   23717    5ca5
drivers/staging/media/bcm2048/radio-bcm2048.o

File size after:
   text    data     bss     dec     hex filename
  21425    2260      32   23717    5ca5
drivers/staging/media/bcm2048/radio-bcm2048.o

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: media: lirc: Format block comments.
Elise Lennion [Sun, 9 Oct 2016 03:50:29 +0000 (00:50 -0300)]
staging: media: lirc: Format block comments.

Fix checkpatch warning:

WARNING: Block comments use a trailing */ on a separate line

Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ks7010: Replace header files
Sabitha George [Sun, 9 Oct 2016 05:54:02 +0000 (11:24 +0530)]
staging: ks7010: Replace header files

This patch replaces inclusion of asm/atomic.h with linux/atomic.h and
asm/io.h with linux/io.h to fix checkpatch warning in ks_wlan.h

Signed-off-by: Sabitha George <sabitha.george@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging: ks7010: Delete unnecessary return statement
Mihaela Muraru [Sat, 8 Oct 2016 07:22:17 +0000 (10:22 +0300)]
Staging: ks7010: Delete unnecessary return statement

This is a patch to ks_hostif.c file that fixes up a checkpatch.pl

WARNING: void function return statements are not generally useful.

The 'return' statement is not useful here, because it is not necessary to be
forced the exit of the function.

Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging: ks7010: __packed instedad of __attribute__((packed))
Mihaela Muraru [Fri, 7 Oct 2016 22:58:11 +0000 (01:58 +0300)]
Staging: ks7010: __packed instedad of __attribute__((packed))

Fix a issue found by  checkpatch.pl tool:

"WARNING: __packed is preferred over __attribute__((packed))".

Replace  __attribute__((packed)) with __packed.

Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ks7010: remove unnecessary else statement
Ebru Akagunduz [Fri, 7 Oct 2016 11:17:49 +0000 (14:17 +0300)]
staging: ks7010: remove unnecessary else statement

This patch removes else statement which is not
usefull after a return. Issue found by checkpatch.pl.

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ks7010: Use printk format specifier for MAC addresses
Pontus Fuchs [Thu, 6 Oct 2016 20:50:20 +0000 (22:50 +0200)]
staging: ks7010: Use printk format specifier for MAC addresses

Convert to %pM instead of custom code.

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ks7010: Remove unnecessary cast
Pontus Fuchs [Thu, 6 Oct 2016 20:50:19 +0000 (22:50 +0200)]
staging: ks7010: Remove unnecessary cast

sdio functions takes unsigned int as address. No need to cast.

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging: ks7010: fix brace coding style issue
Muraru Mihaela [Tue, 4 Oct 2016 20:08:25 +0000 (23:08 +0300)]
Staging: ks7010: fix brace coding style issue

This is a patch to the ks_wlan_net.c file that fixes up a brace coding
style warning found by checkpatch.pl tool, by deleting the unnecessary braces for single statement blocks.

Signed-off-by: Muraru Mihaela <mihaela.muraru21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging: ks7010: add blank line after declaration
Muraru Mihaela [Mon, 3 Oct 2016 19:28:52 +0000 (22:28 +0300)]
Staging: ks7010: add blank line after declaration

This patch fixes a coding style WARNING:
Missing a blank line after declaration, found by checkpatch.pl.
By adding a blank line after declaration of a variable.

Signed-off-by: Muraru Mihaela <mihaela.muraru21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ks7010: fix checkpatch "space after #ifdef" error
Philipp Hoefflin [Mon, 3 Oct 2016 00:57:26 +0000 (02:57 +0200)]
staging: ks7010: fix checkpatch "space after #ifdef" error

Fix checkpatch "ERROR: exactly one space required after that #ifdef"
error in ks_hostif.c.

Signed-off-by: Philipp Hoefflin <p.hoefflin@posteo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ks7010: reformat makro ps_confirm_wait_inc()
Philipp Hoefflin [Mon, 3 Oct 2016 00:57:25 +0000 (02:57 +0200)]
staging: ks7010: reformat makro ps_confirm_wait_inc()

Reformat the makro ps_confirm_wait_inc() to fix several checkpatch
errors and warnings:
  - ERROR: space required before the open brace '{'
  - ERROR: space required before the open parenthesis '('
  - ERROR: code indent should use tabs where possible
  - ERROR: space required after that close brace '}'
  - ERROR: space required before the open parenthesis '('
  - WARNING: line over 80 characters
  - WARNING: please, no spaces at the start of a line

Signed-off-by: Philipp Hoefflin <p.hoefflin@posteo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ks7010: use tabs for indentation
Philipp Hoefflin [Mon, 3 Oct 2016 00:57:24 +0000 (02:57 +0200)]
staging: ks7010: use tabs for indentation

Fix all occurences of checkpatch "ERROR: code indent should use tabs
where possible" errors in ks_hostif.c.

Signed-off-by: Philipp Hoefflin <p.hoefflin@posteo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ks7010: fix "prohibited space" errors reported by checkpatch
Philipp Hoefflin [Mon, 3 Oct 2016 00:57:23 +0000 (02:57 +0200)]
staging: ks7010: fix "prohibited space" errors reported by checkpatch

Fix all occurences of the following checkpatch errors in ks_hostif.c:
  - ERROR: space prohibited after that '&' (ctx:WxW)
  - ERROR: space prohibited after that open parenthesis '('
  - ERROR: space prohibited before that close parenthesis ')'

Signed-off-by: Philipp Hoefflin <p.hoefflin@posteo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8188eu: core: fixes tabstop alignment
Juliana Rodrigues [Sat, 8 Oct 2016 20:49:28 +0000 (17:49 -0300)]
staging: rtl8188eu: core: fixes tabstop alignment

Fixes a tabstop alignment checkpatch issue by removing extra blank
spaces.

Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8188eu: core: removes unecessary parenthesis
Juliana Rodrigues [Sat, 8 Oct 2016 20:48:21 +0000 (17:48 -0300)]
staging: rtl8188eu: core: removes unecessary parenthesis

Removes unecessary parenthesis from rtw_led.c file that were causing
checkpatch warnings.

Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging: rtl8712: remove unused functions
Bhumika Goyal [Thu, 6 Oct 2016 18:02:20 +0000 (23:32 +0530)]
Staging: rtl8712: remove unused functions

Remove the functions sleep_schedulable, down_scanned_network,
up_scanned_network and get_free_xmit_queue as they are not used anywhere
in the kernel. Functions detected using coccinelle but changes done by
hand.
Script:

@initialize:python@
@@
def display(name,p):
        print(name,p[0].file)

@r1@
identifier func;
type T;
position p;
@@
static T func@p(...)
{
...
}

@r@
identifier r1.func;
@@
func

@script:python depends on !r@
func << r1.func;
p << r1.p;
@@
display(func,p)

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging: rtl8192e: rtl_core: Constify rtllib_qos_parameters structures
Bhumika Goyal [Tue, 4 Oct 2016 17:52:36 +0000 (23:22 +0530)]
Staging: rtl8192e: rtl_core: Constify rtllib_qos_parameters structures

Declare the structure rtllib_qos_parameters as constant as it is only
passed as the second argument to the function memcpy. This argument
is constant so the fields of rtllib_qos_parameters structure are
never modified and hence it can be declared as const.
Done using coccinelle:

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct rtllib_qos_parameters i@p = {...};

@ok1@
identifier r1.i;
position p;
expression e1,e2;
@@
memcpy(e1,&i@p,e2)

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct rtllib_qos_parameters i={...};

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct rtllib_qos_parameters i;

File size before:
   text    data     bss     dec     hex filename
  30910     496     201   31607    7b77
drivers/staging/rtl8192e/rtl8192e/rtl_core.o

File size after:
   text    data     bss     dec     hex filename
  30942     464     201   31607    7b77
drivers/staging/rtl8192e/rtl8192e/rtl_core.o

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: sm750fb: Replace printk() with pr_info().
Elise Lennion [Sun, 9 Oct 2016 01:40:24 +0000 (22:40 -0300)]
staging: sm750fb: Replace printk() with pr_info().

Fix checkpatch warning:

WARNING: printk() should include KERN_ facility level

New checkpatch warning appears after including KERN_ facility level.

Fix checkpatch warning:

WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...

Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: android: ion_test: remove extra line per checkpatch.pl
Wayne Porter [Fri, 30 Sep 2016 22:39:52 +0000 (22:39 +0000)]
staging: android: ion_test: remove extra line per checkpatch.pl

Cleanup extra line found by checkpatch.pl

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wilc1000: Add blank line after variable declarations.
Elise Lennion [Fri, 7 Oct 2016 04:20:59 +0000 (01:20 -0300)]
staging: wilc1000: Add blank line after variable declarations.

Fix checkpath warning:

WARNING: Missing a blank line after declarations.

Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wilc1000: Format block comment.
Elise Lennion [Fri, 7 Oct 2016 04:20:23 +0000 (01:20 -0300)]
staging: wilc1000: Format block comment.

Fix checkpatch warning:

WARNING: Block comments use a trailing */ on a separate line

Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wlan-ng: renames ANL_currFC to avoid camelcase
Juliana Rodrigues [Sat, 8 Oct 2016 09:49:47 +0000 (06:49 -0300)]
staging: wlan-ng: renames ANL_currFC to avoid camelcase

Renames the camelcased variable ANL_currFC to anl_curr_fc in order
to fix a checkpatch warning.

Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wlan-ng: renames ASL_currBSS to avoid camelcase
Juliana Rodrigues [Sat, 8 Oct 2016 09:49:32 +0000 (06:49 -0300)]
staging: wlan-ng: renames ASL_currBSS to avoid camelcase

Renames the camelcased variable ASL_currBSS to asl_curr_bss in order
to fix a checkpatch warning.

Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wlan-ng: renames CQ_currBSS to avoid camelcase
Juliana Rodrigues [Sat, 8 Oct 2016 09:49:18 +0000 (06:49 -0300)]
staging: wlan-ng: renames CQ_currBSS to avoid camelcase

Renames the camelcased variable CQ_currBSS to cq_curr_bss in order
to fix a checkpatch warning.

Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wlan-ng: renames hfa384x_authenticateStation_data to avoid camelcase
Juliana Rodrigues [Sat, 8 Oct 2016 09:49:02 +0000 (06:49 -0300)]
staging: wlan-ng: renames hfa384x_authenticateStation_data to avoid camelcase

Renames the camelcased struct hfa384x_authenticateStation_data to
hfa384x_authenticate_station_data in order to fix a checkpatch warning.

Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wlan-ng: renames hfa384x_AssocStatus to avoid camelcase
Juliana Rodrigues [Sat, 8 Oct 2016 09:48:46 +0000 (06:48 -0300)]
staging: wlan-ng: renames hfa384x_AssocStatus to avoid camelcase

Renames the camelcased struct hfa384x_AssocStatus to hfa384x_assoc_status
in order to fix a checkpatch warning.

Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wlan-ng: renames hfa384x_ChInfoResultSub to avoid camelcase
Juliana Rodrigues [Sat, 8 Oct 2016 09:48:31 +0000 (06:48 -0300)]
staging: wlan-ng: renames hfa384x_ChInfoResultSub to avoid camelcase

Renames the camelcased struct hfa384x_ChInfoResultSub to
hfa384x_ch_info_result_sub in order to fix a checkpatch warning.

Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wlan-ng: renames hfa384x_scanResultSub to avoid camelcase
Juliana Rodrigues [Sat, 8 Oct 2016 09:48:10 +0000 (06:48 -0300)]
staging: wlan-ng: renames hfa384x_scanResultSub to avoid camelcase

Renames the camelcased struct hfa384x_scanResultSub to
hfa384x_scan_result_sub in order to fix a checkpatch warning.

Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wlan-ng: renames hfa384x_JoinRequest_data to avoid camelcase
Juliana Rodrigues [Sat, 8 Oct 2016 09:47:52 +0000 (06:47 -0300)]
staging: wlan-ng: renames hfa384x_JoinRequest_data to avoid camelcase

Renames the camelcased struct hfa384x_JoinRequest_data to
hfa384x_join_request_data in order to fix a checkpatch warning.

Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wlan-ng: renames hfa384x_ScanResult to avoid camelcase
Juliana Rodrigues [Sat, 8 Oct 2016 09:47:38 +0000 (06:47 -0300)]
staging: wlan-ng: renames hfa384x_ScanResult to avoid camelcase

Renames the camelcased struct hfa384x_ScanResult to hfa384x_scan_result
in order to fix a checkpatch warning.

Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wlan-ng: renames hfa384x_CommTallies32 to avoid camelcase
Juliana Rodrigues [Sat, 8 Oct 2016 09:47:21 +0000 (06:47 -0300)]
staging: wlan-ng: renames hfa384x_CommTallies32 to avoid camelcase

Fixes a checkpatch warning by renaming the camelcased struct
hfa384x_CommTallies32 to hfa384x_comm_tallies_32.

Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wlan-ng: renames hfa384x_InfFrame to avoid camelcase
Juliana Rodrigues [Sat, 8 Oct 2016 09:47:05 +0000 (06:47 -0300)]
staging: wlan-ng: renames hfa384x_InfFrame to avoid camelcase

Renames hfa384x_InfFrame to hfa384x_inf_frame in order to fix a
checkpatch error caused by camelcase.

Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wlan-ng: fixed lines over 80 characters
Juliana Rodrigues [Sat, 8 Oct 2016 09:46:43 +0000 (06:46 -0300)]
staging: wlan-ng: fixed lines over 80 characters

Breaks lines over 80 characters that were causing checkpatch issues.

Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wlan-ng: aligned block to open parenthesis
Juliana Rodrigues [Sat, 8 Oct 2016 09:46:26 +0000 (06:46 -0300)]
staging: wlan-ng: aligned block to open parenthesis

Fixed multiple checkpatch warnings by aligning blocks to match
open parenthesis.

Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: use 'unsigned int' not unsigned
Elizabeth Ferdman [Mon, 3 Oct 2016 23:53:06 +0000 (16:53 -0700)]
staging: lustre: use 'unsigned int' not unsigned

Use unsigned int rather than unsigned in header variable declaration
for readability. Error found by checkpatch.

Signed-off-by: Elizabeth Ferdman <gnudevliz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: echo: request pages in batches
Alex Zhuravlev [Mon, 3 Oct 2016 02:28:37 +0000 (22:28 -0400)]
staging: lustre: echo: request pages in batches

rather than fetch them one by one.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5278
Reviewed-on: http://review.whamcloud.com/13612
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: lov: move LSM to LOV layer
John L. Hammond [Mon, 3 Oct 2016 02:28:36 +0000 (22:28 -0400)]
staging: lustre: lov: move LSM to LOV layer

Move the definition of struct lov_stripe_md along with supporting
functions from obd.h to lov_internal.h. Remove the unused functions
obd_packmd() and obd_free_diskmd(). Simplify lov_obd_packmd()
according to the reduced use cases and rename it lov_packmd().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5814
Reviewed-on: http://review.whamcloud.com/13696
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: osc: remove remaining bits for capa support
John L. Hammond [Mon, 3 Oct 2016 02:28:35 +0000 (22:28 -0400)]
staging: lustre: osc: remove remaining bits for capa support

With capa support removed from the OSC layer a few more bits
can be cleaned up. Convert the OBD getattr and setattr paths
to use struct obdo rather than struct obd_info. Remove
the oi_policy, oi_oa, and oi_capa members from struct obd_info.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3105
Reviewed-on: http://review.whamcloud.com/14640
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: mdc: add max modify RPCs in flight variable
Gregoire Pichon [Mon, 3 Oct 2016 02:28:34 +0000 (22:28 -0400)]
staging: lustre: mdc: add max modify RPCs in flight variable

This patch introduces the maximum modify RPCs in flight variable of
a mdc client obd device. Its value is set from connection flag and
and connection data. It can later be tuned through the
max_mod_rpcs_in_flight procfs file.

Signed-off-by: Gregoire Pichon <gregoire.pichon@bull.net>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5319
Reviewed-on: http://review.whamcloud.com/14153
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: lov: copy_to_user uses wrong casting
James Simmons [Mon, 3 Oct 2016 02:28:33 +0000 (22:28 -0400)]
staging: lustre: lov: copy_to_user uses wrong casting

With certain version of gcc lov_obd.c failes to compile
with the following warning.

In function copy_to_user,
inlined from lov_iocontrol at
lustre/lustre/lov/lov_obd.c:1168:
./arch/x86/include/asm/uaccess.h:735: error: call to
__copy_to_user_overflow declared with attribute warning:
copy_to_user() buffer size is not probably correct

In lov_iocontrol the data was being casted to int instead
of the required unsigned long. This patch changes the cast
to what is needed for copy_to_user.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6302
Reviewed-on: http://review.whamcloud.com/14613
Reviewed-by: frank zago <fzago@cray.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: ldlm: interval tree search in ldlm_lock_match()
Vitaly Fertman [Mon, 3 Oct 2016 02:28:32 +0000 (22:28 -0400)]
staging: lustre: ldlm: interval tree search in ldlm_lock_match()

replace the linear search by interval_tree one for granted list
in ldlm_lock_match()

Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5739
Xyratex-bug-id: MRP-2089
Reviewed-on: http://review.whamcloud.com/12294
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: ldlm: cancel aged locks for LRUR
Niu Yawei [Mon, 3 Oct 2016 02:28:30 +0000 (22:28 -0400)]
staging: lustre: ldlm: cancel aged locks for LRUR

It doesn't make sense to keep the very aged lock even with the
LRUR policy. This patch decreased the default ns_max_age from 10
hours to 65 minutes and changed LRUR policy to cancel very aged
locks.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6529
Reviewed-on: http://review.whamcloud.com/14856
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: lov: use obd_get_info() to get def/max LOV EA sizes
John L. Hammond [Mon, 3 Oct 2016 02:28:29 +0000 (22:28 -0400)]
staging: lustre: lov: use obd_get_info() to get def/max LOV EA sizes

Use obd_get_info() to get the default and maximum LOV EA sizes (along
with maximum cookiesize) from LOV. Remove the then unused function
obd_size_diskmd() and the unused get info key KEY_LOVDESC. When
computing the maximum LOV EA size use the active OST count
(ld_active_tgt_count) rather than the OST count (ld_tgt_count).

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5814
Reviewed-on: http://review.whamcloud.com/13695
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: obd: remove destroy cookie handling
John L. Hammond [Mon, 3 Oct 2016 02:28:27 +0000 (22:28 -0400)]
staging: lustre: obd: remove destroy cookie handling

Clients no longer need to track the max and default MDS cookiesizes
so remove
 the obsolete obod o_valid flag OBD_MD_FLCOOKIE,
 the struct client_obd members cl_{default,max}_mds_cookiesize,
 the struct obd_trans_info and parameters of this type,
 the cookiesize parameters from md_init_ea_size(),
 the files llite/*/{default,max}_cookiesize, and
 any code that needlessly handled these values.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6017
Reviewed-on: http://review.whamcloud.com/12922
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: quota: remove obsolete quota code
Niu Yawei [Mon, 3 Oct 2016 02:28:26 +0000 (22:28 -0400)]
staging: lustre: quota: remove obsolete quota code

Remove the obsolete quotacheck, quotaon and quotaoff, which
were retained for the interoperability with old (< 2.4) client
and server.

Some other obsolete quota code related to LL_IOC_QUOTACTL_18,
Q_INVLIDATE and Q_FINVALIDATE are removed as well.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5975
Reviewed-on: http://review.whamcloud.com/14705
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: ptlrpc: Move NRS structures out of lustre_net.h
Chris Horn [Mon, 3 Oct 2016 02:28:25 +0000 (22:28 -0400)]
staging: lustre: ptlrpc: Move NRS structures out of lustre_net.h

NRS specific structures are not needed in the rest of the PtlRPC code.
It is more appropriate for these structures to be defined in a
separate header. This commit creates a lustre_nrs.h header for the
generic NRS structures, and policy-specific headers for the various
NRS policies.

Signed-off-by: Chris Horn <hornc@cray.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2667
Reviewed-on: http://review.whamcloud.com/13966
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: hsm: make HSM modification requests replayable
Mikhail Pershin [Mon, 3 Oct 2016 02:28:24 +0000 (22:28 -0400)]
staging: lustre: hsm: make HSM modification requests replayable

There are several HSM requests which modify data on server and
reply on Lustre recovery, e.g. they should replay changes in
case of recovery.

Patch allows such requests to be replayed in recovery time and
they are issued from client using mdc_rpc_lock to serialize them
and avoid concurrent last_rcvd update on server.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5939
Reviewed-on: http://review.whamcloud.com/13684
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: llite: add cl_object_maxbytes()
John L. Hammond [Mon, 3 Oct 2016 02:28:23 +0000 (22:28 -0400)]
staging: lustre: llite: add cl_object_maxbytes()

Add cl_object_maxbytes() to return the maximum supported size of a
cl_object. Remove the lli_maxbytes member from struct
ll_inode_info. Change the lsm_maxbytes member of struct lov_stripe_md
from __u64 to loff_t. Correct the computation of lsm_maxbytes in the
released layout case.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5814
Reviewed-on: http://review.whamcloud.com/13694
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: llite: remove lli_has_smd
Jinshan Xiong [Mon, 3 Oct 2016 02:28:22 +0000 (22:28 -0400)]
staging: lustre: llite: remove lli_has_smd

Remove the lli_has_smd flag from struct ll_inode_info. The empty
layout case will be handled by the LOV layer. Remove the unused
function cl_local_size().

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5814
Reviewed-on: http://review.whamcloud.com/13690
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: lov: add cl_object_layout_get()
John L. Hammond [Mon, 3 Oct 2016 02:28:21 +0000 (22:28 -0400)]
staging: lustre: lov: add cl_object_layout_get()

Add cl_object_layout_get() to return the layout and generation of an
object. Replace some direct accesses to object LSM with calls to this
function.

In ll_getxattr() factor out the LOV xattr specific handling into a new
function ll_getxattr_lov() which calls cl_object_layout_get(). In
ll_listxattr() call ll_getxattr_lov() to determine if a lustre.lov
xattr should be emitted.  Add lov_lsm_pack() to generate LOV xattrs
from a LSM.

Remove the unused functions ccc_inode_lsm_{get,put}() and
lov_lsm_get().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5814
Reviewed-on: http://review.whamcloud.com/13680
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: clio: add CIT_DATA_VERSION and remove IOC_LOV_GETINFO
John L. Hammond [Mon, 3 Oct 2016 02:28:20 +0000 (22:28 -0400)]
staging: lustre: clio: add CIT_DATA_VERSION and remove IOC_LOV_GETINFO

During development a new api, cl_object_obd_info_get()
and cl_object_data_version() which then were later
replaced by a better solution CIT_DATA_VERSION. For
the case of the upstream client their is no point in
introducing a API to only have it removed later. Due
to the way the patches landed with their dependencies
it is not possible to separate out two patches. These
two combined patches do the following:

 * Add a new cl_io type CIT_DATA_VERSION to get file
   data version.
 * Remove the unused IOC_LOV_GETINFO ioctl.
 * Remove ll_glimpse_ioctl() and ll_lsm_getattr().
 * Remove the OBD API method obd_getattr_async().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5823
Reviewed-on: http://review.whamcloud.com/12748
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6356
Reviewed-on: http://review.whamcloud.com/14649
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: mgc: MGC should retry for invalid import
wang di [Mon, 3 Oct 2016 02:28:19 +0000 (22:28 -0400)]
staging: lustre: mgc: MGC should retry for invalid import

After http://review.whamcloud.com/#/c/9967/ is landed, mgc does
not wait the import connected(state = FULL), then enqueue and
retrieve config log, which will cause the mount process to fail,
especially if the mgc is shared by multiple targets.
So once mgc enqueue is failed, it will give another chance to
wait the import to recover, if the import comes back in time,
it will try to enqueue again. Otherwise it will use local config log.

Signed-off-by: wang di <di.wang@intel.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5420
Reviewed-on: http://review.whamcloud.com/11258
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: obd: remove unused LSM parameters
John L. Hammond [Mon, 3 Oct 2016 02:28:18 +0000 (22:28 -0400)]
staging: lustre: obd: remove unused LSM parameters

Remove unused struct lov_stripe_md * parameters from obd_get_info(),
mgc_enqueue(), and osc_brw_prep_request().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5814
Reviewed-on: http://review.whamcloud.com/13426
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: mdc: Removed unneeded NULL check
Henri Doreau [Mon, 3 Oct 2016 02:28:17 +0000 (22:28 -0400)]
staging: lustre: mdc: Removed unneeded NULL check

Do not bother checking the return value of changelog_kuc_hdr()
against NULL since this value was dereferenced earlier.

Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4189
Reviewed-on: http://review.whamcloud.com/12919
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: remove Size on MDS support
John L. Hammond [Mon, 3 Oct 2016 02:28:16 +0000 (22:28 -0400)]
staging: lustre: remove Size on MDS support

Remove unused definitions related to Size on MDS support from
lustre/include/lustre/lustre_idl.h. Remove unused code from several
places in lustre/.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6047
Reviewed-on: http://review.whamcloud.com/13443
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: ptlrpc: dont take unwrap in req_waittime calculation
Sebastien Buisson [Mon, 3 Oct 2016 02:28:15 +0000 (22:28 -0400)]
staging: lustre: ptlrpc: dont take unwrap in req_waittime calculation

Do not take unwrap time in req_waittime calculation on client part
as decryption is not related to request service time.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6356
Reviewed-on: http://review.whamcloud.com/14404
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Jeremy Filizetti <jeremy.filizetti@gmail.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@seagate.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: llite: Report first encountered error
Henri Doreau [Mon, 3 Oct 2016 02:28:14 +0000 (22:28 -0400)]
staging: lustre: llite: Report first encountered error

Failures in ll_ioc_copy_{start,end} are reported to coordinator.
The return code delivered to the caller should indicate what this
error was, not whether coordinator was successfully notified.

Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5683
Reviewed-on: http://review.whamcloud.com/14335
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: ptlrpc: remove old protocol compatibility
Andreas Dilger [Mon, 3 Oct 2016 02:28:13 +0000 (22:28 -0400)]
staging: lustre: ptlrpc: remove old protocol compatibility

Some old protocol compatibility workarounds are still present in
master that should have been removed when LUSTRE_MSG_MAGIC_V1 was.

In particular, the process for upgrading LUSTRE_MSG_MAGIC_V1 to
LUSTRE_MSG_MAGIC_V2 had the client to connect to the server with the
V1 protocol with op_flag=MSG_CONNECT_NEXT_VER set, and if the server
supported the V2 protocol it would reply with LUSTRE_MSG_MAGIC_V2.
This ensured that if the new client connected to an old server the
connection would be allowed.  However, even with V1 protocol support
removed, the 2.x clients are still connecting with NEXT_VER set.
In b1_8 this flag was contingent on LUSTRE_MSG_MAGIC_V1 being used,
which is how it should have been in 2.x as well.

A few other cleanups are be done at the same time:
 - disallow 1.8 clients (or at least those that don't understand
   OBD_CONNECT_FULL20) so we can remove workarounds for 1.8 clients
 - remove support for pre-2.1 DLM flock lock handling
 - don't workaround the lack of MDS_ATTR_xTIME_SET flags in setattr
 - always set MSGHDR_CKSUM_INCOMPAT18 (it can eventually be removed)

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6349
Reviewed-on: http://review.whamcloud.com/14006
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: ldlm: Do not use cbpending for group locks
Patrick Farrell [Mon, 3 Oct 2016 02:28:12 +0000 (22:28 -0400)]
staging: lustre: ldlm: Do not use cbpending for group locks

Currently, the CBPENDING flag is set on group locks when
the osc lock above them is released (osc_cancel_base).

This results in a situation where a new group lock request
on a resource does not match an existing group lock because
LDLM_FL_CBPENDING is set on the existing lock.

So two group locks are granted on the same resource, which
is not valid, since a given client can only have one group
lock on a particular resource.

Since group locks are manually released and not called back
like other LDLM locks, the CBPENDING flag doesn't make
sense. Since they must be manually released, they also
cannot go in the LDLM LRU cache and must be fully released
immediately once they are no longer in use.

This was previously accomplished by setting CBPENDING when
the corresponding osc lock is released, but as noted above,
this prevents the group lock matching some future lock
requests.

This patch uses the fact that group locks have an l_writers
reference which they keep until they are manually released,
so we remove them when they have no more reader or writer
references, without checking cbpending.

Signed-off-by: Patrick Farrell <paf@cray.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6368
Reviewed-on: http://review.whamcloud.com/14093
Reviewed-by: frank zago <fzago@cray.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: osc: fix bug when setting max_pages_per_rpc
Wu Libin [Mon, 3 Oct 2016 02:28:11 +0000 (22:28 -0400)]
staging: lustre: osc: fix bug when setting max_pages_per_rpc

After setting like "lctl set_param -P osc.*.max_pages_per_rpc", it
is possible that the function osc_obd_max_pages_per_rpc_seq_write
will be called before ocd_brw_size has been set when mount.
ocd_brw_size is meaningless when it is zero. So it should not be
the limit at that time.

Signed-off-by: Wu Libin <lwu@ddn.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6421
Reviewed-on: http://review.whamcloud.com/14333
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: ptlrpc: Add a tag field to ptlrpc messages
Gregoire Pichon [Mon, 3 Oct 2016 02:28:10 +0000 (22:28 -0400)]
staging: lustre: ptlrpc: Add a tag field to ptlrpc messages

The new tag field is used as a virtual index for multiple modifying
RPCs management. It is set by the client and allows the target to
release in-memory reply data when the tag is reused by a new RPC.

The tag field replaces the unused last_seen field of ptlrpcd_body
structure.

Additionally, the last_xid field is used to transfer the highest XID
for which a reply has been received and does not have an unreplied
lower-numbered XID.

Signed-off-by: Gregoire Pichon <gregoire.pichon@bull.net>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5319
Reviewed-on: http://review.whamcloud.com/14095
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: clio: use CIT_SETATTR for FSFILT_IOC_SETFLAGS
John L. Hammond [Mon, 3 Oct 2016 02:28:09 +0000 (22:28 -0400)]
staging: lustre: clio: use CIT_SETATTR for FSFILT_IOC_SETFLAGS

Add handling of inode flags to the handlers of CIT_SETATTR in lov and
osc. In the FSFILT_IOC_SETFLAGS case of ll_iocontrol() use
cl_setattr_ost() rather than obd_setattr_rqset() to set inode flags on
OST objects. Remove the then unused OBD API methods
obd_setattr_rqset() and obd_setattr_async() along with their
supporting functions.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5823
Reviewed-on: http://review.whamcloud.com/13422
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: clio: get rid of lov_stripe_md reference
Bobi Jam [Mon, 3 Oct 2016 02:28:08 +0000 (22:28 -0400)]
staging: lustre: clio: get rid of lov_stripe_md reference

Get rid of lov_stripe_md reference in setting file's stripe info.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5823
Reviewed-on: http://review.whamcloud.com/12639
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: ptlrpc: Add OBD_CONNECT_MULTIMODRPCS flag
Gregoire Pichon [Mon, 3 Oct 2016 02:28:07 +0000 (22:28 -0400)]
staging: lustre: ptlrpc: Add OBD_CONNECT_MULTIMODRPCS flag

The new OBD_CONNECT_MULTIMODRPCS connection flag indicates the support
of multiple modify RPCs in parallel. It can be specified by the client
within the connection request and by the server within the connection
reply. The new ocd_maxmodrpcs connection data specifies the maximum modify
RPCs in parallel supported by the server.

To allow the MDS to send the new ocd_maxmodrpcs field, it has been
required to modify RMF_CONNECT_DATA so that its size includes the new
field. This change leads to remove the ocd_connect_data_v1 structure.
Note that the client has been allocating an extra 16*sizeof(__u64) for
the obd_connect_data reply since 2.0 and even in later versions of 1.8)
so there is no problem for the MDS to just send the full reply size.

This patch fixes a bug in __req_capsule_get() since it wasn't checking
RMF_F_NO_SIZE_CHECK when receiving the message. This allows legacy
clients (with version lower that this commit) to send connection
request with ocd_connect_data structure size smaller (actually size is
ocd_connect_data_v1 structure size) than new server ocd_connect_data
structure size.

This patch also fixes a bug in the routine that displays the import's
connect data.

Signed-off-by: Gregoire Pichon <gregoire.pichon@bull.net>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5319
Reviewed-on: http://review.whamcloud.com/#/c/13960
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: libcfs: shortcut to create CPT from NUMA topology
Liang Zhen [Mon, 3 Oct 2016 02:28:06 +0000 (22:28 -0400)]
staging: lustre: libcfs: shortcut to create CPT from NUMA topology

If user wants to create CPT table that can match numa topology,
she has to query cpu & numa topology, then provide a pattern
string to describe the topology, this is inconvenient.

To improve it, this patch can support shortcut expression "N" or "n"
to create CPT table from NUMA & CPU topology

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6325
Reviewed-on: http://review.whamcloud.com/14049
Reviewed-by: Olaf Weber <olaf@sgi.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: llite: default dir stripe index only for mkdir
wang di [Mon, 3 Oct 2016 02:28:05 +0000 (22:28 -0400)]
staging: lustre: llite: default dir stripe index only for mkdir

Default dir stripe index should only work during mkdir,
otherwise it will cause other open/create request being
sent to the wrong MDT.

Signed-off-by: wang di <di.wang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6373
Reviewed-on: http://review.whamcloud.com/14096
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: ptlrpc: ret -ECONNREFUSED if not context found in req
Sebastien Buisson [Mon, 3 Oct 2016 02:28:04 +0000 (22:28 -0400)]
staging: lustre: ptlrpc: ret -ECONNREFUSED if not context found in req

Return -ECONNREFUSED instead of -ENOMEM in sptlrpc_req_get_ctx()
if no context is found in req. It is more graceful.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6356
Reviewed-on: http://review.whamcloud.com/14043
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@seagate.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: llite: remove duplicate fiemap defines
Bobi Jam [Mon, 3 Oct 2016 02:28:03 +0000 (22:28 -0400)]
staging: lustre: llite: remove duplicate fiemap defines

 * replace struct ll_user_fiemap with struct fiemap
 * replace struct ll_fiemap_extent with struct fiemap_extent
 * remove kernel defined FIEMAP_EXTENT_* constants
 * remove kernel defined FIEMAP_FLAG_* flags
 * add member prefix for struct ll_fiemap_info_key

 * Add cl_object_operations::coo_fiemap().
 * Add cl_object_fiemap() to get FIEMAP mappings.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5823
Reviewed-on: http://review.whamcloud.com/12535
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6201
Reviewed-on: http://review.whamcloud.com/13608
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: ldlm: remove unnecessary EXPORT_SYMBOL
frank zago [Mon, 3 Oct 2016 02:28:02 +0000 (22:28 -0400)]
staging: lustre: ldlm: remove unnecessary EXPORT_SYMBOL

A lot of symbols don't need to be exported at all because they are
only used in the module they belong to.

Signed-off-by: frank zago <fzago@cray.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5829
Reviewed-on: http://review.whamcloud.com/13324
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: clio: Revise read ahead implementation
Jinshan Xiong [Mon, 3 Oct 2016 02:28:01 +0000 (22:28 -0400)]
staging: lustre: clio: Revise read ahead implementation

In this implementation, read ahead will hold the underlying DLM lock
to add read ahead pages. A new cl_io operation cio_read_ahead() is
added for this purpose. It takes parameter cl_read_ahead{} so that
each layer can adjust it by their own requirements. For example, at
OSC layer, it will make sure the read ahead region is covered by a
LDLM lock; at the LOV layer, it will make sure that the region won't
cross stripe boundary.

Legacy callback cpo_is_under_lock() is removed.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3259
Reviewed-on: http://review.whamcloud.com/10859
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: obd: remove client Size on MDS support
John L. Hammond [Mon, 3 Oct 2016 02:28:00 +0000 (22:28 -0400)]
staging: lustre: obd: remove client Size on MDS support

Remove the unused OBD MD API method md_done_writing(). Remove the
unused logcookie and struct md_open_data ** parameters from
md_setattr(). Remove the unused functions iattr_from_obdo(),
md_from_obdo(), and obdo_refresh_inode().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6047
Reviewed-on: http://review.whamcloud.com/13169
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: llite: remove client Size on MDS support
John L. Hammond [Mon, 3 Oct 2016 02:27:59 +0000 (22:27 -0400)]
staging: lustre: llite: remove client Size on MDS support

Size on MDS support have been in preview since at least 2.0.0. Remove
support for it from lustre/llite/.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6047
Reviewed-on: http://review.whamcloud.com/13126
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: obdclass: Add synchro in lu_context_key_degister()
Patrick Valentin [Mon, 3 Oct 2016 02:27:58 +0000 (22:27 -0400)]
staging: lustre: obdclass: Add synchro in lu_context_key_degister()

When unloading a module, it may happen that lu_context_key_degister()
removes a key while a thread is either registering it in a new
context (lu_context_init(), lu_context_refill()), or using it when
exiting from a context (lu_context__exit(), lu_context__fini()).

In these cases, we reference a key which no longer exists, and
the system crashes either because we use a *POISON'ed* pointer
in key_fini() -> key->lct_fini(), or because one of the following
assertions fails:
 - lu_context_key_degister():
        ASSERTION(cfs_atomic_read(&key->lct_used) == 1)
                  failed: key has instances: 2

 - lu_context_exit():
        ASSERTION(key != NULL)

 - key_fini():
        ASSERTION(atomic_read(&key->lct_used) > 1)

This can also leads to SLAB objects which are not freed:
        slab error in kmem_cache_destroy(): cache `echo_thread_kmem':
                   Can't free all objects

Note: ptlrpc service threads need to call lu_context_init/fini in
each loop (for each RPC), and this could be a big performance issue
on fat SMP machines if we add serialization by a spinlock and need
to lock/unlock it for multiple times for each RPC.

So the aim of this patch, which only impacts some low frequently used
functions, is:
  1) to add a synchronization in lu_context_key_quiesce(), also called
     by lu_context_key_degister(), to wait until all key::lct_init()
     methods have completed, by serializing with keys_fill()
  2) to add a synchronization in lu_context_key_degister(), to wait
     until all transient contexts referencing this key have run
     key::lct_fini() method

Signed-off-by: Patrick Valentin <patrick.valentin@bull.net>
Signed-off-by: Gregoire Pichon <gregoire.pichon@bull.net>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6049
Reviewed-on: http://review.whamcloud.com/13164
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: obdclass: fix race during key quiescency
Bruno Faccini [Mon, 3 Oct 2016 02:27:57 +0000 (22:27 -0400)]
staging: lustre: obdclass: fix race during key quiescency

Upon umount, presumably of last device using same OSD back-end,
to prepare for module unload, lu_context_key_quiesce() is run to
remove all module's key reference in any context linked on
lu_context_remembered list.
Threads must protect against such transversal processing when
exiting from its context.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5264
Reviewed-on: http://review.whamcloud.com/13103
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging: vc04_services: vchiq_arm: Remove unused function remote_event_destroy
Bhumika Goyal [Thu, 6 Oct 2016 18:10:01 +0000 (23:40 +0530)]
Staging: vc04_services: vchiq_arm: Remove unused function remote_event_destroy

Remove function remote_event_destroy as it is not used anywhere in the
kernel. Function detected using Coccinelle but changes done by hand.
Script:

@initialize:python@
@@
def display(name,p):
        print(name,p[0].file)

@r1@
identifier func;
type T;
position p;
@@
static T func@p(...)
{
...
}

@r@
identifier r1.func;
@@
func

@script:python depends on !r@
func << r1.func;
p << r1.p;
@@
display(func,p)

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agodrivers: staging: greybus: Fixed CHECKS for brace issues
Chase Metzger [Fri, 7 Oct 2016 02:38:41 +0000 (19:38 -0700)]
drivers: staging: greybus: Fixed CHECKS for brace issues

Added braces to else statements where checkpatch complained.

Signed-off-by: Chase Metzger <chasemetzger15@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Vaibhav Agarwal <vaibhav.sr@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: greybus: Add blank line after declaration
Elizabeth Ferdman [Tue, 4 Oct 2016 20:06:10 +0000 (13:06 -0700)]
staging: greybus: Add blank line after declaration

Add a blank line after a declaration. Error found by checkpatch.

Signed-off-by: Elizabeth Ferdman <gnudevliz@gmail.com>
Reviewed-by: Vaibhav Agarwal <vaibhav.sr@gmail.com>
Reviewed-by: Mark Greer <mgreer@animalcreek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>