Re: [lustre-devel] [PATCH] staging: lustre: delete the filesystem from the tree.

2018-06-03 Thread Dilger, Andreas
On Jun 1, 2018, at 17:19, NeilBrown wrote: > > On Fri, Jun 01 2018, Doug Oucharek wrote: > >> Would it makes sense to land LNet and LNDs on their own first? Get >> the networking house in order first before layering on the file >> system? > > I'd like to turn that question on it's head: > Do

Re: [PATCH v2 6/6] staging: lustre: mdc: use large xattr buffers for old servers

2018-05-31 Thread Dilger, Andreas
On May 31, 2018, at 18:54, Greg Kroah-Hartman wrote: > > On Tue, May 29, 2018 at 10:21:45AM -0400, James Simmons wrote: >> From: "John L. Hammond" >> >> Pre 2.10.1 MDTs will crash when they receive a listxattr (MDS_GETXATTR >> with OBD_MD_FLXATTRLS) RPC for an orphan or dead object. So for >>

Re: [PATCH 4/4] staging: lustre: obdclass: change object lookup to no wait mode

2018-05-16 Thread Dilger, Andreas
On May 16, 2018, at 02:00, Dan Carpenter wrote: > > On Tue, May 15, 2018 at 04:02:55PM +0100, James Simmons wrote: >> /* * Allocate new object. This may result in rather complicated * operations, including fld queries, inode loading, etc.

Re: [lustre-devel] [PATCH] staging: lustre: Fix an error handling path in 'client_common_fill_super()'

2018-05-12 Thread Dilger, Andreas
On May 12, 2018, at 00:33, Christophe JAILLET wrote: > > According to error handling path before and after this one, we should go > to 'out_md_fid' here, instead of 'out_md', if 'obd_connect()' fails. > > Signed-off-by: Christophe JAILLET

Re: [lustre-devel] [PATCH] staging: lustre: fix spelling mistake: "req_ulinked" -> "req_unlinked"

2018-05-11 Thread Dilger, Andreas
On May 11, 2018, at 07:38, Colin King wrote: > > From: Colin Ian King > > Trivial fix to spelling mistake in DEBUG_REQ message text > > Signed-off-by: Colin Ian King Reviewed-by: Andreas Dilger

Re: [PATCH v2] staging: lustre: llite: fix potential missing-check bug when copying lumv

2018-05-04 Thread Dilger, Andreas
On May 3, 2018, at 22:19, Wenwen Wang wrote: > > On Tue, May 1, 2018 at 3:46 AM, Dan Carpenter > wrote: >> On Mon, Apr 30, 2018 at 05:56:10PM -0500, Wenwen Wang wrote: >>> However, given that the user data resides in the user space, a malicious >>>

Re: [PATCH 1/4] staging: lustre: obdclass: change spinlock of key to rwlock

2018-05-03 Thread Dilger, Andreas
On May 3, 2018, at 07:50, David Laight wrote: > > From: James Simmons >> Sent: 02 May 2018 19:22 >> From: Li Xi >> >> Most of the time, keys are never changed. So rwlock might be >> better for the concurrency of key read. > > OTOH unless there is

Re: [PATCH v2] staging: lustre: llite: fix potential missing-check bug when copying lumv

2018-04-30 Thread Dilger, Andreas
On Apr 30, 2018, at 16:56, Wenwen Wang wrote: > > In ll_dir_ioctl(), the object lumv3 is firstly copied from the user space > using Its address, i.e., lumv1 = If the lmm_magic field of lumv3 is > LOV_USER_MAGIC_V3, lumv3 will be modified by the second copy from the user >

Re: [PATCH] staging: luster: llite: fix a potential missing-check bug when copying lumv

2018-04-30 Thread Dilger, Andreas
On Apr 29, 2018, at 07:20, Greg Kroah-Hartman <gre...@linuxfoundation.org> wrote: > > On Sat, Apr 28, 2018 at 04:04:25PM +0000, Dilger, Andreas wrote: >> On Apr 27, 2018, at 17:45, Wenwen Wang <wang6...@umn.edu> wrote: >>> [PATCH] staging: luster: llite: fix

Re: [PATCH] staging: luster: llite: fix a potential missing-check bug when copying lumv

2018-04-28 Thread Dilger, Andreas
On Apr 27, 2018, at 17:45, Wenwen Wang wrote: > [PATCH] staging: luster: llite: fix potential missing-check bug when copying > lumv (typo) s/luster/lustre/ > In ll_dir_ioctl(), the object lumv3 is firstly copied from the user space > using Its address, i.e., lumv1 = If the

Re: [lustre-devel] [PATCH v2] staging: lustre: Remove VLA usage

2018-03-09 Thread Dilger, Andreas
On Mar 7, 2018, at 13:54, Kees Cook wrote: > > The kernel would like to have all stack VLA usage removed[1]. This switches > to a simple kasprintf() instead, and in the process fixes an off-by-one > between the allocation and the sprintf (allocation did not include NULL >

Re: [PATCH] staging: lustre: llite: replace variable length array

2018-01-29 Thread Dilger, Andreas
On Jan 27, 2018, at 14:42, Sven Dziadek wrote: > > The functionality of the removed variable length array is already > implemented by the function xattr_full_name in fs/xattr.c > > This fixes the sparse warning: > warning: Variable length array is used. > > Signed-off-by:

Re: [PATCH] staging: lustre: lnet: return of an error code should be negative

2018-01-29 Thread Dilger, Andreas
On Jan 27, 2018, at 22:24, Sumit Pundir wrote: > > Return value of error codes should typically be negative. > Issue reported by checkpatch.pl > > Signed-off-by: Sumit Pundir Reviewed-by: Andreas Dilger > --- >

Re: [PATCH v4] staging: lustre: separate a connection destroy from free struct kib_conn

2018-01-25 Thread Dilger, Andreas
On Jan 25, 2018, at 06:51, Eremin, Dmitry wrote: > > The logic of the original commit 4d99b2581eff ("staging: lustre: avoid > intensive reconnecting for ko2iblnd") was assumed conditional free of > struct kib_conn if the second argument free_conn in function >

Re: [PATCH 6/8] staging: lustre: Fix overlong lines

2018-01-18 Thread Dilger, Andreas
On Jan 11, 2018, at 10:17, Fabian Huegel wrote: > > Fixed four lines that went over the 80 character limit > to reduce checkpatch warnings. > > Signed-off-by: Fabian Huegel > Signed-off-by: Christoph Volkert > --- >

Re: [PATCH] staging: lustre: Fix avoid intensive reconnecting for ko2iblnd patch

2018-01-16 Thread Dilger, Andreas
> On Jan 16, 2018, at 09:56, Greg Kroah-Hartman > wrote: > > On Tue, Jan 16, 2018 at 03:01:49PM +, Eremin, Dmitry wrote: >> In the original commit 4d99b2581effe115376402e710fbcb1c3c073769 > > Please use the documented way to write this: > 4d99b2581eff

Re: [PATCH] drivers: lustre: obdclass: simplify unregister_shrinker() usage

2018-01-02 Thread Dilger, Andreas
On Dec 23, 2017, at 04:13, Aliaksei Karaliou wrote: > > lu_global_fini() explicitly uses knowledge about shrinker's > internals to make decision about calling of unregister_shrinker(). > Now this check was integrated into unregister_shrinker(), > so it is safe to call it

Re: [lustre-devel] [PATCH v4] staging: lustre: Replace 'uint32_t' with 'u32' and 'uint64_t' with 'u64'

2017-12-24 Thread Dilger, Andreas
On Dec 19, 2017, at 10:56, Roman Storozhenko wrote: > > There are two reasons for replacing 'uint32_t' with 'u32' > and 'uint64_t' with 'u64': > > 1) As Linus Torvalds have said we should use kernel types: > http://lkml.iu.edu/hypermail//linux/kernel/1506.0/00160.html >

Re: [PATCH] staging: lustre: check result of register_shrinker

2017-12-04 Thread Dilger, Andreas
On Dec 4, 2017, at 11:42, Aliaksei Karaliou wrote: > > On 12/04/2017 11:40 AM, Dan Carpenter wrote: >> On Sun, Dec 03, 2017 at 07:59:07PM +0300, ak wrote: >>> Thank you for your extensive comments. >>> >>> I've also thought about adding more protection into

Re: [PATCH] staging: lustre: Fix sparse, using plain integer as NULL pointer in lov_object_fiemap()

2017-12-04 Thread Dilger, Andreas
> On Nov 30, 2017, at 11:30, Andrii Vladyka wrote: > > Change 0 to NULL in lov_object_fiemap() in order to fix warning produced by > sparse > > Signed-off-by: Andrii Vladyka Patches should be inline rather than in an attachment. That said, the patch looks

Re: [PATCH] staging: lustre: check result of register_shrinker

2017-12-02 Thread Dilger, Andreas
On Dec 2, 2017, at 11:40, Aliaksei Karaliou wrote: > > Lustre code lacks checking the result of register_shrinker() > in several places. register_shrinker() was tagged __must_check > recently so that sparse has started reporting it. Thank you for your patch. Some

Re: [PATCH v2] Replace 'uint32_t' with 'u32' and 'uint64_t' with 'u64'

2017-11-17 Thread Dilger, Andreas
On Nov 17, 2017, at 04:46, Roman Storozhenko wrote: > > There are two reasons for that: > 1) As Linus Torvalds said we should use kernel types: > http://lkml.iu.edu/hypermail//linux/kernel/1506.0/00160.html > > 2) There are only few places in the lustre codebase that

Re: [lustre-devel] [PATCH] staging: lustre: Replaces 'uint32_t' with '__u32' and 'uint64_t' with '__u64'.

2017-11-13 Thread Dilger, Andreas
> On Nov 9, 2017, at 03:57, Roman Storozhenko <romeusmeis...@gmail.com> wrote: > > On Thu, Nov 9, 2017 at 1:06 PM, Dilger, Andreas > <andreas.dil...@intel.com> wrote: >> On Nov 3, 2017, at 06:36, Roman Storozhenko <romeusmeis...@gmail.com> wrote: >>>

Re: [PATCH] staging: lustre: Replaces 'uint32_t' with '__u32' and 'uint64_t' with '__u64'.

2017-11-09 Thread Dilger, Andreas
On Nov 3, 2017, at 06:36, Roman Storozhenko wrote: > > On Fri, Nov 03, 2017 at 12:46:18PM +0100, Greg Kroah-Hartman wrote: >> On Sun, Oct 29, 2017 at 08:58:39PM +0300, Roman Storozhenko wrote: >>> There are two reasons for that: >>> 1) As Linus Torvalds said we should

Re: [PATCH 06/11] staging: lustre: add SPDX identifiers to all lustre files

2017-11-08 Thread Dilger, Andreas
On Nov 7, 2017, at 23:15, Greg Kroah-Hartman <gre...@linuxfoundation.org> wrote: > > On Wed, Nov 08, 2017 at 12:35:43AM +0000, Dilger, Andreas wrote: >> On Nov 7, 2017, at 06:58, Greg Kroah-Hartman <gre...@linuxfoundation.org> >> wrote: >>> >>>

Re: [PATCH 06/11] staging: lustre: add SPDX identifiers to all lustre files

2017-11-07 Thread Dilger, Andreas
On Nov 7, 2017, at 06:58, Greg Kroah-Hartman wrote: > > It's good to have SPDX identifiers in all files to make it easier to > audit the kernel tree for correct licenses. > > Update the drivers/staging/lustre files files with the correct SPDX > license identifier

Re: [PATCH] staging: lustre: Replaces 'uint32_t' with '__u32' and 'uint64_t' with '__u64'.

2017-10-31 Thread Dilger, Andreas
On Oct 30, 2017, at 01:58, Roman Storozhenko wrote: > > There are two reasons for that: > 1) As Linus Torvalds said we should use kernel types: > http://lkml.iu.edu/hypermail//linux/kernel/1506.0/00160.html > > 2) There are only few places in the lustre codebase that

Re: [PATCH] staging: lustre: Replaces 'uint32_t' with '__u32' and 'uint64_t' with '__u64'.

2017-10-31 Thread Dilger, Andreas
On Oct 30, 2017, at 01:58, Roman Storozhenko wrote: > > There are two reasons for that: > 1) As Linus Torvalds said we should use kernel types: > http://lkml.iu.edu/hypermail//linux/kernel/1506.0/00160.html > > 2) There are only few places in the lustre codebase that

Re: [PATCH] lustre: don't set f_version in ll_readdir

2017-10-30 Thread Dilger, Andreas
On Oct 30, 2017, at 23:00, Jeff Layton wrote: > > From: Jeff Layton > > f_version is only ever used by filesystem-specific code. Generic > VFS code never uses it. > > Nothing in lustre ever looks at it, so just remove this. > > Signed-off-by: Jeff

Re: [PATCH 18/20] staging: lustre: osc: mark expected switch fall-through

2017-10-17 Thread Dilger, Andreas
On Oct 12, 2017, at 10:17, Gustavo A. R. Silva wrote: > > In preparation to enabling -Wimplicit-fallthrough, mark switch cases > where we are expecting to fall through. > > Addresses-Coverity-ID: 1077598 > Signed-off-by: Gustavo A. R. Silva

Re: [PATCH 12/20] staging: lustre: lnet: selftest: mark expected switch fall-through

2017-10-17 Thread Dilger, Andreas
On Oct 12, 2017, at 10:17, Gustavo A. R. Silva wrote: > > In preparation to enabling -Wimplicit-fallthrough, mark switch cases > where we are expecting to fall through. > > Signed-off-by: Gustavo A. R. Silva Reviewed-by: Andreas Dilger

Re: [PATCH 20/20] staging: lustre: rpc: mark expected switch fall-throughs

2017-10-17 Thread Dilger, Andreas
On Oct 12, 2017, at 10:17, Gustavo A. R. Silva wrote: > > In preparation to enabling -Wimplicit-fallthrough, mark switch cases > where we are expecting to fall through. > > Addresses-Coverity-ID: 1077604 > Addresses-Coverity-ID: 1077605 > Signed-off-by: Gustavo A. R.

Re: [PATCH 19/20] staging: lustre: ptlrpc: mark expected switch fall-throughs

2017-10-17 Thread Dilger, Andreas
On Oct 12, 2017, at 10:17, Gustavo A. R. Silva wrote: > > In preparation to enabling -Wimplicit-fallthrough, mark switch cases > where we are expecting to fall through. > > Signed-off-by: Gustavo A. R. Silva Reviewed-by: Andreas Dilger

Re: [PATCH 17/20] staging: lustre: ldlm: mark expected switch fall-through

2017-10-17 Thread Dilger, Andreas
On Oct 12, 2017, at 10:17, Gustavo A. R. Silva wrote: > > In preparation to enabling -Wimplicit-fallthrough, mark switch cases > where we are expecting to fall through. > > Signed-off-by: Gustavo A. R. Silva Reviewed-by: Andreas Dilger

Re: [PATCH 16/20] staging: lustre: lprocfs: mark expected switch fall-throughs

2017-10-17 Thread Dilger, Andreas
On Oct 12, 2017, at 10:17, Gustavo A. R. Silva wrote: > > In preparation to enabling -Wimplicit-fallthrough, mark switch cases > where we are expecting to fall through. > > Addresses-Coverity-ID: 1271166 > Addresses-Coverity-ID: 1271167 > Addresses-Coverity-ID: 1271168

Re: [PATCH 15/20] staging: lustre: llite: mark expected switch fall-through

2017-10-17 Thread Dilger, Andreas
> On Oct 12, 2017, at 10:17, Gustavo A. R. Silva > wrote: > > In preparation to enabling -Wimplicit-fallthrough, mark switch cases > where we are expecting to fall through. > > Signed-off-by: Gustavo A. R. Silva Not sure why you moved the

Re: [PATCH 14/20] staging: lustre: lnet: selftest: mark expected switch fall-throughs

2017-10-17 Thread Dilger, Andreas
On Oct 12, 2017, at 10:17, Gustavo A. R. Silva wrote: > > > In preparation to enabling -Wimplicit-fallthrough, mark switch cases > where we are expecting to fall through. > > Signed-off-by: Gustavo A. R. Silva Reviewed-by: Andreas Dilger

Re: [PATCH 05/20] staging: lustre: lnet: net_fault: mark expected switch fall-through

2017-10-17 Thread Dilger, Andreas
On Oct 12, 2017, at 10:16, Gustavo A. R. Silva wrote: > > In preparation to enabling -Wimplicit-fallthrough, mark switch cases > where we are expecting to fall through. > > Signed-off-by: Gustavo A. R. Silva This could also just be

Re: [PATCH 02/20] staging: lustre: lnet: socklnd: mark expected switch fall-through

2017-10-17 Thread Dilger, Andreas
On Oct 12, 2017, at 10:16, Gustavo A. R. Silva wrote: > > In preparation to enabling -Wimplicit-fallthrough, mark switch cases > where we are expecting to fall through. > > Signed-off-by: Gustavo A. R. Silva This isn't strictly necessary,

Re: [PATCH] staging: lustre: lustre: Off by two in lmv_fid2path()

2017-08-18 Thread Dilger, Andreas
> On Aug 17, 2017, at 09:47, Greg Kroah-Hartman > wrote: > > On Mon, Aug 14, 2017 at 04:01:17PM +0100, James Simmons wrote: >> >>> We want to concatonate join string one, a '/' character, string two and >>> then a NUL terminator. The destination buffer holds

Re: [PATCH] staging: lustre: fix structure size for ARM OABI

2017-08-18 Thread Dilger, Andreas
On Aug 17, 2017, at 10:26, Greg KH wrote: > > On Wed, Aug 16, 2017 at 05:44:15PM +0300, Cihangir Akturk wrote: >> When building the kernel for the ARM architecture without setting >> CONFIG_AEABI, size of struct lov_user_md_v3 and struct lov_mds_md_v3 >> differs, due

Re: [PATCH v2 4/4] Staging: Lustre Fix block statement style issue

2017-07-17 Thread Dilger, Andreas
On Jul 12, 2017, at 03:03, Craig Inches wrote: > > This fixes a block statement which didnt end with */ > > Signed-off-by: Craig Inches > --- > drivers/staging/lustre/include/linux/lnet/socklnd.h | 3 ++- > 1 file changed, 2 insertions(+), 1

