[PATCH] drbd: remove BIOSET_NEED_RESCUER flag from drbd_{md_,}io_bio_set

2017-08-29 Thread NeilBrown
and the activity log. There are only accessed from worker threads and workqueues, never directly from make_request_fn. Again, the rescuer isn't needed. Signed-off-by: NeilBrown --- drivers/block/drbd/drbd_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/block

Re: Do we really need d_weak_revalidate???

2017-08-16 Thread NeilBrown
On Wed, Aug 16 2017, Jeff Layton wrote: > On Wed, 2017-08-16 at 12:43 +1000, NeilBrown wrote: >> On Mon, Aug 14 2017, Jeff Layton wrote: >> >> > On Mon, 2017-08-14 at 09:36 +1000, NeilBrown wrote: >> > > On Fri, Aug 11 2017, Jeff Layton wrote: >> >

Re: Do we really need d_weak_revalidate???

2017-08-17 Thread NeilBrown
On Thu, Aug 17 2017, Ian Kent wrote: > On 16/08/17 19:34, Jeff Layton wrote: >> On Wed, 2017-08-16 at 12:43 +1000, NeilBrown wrote: >>> On Mon, Aug 14 2017, Jeff Layton wrote: >>> >>>> On Mon, 2017-08-14 at 09:36 +1000, NeilBrown wrote: >&

Re: [PATCH] md: raid10: remove VLAIS

2017-10-05 Thread NeilBrown
} on_stack; struct r10bio *r10b; if (conf->copies <= ARRAY_SIZE(on_stack.devs)) r10b = _stack.r10_bio; else r10b = kmalloc(sizeof(*r10b) + sizeof(struct r10dev) * conf->copies, GFP_NOIO); Thanks, NeilBro

Re: [PATCH] md: raid10: remove VLAIS

2017-10-05 Thread NeilBrown
On Thu, Oct 05 2017, Matthias Kaehlcke wrote: > Hi Neil, > > El Fri, Oct 06, 2017 at 10:58:59AM +1100 NeilBrown ha dit: > >> On Thu, Oct 05 2017, Matthias Kaehlcke wrote: >> >> > The raid10 driver can't be built with clang since it uses a variable >&g

[PATCH] scripts: fix faddr2line to work on last symbol

2017-10-11 Thread NeilBrown
If faddr2line is given a function name which is the last one listed by "nm -n", it will fail because it never finds the next symbol. So teach the awk script to catch that possibility, and use 'size' to provide the end point of the last function. Signed-off-by: NeilBrown --- scripts/

Re: [PATCH] scripts: fix faddr2line to work on last symbol

2017-10-12 Thread NeilBrown
On Thu, Oct 12 2017, Josh Poimboeuf wrote: > On Thu, Oct 12, 2017 at 02:22:04PM +1100, NeilBrown wrote: >> >> If faddr2line is given a function name which is the >> last one listed by "nm -n", it will fail because it >> never finds the next symbol. &g

Re: [lkp-robot] [blk] 47e0fb461f: BUG:unable_to_handle_kernel

2017-09-30 Thread NeilBrown
%rdi holds link->ap, so the "link->ap->slave_link" dereference causes the crash. link->ap seems to be initialized quite early, and never cleared, so I don't know how it could be NULL... Confused. Thanks, NeilBrown signature.asc Description: PGP signature

Re: [PATCH] Documentation: security/credentials.rst: explain need to sort group_list

2018-01-07 Thread NeilBrown
in case including the kernel-doc in credentials.rst like this was the wrong direction. Thanks, NeilBrown --8<----- From: NeilBrown Subject: [PATCH] Documentation: include kernel-doc in credentials.rst - kernel-doc from include/linux/cred.h, kernel

[PATCH 5 v2: 00/19] staging: lustre: use standard wait_event macros

2018-01-07 Thread NeilBrown
(as I understand it) doesn't seem to agree with comments/debug message, or just generally looks odd. Thanks, NeilBrown --- NeilBrown (19): sched/wait: add wait_event_idle() functions. staging: lustre: discard SVC_SIGNAL and related functions staging: lustre: replace simple cases

[PATCH 02/19] staging: lustre: discard SVC_SIGNAL and related functions

2018-01-07 Thread NeilBrown
This flag is never set, so remove checks and remove the flag. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/include/lustre_net.h |6 -- drivers/staging/lustre/lustre/ptlrpc/sec_gc.c |4 +--- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers

[PATCH 03/19] staging: lustre: replace simple cases of l_wait_event() with wait_event().

2018-01-07 Thread NeilBrown
needing to block signals. In one case, wait_event_idle_exclusive() is needed. Also remove all l_wait_condition*() macros which were short-cuts for setting lwi to {0}. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/include/lustre_lib.h | 19 drivers/staging/lustre/lustre

[PATCH 06/19] staging: lustre: introduce and use l_wait_event_abortable()

2018-01-07 Thread NeilBrown
return -ERESTARTSYS. l_wait_event_{abortable_,}exclusive follow the Linux pattern. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/include/lustre_lib.h | 24 drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 12 +- drivers/staging/lustre/lustre

[PATCH 01/19] sched/wait: add wait_event_idle() functions.

