History log of /drivers/staging/lustre/lustre/libcfs/linux/linux-curproc.c
Revision Date Author Comments
9fdaf8c0b92ab374f8501eb47855776afc928e45 12-Jul-2014 Greg Kroah-Hartman <gregkh@linuxfoundation.org> staging: lustre: remove top level ccflags variable

We need to remove the ccflags from the Lustre code as it prevents
individual object files from building properly in the kernel build
system. It also hids the horrid mess that the Lustre include files are
made up of.

Start out by removing the toplevel ccflags variable pointing to
drivers/staging/lustre/include/ as a valid include path. This requires
the absolute include markings of a bunch of .h and .c files, which is
also done here.

Cc: Andreas Dilger <andreas.dilger@intel.com>
Cc: Oleg Drokin <oleg.drokin@intel.com>
Cc: hpdd-discuss <hpdd-discuss@lists.01.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
76133e66b1417a73c0950d0716219d09ee21d595 28-Apr-2014 Oleg Drokin <green@linuxhacker.ru> staging/lustre: Replace jobid acquiring with per node setting

Insted of meddling directly in process environment variables
(which is also not possible on certain platforms due to not exported
symbols), create jobid_name proc file to represent this info
(to be filled by job scheduler epilogue).

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
CC: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
a95cdab3cee551af309a7c8042912531c0a2a956 18-Mar-2014 Georgiana Rodica Chelu <georgiana.chelu93@gmail.com> staging: lustre: add an extra line

Add an extra line break between the variable
declaration and the rest of the code

Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4a87df3ef82f4eda9a36e2af8494607d6a830a81 09-Mar-2014 Chi Pham <fempsci@gmail.com> staging:lustre: Removed assignments from if statements.

Fixed some minor checkpatch warnings such as whitespace.

Coccinelle was used for this patch (NOTE: some of the changes were made by hand). The script is not complete (semantically) and might raise some checkpatch warnings in terms of indentation depending on existing code.

*** IFASSIGNMENT.COCCI START ***

/* Coccinelle script to handle assignments in if statements
* For compound statements, can so far only handle statements with the
* assignment on either extreme */

/* This rule is for simple cases
* e.g. just an assignment in if, possibly with unary operator */
@simple@
expression E1, E2;
statement S1, S2;
@@

+ E1 = E2;
if (
- (E1 = E2)
+ E1
)
S1 else S2

/* This rule is for compound statements where the assignment is on the right.*/
@right@
expression E, E1, E2;
statement S1, S2;
@@

(
/* and */
- if (E && (E1 = E2))
+ if (E) {
+ E1 = E2;
+ if (E1)
S1 else S2
+ } else S2
|
- if (E && (E1 = E2))
+ if (E) {
+ E1 = E2;
+ if (E1)
S1
+ }

/* or */
|
- if (E || (E1 = E2))
+ if (!E) {
+ E1 = E2;
+ if (E1)
S1 else S2
+ }
+ else S1
|
- if (E || (E1 = E2))
+ if (!E) {
+ E1 = E2;
+ if (E1) S1
+ } else
S1

/* not equal */
|
- if (E != (E1 = E2))
+ E1 = E2;
+ if (E != E1)
S1 else S2
|
- if (E != (E1 = E2))
+ E1 = E2;
+ if (E != E1)
S1

/* equal */
|
- if (E == (E1 = E2))
+ E1 = E2;
+ if (E == E1)
S1 else S2
|
- if (E == (E1 = E2))
+ E1 = E2;
+ if (E == E1)
S1

/* greater than */
|
- if (E > (E1 = E2))
+ E1 = E2;
+ if (E > E1)
S1 else S2
|
- if (E > (E1 = E2))
+ E1 = E2;
+ if (E > E1)
S1

/* less than */
|
- if (E < (E1 = E2))
+ E1 = E2;
+ if (E < E1)
S1 else S2
|
- if (E < (E1 = E2))
+ E1 = E2;
+ if (E < E1)
S1

/* lesser than or equal to */
|
- if (E <= (E1 = E2))
+ E1 = E2;
+ if (E <= E1)
S1 else S2
|
- if (E <= (E1 = E2))
+ E1 = E2;
+ if (E <= E1)
S1

/* greater than or equal to */
|
- if (E >= (E1 = E2))
+ E1 = E2;
+ if (E >= E1)
S1 else S2
|
- if (E >= (E1 = E2))
+ E1 = E2;
+ if (E >= E1)
S1
)