Re: [PATCH v5] staging: lustre: lnet: remove dead code and useless wrapper

2017-07-12 Thread Dilger, Andreas
On Jul 7, 2017, at 16:03, Dmitriy Cherkasov wrote: > > After removing commented out code, ksocknal_csum() becomes a useless > wrapper for crc32_le(). Remove it, and instead call crc32_le() directly. > > Fixes the following checkpatch warning: > > WARNING: space

Re: [PATCH v5] staging: lustre: lnet: remove dead code and useless wrapper

2017-07-12 Thread Dilger, Andreas
On Jul 7, 2017, at 16:03, Dmitriy Cherkasov wrote: > > After removing commented out code, ksocknal_csum() becomes a useless > wrapper for crc32_le(). Remove it, and instead call crc32_le() directly. > > Fixes the following checkpatch warning: > > WARNING: space

Re: [PATCH 8/8] Staging: lustre :lustre: include :lustre_compat.h: Prefer using the BIT macro

2017-07-11 Thread Dilger, Andreas
> On Jul 11, 2017, at 11:08, Greg KH wrote: > > On Thu, Jul 06, 2017 at 12:43:15PM +0530, Jaya Durga wrote: >> Replace all instances of (1 << 27) with BIT(27) to fix >> checkpatch check messages >> >> Signed-off-by: Jaya Durga >> --- >>