2018-01-07 Thread NeilBrown
() wait_event_idle_exclusive_timeout() This set was chosen because lustre needs them before it can discard its own l_wait_event() macro. Acked-by: Peter Zijlstra (Intel) Signed-off-by: NeilBrown --- include/linux/wait.h | 114 ++ 1 file changed, 114 insertions(+) diff

[PATCH 05/19] staging: lustre: use wait_event_idle_timeout() where appropriate.

2018-01-07 Thread NeilBrown
() is used. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 10 ++-- drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 12 +++--- drivers/staging/lustre/lustre/llite/statahead.c| 14 --- drivers/staging/lustre/lustre/mdc/mdc_request.c

[PATCH 04/19] staging: lustre: discard cfs_time_seconds()

2018-01-07 Thread NeilBrown
cfs_time_seconds() converts a number of seconds to the matching number of jiffies. The standard way to do this in Linux is "* HZ". So discard cfs_time_seconds() and use "* HZ" instead. Signed-off-by: NeilBrown --- .../lustre/include/linux/libcfs/libcfs_debug.h |

[PATCH 08/19] staging: lustre: simplify waiting in ldlm_completion_ast()

2018-01-07 Thread NeilBrown
condition is true if it is signaled. This doesn't quite agree with the comments and debug messages. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 55 +++-- 1 file changed, 18 insertions(+), 37 deletions(-) diff --git a/drivers/staging/lustre/l

[PATCH 09/19] staging: lustre: open code polling loop instead of using l_wait_event()

2018-01-07 Thread NeilBrown
Two places that LWI_TIMEOUT_INTERVAL() is used, the outcome is a simple polling loop that polls every second for some event (with a limit). So write a simple loop to make this more apparent. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/llite/llite_lib.c | 11

[PATCH 07/19] staging: lustre: simplify l_wait_event when intr handler but no timeout.

2018-01-07 Thread NeilBrown
of the function after the wait_event, if -ERESTARTSYS was returned. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 30 +-- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c b/drivers/staging

[PATCH 15/19] staging: lustre: use explicit poll loop in ptlrpc_service_unlink_rqbd

2018-01-07 Thread NeilBrown
Rather an using l_wait_event(), use wait_event_idle_timeout() with an explicit loop so it is easier to see what is happening. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/ptlrpc/service.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers

[PATCH 13/19] staging: lustre: use wait_event_idle_timeout in ptlrpcd()

2018-01-07 Thread NeilBrown
We can replace l_wait_event() with wait_event_idle_timeout() here providing we call the timeout function when wait_event_idle_timeout() returns zero. As ptlrpc_expired_set() returns 1, the l_wait_event() aborts of the first timeout. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre

[PATCH 14/19] staging: lustre: improve waiting in sptlrpc_req_refresh_ctx

2018-01-07 Thread NeilBrown
Replace l_wait_event with wait_event_idle_timeout() and call the handler function explicitly. This makes it more clear what is happening. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/ptlrpc/sec.c | 34 1 file changed, 24 insertions(+), 10 deletions

[PATCH 17/19] staging: lustre: remove l_wait_event from ptlrpc_set_wait

2018-01-07 Thread NeilBrown
This is the last remaining use of l_wait_event(). It is the only use of LWI_TIMEOUT_INTR_ALL() which has a meaning that timeouts can be interrupted. Only interrupts by "fatal" signals are allowed, so introduce l_wait_event_abortable_timeout() to support this. Signed-off-by:

[PATCH 16/19] staging: lustre: use explicit poll loop in ptlrpc_unregister_reply

2018-01-07 Thread NeilBrown
replace l_wait_event() with wait_event_idle_timeout() and explicit loop. This approach is easier to understand. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/ptlrpc/client.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/lustre

[PATCH 12/19] staging: lustre: make polling loop in ptlrpc_unregister_bulk more obvious

2018-01-07 Thread NeilBrown
This use of l_wait_event() is a polling loop that re-checks every second. Make this more obvious with a while loop and wait_event_idle_timeout(). Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions

[PATCH 11/19] staging: lustre: remove back_to_sleep()

2018-01-07 Thread NeilBrown
sleep()" is used but using two explicit sleeps. The code in ptlrpcd_add_req() looks odd - why not just have one wait_event_idle()? However I believe this is a faithful transformation of the existing code. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/include/lustre_li

[PATCH 10/19] staging: lustre: simplify waiting in ptlrpc_invalidate_import()

2018-01-07 Thread NeilBrown
-off-by: NeilBrown --- drivers/staging/lustre/lustre/ptlrpc/client.c |3 ++- drivers/staging/lustre/lustre/ptlrpc/import.c | 21 - 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/drivers/staging/lustre/lustre/ptlrpc/client.c b/drivers/staging/lustre/lustre

[PATCH 18/19] staging: lustre: replace l_wait_event_exclusive_head() with wait_event_idle_exclusive

2018-01-07 Thread NeilBrown
in the timeout setting. The current code arrange for LIFO queuing of waiters, but include/event.h doesn't support that yet. Until it does, fall back on FIFO with wait_event_idle_exclusive{,_timeout}(). Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/ptlrpc/service.c | 43

[PATCH 19/19] staging: lustre: remove l_wait_event() and related code