/* This rule is for compound statements where the assignment is on the left.*/
@left@
expression E, E1, E2;
statement S1, S2;
@@

(
/* and */
- if ((E1 = E2) && E)
+ E1 = E2;
+ if (E1 && E)
S1 else S2
|
- if ((E1 = E2) && E)
+ E1 = E2;
+ if (E1 && E)
S1
|

/* or */
- if ((E1 = E2) || E)
+ E1 = E2;
+ if (E1 || E)
S1
|
- if ((E1 = E2) || E)
+ E1 = E2;
+ if (E1 || E)
S1 else S2
|

/* not equal */
- if ((E1 = E2) != E)
+ E1 = E2;
+ if (E1 != E)
S1
|
- if ((E1 = E2) != E)
+ E1 = E2;
+ if (E1 != E)
S1 else S2
|

/* equal */
- if ((E1 = E2) == E)
+ E1 = E2;
+ if (E1 == E)
S1
|
- if ((E1 = E2) == E)
+ E1 = E2;
+ if (E1 == E)
S1 else S2
|
/* greater */
- if ((E1 = E2) > E)
+ E1 = E2;
+ if (E1 > E)
S1
|
- if ((E1 = E2) > E)
+ E1 = E2;
+ if (E1 > E)
S1 else S2
|

/* less */
- if ((E1 = E2) < E)
+ E1 = E2;
+ if (E1 < E)
S1
|
- if ((E1 = E2) < E)
+ E1 = E2;
+ if (E1 < E)
S1 else S2

/* lesser than or equal to */
- if ((E1 = E2) <= E)
+ E1 = E2;
+ if (E1 <= E)
S1
|
- if ((E1 = E2) <= E)
+ E1 = E2;
+ if (E1 <= E)
S1 else S2

/* greater than or equal to */
- if ((E1 = E2) >= E)
+ E1 = E2;
+ if (E1 >= E)
S1
|
- if ((E1 = E2) >= E)
+ E1 = E2;
+ if (E1 >= E)
S1 else S2
)

*** IFASSIGNMENT.COCCI END ***

Signed-off-by: Chi Pham <fempsci@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2eb90a757e9d953c9e2a8fce530422189992fb1b 22-Jan-2014 Peng Tao <bergwolf@gmail.com> staging/lustre/libcfs: remove cfs_capable

Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
efc9eb02898037b9639c8b5d17feaec2f853cf9c 22-Jan-2014 Peng Tao <bergwolf@gmail.com> staging/lustre/libcfs: remove CAPABILITY_VERSION tests

_LINUX_CAPABILITY_VERSION is only for backward compatibility in
user space. Kernel code doesn't care about it.

Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9a28b1881cef46727d7ba81a5d743db2321155b0 22-Jan-2014 Peng Tao <bergwolf@gmail.com> staging/lustre/libcfs: remove cfs_cap_{un}pack

Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3b01cf803112f02b55b574b7df37599fac6fee27 22-Jan-2014 Peng Tao <bergwolf@gmail.com> staging/lustre/libcfs: remove cfs_curproc_cap_unpack

no user.

Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
82c3fef5682d501d02ccb8b32dcc24ecad7986e6 22-Jan-2014 Peng Tao <bergwolf@gmail.com> staging/lustre/libcfs: remove cfs_curproc_groups_nr