Re: [PATCH 3/4] Staging: Lustre Fixing multiline block comments in lnetst.h

2017-07-11 Thread Dilger, Andreas
On Jul 11, 2017, at 11:14, Greg Kroah-Hartman wrote: > > On Fri, Jul 07, 2017 at 01:47:04AM +, Craig Inches wrote: >> This fixes multiple block statements found not to match >> style as per checkpatch >> >> Signed-off-by: Craig Inches >>

Re: [PATCH] staging: lustre: headers: potential UAPI headers

2017-06-12 Thread Dilger, Andreas
On Jan 21, 2017, at 02:24, Greg Kroah-Hartman wrote: > > On Fri, Jan 20, 2017 at 11:33:11PM +, James Simmons wrote: >> > On Mon, Dec 19, 2016 at 12:06:47PM -0500, James Simmons wrote: >> Not for landing. This is the purposed UAPI headers >> with the

Re: [PATCH 1/2] staging: lustre: lprocfs: Use kstrtouint_from_user

2017-05-18 Thread Dilger, Andreas
On May 18, 2017, at 17:13, Mathias Rav <mathias...@gmail.com> wrote: > > On Thu, 18 May 2017 14:48:25 +0000 > "Dilger, Andreas" <andreas.dil...@intel.com> wrote: > >> On May 18, 2017, at 15:53, Greg Kroah-Hartman <gre...@linuxfoundation.org> >>