2018-01-07 Thread NeilBrown
These macros are no longer used, so they can be removed. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/include/lustre_lib.h | 249 1 file changed, 249 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre_lib.h b/drivers/staging/lustre

Re: [PATCH 03/15] staging: lustre: replace simple cases of LIBCFS_ALLOC with kzalloc.

2018-01-08 Thread NeilBrown
On Mon, Jan 08 2018, Greg Kroah-Hartman wrote: > On Mon, Dec 18, 2017 at 11:46:30AM +1100, NeilBrown wrote: >> All usages of the form >> LIBCFS_ALLOC(variable, sizeof(variable)) >> or >> LIBCFS_ALLOC(variable, sizeof(variable's-type)) >> >> are ch

[PATCH 00/14] staging:lustre: convert most LIBCFS*ALLOC to k*malloc - V2

2018-01-08 Thread NeilBrown
w. Thanks, NeilBrown == Lustre has some "convenience" macros for allocating and freeing memory. They: - warn if called from interrupt context - use kvmalloc - assume GFP_NOFS (which kvmalloc doesn't support) - print an error if the allocation fails - initialize the memor

[PATCH 04/14] staging: lustre: lnet: use kmalloc/kvmalloc in router_proc

2018-01-08 Thread NeilBrown
kvmalloc(). Signed-off-by: NeilBrown --- drivers/staging/lustre/lnet/lnet/router_proc.c | 34 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/staging/lustre/lnet/lnet/router_proc.c b/drivers/staging/lustre/lnet/lnet/router_proc.c index 43038f930ba1

[PATCH 05/14] staging: lustre: change some LIBCFS_ALLOC calls to k?alloc(GFP_KERNEL)

2018-01-08 Thread NeilBrown
of locations that need changing. As there are quite a lot, I've broken them up into several ad-hoc sets to avoid review-fatigue. Signed-off-by: NeilBrown --- .../lustre/include/linux/libcfs/libcfs_string.h|4 ++-- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c| 11

[PATCH 03/14] staging: lustre: lnet: selftest: don't allocate small strings.

2018-01-08 Thread NeilBrown
e which 99 bytes on the stack, instead of the 24 that would have been allocated for 64-bit pointers. Signed-off-by: NeilBrown --- drivers/staging/lustre/lnet/selftest/conctl.c | 180 - 1 file changed, 29 insertions(+), 151 deletions(-) diff --git a/drivers/staging/lustre/lne

[PATCH 02/14] staging: lustre: lnet: switch to cpumask_var_t

2018-01-08 Thread NeilBrown
() has been called on it. Signed-off-by: NeilBrown --- .../lustre/include/linux/libcfs/libcfs_cpu.h |4 - .../lustre/include/linux/libcfs/linux/linux-cpu.h |4 - .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c|6 + drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c|2

[PATCH 06/14] staging: lustre: Convert more LIBCFS_ALLOC allocation to direct GFP_KERNEL

2018-01-08 Thread NeilBrown
None of these need to be GFP_NOFS, so use GFP_KERNEL explicitly with kmalloc(), kvmalloc(), or kvmalloc_array(). Change matching LIBCFS_FREE() to kfree() or kvfree() Signed-off-by: NeilBrown --- .../lustre/lnet/libcfs/linux/linux-module.c|4 +- drivers/staging/lustre/lnet/libcfs

[PATCH 07/14] staging: lustre: more LIBCFS_ALLOC conversions to GFP_KERNEL allocations.

2018-01-08 Thread NeilBrown
None of these need GFP_NOFS so allocate directly. Change matching LIBCFS_FREE() to kfree() or kvfree(). Signed-off-by: NeilBrown --- .../staging/lustre/lnet/libcfs/linux/linux-cpu.c | 19 +++ drivers/staging/lustre/lnet/lnet/lib-eq.c |9 - drivers

[PATCH 01/14] staging: lustre: replace simple cases of LIBCFS_ALLOC with kzalloc.

2018-01-08 Thread NeilBrown
option, or any of the other minor benefits of LIBCFS_ALLOC(). Signed-off-by: NeilBrown --- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c| 39 ++-- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c |4 +- .../lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c |4

[PATCH 10/14] staging: lustre: use kmalloc for allocating ksock_tx

2018-01-08 Thread NeilBrown
The size of the data structure is primarily controlled by the iovec size, which is limited to 256. Entries in this vector are 12 bytes, so the whole will always fit in a page. So it is safe to use kmalloc (kvmalloc not needed). So replace LIBCFS_ALLOC with kmalloc. Signed-off-by: NeilBrown

[PATCH 09/14] staging: lustre: lnet-route: use kmalloc for small allocation

2018-01-08 Thread NeilBrown
This allocation is reasonably small. As the function is called "*_locked", it might not be safe to perform a GFP_KERNEL allocation, so be safe and use GFP_NOFS. Signed-off-by: NeilBrown --- drivers/staging/lustre/lnet/lnet/router.c |5 ++--- 1 file changed, 2 insertions(+), 3

[PATCH 12/14] staging: lustre: opencode LIBCFS_ALLOC_ATOMIC calls.

2018-01-08 Thread NeilBrown
Just call kzalloc(GFP_ATOMIC) directly. We don't need the warning on failure. Signed-off-by: NeilBrown --- .../lustre/lustre/obdclass/lprocfs_status.c|7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c b

[PATCH 13/14] staging: lustre: replace LIBCFS_CPT_ALLOC()

2018-01-08 Thread NeilBrown
(..)) in the one case that lnet_cpt_table() isn't used. When LIBCFS_CPT_ALLOC() is replaced, the matching LIBCFS_FREE() is also replaced, with with kfree() or kvfree() as appropriate. Signed-off-by: NeilBrown --- .../lustre/include/linux/libcfs/libcfs_private.h | 19 .../staging/lustre/lnet

[PATCH 08/14] staging: lustre: more conversions to GFP_KERNEL allocations.

2018-01-08 Thread NeilBrown
These are not called from filesystem context, so use GFP_KERNEL, not LIBCFS_ALLOC(). Signed-off-by: NeilBrown --- drivers/staging/lustre/lnet/selftest/console.c | 57 +--- drivers/staging/lustre/lnet/selftest/framework.c |4 + drivers/staging/lustre/lnet/selftest

[PATCH 11/14] staging: lustre: cfs_percpt_alloc: use kvmalloc(GFP_KERNEL)

2018-01-08 Thread NeilBrown
this allocation is called from several places, but all are during initialization, so GFP_NOFS is not needed. So use kvmalloc and GFP_KERNEL. Signed-off-by: NeilBrown --- drivers/staging/lustre/lnet/libcfs/libcfs_mem.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH 14/14] staging: lustre: remove LIBCFS_ALLOC, LIBCFS_FREE and related macros.

2018-01-08 Thread NeilBrown
LIBCFS_ALLOC LIBCFS_ALLOC_ATOMIC LIBCFS_ALLOC_POST LIBCFS_CPT_ALLOC LIBCFS_FREE are no longer used, and so are removed. Signed-off-by: NeilBrown --- .../lustre/include/linux/libcfs/libcfs_private.h | 51 1 file changed, 51 deletions(-) diff --git a/drivers/staging

Re: [PATCH 3/4] staging: lustre: lnet: convert selftest to use workqueues

2018-01-08 Thread NeilBrown
On Mon, Jan 08 2018, Greg Kroah-Hartman wrote: > On Mon, Dec 18, 2017 at 12:25:19PM +1100, NeilBrown wrote: >> Instead of the cfs workitem library, use workqueues. >> >> As lnet wants to provide a cpu mask of allowed cpus, it >> needs to be a WQ_UNBOUND work que

Re: [PATCH 5 v2: 00/19] staging: lustre: use standard wait_event macros

2018-01-08 Thread NeilBrown
On Mon, Jan 08 2018, James Simmons wrote: >> On Mon, Jan 08, 2018 at 02:28:13PM +1100, NeilBrown wrote: >> > Hi, >> > this is a revised version of the patch series I sent under a similar >> > subject in mid December. >> > Improvements are: >

[PATCH 2/2] staging: lustre: libcfs: remove workitem code.

2018-01-10 Thread NeilBrown
There are now no users. workqueues are doing the job that this used to do. Signed-off-by: NeilBrown --- .../staging/lustre/include/linux/libcfs/libcfs.h |1 .../lustre/include/linux/libcfs/libcfs_workitem.h | 104 drivers/staging/lustre/lnet/libcfs/Makefile|2

[PATCH 0/2] staging: lustre: finish removal of workitem code.

2018-01-10 Thread NeilBrown
This is a resend of the last two patches of my "remove workitem code", which resolve a merge conflict and add and 'Ack-by' from Tejun. The first two patches have already been merged. Thanks, NeilBrown Original intro: Lustre has a "workitem" subsystem with much the same functi

[PATCH 1/2] staging: lustre: lnet: convert selftest to use workqueues

2018-01-10 Thread NeilBrown
of the workqueue API, that isn't currently exported. lustre needs it to allow workqueue thread to be limited to a subset of CPUs. Acked-by: Tejun Heo (for export of apply_workqueue_attrs) Signed-off-by: NeilBrown --- drivers/staging/lustre/lnet/selftest/framework.c | 10 +--- drivers/staging/lustre

Re: [lustre-devel] [PATCH 02/16] staging: lustre: replace simple cases of l_wait_event() with wait_event().

2017-12-18 Thread NeilBrown
bout "simple wait queues" I guess. Thanks, NeilBrown > > - Patrick > > On 12/18/17, 1:17 AM, "lustre-devel on behalf of NeilBrown" > wrote: > >>When the lwi arg is full of zeros, l_wait_event() behaves almost >>identically to the standard

[PATCH SET 6: 0/2] staging: lustre: two miscellaneous patches

2017-12-18 Thread NeilBrown
I thought I had mode one-off patches but this, but it seems there are only two ready to go now. The first removes another local interface in favour of a more general interface, the second removing a warning (which actually say "BUG:"). Thanks, NeilBrown --- NeilBrown (2): stagi

[PATCH 2/2] staging: lustre: disable preempt while sampling processor id.

2017-12-18 Thread NeilBrown
with preemption disabled. So disable preemption inside cfs_cpt_current() to silence the warning. Signed-off-by: NeilBrown --- .../staging/lustre/lnet/libcfs/linux/linux-cpu.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux

[PATCH 1/2] staging: lustre: use strim instead of cfs_trimwhite.

2017-12-18 Thread NeilBrown
Linux lib provides identical functionality to cfs_trimwhite, so discard that code and use the standard. Signed-off-by: NeilBrown --- .../lustre/include/linux/libcfs/libcfs_string.h|1 - drivers/staging/lustre/lnet/libcfs/libcfs_string.c | 20 .../staging/lustre

Re: [VFS PATCH] constify more dcache.h inlined helpers.

2017-12-18 Thread NeilBrown
On Fri, Oct 20 2017, Al Viro wrote: > On Fri, Oct 20, 2017 at 11:41:17AM +1100, NeilBrown wrote: >> On Wed, Aug 02 2017, NeilBrown wrote: >> >> > Many of the inlines in dcache.h were changed to accept >> > const struct pointers in commit f0d3b3ded999 ("

Re: [PATCH 2/3, V2] kernel: Move groups_sort to the caller of set_groups.

2017-12-19 Thread NeilBrown
On Tue, Dec 19 2017, J. Bruce Fields wrote: > On Tue, Dec 05, 2017 at 07:11:00AM +1100, NeilBrown wrote: >> On Mon, Dec 04 2017, Thiago Rafael Becker wrote: >> >> > On Mon, 4 Dec 2017, NeilBrown wrote: >> > >> >> I think you need to add groups_sort(

Re: [lustre-devel] [PATCH 02/16] staging: lustre: replace simple cases of l_wait_event() with wait_event().

2017-12-19 Thread NeilBrown
ro. At least, that is my thought before I try to write the code - maybe I'll change my mind. Anyway, it is clear now that this l_wait_event() series needs to be rewritten now that I have a better understanding. Thanks, NeilBrown > > Cheers, Andreas > >> Similar issues for osc_objec

Re: [ANNOUNCE] autofs 5.1.2 release

2017-12-19 Thread NeilBrown
g if I simply reverse this chunk of the patch? Thanks, NeilBrown signature.asc Description: PGP signature

Re: [PATCH] NFS: allow name_to_handle_at() to work for Amazon EFS.

2017-12-20 Thread NeilBrown
On Tue, Dec 19 2017, Jan Kara wrote: > On Fri 08-12-17 13:17:31, NeilBrown wrote: >> On Thu, Dec 07 2017, Amir Goldstein wrote: >> >> > On Thu, Dec 7, 2017 at 5:20 AM, NeilBrown wrote: >> >> On Wed, Dec 06 2017, Linus Torvalds wrote: >> >> &g

[PATCH/RFC] VFS: don't keep disconnected dentries on d_anon

2017-12-20 Thread NeilBrown
this list. There are many fewer of these (only NFS and NILFS2 use the call, and only during filesystem mount) so contention on the bit-lock will not be a problem. Possibly an alternate solution should be found for NFS and NILFS2, but that would require understanding their needs first. Signed-

Re: [PATCH/RFC] VFS: don't keep disconnected dentries on d_anon

2017-12-20 Thread NeilBrown
On Wed, Dec 20 2017, Matthew Wilcox wrote: > On Thu, Dec 21, 2017 at 09:45:40AM +1100, NeilBrown wrote: >> -c/ Helper routines to allocate anonymous dentries, and to help attach >> + prefix. If the refcount on a dentry with this flag set >> + becomes zero, the dentry is

Re: [ANNOUNCE] autofs 5.1.2 release

2017-12-20 Thread NeilBrown
On Wed, Dec 20 2017, Ian Kent wrote: > On 20/12/17 13:52, Ian Kent wrote: >> On 20/12/17 11:29, NeilBrown wrote: >>> >>> Hi Ian, >>> I've been looking at: >>> >>>> - add configuration option to use fqdn in mounts. >>> >>

[PATCH/RFC] NFS: add nostatflush mount option.

2017-12-20 Thread NeilBrown
admins to have applications which are hurt by the current behavior to disable it. Note that this option should probably *not* be used together with "nocto". In that case, mtime could be unstable even when no process has the file open. Signed-off-by: NeilBrown --- fs/nfs/inode

Re: [PATCH] VFS: use synchronize_rcu_expedited() in namespace_unlock()

2017-11-28 Thread NeilBrown
the start of namespace_lock(). That would mean a single unmount would have low impact, but it would still slow down a sequence of 1000 consecutive unmounts. Maybe we would only need the rcu_barrier() before select namespace_lock() calls. I would need to study the code closely to form an opinion. Interesting idea though. Hopefully the _expedited() patch will be accepted - I haven't had a "nak" yet... thanks, NeilBrown signature.asc Description: PGP signature

Re: [dm-devel] dm: use cloned bio as head, not remainder, in __split_and_process_bio()

2017-11-28 Thread NeilBrown
On Mon, Nov 27 2017, Mike Snitzer wrote: > On Thu, Nov 23 2017 at 5:52pm -0500, > NeilBrown wrote: > >> >> When we use bio_clone_bioset() to split off the front part of a bio >> and chain the two together and submit the remainder to >> generic_make_request(

Re: [PATCH 1/2] autofs: revert take more care to not update last_used on path walk

2017-11-28 Thread NeilBrown
on path walk") Cc: sta...@vger.kernel.org (v4.11+) to ensure these are picked up as needed (different Fixes line for second of course). Reviewed-by: NeilBrown Thanks, NeilBrown > > Signed-off-by: Ian Kent > Cc: Neil Brown > Cc: Al Viro > --- > fs/autofs4/root.c | 17 +

Re: [PATCH 3/3] autofs - fix AT_NO_AUTOMOUNT not being honored

2017-11-28 Thread NeilBrown
would only be able to use the cache for a read() syscall which reads the whole file. How big do people see /proc/self/mount* getting? What size reads does 'strace' show the various programs using to read it? Thanks, NeilBrown signature.asc Description: PGP signature

Re: [PATCH 3/3] autofs - fix AT_NO_AUTOMOUNT not being honored

2017-11-28 Thread NeilBrown
On Wed, Nov 29 2017, Ian Kent wrote: > On 29/11/17 10:13, Mike Marion wrote: >> On Wed, Nov 29, 2017 at 12:17:27PM +1100, NeilBrown wrote: >> >>> How big do people see /proc/self/mount* getting? What size reads >>> does 'strace' show the various programs using t

Re: [PATCH 08/10] staging: lustre: lov: use list_for_each_entry in lov_obd.c

2017-11-28 Thread NeilBrown
Subject: [PATCH] staging: lustre: lov: use list_for_each_entry in lov_obd.c Using the *_entry macro simplifies the code slightly. Signed-off-by: NeilBrown --- Resubmitted with non-empty changelog text. Thanks, NeilBrown drivers/staging/lustre/lustre/lov/lov_obd.c | 6 ++ 1 file changed

Re: [PATCH 3/3] autofs - fix AT_NO_AUTOMOUNT not being honored

2017-11-28 Thread NeilBrown
On Wed, Nov 29 2017, Ian Kent wrote: > Adding Al Viro to the Cc list as I believe Stephen Whitehouse and > Al have discussed something similar, please feel free to chime in > with your thoughts Al. > > On 29/11/17 09:17, NeilBrown wrote: >> On Tue, Nov 28 2017, Mike Marion

Re: [PATCH 3/3] autofs - fix AT_NO_AUTOMOUNT not being honored

2017-11-28 Thread NeilBrown
On Wed, Nov 29 2017, Ian Kent wrote: > On 29/11/17 11:45, NeilBrown wrote: >> On Wed, Nov 29 2017, Ian Kent wrote: >> >>> Adding Al Viro to the Cc list as I believe Stephen Whitehouse and >>> Al have discussed something similar, please feel free to c

Re: [PATCH 2/3, V2] kernel: Move groups_sort to the caller of set_groups.

2017-12-04 Thread NeilBrown
On Mon, Dec 04 2017, Thiago Rafael Becker wrote: > On Mon, 4 Dec 2017, NeilBrown wrote: > >> I think you need to add groups_sort() in a few more places. >> Almost anywhere that calls groups_alloc() should be considered. >> net/sunrpc/svcauth_unix.c, net/sunrpc/auth_gss/s

Re: [PATCH 2/3, V2] kernel: Move groups_sort to the caller of set_groups.

2017-12-05 Thread NeilBrown
On Tue, Dec 05 2017, Matthew Wilcox wrote: > On Tue, Dec 05, 2017 at 07:11:00AM +1100, NeilBrown wrote: >> As we don't seem to be pursuing this possibility is probably isn't very >> important, but I'd like to point out that the original fix isn't a true >> fix. >

Re: [PATCH 2/3] kernel: Move groups_sort to the caller of set_groups.

2017-12-05 Thread NeilBrown
); > if (ugp) { > struct cache_head *ch; > @@ -819,6 +826,7 @@ svcauth_unix_accept(struct svc_rqst *rqstp, __be32 *authp) > kgid_t kgid = make_kgid(_user_ns, svc_getnl(argv)); > cred->cr_group_info->gid[i] = kgid; > } > + groups_sort(cred->cr_group_info); > if (svc_getu32(argv) != htonl(RPC_AUTH_NULL) || svc_getu32(argv) != 0) { > *authp = rpc_autherr_badverf; > return SVC_DENIED; > -- > 2.9.5 Reviewed-by: NeilBrown Looks good to me, thanks. NeilBrown signature.asc Description: PGP signature

[PATCH] autofs: fix careless error in recent commit.

2017-12-05 Thread NeilBrown
Commit ecc0c469f277 was meant to replace an 'if' with a 'switch', but instead added the 'switch' leaving the case in place. Reported-by: Ben Hutchings Cc: sta...@vger.kernel.org Fixes: ecc0c469f277 ("autofs: don't fail mount for transient error") Signed-off-by: NeilBrown ---

Re: [PATCH 4.4 20/96] autofs: dont fail mount for transient error

2017-12-05 Thread NeilBrown
On Tue, Dec 05 2017, Ben Hutchings wrote: > On Tue, 2017-11-28 at 11:22 +0100, Greg Kroah-Hartman wrote: >> 4.4-stable review patch.  If anyone has any objections, please let me know. >> >> ------ >> >> From: NeilBrown >> >> commit ecc0

[PATCH] staging: lustre: lnet: Fix recent breakage from list_for_each conversion

2017-12-13 Thread NeilBrown
would likely crash if the list was not empty. Restore correct functionality by using code-flow rather the value of "route2" to determine whether to use on old route, or to add a new one. Fixes: 8e55b6fd0660 ("staging: lustre: lnet: replace list_for_each with list_for_each_entry") Sign

Re: [PATCH 01/19] fs: new API for handling inode->i_version

2017-12-15 Thread NeilBrown
On Wed, Dec 13 2017, Jeff Layton wrote: > On Thu, 2017-12-14 at 09:04 +1100, NeilBrown wrote: >> On Wed, Dec 13 2017, Jeff Layton wrote: >> >> > +/* >> > + * The change attribute (i_version) is mandated by NFSv4 and is mostly for >> > + * knfsd, but

Re: [PATCH/RFC] NFS: add nostatflush mount option.

2017-12-21 Thread NeilBrown
On Thu, Dec 21 2017, Chuck Lever wrote: > Hi Neil- > > >> On Dec 20, 2017, at 9:57 PM, NeilBrown wrote: >> >> >> When an i_op->getattr() call is made on an NFS file >> (typically from a 'stat' family system call), NFS >> will first flush a

Re: [PATCH/RFC] NFS: add nostatflush mount option.

2017-12-21 Thread NeilBrown
On Thu, Dec 21 2017, Trond Myklebust wrote: > On Thu, 2017-12-21 at 10:39 -0500, Chuck Lever wrote: >> Hi Neil- >> >> >> > On Dec 20, 2017, at 9:57 PM, NeilBrown wrote: >> > >> > >> > When an i_op->getattr() call is made on an NFS

Re: [PATCH/RFC] NFS: add nostatflush mount option.

2017-12-21 Thread NeilBrown
On Thu, Dec 21 2017, Trond Myklebust wrote: > On Fri, 2017-12-22 at 07:59 +1100, NeilBrown wrote: >> On Thu, Dec 21 2017, Trond Myklebust wrote: >> >> > On Thu, 2017-12-21 at 10:39 -0500, Chuck Lever wrote: >> > > Hi Neil- >> > > >> >

[PATCH 0/2] Add new wait_event macros to support lustre

2017-12-21 Thread NeilBrown
functionalty to wait.h so that lustre can be fully moved away from l_wait_event() Thanks, NeilBrown --- NeilBrown (2): sched/wait: add wait_event_idle() functions. sched/wait: add wait_event_idle_exclusive_lifo() include/linux/wait.h | 170

[PATCH 1/2] sched/wait: add wait_event_idle() functions.

2017-12-21 Thread NeilBrown
because lustre needs them before it can discard its own l_wait_event() macro. Signed-off-by: NeilBrown --- include/linux/wait.h | 77 ++ 1 file changed, 77 insertions(+) diff --git a/include/linux/wait.h b/include/linux/wait.h index 158715445ffb

[PATCH 2/2] sched/wait: add wait_event_idle_exclusive_lifo()

2017-12-21 Thread NeilBrown
a new WQ_FLAG_LIFO which causes prepare_to_wait_event() to add to the head of the queue. This will be used to allow lustre's l_wait_event() to be replaced with more standard wait.h macros. Signed-off-by: NeilBrown --- include/linux/wait.h | 95

Re: [PATCH 1/2] sched/wait: add wait_event_idle() functions.

2017-12-22 Thread NeilBrown
[removing close lustre-devel list as requested, adding assorted Lustre individuals] On Fri, Dec 22 2017, Peter Zijlstra wrote: > On Fri, Dec 22, 2017 at 02:11:04PM +1100, NeilBrown wrote: >> The new TASK_IDLE state (TASK_UNINTERRUPTIBLE | __TASK_NOLOAD) >> is not much used.

Re: [PATCH 2/2] sched/wait: add wait_event_idle_exclusive_lifo()

2017-12-22 Thread NeilBrown
On Fri, Dec 22 2017, Peter Zijlstra wrote: > On Fri, Dec 22, 2017 at 02:11:04PM +1100, NeilBrown wrote: >> wait_event_*_exclusive() adds new waiters to the end of the >> quest, while non-exclusive wait_event adds to the head. >> >> This ensures that a wake_up

Re: [PATCH v4 01/19] fs: new API for handling inode->i_version

2017-12-22 Thread NeilBrown
> + > +#include > + > +/* > + * The change attribute (i_version) is mandated by NFSv4 and is mostly for > + * knfsd, but is also used for other purposes (e.g. IMA). The i_version must > + * appear different to observers if there was a change to the inode's data or > +

[PATCH 01/15] staging: lustre: lnet-lib: opencode some alloc/free functions.

2017-12-17 Thread NeilBrown
too. So with one exception where the alloc function is not trivial, open-code the alloc and free functions using kmalloc and kfree. Note that the 'size' used in lnet_md_alloc() is limited and less than a page because LNET_MAX_IOV is 256, so kvmalloc is not needed. Signed-off-by: NeilBrown

[PATCH SERIES 1: 00/15] staging:lustre: convert most LIBCFS*ALLOC to k*malloc

2017-12-17 Thread NeilBrown
wing proper analysis. I plan to send out several sets of lustre patches today (Christmas holiday reading :-) so I've labeled this "PATCH SERIES 1" to it is easier to apply them in the right order, if there are acceptable. Thanks, NeilBrown --- NeilBrown (15): staging: lustre: lnet

[PATCH 02/15] staging: lustre: lnet: discard CFS_ALLOC_PTR

2017-12-17 Thread NeilBrown
These trivial wrappers hurt readability and as they use kvmalloc, they are overly generic. So discard them and use kmalloc/kfree as is normal in Linux. Signed-off-by: NeilBrown --- .../lustre/include/linux/libcfs/libcfs_private.h |3 --- drivers/staging/lustre/lnet/lnet/net_fault.c

[PATCH 05/15] staging: lustre: lnet: selftest: don't allocate small strings.

2017-12-17 Thread NeilBrown
e which 99 bytes on the stack, instead of the 24 that would have been allocated for 64-bit pointers. Signed-off-by: NeilBrown --- drivers/staging/lustre/lnet/selftest/conctl.c | 180 - 1 file changed, 29 insertions(+), 151 deletions(-) diff --git a/drivers/staging/lustre/lne

[PATCH 04/15] staging: lustre: lnet: switch to cpumask_var_t

2017-12-17 Thread NeilBrown
() has been called on it. Signed-off-by: NeilBrown --- .../lustre/include/linux/libcfs/libcfs_cpu.h |4 - .../lustre/include/linux/libcfs/linux/linux-cpu.h |4 - .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c|6 + drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c|2

[PATCH 07/15] staging: lustre: change some LIBCFS_ALLOC calls to k?alloc(GFP_KERNEL)

2017-12-17 Thread NeilBrown
of location that need changing. As there are quite a lot, I've broken them up into several ad-hoc sets to avoid review-fatigue. Signed-off-by: NeilBrown --- .../lustre/include/linux/libcfs/libcfs_string.h|4 ++-- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c| 11

[PATCH 03/15] staging: lustre: replace simple cases of LIBCFS_ALLOC with kzalloc.

2017-12-17 Thread NeilBrown
option, or any of the other minor benefits of LIBCFS_ALLOC(). Signed-off-by: NeilBrown --- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c| 38 ++-- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c |4 +- .../lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c |4

[PATCH 06/15] staging: lustre: lnet: use kmalloc/kvmalloc in router_proc

2017-12-17 Thread NeilBrown
kvmalloc(). Signed-off-by: NeilBrown --- drivers/staging/lustre/lnet/lnet/router_proc.c | 34 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/staging/lustre/lnet/lnet/router_proc.c b/drivers/staging/lustre/lnet/lnet/router_proc.c index 06e20b314520

[PATCH 09/15] staging: lustre: more LIBCFS_ALLOC conversions to GFP_KERNEL allocations.

2017-12-17 Thread NeilBrown
None of these need GFP_NOFS so allocate directly. Change matching LIBCFS_FREE() to kfree() or kvfree(). Signed-off-by: NeilBrown --- .../staging/lustre/lnet/libcfs/linux/linux-cpu.c | 19 +++ drivers/staging/lustre/lnet/lnet/lib-eq.c |9 - drivers

[PATCH 08/15] staging: lustre: Convert more LIBCFS_ALLOC allocation to direct GFP_KERNEL

2017-12-17 Thread NeilBrown
None of these need to be GFP_NOFS, so use GFP_KERNEL explicitly with kmalloc(), kvmalloc(), or kvmalloc_array(). Changing matching LIBCFS_FREE() to kfree() or kvfree() Signed-off-by: NeilBrown --- .../lustre/lnet/libcfs/linux/linux-module.c|4 +- drivers/staging/lustre/lnet/libcfs

[PATCH 10/15] staging: lustre: more conversions to GFP_KERNEL allocations.

2017-12-17 Thread NeilBrown
These are not called from filesystem context, so use GFP_KERNEL, not LIBCFS_ALLOC(). Signed-off-by: NeilBrown --- drivers/staging/lustre/lnet/selftest/console.c | 57 +--- drivers/staging/lustre/lnet/selftest/framework.c |4 + drivers/staging/lustre/lnet/selftest

[PATCH 11/15] staging: lustre: lnet-route: use kmalloc for small allocation

2017-12-17 Thread NeilBrown
This allocation is reasonably small. As the function is called "*_locked", it might not be safe to perform a GFP_KERNEL allocation, so be safe and use GFP_NOFS. Signed-off-by: NeilBrown --- drivers/staging/lustre/lnet/lnet/router.c |5 ++--- 1 file changed, 2 insertions(+), 3

[PATCH 14/15] staging: lustre: opencode LIBCFS_ALLOC_ATOMIC calls.

2017-12-17 Thread NeilBrown
Just call kzalloc(GFP_ATOMIC) directly. We don't need the warning on failure. Signed-off-by: NeilBrown --- .../lustre/lustre/obdclass/lprocfs_status.c|7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c b

<    3   4   5   6   7   8   9   10   11   12   >