no user.

Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
c7c99012dd68feaebd7f6e0df9251bb62e184e9a 14-Nov-2013 James Simmons <uja.ornl@gmail.com> staging/lustre/autoconf: remove LIBCFS_HAVE_IS_COMPAT_TASK test

is_compat_task has been defined on all arches since v2.6.29.
We can remove the test and dead code.

Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2800
Lustre-change: http://review.whamcloud.com/5393
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
b20204310ad18516146264830bc7b840b6052d57 30-Sep-2013 Jesper Juhl <jj@chaosbits.net> staging: lustre: Don't leak 'buffer' in cfs_get_environ()

If 'down_read_trylock' fails we'll curently leak the memory allocated to 'buffer'.
Fix the leak by simply kfree'ing 'buffer' before returning '-EDEADLK'.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3230c0cc98dc1641e3de3c2f25590bcdd8e21a34 15-Sep-2013 Masanari Iida <standby24x7@gmail.com> staging: lustre: Fix typo in lustre/libcfs

Correct spelling typos in comment and debug message,
within luster/libcfs

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
0a3bdb00710bf253ba8ba8f645645f22297c7a04 03-Aug-2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org> staging: lustre: remove RETURN macro

We have a kernel-wide function tracing system, so use that instead of
rolling a custom one just for one filesystem.

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
29aaf4962a3bce337d37176858ef1025b9f29cc4 02-Aug-2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org> staging: lustre: remove ENTRY macro

We have a kernel-wide function tracing system, so use that instead of
rolling a custom one just for one filesystem.

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4b1a25f06b30b203b35c227b163c8191b091dad8 15-Jul-2013 Peng Tao <bergwolf@gmail.com> staging/lustre: fix build when CONFIG_UIDGID_STRICT_TYPE_CHECKS is on

kuid_t/kgid_t are wrappered when CONFIG_UIDGID_STRICT_TYPE_CHECKS is on.
Lustre build is broken because we always treat them as plain __u32.
The patch fixes it. Internally, Lustre always use __u32 uid/gid, and
convert to kuid_t/kgid_t when necessary.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
d7e09d0397e84eefbabfd9cb353221f3c6448d83 02-May-2013 Peng Tao <bergwolf@gmail.com> staging: add Lustre file system client support

Lustre is the most deployed distributed file system
in the HPC (High Performance Computing) world. The patch
adds its client side support.

The code is not very clean and needs to live in drivers/staging
for some time for continuing cleanup work. See
drivers/staging/lustre/TODO for details.

The code is based on Lustre master commit faefbfc04

commit faefbfc0460bc00f2ee4c1c1c86aa1e39b9eea49
Author: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Date: Tue Apr 30 23:05:21 2013 +0400

LU-3244 utils: tunefs.lustre should preserve virgin label

Plus a few under-review patches on Whamcloud gerrit:
3.8 kernel support:
http://review.whamcloud.com/#change,5973
http://review.whamcloud.com/#change,5974
http://review.whamcloud.com/#change,5768
http://review.whamcloud.com/#change,5781
http://review.whamcloud.com/#change,5763
http://review.whamcloud.com/#change,5613
http://review.whamcloud.com/#change,5655

3.9 kernel support:
http://review.whamcloud.com/#change,5898
http://review.whamcloud.com/#change,5899

Kconfig/Kbuild:
http://review.whamcloud.com/#change,4646
http://review.whamcloud.com/#change,4644

libcfs cleanup:
http://review.whamcloud.com/#change,2831
http://review.whamcloud.com/#change,4775
http://review.whamcloud.com/#change,4776
http://review.whamcloud.com/#change,4777
http://review.whamcloud.com/#change,4778
http://review.whamcloud.com/#change,4779
http://review.whamcloud.com/#change,4780

All starting/trailing whitespaces are removed, to match kernel
coding style. Also ran scripts/cleanfile on all lustre source files.

[maked the Kconfig depend on BROKEN as the recent procfs changes causes
this to fail - gregkh]

Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>