Re: [PATCH 1/2] staging: lustre: lprocfs: Use kstrtouint_from_user

2017-05-18 Thread Dilger, Andreas
On May 18, 2017, at 15:53, Greg Kroah-Hartman wrote: > > On Thu, May 04, 2017 at 12:13:38PM -0400, Mathias Rav wrote: >> Prefer kstrtouint_from_user to copy_from_user+simple_strtoul. >> >> The helper function lprocfs_wr_uint() is only used to implement >>

Re: [Patch v3 1/2] lustre: Parantheses added for Macro argument to avoid precedence issues

2017-04-18 Thread Dilger, Andreas
On Apr 18, 2017, at 09:50, g...@kroah.com wrote: > > On Sat, Apr 15, 2017 at 01:50:42PM +, Rishiraj Manwatkar wrote: >> Subject: [Patch v3 1/2] lustre: Parantheses added for Macro argument to >> avoid precedence issues (typo) s/Parantheses/parenthesis/ s/Macro/macro/ The Subject line

Re: [Patch v3 2/2] lustre: CONSTANTS put on right side of comparison test

2017-04-18 Thread Dilger, Andreas
On Apr 15, 2017, at 07:50, Rishiraj Manwatkar wrote: > > Comparison should have the CONSTANT on the right side of the test I don't think this change really improves things. For standalone comparisons I agree that having the constant on the RHS is best, but here it is

Re: [PATCH v2] staging: lustre: Fix sparse endianness warnings cast to restricted __le64 and __le32

2017-04-18 Thread Dilger, Andreas
On Apr 15, 2017, at 18:48, skanda.kash...@gmail.com wrote: > > From: Skanda Guruanand > > The struct lu_dirpage elements in lustre_idl.h file are modified to > __le64 and __le32 types since the elements are always converted from > litte endian to processor native

Re: [lustre-devel] [PATCH RESEND v2] Staging: lustre cleanup macros in libcfs_private.h

2017-04-18 Thread Dilger, Andreas
On Apr 13, 2017, at 03:24, Craig Inches wrote: > > This resolves a checkpatch warning that "Single statement macros should > not use a do {} while (0) loop" by removing the loop and adjusting line > length accordingly. > > Signed-off-by: Craig Inches

Re: [PATCH] Staging: lustre cleanup macros in libcfs_private.h

2017-04-05 Thread Dilger, Andreas
On Apr 3, 2017, at 15:13, Craig Inches wrote: > > This resolves a checkpatch warning that "Single statement macros should > not use a do {} while (0) loop" by removing the loop and adjusting line > length accordingly. > > Signed-off-by: Craig Inches

Re: [lustre-devel] [PATCH] drivers/staging/lustre: Coding-guideline: Missing a blank line after declarations

2017-04-05 Thread Dilger, Andreas
On Apr 4, 2017, at 03:38, Dan Carpenter wrote: > > On Tue, Apr 04, 2017 at 02:45:26PM +0530, Pushkar Jambhlekar wrote: >> diff --git a/drivers/staging/lustre/lustre/obdclass/cl_page.c >> b/drivers/staging/lustre/lustre/obdclass/cl_page.c >> index cd9a40c..71fcc4c

Re: [PATCH] Remove sparse warnings in mdc_request.c

2017-03-28 Thread Dilger, Andreas
On Mar 27, 2017, at 23:40, Skanda Guruanand wrote: > > I have tried to fix the endian issues in the mdc_request.c in the > lustre file system drivers in the staging area. Your feedback is > welcome. Sorry, but this patch is totally wrong. This would break the handling

Re: [PATCH] staging: lustre: Remove redundant code

2017-03-24 Thread Dilger, Andreas
On Mar 24, 2017, at 07:44, Greg Kroah-Hartman wrote: > > On Fri, Mar 24, 2017 at 05:09:53PM +0530, Arushi Singhal wrote: >> Remove the code which do not have any value. >> >> Signed-off-by: Arushi Singhal >> --- >>

Re: [PATCH] staging: lustre: Replace a bit shift by a use of BIT.

2017-03-23 Thread Dilger, Andreas
On Mar 22, 2017, at 06:12, Dilger, Andreas <andreas.dil...@intel.com> wrote: > > On Mar 21, 2017, at 22:39, Arushi Singhal <arushisinghal19971...@gmail.com> > wrote: >> >> This patch replaces bit shifting on 1 with the BIT(x) macro. >> This was don

Re: [PATCH v2] staging: lustre: Replace a bit shift by a use of BIT.

2017-03-23 Thread Dilger, Andreas
On Mar 22, 2017, at 09:53, Arushi Singhal wrote: > > This patch replaces bit shifting on 1 with the BIT(x) macro. > This was done with coccinelle: > @@ > constant c; > @@ > > -1 << c > +BIT(c) > > Signed-off-by: Arushi Singhal

Re: [PATCH] staging: lustre: Replace a bit shift by a use of BIT.

2017-03-22 Thread Dilger, Andreas
On Mar 21, 2017, at 22:39, Arushi Singhal wrote: > > This patch replaces bit shifting on 1 with the BIT(x) macro. > This was done with coccinelle: > @@ > constant c; > @@ > > -1 << c > +BIT(c) Did you take the time to look at what this Coccinelle script

Re: [PATCH] staging: media: Replace a bit shift by a use of BIT.

2017-03-22 Thread Dilger, Andreas
On Mar 22, 2017, at 00:20, Arushi Singhal wrote: > > This patch replaces bit shifting on 1 with the BIT(x) macro. > This was done with coccinelle: > @@ > constant c; > @@ > > -1 << c > +BIT(c) Hi Arushi, thanks for taking time to contribute to the kernel.

Re: [PATCH] Minor coding guideline Fix in lusture module

2017-03-09 Thread Dilger, Andreas
On Mar 9, 2017, at 05:22, Pushkar Jambhlekar wrote: > Subject: Minor coding guideline Fix in lusture module I suspect the patchbot is unhappy with the subject line not containing anything useful, and not containing the subsystem name. Something like: staging/lustre/llite:

Re: [PATCH 5/5] staging: lustre: osc_page.c: Use list_for_each_entry_safe

2017-03-07 Thread Dilger, Andreas
On Mar 6, 2017, at 08:20, James Simmons wrote: > >> >> Doubly linked lists which are iterated using list_empty >> and list_entry macros have been replaced with list_for_each_entry_safe >> macro. >> This makes the iteration simpler and more readable. >> >> This patch

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

2017-02-07 Thread Dilger, Andreas
> On Feb 3, 2017, at 03:33, Greg Kroah-Hartman > wrote: > > On Sat, Jan 28, 2017 at 07:04:38PM -0500, James Simmons wrote: >> From: Andreas Dilger >> >> Update the sysfs "version" file to print "lustre: " with >> the version number. >>

Re: [PATCH] staging: lustre: remove CLASSERT macro

2017-02-02 Thread Dilger, Andreas
On Feb 2, 2017, at 04:26, Arnd Bergmann wrote: > > lustre uses a fake switch() statement as a compile-time assert, but > unfortunately > each use of that causes a warning when building with clang: > > drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c:2907:2: warning: no case

Re: [PATCH] staging: lustre: shut up clang warnings on CLASSERT()

2017-02-01 Thread Dilger, Andreas
On Feb 1, 2017, at 09:52, Arnd Bergmann wrote: > > lustre uses a fake switch() statement as a compile-time assert, but > unfortunately > each use of that causes a warning when building with clang: > > drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c:2907:2: warning: no case

Re: [PATCH 1/2] staging: lustre: libcfs: use octal permissions

2017-01-24 Thread Dilger, Andreas
On Jan 24, 2017, at 09:40, Ernestas Kulik wrote: > > Using octal permissions instead of symbolic ones is preferred. Typically the reverse is true - using symbolic constants is preferred over numeric ones. Where does this recommendation come from? Cheers, Andreas >

Re: [lustre-devel] [PATCH] staging: lustre: selftest: Make brw_inject_one_error() static

2017-01-12 Thread Dilger, Andreas
On Dec 23, 2016, at 08:42, Karthik Nayak wrote: > > Since the function brw_inject_one_error() is used only within > brw_test.c, make it static. This was reported as a warning by sparse. > > Signed-off-by: Karthik Nayak Reviewed-by: Andreas Dilger

Re: [PATCH] Staging: lustre: lustre: lmv: Compress return logic into one line.

2017-01-08 Thread Dilger, Andreas
On Jan 4, 2017, at 22:14, Gustavo A. R. Silva wrote: > > Simplify return logic to avoid unnecessary variable assignments. > These issues were detected using Coccinelle and the following semantic patch: > > @@ > local idexpression ret; > expression e; > @@ > > -ret

Re: [PATCH] staging : osc : coding style fix

2016-12-14 Thread Dilger, Andreas
On Dec 14, 2016, at 14:11, Tabrez khan wrote: > > Subject: [PATCH] staging : osc : coding style fix Thanks for sumbitting your patch. As a general rule, the patch summary line should try to describe (as best as possible in a single line) what the patch is actually

Re: [PATCH v2 5/5] staging: lustre: headers: use proper byteorder functions in lustre_idl.h

2016-12-12 Thread Dilger, Andreas
On Dec 12, 2016, at 13:00, James Simmons wrote: > > >> On Sat, Dec 10, 2016 at 01:06:01PM -0500, James Simmons wrote: >>> In order for lustre_idl.h to be usable for both user >>> land and kernel space it has to use the proper >>> byteorder functions. >> >> Why would

Re: [lustre-devel] [PATCH 3/6] staging: lustre: obdclass: Create a header for obdo related functions

2016-12-05 Thread Dilger, Andreas
> On Dec 5, 2016, at 13:50, Dan Carpenter wrote: > > On Fri, Dec 02, 2016 at 02:40:47PM -0500, James Simmons wrote: >> -__u32 local_flags = 0; >> +u32 local_flags = 0; > >> -if (local_flags != 0) { >> +if (local_flags) { > > Please avoid these

Re: [patch] staging: lustre: lnet: memory corruption in selftest

2016-11-25 Thread Dilger, Andreas
On Nov 24, 2016, at 04:10, Dan Carpenter wrote: > > We want sizeof(struct lstcon_node) but instead we're getting the sizeof > a pointer. > > Fixes: 8d78f0f2ba76 ("staging: lustre: lnet: cleanup some of the > 80 line > issues") > Signed-off-by: Dan Carpenter

Re: [lustre-devel] [PATCH 09/10] staging: lustre: libcfs: remove zero comparisons in headers

2016-11-25 Thread Dilger, Andreas
On Nov 18, 2016, at 09:48, James Simmons wrote: > > Remove the zero comparisions in the libcfs headers. > > Signed-off-by: James Simmons > --- > .../lustre/include/linux/libcfs/libcfs_crypto.h|2 +- >

Re: [lustre-devel] [patch] staging: lustre/ptlrpc: small leak on allocation failure

2016-11-25 Thread Dilger, Andreas
On Nov 24, 2016, at 04:12, Dan Carpenter wrote: > > We should free "desc" before returning NULL. > > Signed-off-by: Dan Carpenter Reviewed-by: Andreas Dilger > diff --git

Re: [PATCH] staging: lustre: lov: Fix signed wrap around when decrementing index 'i'

2016-11-10 Thread Dilger, Andreas
On Nov 10, 2016, at 07:19, Colin King wrote: > > From: Colin Ian King > > Change predecrement compare to post decrement compare to avoid an > unsigned integer wrap-around comparisomn when decrementing in the while > loop. > > Issue found

Re: [lustre-devel] [PATCH] staging: lustre: ldlm: pl_recalc time handling is wrong

2016-11-08 Thread Dilger, Andreas
On Nov 7, 2016, at 19:47, James Simmons wrote: > > The ldlm_pool field pl_recalc_time is set to the current > monotonic clock value but the interval period is calculated > with the wall clock. This means the interval period will > always be far larger than the

Re: [lustre-devel] [PATCH 1/2] staging: lustre: replace uses of class_devno_max by MAX_OBD_DEVICES

2016-11-07 Thread Dilger, Andreas
On Nov 7, 2016, at 02:07, Aya Mahfouz <mahfouz.saif.elya...@gmail.com> wrote: > > On Mon, Nov 7, 2016 at 6:22 AM, Oleg Drokin <oleg.dro...@intel.com> wrote: > >> On Nov 4, 2016, at 4:37 AM, Aya Mahfouz wrote: >> >> > >> > On Thu, Nov 3, 2016 at

Re: [PATCH 2/2] staging: lustre: obdclass: Add handling of error returned by lustre_cfg_new

2016-11-07 Thread Dilger, Andreas
On Nov 6, 2016, at 10:26, Drokin, Oleg wrote: > > Hello! > > On Nov 6, 2016, at 12:11 PM, Christophe JAILLET wrote: > >> 'lustre_cfg_new()' can return ERR_PTR(-ENOMEM). >> Handle these errors and propagate the error code to the callers. >> >> Error handling has been

Re: [PATCH] staging: lustre: o2iblnd: use bool assignment to true/false

2016-11-07 Thread Dilger, Andreas
On Nov 7, 2016, at 12:01, Nicholas Hanley wrote: > > Replace 0 with false in tx_pages_mapped = 0 to be consistent with > the rest of the lustre code. > > Signed-off-by: Nicholas Hanley Reviewed-by: Andreas Dilger

Re: [PATCH v2] staging: lustre: fixed shadowed variable in socklnd_cb.c

2016-11-03 Thread Dilger, Andreas
On Nov 3, 2016, at 16:49, Andrew Kanner wrote: > > Removed redundant declaration of variable 'tx' in local scope > Fixed: sparse warning: > socklnd_cb.c:2476:41: warning: symbol 'tx' shadows an earlier one > socklnd_cb.c:2435:25: originally declared here > >

Re: [PATCH] staging: lustre: fixed shadowed variable in socklnd_cb.c

2016-11-03 Thread Dilger, Andreas
On Nov 3, 2016, at 15:54, Andrew Kanner wrote: > > Changed variable 'tx' name in local scope > Fixed: sparse warning: > socklnd_cb.c:2476:41: warning: symbol 'tx' shadows an earlier one > socklnd_cb.c:2435:25: originally declared here Looking at this more closely (or

Re: [lustre-devel] [PATCH 1/2] staging: lustre: replace uses of class_devno_max by MAX_OBD_DEVICES

2016-11-02 Thread Dilger, Andreas
On Oct 25, 2016, at 10:47, Aya Mahfouz <mahfouz.saif.elya...@gmail.com> wrote: > > On Mon, Oct 17, 2016 at 10:38:31PM +0000, Dilger, Andreas wrote: >> On Oct 17, 2016, at 15:46, Aya Mahfouz <mahfouz.saif.elya...@gmail.com> >> wrote: >>> >>> cl

Re: [PATCH 1/2] staging: lustre: replace uses of class_devno_max by MAX_OBD_DEVICES

2016-10-17 Thread Dilger, Andreas
On Oct 17, 2016, at 15:46, Aya Mahfouz wrote: > > class_devno_max is an inline function that returns > MAX_OBD_DEVICES. Replace all calls to the function > by MAX_OBD_DEVICES. Thanks for your patch, but unfortunately it can't be accepted. This function was added

Re: [lustre-devel] [PATCH] staging: lustre: ko2iblbd: handle ib_dereg_mr removal

2016-10-02 Thread Dilger, Andreas
On Oct 2, 2016, at 20:22, James Simmons wrote: > > In the rdma-next tree to be merged for 4.9-rc1 removes > the IB core function ib_get_dma_mr. This patch migrates > us way from this former function. > > Signed-off-by: James Simmons > --- >

Re: [PATCH v2] staging: lustre: lustre/ldlm: Fixed sparse warnings

2016-09-18 Thread Dilger, Andreas
> On Sep 18, 2016, at 23:18, Nayeemahmed Badebade > wrote: > > Added __acquires / __releases sparse locking annotations > to lock_res_and_lock() and unlock_res_and_lock() functions > in l_lock.c, to fix below sparse warnings: > > l_lock.c:47:22: warning: context

Re: [PATCH] staging: lustre: lmv: mark symbols static where possible

2016-09-18 Thread Dilger, Andreas
On Sep 17, 2016, at 06:04, Baoyou Xie wrote: > > We get a few warnings when building kernel with W=1: > drivers/staging/lustre/lustre/lmv/lmv_obd.c:1640:1: warning: no previous > prototype for 'lmv_locate_target_for_name' [-Wmissing-prototypes] >

Re: [PATCH] staging: lustre: lustre/ldlm: Fixed sparse warnings

2016-09-18 Thread Dilger, Andreas
On Sep 18, 2016, at 14:21, nayeem <itachi.op...@gmail.com> wrote: > On Friday 16 September 2016 01:30 PM, Dilger, Andreas wrote: >> On Sep 15, 2016, at 12:33, nayeem <itachi.op...@gmail.com> wrote: >>> On Wednesday 14 September 2016 10:44 AM, Dilger, Andreas wrote:

Re: [PATCH] staging: lustre: lustre/ldlm: Fixed sparse warnings

2016-09-16 Thread Dilger, Andreas
On Sep 15, 2016, at 12:33, nayeem <itachi.op...@gmail.com> wrote: > On Wednesday 14 September 2016 10:44 AM, Dilger, Andreas wrote: >> On Sep 12, 2016, at 04:27, Greg KH <gre...@linuxfoundation.org> wrote: >>> >>> On Fri, Sep 09, 2016 at 08:50:35PM +0530,

Re: [PATCH] staging: lustre: lustre/ldlm: Fixed sparse warnings

2016-09-13 Thread Dilger, Andreas
On Sep 12, 2016, at 04:27, Greg KH wrote: > > On Fri, Sep 09, 2016 at 08:50:35PM +0530, Nayeemahmed Badebade wrote: >> Added __acquires / __releases sparse locking annotations >> to lock_res_and_lock and unlock_res_and_lock functions in >> l_lock.c, to fix below

Re: [lustre-devel] [PATCH] staging: lustre: mdc: fix NULL pointer dereference in mdc_adjust_dirpages

2016-08-22 Thread Dilger, Andreas
On Aug 22, 2016, at 10:57, James Simmons wrote: > > The function mdc_adjust_dirpages is only called on platforms which > don't have pages 4K in size which is why kbuild only reported this > for platforms like the Alpha. The problem was a typo in ordering of > variables in

Re: [PATCH] staging: lustre: llite: remove lloop device

2016-06-09 Thread Dilger, Andreas
On 2016/06/08, 16:50, "James Simmons" wrote: >The lloop device was original developed to work around >the lack of direct I/O for the default loop back device. >Also the lloop device greatly out performed the default >loop back device. The lloop hasn't been worked on for

Re: [lustre-devel] [PATCH] posix acls: Move namespace conversion into filesystem / xattr handlers

2016-05-24 Thread Dilger, Andreas
On 2016/05/23, 15:06, "James Simmons" wrote: > >> Currently, getxattr() and setxattr() check for the xattr names >> "system.posix_acl_{access,default}" and perform in-place UID / GID >> namespace mappings in the xattr values. Filesystems then again check for >> the same

Re: [lustre-devel] [PATCH v2] staging/lustre/ptlrpc: Removes potential null dereference

2016-05-16 Thread Dilger, Andreas
On 2016/05/16, 12:16, "James Simmons" wrote: > >> This looks wrong - You return -EINVAL from sptlrpc_pack_user_desc, but then >> the caller checks "!desc". Desc will not be null, since you've returned >> -EINVAL. > >Actually 'if (!desc)' is equal to 'if (desc != 0). Yes

Re: [lustre-devel] [PATCH] Revert "Staging: lustre: o2iblnd: Use sizeof type *pointer instead of sizeof type."

2016-03-22 Thread Dilger, Andreas
On 2016/03/22, 19:49, "lustre-devel on behalf of Greg Kroah-Hartman" wrote: >On Tue, Mar 22, 2016 at 06:21:04PM -0400, James Simmons wrote: >> Latest testing fails when using ko2iblnd. It was tracked down >> to commit

Re: [lustre-devel] [patch] staging: lustre: checking for NULL instead of IS_ERR

2016-03-19 Thread Dilger, Andreas
On 2016/03/18, 13:28, "lustre-devel on behalf of Dilger, Andreas" <lustre-devel-boun...@lists.lustre.org on behalf of andreas.dil...@intel.com> wrote: >On 2016/03/17, 23:42, "Dan Carpenter" <dan.carpen...@oracle.com> wrote: > >>lustre_cfg_new() retur

Re: [patch] staging: lustre: checking for NULL instead of IS_ERR

2016-03-19 Thread Dilger, Andreas
On 2016/03/17, 23:42, "Dan Carpenter" wrote: >lustre_cfg_new() returns error pointers on error, it never returns NULL. > >Signed-off-by: Dan Carpenter > >diff --git a/drivers/staging/lustre/lustre/mgc/mgc_request.c

Re: [lustre-devel] [PATCH 07/10] staging: lustre: cleanup comment style for lnet selftest

2016-03-11 Thread Dilger, Andreas
On 2016/03/11, 18:29, "lustre-devel on behalf of James Simmons" wrote: >Apply a consistent style for comments in the lnet selftest >code. > >Signed-off-by: James Simmons >--- >

Re: [PATCH] staging: lustre: Remove unused memhog functionality

2015-12-23 Thread Dilger, Andreas
On 2015/12/23, 02:40, "Dighe, Niranjan (N.)" wrote: >From: Niranjan Dighe > >Remove IOC_LIBCFS_MEMHOG ioctl functionality as it is no longer needed >thereby >making functions like - kportal_memhog_alloc(), kportal_memhog_free() and >type - >struct

Re: [lustre-devel] [PATCH] staging: lustre: Remove unused memhog functionality

2015-12-23 Thread Dilger, Andreas
On 2015/12/23, 14:40, "Simmons, James A." wrote: >>From: Niranjan Dighe >> >>Remove IOC_LIBCFS_MEMHOG ioctl functionality as it is no longer needed >>thereby >>making functions like - kportal_memhog_alloc(), kportal_memhog_free() >>and type - >>struct

  1   2   >