From peter.a.jones at intel.com Tue Oct 3 06:16:25 2017 From: peter.a.jones at intel.com (Jones, Peter A) Date: Tue, 3 Oct 2017 06:16:25 +0000 Subject: [lustre-devel] Lustre 2.10.1 released Message-ID: We are pleased to announce that the Lustre 2.10.1 Release has been declared GA and is available for download. You can also grab the source from git. Along with a number of useful bug fixes, this maintenance release includes the following notable enhancements over 2.10.0: * RHEL 7.4 support for Lustre Servers and Clients (LU-9816) * ZFS 0.7.1 is now the default version of ZFS used for the release (LU-8619) * RHEL 6.9 support for Lustre Clients (LU-9979) * Ubuntu 16.04 support for Lustre Clients * Patchless server build for ldiskfs is now routinely provided. Note that the patched kernel version must still be used to make use of project quotas * 4.9 Kernel support for Lustre client (LU-9183) * MOFED 4.1 support Details of changes since 2.10.0 can be found in the 2.10.1 change log. Please log any issues found in the issue tracking system. Thanks to all those who have contributed to the creation of this release. We are planning to release Lustre 2.10.2 during Q4. -------------- next part -------------- An HTML attachment was scrubbed... URL: From peter.a.jones at intel.com Tue Oct 3 07:30:36 2017 From: peter.a.jones at intel.com (Jones, Peter A) Date: Tue, 3 Oct 2017 07:30:36 +0000 Subject: [lustre-devel] FW: Lustre 2.10.1 released In-Reply-To: References: Message-ID: <4446146B-8BA5-46C3-87D7-A24A22FDBE30@intel.com> On 2017-10-02, 11:16 PM, "Jones, Peter A" > wrote: We are pleased to announce that the Lustre 2.10.1 Release has been declared GA and is available for download. You can also grab the source from git. Along with a number of useful bug fixes, this maintenance release includes the following notable enhancements over 2.10.0: * RHEL 7.4 support for Lustre Servers and Clients (LU-9816) * ZFS 0.7.1 is now the default version of ZFS used for the release (LU-8619) * RHEL 6.9 support for Lustre Clients (LU-9979) * Ubuntu 16.04 support for Lustre Clients * Patchless server build for ldiskfs is now routinely provided. Note that the patched kernel version must still be used to make use of project quotas * 4.9 Kernel support for Lustre client (LU-9183) * MOFED 4.1 support Details of changes since 2.10.0 can be found in the 2.10.1 change log. Please log any issues found in the issue tracking system. Thanks to all those who have contributed to the creation of this release. We are planning to release Lustre 2.10.2 during Q4. -------------- next part -------------- An HTML attachment was scrubbed... URL: From oleg.drokin at intel.com Thu Oct 12 05:48:42 2017 From: oleg.drokin at intel.com (Oleg Drokin) Date: Thu, 12 Oct 2017 01:48:42 -0400 Subject: [lustre-devel] New tag 2.10.54 Message-ID: <14F8A520-633E-4BFF-858B-F9EC08B09281@intel.com> Hello! I just tagged 2.10.54 in the Lustre master branch for Lustre community tree. Here's the changelog: Alex Zhuravlev (1): LU-9967 tests: run-llog to cleanup properly Amir Shehata (2): LU-9992 lnet: don't discover loopback interface LU-9904 lnet: reduce logging severity Andreas Dilger (1): LU-3308 tests: fix sanity/sanityn test_mkdir() usage Arshad Hussain (1): LU-9379 tests: Improve get_version to handle empty return value Ben Evans (2): LU-9221 jobstats: Create a pid-based hash for jobid values LU-9855 obdclass: Code cleanup Bob Glossman (3): LU-9966 test: add a skip test to test_411 LU-9979 kernel: kernel update RHEL6.9 [2.6.32-696.10.2.el6] LU-9978 kernel: kernel update RHEL7.4 [3.10.0-693.2.2.el7] Bruno Faccini (1): LU-9930 llite: only clear lli_sai if the setter Di Wang (1): LU-9840 lod: add ldo_dir_stripe_loaded Elena Gryaznova (2): LU-9980 tests: save specific facet in save_lustre_params() LU-9931 tests: : fix REQFAIL calculation Emoly Liu (2): LU-9682 nodemap: delete nids range from nodemap correctly LU-9929 nodemap: add default ACL unmapping handling Erich Focht (1): LU-9214 llite: enable readahead for small read_ahead_per_file Fan Yong (2): LU-9887 lfsck: calculate LFSCK speed properly LU-9995 lfsck: keep the LMV_HASH_FLAG_DEAD flag Frank Zago (1): LU-7988 hsm: split mdt_hsm_add_actions() Henri Doreau (1): LU-8400 mdd: remove OBD_IOC_GET_MNTOPT James Nunez (1): LU-10024 tests: sanity 120f restore stripe count option James Simmons (3): LU-8541 ldlm: don't use jiffies as sysfs parameter LU-9558 tests: add completion.h header to kinode.c LU-9019 ptlrpc: migrate pinger to 64 bit time Jinshan Xiong (2): LU-9574 llite: pipeline readahead better with large I/O LU-9802 pfl: swapping lcm_entry_count correctly Minh Diep (1): LU-9996 build: include MOFED lib Nathaniel Clark (2): LU-9888 tests: Update disk2_7-zfs.tar.bz2 for quota LU-9960 osd-zfs: don't auto-upgrade quota Olaf Weber (1): LU-9933 lnet: Handle ping buffer with only loopback NID Oleg Drokin (5): LU-9995 lfsck: Have LMV_HASH_FLAG_DEAD defined for a while longer LU-8066 obd: make ldebugfs_remove recursive LU-8066 lnet: port lnet router to debugfs Revert "LU-9810 lnet: prefer Fast Reg" New tag 2.10.54 Patrick Farrell (2): LU-6179 llite: Implement ladvise lockahead LU-7802 ldlm: No -EINVAL for canceled != unused Wang Shilong (1): LU-10011 utils: suppress annoying messages for project quota dilip krishnagiri (1): LU-9963 test: add parallel-scale tests to ALWAYS_EXCEPT From andreas.dilger at intel.com Tue Oct 17 22:56:21 2017 From: andreas.dilger at intel.com (Dilger, Andreas) Date: Tue, 17 Oct 2017 22:56:21 +0000 Subject: [lustre-devel] [PATCH 02/20] staging: lustre: lnet: socklnd: mark expected switch fall-through In-Reply-To: References: Message-ID: <236BFBC5-3722-413F-A8F9-1273E2221A24@intel.com> 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, since LASSERT() never returns, but not harmful either. Reviewed-by: Andreas Dilger > --- > drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c > index d0ee58d..7b014ca 100644 > --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c > +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c > @@ -2308,7 +2308,7 @@ ksocknal_base_shutdown(void) > switch (ksocknal_data.ksnd_init) { > default: > LASSERT(0); > - > + /* fall through */ > case SOCKNAL_INIT_ALL: > case SOCKNAL_INIT_DATA: > LASSERT(ksocknal_data.ksnd_peers); > -- > 2.7.4 > Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation From andreas.dilger at intel.com Tue Oct 17 22:57:37 2017 From: andreas.dilger at intel.com (Dilger, Andreas) Date: Tue, 17 Oct 2017 22:57:37 +0000 Subject: [lustre-devel] [PATCH 05/20] staging: lustre: lnet: net_fault: mark expected switch fall-through In-Reply-To: References: Message-ID: <0EFF5864-9A26-49AA-B527-47BA1EC3C079@intel.com> 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 "continue;", but doesn't appear harmful. Reviewed-by: Andreas Dilger > --- > drivers/staging/lustre/lnet/lnet/net_fault.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/staging/lustre/lnet/lnet/net_fault.c b/drivers/staging/lustre/lnet/lnet/net_fault.c > index 03f3d18..7391e16 100644 > --- a/drivers/staging/lustre/lnet/lnet/net_fault.c > +++ b/drivers/staging/lustre/lnet/lnet/net_fault.c > @@ -629,6 +629,7 @@ delayed_msg_process(struct list_head *msg_list, bool drop) > case LNET_CREDIT_OK: > lnet_ni_recv(ni, msg->msg_private, msg, 0, > 0, msg->msg_len, msg->msg_len); > + /* fall through */ > case LNET_CREDIT_WAIT: > continue; > default: /* failures */ > -- > 2.7.4 > Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation From andreas.dilger at intel.com Tue Oct 17 22:58:41 2017 From: andreas.dilger at intel.com (Dilger, Andreas) Date: Tue, 17 Oct 2017 22:58:41 +0000 Subject: [lustre-devel] [PATCH 14/20] staging: lustre: lnet: selftest: mark expected switch fall-throughs In-Reply-To: <498af25d3ec36c899f8b3071ce32c7937a4a038f.1507781178.git.garsilva@embeddedor.com> References: <498af25d3ec36c899f8b3071ce32c7937a4a038f.1507781178.git.garsilva@embeddedor.com> Message-ID: 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 > --- > drivers/staging/lustre/lnet/selftest/module.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/staging/lustre/lnet/selftest/module.c b/drivers/staging/lustre/lnet/selftest/module.c > index b5d556f..fa1bccc 100644 > --- a/drivers/staging/lustre/lnet/selftest/module.c > +++ b/drivers/staging/lustre/lnet/selftest/module.c > @@ -57,10 +57,13 @@ lnet_selftest_exit(void) > switch (lst_init_step) { > case LST_INIT_CONSOLE: > lstcon_console_fini(); > + /* fall through */ > case LST_INIT_FW: > sfw_shutdown(); > + /* fall through */ > case LST_INIT_RPC: > srpc_shutdown(); > + /* fall through */ > case LST_INIT_WI_TEST: > for (i = 0; > i < cfs_cpt_number(lnet_cpt_table()); i++) { > @@ -72,7 +75,7 @@ lnet_selftest_exit(void) > sizeof(lst_sched_test[0]) * > cfs_cpt_number(lnet_cpt_table())); > lst_sched_test = NULL; > - > + /* fall through */ > case LST_INIT_WI_SERIAL: > cfs_wi_sched_destroy(lst_sched_serial); > lst_sched_serial = NULL; > -- > 2.7.4 > Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation From andreas.dilger at intel.com Tue Oct 17 23:00:02 2017 From: andreas.dilger at intel.com (Dilger, Andreas) Date: Tue, 17 Oct 2017 23:00:02 +0000 Subject: [lustre-devel] [PATCH 15/20] staging: lustre: llite: mark expected switch fall-through In-Reply-To: <661e7cdf247c7662f4f27ac7c54fb4636fd9c1e3.1507781178.git.garsilva@embeddedor.com> References: <661e7cdf247c7662f4f27ac7c54fb4636fd9c1e3.1507781178.git.garsilva@embeddedor.com> Message-ID: <0B7757C2-00D8-47E2-A30D-B7C394E12832@intel.com> > 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 "for mode = 0" comment to a separate line? Not the end of the world though. Reviewed-by: Andreas Dilger > --- > drivers/staging/lustre/lustre/llite/namei.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c > index 5cc2b32..55e0d03 100644 > --- a/drivers/staging/lustre/lustre/llite/namei.c > +++ b/drivers/staging/lustre/lustre/llite/namei.c > @@ -949,7 +949,9 @@ static int ll_mknod(struct inode *dir, struct dentry *dchild, > > switch (mode & S_IFMT) { > case 0: > - mode |= S_IFREG; /* for mode = 0 case, fallthrough */ > + mode |= S_IFREG; > + /* for mode = 0 case */ > + /* fall through */ > case S_IFREG: > case S_IFCHR: > case S_IFBLK: > -- > 2.7.4 > Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation From andreas.dilger at intel.com Tue Oct 17 23:00:26 2017 From: andreas.dilger at intel.com (Dilger, Andreas) Date: Tue, 17 Oct 2017 23:00:26 +0000 Subject: [lustre-devel] [PATCH 16/20] staging: lustre: lprocfs: mark expected switch fall-throughs In-Reply-To: <734912e09d855035cfa64746101cc24b8695bf3e.1507781178.git.garsilva@embeddedor.com> References: <734912e09d855035cfa64746101cc24b8695bf3e.1507781178.git.garsilva@embeddedor.com> Message-ID: <113524DE-3EF5-4437-A1AF-93D5CCD85A93@intel.com> 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 > Addresses-Coverity-ID: 1271169 > Signed-off-by: Gustavo A. R. Silva Reviewed-by: Andreas Dilger > --- > drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c > index e79485b..4ec582f 100644 > --- a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c > +++ b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c > @@ -1507,12 +1507,16 @@ int lprocfs_write_frac_u64_helper(const char __user *buffer, > switch (tolower(*end)) { > case 'p': > units <<= 10; > + /* fall through */ > case 't': > units <<= 10; > + /* fall through */ > case 'g': > units <<= 10; > + /* fall through */ > case 'm': > units <<= 10; > + /* fall through */ > case 'k': > units <<= 10; > } > -- > 2.7.4 > Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation From andreas.dilger at intel.com Tue Oct 17 23:01:52 2017 From: andreas.dilger at intel.com (Dilger, Andreas) Date: Tue, 17 Oct 2017 23:01:52 +0000 Subject: [lustre-devel] [PATCH 17/20] staging: lustre: ldlm: mark expected switch fall-through In-Reply-To: References: Message-ID: <0BB0D9A1-2A0E-415F-B772-72C9C069FD18@intel.com> 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 > --- > drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c > index f3bf238..6943987 100644 > --- a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c > +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c > @@ -1175,6 +1175,7 @@ ldlm_cancel_no_wait_policy(struct ldlm_namespace *ns, struct ldlm_lock *lock, > case LDLM_IBITS: > if (ns->ns_cancel && ns->ns_cancel(lock) != 0) > break; > + /* fall through */ > default: > result = LDLM_POLICY_SKIP_LOCK; > lock_res_and_lock(lock); > -- > 2.7.4 > Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation From andreas.dilger at intel.com Tue Oct 17 23:04:00 2017 From: andreas.dilger at intel.com (Dilger, Andreas) Date: Tue, 17 Oct 2017 23:04:00 +0000 Subject: [lustre-devel] [PATCH 19/20] staging: lustre: ptlrpc: mark expected switch fall-throughs In-Reply-To: References: Message-ID: 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 > --- > drivers/staging/lustre/lustre/ptlrpc/pack_generic.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c > index aad4ff1..a3664c1 100644 > --- a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c > +++ b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c > @@ -786,7 +786,7 @@ __u32 lustre_msg_get_flags(struct lustre_msg *msg) > > CERROR("invalid msg %p: no ptlrpc body!\n", msg); > } > - /* no break */ > + /* fall through */ > default: > /* flags might be printed in debug code while message > * uninitialized > @@ -854,7 +854,7 @@ __u32 lustre_msg_get_op_flags(struct lustre_msg *msg) > > CERROR("invalid msg %p: no ptlrpc body!\n", msg); > } > - /* no break */ > + /* fall through */ > default: > return 0; > } > @@ -1035,7 +1035,7 @@ int lustre_msg_get_status(struct lustre_msg *msg) > > CERROR("invalid msg %p: no ptlrpc body!\n", msg); > } > - /* no break */ > + /* fall through */ > default: > /* status might be printed in debug code while message > * uninitialized > -- > 2.7.4 > Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation From andreas.dilger at intel.com Tue Oct 17 23:05:05 2017 From: andreas.dilger at intel.com (Dilger, Andreas) Date: Tue, 17 Oct 2017 23:05:05 +0000 Subject: [lustre-devel] [PATCH 20/20] staging: lustre: rpc: mark expected switch fall-throughs In-Reply-To: <93be012259825eb72c235b293f44e729797b38c9.1507781178.git.garsilva@embeddedor.com> References: <93be012259825eb72c235b293f44e729797b38c9.1507781178.git.garsilva@embeddedor.com> Message-ID: <6EFF7C2E-4962-49DE-A71A-072C9E9FCBC1@intel.com> 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. Silva Reviewed-by: Andreas Dilger > --- > drivers/staging/lustre/lnet/selftest/rpc.c | 13 +++++++++---- > 1 file changed, 9 insertions(+), 4 deletions(-) > > diff --git a/drivers/staging/lustre/lnet/selftest/rpc.c b/drivers/staging/lustre/lnet/selftest/rpc.c > index 77c222c..74ef3c3 100644 > --- a/drivers/staging/lustre/lnet/selftest/rpc.c > +++ b/drivers/staging/lustre/lnet/selftest/rpc.c > @@ -1037,6 +1037,7 @@ srpc_handle_rpc(struct swi_workitem *wi) > ev->ev_status = rc; > } > } > + /* fall through */ > case SWI_STATE_BULK_STARTED: > LASSERT(!rpc->srpc_bulk || ev->ev_fired); > > @@ -1237,7 +1238,8 @@ srpc_send_rpc(struct swi_workitem *wi) > break; > > wi->swi_state = SWI_STATE_REQUEST_SENT; > - /* perhaps more events, fall thru */ > + /* perhaps more events */ > + /* fall through */ > case SWI_STATE_REQUEST_SENT: { > enum srpc_msg_type type = srpc_service2reply(rpc->crpc_service); > > @@ -1269,6 +1271,7 @@ srpc_send_rpc(struct swi_workitem *wi) > > wi->swi_state = SWI_STATE_REPLY_RECEIVED; > } > + /* fall through */ > case SWI_STATE_REPLY_RECEIVED: > if (do_bulk && !rpc->crpc_bulkev.ev_fired) > break; > @@ -1448,6 +1451,7 @@ srpc_lnet_ev_handler(struct lnet_event *ev) > srpc_data.rpc_counters.rpcs_sent++; > spin_unlock(&srpc_data.rpc_glock); > } > + /* fall through */ > case SRPC_REPLY_RCVD: > case SRPC_BULK_REQ_RCVD: > crpc = rpcev->ev_data; > @@ -1570,7 +1574,7 @@ srpc_lnet_ev_handler(struct lnet_event *ev) > > if (!ev->unlinked) > break; /* wait for final event */ > - > + /* fall through */ > case SRPC_BULK_PUT_SENT: > if (!ev->status && ev->type != LNET_EVENT_UNLINK) { > spin_lock(&srpc_data.rpc_glock); > @@ -1582,6 +1586,7 @@ srpc_lnet_ev_handler(struct lnet_event *ev) > > spin_unlock(&srpc_data.rpc_glock); > } > + /* fall through */ > case SRPC_REPLY_SENT: > srpc = rpcev->ev_data; > scd = srpc->srpc_scd; > @@ -1674,14 +1679,14 @@ srpc_shutdown(void) > spin_unlock(&srpc_data.rpc_glock); > > stt_shutdown(); > - > + /* fall through */ > case SRPC_STATE_EQ_INIT: > rc = LNetClearLazyPortal(SRPC_FRAMEWORK_REQUEST_PORTAL); > rc = LNetClearLazyPortal(SRPC_REQUEST_PORTAL); > LASSERT(!rc); > rc = LNetEQFree(srpc_data.rpc_lnet_eq); > LASSERT(!rc); /* the EQ should have no user by now */ > - > + /* fall through */ > case SRPC_STATE_NI_INIT: > LNetNIFini(); > } > -- > 2.7.4 > Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation From andreas.dilger at intel.com Tue Oct 17 23:05:39 2017 From: andreas.dilger at intel.com (Dilger, Andreas) Date: Tue, 17 Oct 2017 23:05:39 +0000 Subject: [lustre-devel] [PATCH 12/20] staging: lustre: lnet: selftest: mark expected switch fall-through In-Reply-To: <4633f85babbbeb119e318a9c319c8a49d68f6f13.1507781178.git.garsilva@embeddedor.com> References: <4633f85babbbeb119e318a9c319c8a49d68f6f13.1507781178.git.garsilva@embeddedor.com> Message-ID: 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 > --- > drivers/staging/lustre/lnet/selftest/conctl.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/staging/lustre/lnet/selftest/conctl.c b/drivers/staging/lustre/lnet/selftest/conctl.c > index 9619ecb..551e921 100644 > --- a/drivers/staging/lustre/lnet/selftest/conctl.c > +++ b/drivers/staging/lustre/lnet/selftest/conctl.c > @@ -151,6 +151,7 @@ lst_debug_ioctl(struct lstio_debug_args *args) > > case LST_OPC_BATCHSRV: > client = 0; > + /* fall through */ > case LST_OPC_BATCHCLI: > if (!name) > goto out; > -- > 2.7.4 > Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation From andreas.dilger at intel.com Tue Oct 17 23:03:36 2017 From: andreas.dilger at intel.com (Dilger, Andreas) Date: Tue, 17 Oct 2017 23:03:36 +0000 Subject: [lustre-devel] [PATCH 18/20] staging: lustre: osc: mark expected switch fall-through In-Reply-To: References: Message-ID: <274B25B3-8F82-4DDA-87F9-419C7F3BC510@intel.com> 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 Reviewed-by: Andreas Dilger > --- > drivers/staging/lustre/lustre/osc/osc_cache.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/staging/lustre/lustre/osc/osc_cache.c b/drivers/staging/lustre/lustre/osc/osc_cache.c > index e1207c2..eab7759 100644 > --- a/drivers/staging/lustre/lustre/osc/osc_cache.c > +++ b/drivers/staging/lustre/lustre/osc/osc_cache.c > @@ -227,6 +227,7 @@ static int osc_extent_sanity_check0(struct osc_extent *ext, > rc = 65; > goto out; > } > + /* fall through */ > default: > if (atomic_read(&ext->oe_users) > 0) { > rc = 70; > -- > 2.7.4 > Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation From neilb at suse.com Fri Oct 20 00:39:50 2017 From: neilb at suse.com (NeilBrown) Date: Fri, 20 Oct 2017 11:39:50 +1100 Subject: [lustre-devel] [PATCH 0/6] dcache/namei fixes for lustre In-Reply-To: References: <150164273003.13199.7841976922211510658.stgit@noble> Message-ID: <87k1zqfy95.fsf@notabene.neil.brown.name> On Sun, Aug 20 2017, James Simmons wrote: >> This series is a revised version of two patches I sent >> previously (one of which was sadly broken). >> That patch has been broken into multiple parts for easy >> review. The other is included unchanged as the last of >> this series. >> >> I was drawn to look at this code due to the tests on >> DCACHE_DISCONNECTED which are often wrong, and it turns out >> they are used wrongly in lustre too. Fixing one led to some >> clean-up. Fixing the other is straight forward. >> >> A particular change here from the previous posting is >> the first patch which tests for DCACHE_PAR_LOOKUP in ll_dcompare(). >> Without this patch, two threads can be looking up the same >> name in a given directory in parallel. This parallelism lead >> to my concerns about needing improved locking in ll_splice_alias(). >> Instead of improving the locking, I now avoid the need for it >> by fixing ll_dcompare. >> >> This code passes basic "smoke tests". >> >> Note that the cast to "struct dentry *" in the first patch is because >> we have a "const struct dentry *" but d_in_lookup() requires a >> pointer to a non-const structure. I'll send a separate patch to >> change d_in_lookup(). > > To let you know this patch has been under going testing and we have a > ticket open to track the progess: > > https://jira.hpdd.intel.com/browse/LU-9868 > > Your patch did reveal that a piece of a fix landed earlier is missing :-( > So currently the client can oops. I will send the fix shortly but this > work will have to rebased after. As soon as we can get some cycles we will > figure out what is going on. Thanks for helping out. Hi, what happened about this? I had a look around the ticket and couldn't find anything about an oops. If there is still a problem I'd be very happy to help work out what it is - but I don't know where to look. Thanks, NeilBrown -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 832 bytes Desc: not available URL: From neilb at suse.com Mon Oct 23 00:53:49 2017 From: neilb at suse.com (NeilBrown) Date: Mon, 23 Oct 2017 11:53:49 +1100 Subject: [lustre-devel] [PATCH 0/9] Assorted cleanups for staging/.../lustre/ldlm/ldlm_flock.c Message-ID: <150871988297.3340.4522589460981284121.stgit@noble> This file contains quite a bit of dead code and unused variables. This patch series cleans it up in various ways. It should change behaviour at all, just code readability/maintainabilty. I sent the back in July but got not response, possibly because there were included with other patches which caused a distraction. So here they are by themselves. Thanks, NeilBrown --- NeilBrown (9): staging: lustre: ldlm: remove 'first_enq' arg from ldlm_process_flock_lock() staging: lustre: ldlm: remove unused 'work_list' arg from ldlm_process_flock_lock() staging: lustre: ldlm: remove unneeded 'err' arg to ldlm_process_flock_lock() staging: lustre: ldlm: remove 'flags' arg from ldlm_process_flock_lock() staging: lustre: ldlm: remove unused 'overlaps' variable staging: lustre: ldlm: remove 'flags' arg from ldlm_flock_destroy() staging: lustre: ldlm: tidy list walking in ldlm_flock() staging: lustre: ldlm: remove unnecessary 'ownlocks' variable. staging: lustre: ldlm: remove unused field 'fwd_generation' drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 208 +++++------------------ 1 file changed, 42 insertions(+), 166 deletions(-) -- Signature From neilb at suse.com Mon Oct 23 00:53:49 2017 From: neilb at suse.com (NeilBrown) Date: Mon, 23 Oct 2017 11:53:49 +1100 Subject: [lustre-devel] [PATCH 1/9] staging: lustre: ldlm: remove 'first_enq' arg from ldlm_process_flock_lock() In-Reply-To: <150871988297.3340.4522589460981284121.stgit@noble> References: <150871988297.3340.4522589460981284121.stgit@noble> Message-ID: <150872002958.3340.14294625301256962751.stgit@noble> it is only ever set to '1', so we can just assume that and remove the code. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c index cb826e9e840e..f719dc05e1ea 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c @@ -121,15 +121,9 @@ ldlm_flock_destroy(struct ldlm_lock *lock, enum ldlm_mode mode, __u64 flags) * It is also responsible for splitting a lock if a portion of the lock * is released. * - * If \a first_enq is 0 (ie, called from ldlm_reprocess_queue): - * - blocking ASTs have already been sent - * - * If \a first_enq is 1 (ie, called from ldlm_lock_enqueue): - * - blocking ASTs have not been sent yet, so list of conflicting locks - * would be collected and ASTs sent. */ static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags, - int first_enq, enum ldlm_error *err, + enum ldlm_error *err, struct list_head *work_list) { struct ldlm_resource *res = req->l_resource; @@ -197,11 +191,6 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags, if (!ldlm_flocks_overlap(lock, req)) continue; - if (!first_enq) { - reprocess_failed = 1; - continue; - } - if (*flags & LDLM_FL_BLOCK_NOWAIT) { ldlm_flock_destroy(req, mode, *flags); *err = -EAGAIN; @@ -605,7 +594,7 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data) /* We need to reprocess the lock to do merges or splits * with existing locks owned by this process. */ - ldlm_process_flock_lock(lock, &noreproc, 1, &err, NULL); + ldlm_process_flock_lock(lock, &noreproc, &err, NULL); } unlock_res_and_lock(lock); return rc; From neilb at suse.com Mon Oct 23 00:53:49 2017 From: neilb at suse.com (NeilBrown) Date: Mon, 23 Oct 2017 11:53:49 +1100 Subject: [lustre-devel] [PATCH 2/9] staging: lustre: ldlm: remove unused 'work_list' arg from ldlm_process_flock_lock() In-Reply-To: <150871988297.3340.4522589460981284121.stgit@noble> References: <150871988297.3340.4522589460981284121.stgit@noble> Message-ID: <150872002962.3340.16967380600702796184.stgit@noble> 'work_list' is only set to NULL, and is never used. So discard it. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c index f719dc05e1ea..766653b4d8a5 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c @@ -123,8 +123,7 @@ ldlm_flock_destroy(struct ldlm_lock *lock, enum ldlm_mode mode, __u64 flags) * */ static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags, - enum ldlm_error *err, - struct list_head *work_list) + enum ldlm_error *err) { struct ldlm_resource *res = req->l_resource; struct ldlm_namespace *ns = ldlm_res_to_ns(res); @@ -594,7 +593,7 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data) /* We need to reprocess the lock to do merges or splits * with existing locks owned by this process. */ - ldlm_process_flock_lock(lock, &noreproc, &err, NULL); + ldlm_process_flock_lock(lock, &noreproc, &err); } unlock_res_and_lock(lock); return rc; From neilb at suse.com Mon Oct 23 00:53:49 2017 From: neilb at suse.com (NeilBrown) Date: Mon, 23 Oct 2017 11:53:49 +1100 Subject: [lustre-devel] [PATCH 3/9] staging: lustre: ldlm: remove unneeded 'err' arg to ldlm_process_flock_lock() In-Reply-To: <150871988297.3340.4522589460981284121.stgit@noble> References: <150871988297.3340.4522589460981284121.stgit@noble> Message-ID: <150872002965.3340.8937896457096417746.stgit@noble> This arg is used to return an error code, but the returned code is never looked at. So there is no point returning it. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c index 766653b4d8a5..05e6b67b0e72 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c @@ -122,8 +122,7 @@ ldlm_flock_destroy(struct ldlm_lock *lock, enum ldlm_mode mode, __u64 flags) * is released. * */ -static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags, - enum ldlm_error *err) +static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags) { struct ldlm_resource *res = req->l_resource; struct ldlm_namespace *ns = ldlm_res_to_ns(res); @@ -145,8 +144,6 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags, req->l_policy_data.l_flock.start, req->l_policy_data.l_flock.end); - *err = ELDLM_OK; - /* No blocking ASTs are sent to the clients for * Posix file & record locks */ @@ -192,7 +189,6 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags, if (*flags & LDLM_FL_BLOCK_NOWAIT) { ldlm_flock_destroy(req, mode, *flags); - *err = -EAGAIN; return LDLM_ITER_STOP; } @@ -330,7 +326,6 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags, if (IS_ERR(new2)) { ldlm_flock_destroy(req, lock->l_granted_mode, *flags); - *err = PTR_ERR(new2); return LDLM_ITER_STOP; } goto reprocess; @@ -440,7 +435,6 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data) struct obd_import *imp = NULL; struct ldlm_flock_wait_data fwd; struct l_wait_info lwi; - enum ldlm_error err; int rc = 0; OBD_FAIL_TIMEOUT(OBD_FAIL_LDLM_CP_CB_WAIT2, 4); @@ -593,7 +587,7 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data) /* We need to reprocess the lock to do merges or splits * with existing locks owned by this process. */ - ldlm_process_flock_lock(lock, &noreproc, &err); + ldlm_process_flock_lock(lock, &noreproc); } unlock_res_and_lock(lock); return rc; From neilb at suse.com Mon Oct 23 00:53:49 2017 From: neilb at suse.com (NeilBrown) Date: Mon, 23 Oct 2017 11:53:49 +1100 Subject: [lustre-devel] [PATCH 4/9] staging: lustre: ldlm: remove 'flags' arg from ldlm_process_flock_lock() In-Reply-To: <150871988297.3340.4522589460981284121.stgit@noble> References: <150871988297.3340.4522589460981284121.stgit@noble> Message-ID: <150872002969.3340.14527228729799786026.stgit@noble> This is only ever set to LDLM_FL_WAIT_NOREPROC, so we can remove the arg and discard any code that is only run when it doesn't have that value. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 110 ++++------------------- 1 file changed, 21 insertions(+), 89 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c index 05e6b67b0e72..2d1fa2b33129 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c @@ -122,7 +122,7 @@ ldlm_flock_destroy(struct ldlm_lock *lock, enum ldlm_mode mode, __u64 flags) * is released. * */ -static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags) +static int ldlm_process_flock_lock(struct ldlm_lock *req) { struct ldlm_resource *res = req->l_resource; struct ldlm_namespace *ns = ldlm_res_to_ns(res); @@ -138,8 +138,8 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags) const struct ldlm_callback_suite null_cbs = { }; CDEBUG(D_DLMTRACE, - "flags %#llx owner %llu pid %u mode %u start %llu end %llu\n", - *flags, new->l_policy_data.l_flock.owner, + "owner %llu pid %u mode %u start %llu end %llu\n", + new->l_policy_data.l_flock.owner, new->l_policy_data.l_flock.pid, mode, req->l_policy_data.l_flock.start, req->l_policy_data.l_flock.end); @@ -150,74 +150,16 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags) req->l_blocking_ast = NULL; reprocess: - if ((*flags == LDLM_FL_WAIT_NOREPROC) || (mode == LCK_NL)) { - /* This loop determines where this processes locks start - * in the resource lr_granted list. - */ - list_for_each(tmp, &res->lr_granted) { - lock = list_entry(tmp, struct ldlm_lock, - l_res_link); - if (ldlm_same_flock_owner(lock, req)) { - ownlocks = tmp; - break; - } - } - } else { - int reprocess_failed = 0; - - lockmode_verify(mode); - - /* This loop determines if there are existing locks - * that conflict with the new lock request. - */ - list_for_each(tmp, &res->lr_granted) { - lock = list_entry(tmp, struct ldlm_lock, - l_res_link); - - if (ldlm_same_flock_owner(lock, req)) { - if (!ownlocks) - ownlocks = tmp; - continue; - } - - /* locks are compatible, overlap doesn't matter */ - if (lockmode_compat(lock->l_granted_mode, mode)) - continue; - - if (!ldlm_flocks_overlap(lock, req)) - continue; - - if (*flags & LDLM_FL_BLOCK_NOWAIT) { - ldlm_flock_destroy(req, mode, *flags); - return LDLM_ITER_STOP; - } - - if (*flags & LDLM_FL_TEST_LOCK) { - ldlm_flock_destroy(req, mode, *flags); - req->l_req_mode = lock->l_granted_mode; - req->l_policy_data.l_flock.pid = - lock->l_policy_data.l_flock.pid; - req->l_policy_data.l_flock.start = - lock->l_policy_data.l_flock.start; - req->l_policy_data.l_flock.end = - lock->l_policy_data.l_flock.end; - *flags |= LDLM_FL_LOCK_CHANGED; - return LDLM_ITER_STOP; - } - - ldlm_resource_add_lock(res, &res->lr_waiting, req); - *flags |= LDLM_FL_BLOCK_GRANTED; - return LDLM_ITER_STOP; + /* This loop determines where this processes locks start + * in the resource lr_granted list. + */ + list_for_each(tmp, &res->lr_granted) { + lock = list_entry(tmp, struct ldlm_lock, + l_res_link); + if (ldlm_same_flock_owner(lock, req)) { + ownlocks = tmp; + break; } - if (reprocess_failed) - return LDLM_ITER_CONTINUE; - } - - if (*flags & LDLM_FL_TEST_LOCK) { - ldlm_flock_destroy(req, mode, *flags); - req->l_req_mode = LCK_NL; - *flags |= LDLM_FL_LOCK_CHANGED; - return LDLM_ITER_STOP; } /* Scan the locks owned by this process that overlap this request. @@ -267,7 +209,8 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags) } if (added) { - ldlm_flock_destroy(lock, mode, *flags); + ldlm_flock_destroy(lock, mode, + LDLM_FL_WAIT_NOREPROC); } else { new = lock; added = 1; @@ -293,7 +236,8 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags) new->l_policy_data.l_flock.end + 1; break; } - ldlm_flock_destroy(lock, lock->l_req_mode, *flags); + ldlm_flock_destroy(lock, lock->l_req_mode, + LDLM_FL_WAIT_NOREPROC); continue; } if (new->l_policy_data.l_flock.end >= @@ -325,7 +269,7 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags) lock_res_and_lock(req); if (IS_ERR(new2)) { ldlm_flock_destroy(req, lock->l_granted_mode, - *flags); + LDLM_FL_WAIT_NOREPROC); return LDLM_ITER_STOP; } goto reprocess; @@ -354,9 +298,8 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags) &new2->l_remote_handle, &new2->l_exp_hash); } - if (*flags == LDLM_FL_WAIT_NOREPROC) - ldlm_lock_addref_internal_nolock(new2, - lock->l_granted_mode); + ldlm_lock_addref_internal_nolock(new2, + lock->l_granted_mode); /* insert new2 at lock */ ldlm_resource_add_lock(res, ownlocks, new2); @@ -377,22 +320,13 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags) ldlm_resource_add_lock(res, ownlocks, req); } - if (*flags != LDLM_FL_WAIT_NOREPROC) { - /* The only one possible case for client-side calls flock - * policy function is ldlm_flock_completion_ast inside which - * carries LDLM_FL_WAIT_NOREPROC flag. - */ - CERROR("Illegal parameter for client-side-only module.\n"); - LBUG(); - } - /* In case we're reprocessing the requested lock we can't destroy * it until after calling ldlm_add_ast_work_item() above so that laawi() * can bump the reference count on \a req. Otherwise \a req * could be freed before the completion AST can be sent. */ if (added) - ldlm_flock_destroy(req, mode, *flags); + ldlm_flock_destroy(req, mode, LDLM_FL_WAIT_NOREPROC); ldlm_resource_dump(D_INFO, res); return LDLM_ITER_CONTINUE; @@ -582,12 +516,10 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data) getlk->fl_start = (loff_t)lock->l_policy_data.l_flock.start; getlk->fl_end = (loff_t)lock->l_policy_data.l_flock.end; } else { - __u64 noreproc = LDLM_FL_WAIT_NOREPROC; - /* We need to reprocess the lock to do merges or splits * with existing locks owned by this process. */ - ldlm_process_flock_lock(lock, &noreproc); + ldlm_process_flock_lock(lock); } unlock_res_and_lock(lock); return rc; From neilb at suse.com Mon Oct 23 00:53:49 2017 From: neilb at suse.com (NeilBrown) Date: Mon, 23 Oct 2017 11:53:49 +1100 Subject: [lustre-devel] [PATCH 6/9] staging: lustre: ldlm: remove 'flags' arg from ldlm_flock_destroy() In-Reply-To: <150871988297.3340.4522589460981284121.stgit@noble> References: <150871988297.3340.4522589460981284121.stgit@noble> Message-ID: <150872002976.3340.17760141414233585370.stgit@noble> The only value ever passed in LDLM_FL_WAIT_NOREPROC, so assume that instead of passing it. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 36 ++++++++++------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c index d5a5742a1171..1bf56892fcf5 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c @@ -88,24 +88,23 @@ ldlm_flocks_overlap(struct ldlm_lock *lock, struct ldlm_lock *new) } static inline void -ldlm_flock_destroy(struct ldlm_lock *lock, enum ldlm_mode mode, __u64 flags) +ldlm_flock_destroy(struct ldlm_lock *lock, enum ldlm_mode mode) { - LDLM_DEBUG(lock, "%s(mode: %d, flags: 0x%llx)", - __func__, mode, flags); + LDLM_DEBUG(lock, "%s(mode: %d)", + __func__, mode); /* Safe to not lock here, since it should be empty anyway */ LASSERT(hlist_unhashed(&lock->l_exp_flock_hash)); list_del_init(&lock->l_res_link); - if (flags == LDLM_FL_WAIT_NOREPROC) { - /* client side - set a flag to prevent sending a CANCEL */ - lock->l_flags |= LDLM_FL_LOCAL_ONLY | LDLM_FL_CBPENDING; - /* when reaching here, it is under lock_res_and_lock(). Thus, - * need call the nolock version of ldlm_lock_decref_internal - */ - ldlm_lock_decref_internal_nolock(lock, mode); - } + /* client side - set a flag to prevent sending a CANCEL */ + lock->l_flags |= LDLM_FL_LOCAL_ONLY | LDLM_FL_CBPENDING; + + /* when reaching here, it is under lock_res_and_lock(). Thus, + * need call the nolock version of ldlm_lock_decref_internal + */ + ldlm_lock_decref_internal_nolock(lock, mode); ldlm_lock_destroy_nolock(lock); } @@ -208,8 +207,7 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req) } if (added) { - ldlm_flock_destroy(lock, mode, - LDLM_FL_WAIT_NOREPROC); + ldlm_flock_destroy(lock, mode); } else { new = lock; added = 1; @@ -233,8 +231,7 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req) new->l_policy_data.l_flock.end + 1; break; } - ldlm_flock_destroy(lock, lock->l_req_mode, - LDLM_FL_WAIT_NOREPROC); + ldlm_flock_destroy(lock, lock->l_req_mode); continue; } if (new->l_policy_data.l_flock.end >= @@ -265,8 +262,7 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req) NULL, 0, LVB_T_NONE); lock_res_and_lock(req); if (IS_ERR(new2)) { - ldlm_flock_destroy(req, lock->l_granted_mode, - LDLM_FL_WAIT_NOREPROC); + ldlm_flock_destroy(req, lock->l_granted_mode); return LDLM_ITER_STOP; } goto reprocess; @@ -323,7 +319,7 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req) * could be freed before the completion AST can be sent. */ if (added) - ldlm_flock_destroy(req, mode, LDLM_FL_WAIT_NOREPROC); + ldlm_flock_destroy(req, mode); ldlm_resource_dump(D_INFO, res); return LDLM_ITER_CONTINUE; @@ -477,7 +473,7 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data) LDLM_DEBUG(lock, "client-side enqueue deadlock received"); rc = -EDEADLK; } - ldlm_flock_destroy(lock, mode, LDLM_FL_WAIT_NOREPROC); + ldlm_flock_destroy(lock, mode); unlock_res_and_lock(lock); /* Need to wake up the waiter if we were evicted */ @@ -498,7 +494,7 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data) * in the lock changes we can decref the appropriate refcount. */ LASSERT(ldlm_is_test_lock(lock)); - ldlm_flock_destroy(lock, getlk->fl_type, LDLM_FL_WAIT_NOREPROC); + ldlm_flock_destroy(lock, getlk->fl_type); switch (lock->l_granted_mode) { case LCK_PR: getlk->fl_type = F_RDLCK; From neilb at suse.com Mon Oct 23 00:53:49 2017 From: neilb at suse.com (NeilBrown) Date: Mon, 23 Oct 2017 11:53:49 +1100 Subject: [lustre-devel] [PATCH 5/9] staging: lustre: ldlm: remove unused 'overlaps' variable In-Reply-To: <150871988297.3340.4522589460981284121.stgit@noble> References: <150871988297.3340.4522589460981284121.stgit@noble> Message-ID: <150872002972.3340.9372825368625571993.stgit@noble> 'overlaps' is never used, only incremented. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c index 2d1fa2b33129..d5a5742a1171 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c @@ -133,7 +133,6 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req) struct ldlm_lock *new2 = NULL; enum ldlm_mode mode = req->l_req_mode; int added = (mode == LCK_NL); - int overlaps = 0; int splitted = 0; const struct ldlm_callback_suite null_cbs = { }; @@ -226,8 +225,6 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req) lock->l_policy_data.l_flock.start) break; - ++overlaps; - if (new->l_policy_data.l_flock.start <= lock->l_policy_data.l_flock.start) { if (new->l_policy_data.l_flock.end < From neilb at suse.com Mon Oct 23 00:53:49 2017 From: neilb at suse.com (NeilBrown) Date: Mon, 23 Oct 2017 11:53:49 +1100 Subject: [lustre-devel] [PATCH 9/9] staging: lustre: ldlm: remove unused field 'fwd_generation' In-Reply-To: <150871988297.3340.4522589460981284121.stgit@noble> References: <150871988297.3340.4522589460981284121.stgit@noble> Message-ID: <150872002986.3340.15607846693582678949.stgit@noble> With this field gone, we don't need local variables 'imp' or 'obd' any more. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c index 774d8667769a..9c0e9cd00000 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c @@ -311,7 +311,6 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req) struct ldlm_flock_wait_data { struct ldlm_lock *fwd_lock; - int fwd_generation; }; static void @@ -342,11 +341,9 @@ int ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data) { struct file_lock *getlk = lock->l_ast_data; - struct obd_device *obd; - struct obd_import *imp = NULL; - struct ldlm_flock_wait_data fwd; - struct l_wait_info lwi; - int rc = 0; + struct ldlm_flock_wait_data fwd; + struct l_wait_info lwi; + int rc = 0; OBD_FAIL_TIMEOUT(OBD_FAIL_LDLM_CP_CB_WAIT2, 4); if (OBD_FAIL_PRECHECK(OBD_FAIL_LDLM_CP_CB_WAIT3)) { @@ -374,18 +371,6 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data) LDLM_DEBUG(lock, "client-side enqueue returned a blocked lock, sleeping"); fwd.fwd_lock = lock; - obd = class_exp2obd(lock->l_conn_export); - - /* if this is a local lock, there is no import */ - if (obd) - imp = obd->u.cli.cl_import; - - if (imp) { - spin_lock(&imp->imp_lock); - fwd.fwd_generation = imp->imp_generation; - spin_unlock(&imp->imp_lock); - } - lwi = LWI_TIMEOUT_INTR(0, NULL, ldlm_flock_interrupted_wait, &fwd); /* Go to sleep until the lock is granted. */ From neilb at suse.com Mon Oct 23 00:53:49 2017 From: neilb at suse.com (NeilBrown) Date: Mon, 23 Oct 2017 11:53:49 +1100 Subject: [lustre-devel] [PATCH 7/9] staging: lustre: ldlm: tidy list walking in ldlm_flock() In-Reply-To: <150871988297.3340.4522589460981284121.stgit@noble> References: <150871988297.3340.4522589460981284121.stgit@noble> Message-ID: <150872002980.3340.10618324564169458593.stgit@noble> Use list_for_each_entry variants to avoid the explicit list_entry() calls. This allows us to use list_for_each_entry_safe_from() instread of adding a local list-walking macro. Also improve some comments so that it is more obvious that the locks are sorted per-owner and that we need to find the insertion point. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 45 ++++++++++------------- 1 file changed, 19 insertions(+), 26 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c index 1bf56892fcf5..0bf6dce1c5b1 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c @@ -59,17 +59,6 @@ #include #include "ldlm_internal.h" -/** - * list_for_remaining_safe - iterate over the remaining entries in a list - * and safeguard against removal of a list entry. - * \param pos the &struct list_head to use as a loop counter. pos MUST - * have been initialized prior to using it in this macro. - * \param n another &struct list_head to use as temporary storage - * \param head the head for your list. - */ -#define list_for_remaining_safe(pos, n, head) \ - for (n = pos->next; pos != (head); pos = n, n = pos->next) - static inline int ldlm_same_flock_owner(struct ldlm_lock *lock, struct ldlm_lock *new) { @@ -125,8 +114,8 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req) { struct ldlm_resource *res = req->l_resource; struct ldlm_namespace *ns = ldlm_res_to_ns(res); - struct list_head *tmp; - struct list_head *ownlocks = NULL; + struct ldlm_lock *tmp; + struct ldlm_lock *ownlocks = NULL; struct ldlm_lock *lock = NULL; struct ldlm_lock *new = req; struct ldlm_lock *new2 = NULL; @@ -151,23 +140,23 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req) /* This loop determines where this processes locks start * in the resource lr_granted list. */ - list_for_each(tmp, &res->lr_granted) { - lock = list_entry(tmp, struct ldlm_lock, - l_res_link); + list_for_each_entry(lock, &res->lr_granted, l_res_link) { if (ldlm_same_flock_owner(lock, req)) { - ownlocks = tmp; + ownlocks = lock; break; } } - /* Scan the locks owned by this process that overlap this request. + /* Scan the locks owned by this process to find the insertion point + * (as locks are ordered), and to handle overlaps. * We may have to merge or split existing locks. */ - if (!ownlocks) - ownlocks = &res->lr_granted; - - list_for_remaining_safe(ownlocks, tmp, &res->lr_granted) { - lock = list_entry(ownlocks, struct ldlm_lock, l_res_link); + if (ownlocks) + lock = ownlocks; + else + lock = list_entry(&res->lr_granted, + struct ldlm_lock, l_res_link); + list_for_each_entry_safe_from(lock, tmp, &res->lr_granted, l_res_link) { if (!ldlm_same_flock_owner(lock, new)) break; @@ -295,7 +284,7 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req) lock->l_granted_mode); /* insert new2 at lock */ - ldlm_resource_add_lock(res, ownlocks, new2); + ldlm_resource_add_lock(res, &lock->l_res_link, new2); LDLM_LOCK_RELEASE(new2); break; } @@ -309,8 +298,12 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req) if (!added) { list_del_init(&req->l_res_link); - /* insert new lock before ownlocks in list. */ - ldlm_resource_add_lock(res, ownlocks, req); + /* insert new lock before "lock", which might be the + * next lock for this owner, or might be the first + * lock for the next owner, or might not be a lock at + * all, but instead points at the head of the list + */ + ldlm_resource_add_lock(res, &lock->l_res_link, req); } /* In case we're reprocessing the requested lock we can't destroy From neilb at suse.com Mon Oct 23 00:53:49 2017 From: neilb at suse.com (NeilBrown) Date: Mon, 23 Oct 2017 11:53:49 +1100 Subject: [lustre-devel] [PATCH 8/9] staging: lustre: ldlm: remove unnecessary 'ownlocks' variable. In-Reply-To: <150871988297.3340.4522589460981284121.stgit@noble> References: <150871988297.3340.4522589460981284121.stgit@noble> Message-ID: <150872002983.3340.10585764760968162389.stgit@noble> Now that the code has been simplified, 'ownlocks' is not necessary. The loop which sets it exits with 'lock' having the same value as 'ownlocks', or pointing to the head of the list if ownlocks is NULL. The current code then tests ownlocks and sets 'lock' to exactly the value that it currently has. So discard 'ownlocks'. Also remove unnecessary initialization of 'lock'. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c index 0bf6dce1c5b1..774d8667769a 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c @@ -115,8 +115,7 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req) struct ldlm_resource *res = req->l_resource; struct ldlm_namespace *ns = ldlm_res_to_ns(res); struct ldlm_lock *tmp; - struct ldlm_lock *ownlocks = NULL; - struct ldlm_lock *lock = NULL; + struct ldlm_lock *lock; struct ldlm_lock *new = req; struct ldlm_lock *new2 = NULL; enum ldlm_mode mode = req->l_req_mode; @@ -140,22 +139,14 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req) /* This loop determines where this processes locks start * in the resource lr_granted list. */ - list_for_each_entry(lock, &res->lr_granted, l_res_link) { - if (ldlm_same_flock_owner(lock, req)) { - ownlocks = lock; + list_for_each_entry(lock, &res->lr_granted, l_res_link) + if (ldlm_same_flock_owner(lock, req)) break; - } - } /* Scan the locks owned by this process to find the insertion point * (as locks are ordered), and to handle overlaps. * We may have to merge or split existing locks. */ - if (ownlocks) - lock = ownlocks; - else - lock = list_entry(&res->lr_granted, - struct ldlm_lock, l_res_link); list_for_each_entry_safe_from(lock, tmp, &res->lr_granted, l_res_link) { if (!ldlm_same_flock_owner(lock, new)) From jsimmons at infradead.org Tue Oct 24 21:50:48 2017 From: jsimmons at infradead.org (James Simmons) Date: Tue, 24 Oct 2017 22:50:48 +0100 (BST) Subject: [lustre-devel] [PATCH 0/6] dcache/namei fixes for lustre In-Reply-To: <87k1zqfy95.fsf@notabene.neil.brown.name> References: <150164273003.13199.7841976922211510658.stgit@noble> <87k1zqfy95.fsf@notabene.neil.brown.name> Message-ID: > >> This series is a revised version of two patches I sent > >> previously (one of which was sadly broken). > >> That patch has been broken into multiple parts for easy > >> review. The other is included unchanged as the last of > >> this series. > >> > >> I was drawn to look at this code due to the tests on > >> DCACHE_DISCONNECTED which are often wrong, and it turns out > >> they are used wrongly in lustre too. Fixing one led to some > >> clean-up. Fixing the other is straight forward. > >> > >> A particular change here from the previous posting is > >> the first patch which tests for DCACHE_PAR_LOOKUP in ll_dcompare(). > >> Without this patch, two threads can be looking up the same > >> name in a given directory in parallel. This parallelism lead > >> to my concerns about needing improved locking in ll_splice_alias(). > >> Instead of improving the locking, I now avoid the need for it > >> by fixing ll_dcompare. > >> > >> This code passes basic "smoke tests". > >> > >> Note that the cast to "struct dentry *" in the first patch is because > >> we have a "const struct dentry *" but d_in_lookup() requires a > >> pointer to a non-const structure. I'll send a separate patch to > >> change d_in_lookup(). > > > > To let you know this patch has been under going testing and we have a > > ticket open to track the progess: > > > > https://jira.hpdd.intel.com/browse/LU-9868 > > > > Your patch did reveal that a piece of a fix landed earlier is missing :-( > > So currently the client can oops. I will send the fix shortly but this > > work will have to rebased after. As soon as we can get some cycles we will > > figure out what is going on. Thanks for helping out. > > Hi, > what happened about this? I had a look around the ticket and couldn't > find anything about an oops. If there is still a problem I'd be very > happy to help work out what it is - but I don't know where to look. The oops is specific to the in kernel client. Some where along the way the calls to ll_d_init() were removed from ll_splice_alias(). It was unnoticed until your patch came along. I do have a fix that I will be pushing to the next staging tree very shortly. I have been testing the patch series and for me I don't see any issue. Our test suite is reporting failures with this patch which I'm attempting to figure out how to reproduce locally on my test system. Once I have a reproducer I can send it to you. From jsimmons at infradead.org Tue Oct 24 22:20:35 2017 From: jsimmons at infradead.org (James Simmons) Date: Tue, 24 Oct 2017 23:20:35 +0100 (BST) Subject: [lustre-devel] [PATCH 0/9] Assorted cleanups for staging/.../lustre/ldlm/ldlm_flock.c In-Reply-To: <150871988297.3340.4522589460981284121.stgit@noble> References: <150871988297.3340.4522589460981284121.stgit@noble> Message-ID: > This file contains quite a bit of dead code and unused variables. > This patch series cleans it up in various ways. > It should change behaviour at all, just code > readability/maintainabilty. > > I sent the back in July but got not response, possibly because there > were included with other patches which caused a distraction. > So here they are by themselves. Thanks for separating them out. I will give them a spin. > Thanks, > NeilBrown > > > --- > > NeilBrown (9): > staging: lustre: ldlm: remove 'first_enq' arg from ldlm_process_flock_lock() > staging: lustre: ldlm: remove unused 'work_list' arg from ldlm_process_flock_lock() > staging: lustre: ldlm: remove unneeded 'err' arg to ldlm_process_flock_lock() > staging: lustre: ldlm: remove 'flags' arg from ldlm_process_flock_lock() > staging: lustre: ldlm: remove unused 'overlaps' variable > staging: lustre: ldlm: remove 'flags' arg from ldlm_flock_destroy() > staging: lustre: ldlm: tidy list walking in ldlm_flock() > staging: lustre: ldlm: remove unnecessary 'ownlocks' variable. > staging: lustre: ldlm: remove unused field 'fwd_generation' > > > drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 208 +++++------------------ > 1 file changed, 42 insertions(+), 166 deletions(-) > > -- > Signature > > From neilb at suse.com Tue Oct 24 22:35:48 2017 From: neilb at suse.com (NeilBrown) Date: Wed, 25 Oct 2017 09:35:48 +1100 Subject: [lustre-devel] [PATCH 0/6] dcache/namei fixes for lustre In-Reply-To: References: <150164273003.13199.7841976922211510658.stgit@noble> <87k1zqfy95.fsf@notabene.neil.brown.name> Message-ID: <87a80gdvi3.fsf@notabene.neil.brown.name> On Tue, Oct 24 2017, James Simmons wrote: >> >> This series is a revised version of two patches I sent >> >> previously (one of which was sadly broken). >> >> That patch has been broken into multiple parts for easy >> >> review. The other is included unchanged as the last of >> >> this series. >> >> >> >> I was drawn to look at this code due to the tests on >> >> DCACHE_DISCONNECTED which are often wrong, and it turns out >> >> they are used wrongly in lustre too. Fixing one led to some >> >> clean-up. Fixing the other is straight forward. >> >> >> >> A particular change here from the previous posting is >> >> the first patch which tests for DCACHE_PAR_LOOKUP in ll_dcompare(). >> >> Without this patch, two threads can be looking up the same >> >> name in a given directory in parallel. This parallelism lead >> >> to my concerns about needing improved locking in ll_splice_alias(). >> >> Instead of improving the locking, I now avoid the need for it >> >> by fixing ll_dcompare. >> >> >> >> This code passes basic "smoke tests". >> >> >> >> Note that the cast to "struct dentry *" in the first patch is because >> >> we have a "const struct dentry *" but d_in_lookup() requires a >> >> pointer to a non-const structure. I'll send a separate patch to >> >> change d_in_lookup(). >> > >> > To let you know this patch has been under going testing and we have a >> > ticket open to track the progess: >> > >> > https://jira.hpdd.intel.com/browse/LU-9868 >> > >> > Your patch did reveal that a piece of a fix landed earlier is missing :-( >> > So currently the client can oops. I will send the fix shortly but this >> > work will have to rebased after. As soon as we can get some cycles we will >> > figure out what is going on. Thanks for helping out. >> >> Hi, >> what happened about this? I had a look around the ticket and couldn't >> find anything about an oops. If there is still a problem I'd be very >> happy to help work out what it is - but I don't know where to look. > > The oops is specific to the in kernel client. Some where along the way the > calls to ll_d_init() were removed from ll_splice_alias(). It was unnoticed > until your patch came along. I do have a fix that I will be pushing to > the next staging tree very shortly. ll_d_init() doesn't need to be called from anywhere. It is called by __d_alloc (dentry->d_op->d_init) whenever a dentry is allocated. That is all that is needed. > > I have been testing the patch series and for me I don't see any issue. Our > test suite is reporting failures with this patch which I'm attempting to > figure out how to reproduce locally on my test system. Once I have a > reproducer I can send it to you. Can I see the failure report? Or the oops? I cannot find anything at the jira.hpdd.intel.com link you gave, or the review.whamcloud.com that is linked from there. Maybe it is behind testing.hpdd.intel.com that I need a login for (I've registered and am waiting) .... Thanks, NeilBrown -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 832 bytes Desc: not available URL: From AbeA at supermicro.com Wed Oct 25 18:00:25 2017 From: AbeA at supermicro.com (Abe Asraoui) Date: Wed, 25 Oct 2017 18:00:25 +0000 Subject: [lustre-devel] Zfs recovery time Message-ID: Hi All, Does anyone know what the Zfs recovery time for a disk failure under lustre filesystem, or is there any documentation around this topic ? Thanks, Abe From andreas.dilger at intel.com Wed Oct 25 18:34:08 2017 From: andreas.dilger at intel.com (Dilger, Andreas) Date: Wed, 25 Oct 2017 18:34:08 +0000 Subject: [lustre-devel] Zfs recovery time In-Reply-To: References: Message-ID: <3675C0E7-8B03-49FE-9410-2C0B1184BE4D@intel.com> On Oct 25, 2017, at 12:00, Abe Asraoui wrote: > > Hi All, > > Does anyone know what the Zfs recovery time for a disk failure under lustre filesystem, or is there any documentation around this topic ? Could you please clarify the question? Do you mean what the resilvering time is for a ZFS zpool when a drive fails? That depends heavily on your zpool configuration (number and performance of drives), and how full/fragmented the pool is. This is more of a ZFS question, but some numbers I saw recently were about 20-40MB/s resilvering for the *used* data on the HDD. Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation From neilb at suse.com Wed Oct 25 21:55:06 2017 From: neilb at suse.com (NeilBrown) Date: Thu, 26 Oct 2017 08:55:06 +1100 Subject: [lustre-devel] [PATCH 0/9] Assorted cleanups for staging/.../lustre/ldlm/ldlm_flock.c In-Reply-To: References: <150871988297.3340.4522589460981284121.stgit@noble> Message-ID: <874lqmevut.fsf@notabene.neil.brown.name> On Tue, Oct 24 2017, James Simmons wrote: >> This file contains quite a bit of dead code and unused variables. >> This patch series cleans it up in various ways. >> It should change behaviour at all, just code >> readability/maintainabilty. >> >> I sent the back in July but got not response, possibly because there >> were included with other patches which caused a distraction. >> So here they are by themselves. > > Thanks for separating them out. I will give them a spin. > Thanks. I have a growing series of cleanups (43 at present, including these and the namei/dcache patches). Is posting them here the best approach? I assume I should keep them in well-defined groups. Should I wait for one set to be merged before sending more, or should I just send them when I think they are ready and you (or others) will look at them as time permits. Thanks, NeilBrown -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 832 bytes Desc: not available URL: From AbeA at supermicro.com Thu Oct 26 00:27:24 2017 From: AbeA at supermicro.com (Abe Asraoui) Date: Thu, 26 Oct 2017 00:27:24 +0000 Subject: [lustre-devel] Zfs recovery time In-Reply-To: <3675C0E7-8B03-49FE-9410-2C0B1184BE4D@intel.com> References: <3675C0E7-8B03-49FE-9410-2C0B1184BE4D@intel.com> Message-ID: <9a61cf88df0041fea3e8b237ebac37a2@Ex2013-MBX2.supermicro.com> Hi Andreas, I'm looking for any data regarding resilvering time for a zfs pool in a case of a drive failure and again with full or fragmented pools. Thanks in Advance, Abe -----Original Message----- From: Dilger, Andreas [mailto:andreas.dilger at intel.com] Sent: Wednesday, October 25, 2017 11:34 AM To: Abe Asraoui (Server) Cc: Lustre Development List Subject: Re: [lustre-devel] Zfs recovery time On Oct 25, 2017, at 12:00, Abe Asraoui wrote: > > Hi All, > > Does anyone know what the Zfs recovery time for a disk failure under lustre filesystem, or is there any documentation around this topic ? Could you please clarify the question? Do you mean what the resilvering time is for a ZFS zpool when a drive fails? That depends heavily on your zpool configuration (number and performance of drives), and how full/fragmented the pool is. This is more of a ZFS question, but some numbers I saw recently were about 20-40MB/s resilvering for the *used* data on the HDD. Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation From andreas.dilger at intel.com Fri Oct 27 09:08:29 2017 From: andreas.dilger at intel.com (Dilger, Andreas) Date: Fri, 27 Oct 2017 09:08:29 +0000 Subject: [lustre-devel] [PATCH 1/9] staging: lustre: ldlm: remove 'first_enq' arg from ldlm_process_flock_lock() In-Reply-To: <150872002958.3340.14294625301256962751.stgit@noble> References: <150871988297.3340.4522589460981284121.stgit@noble> <150872002958.3340.14294625301256962751.stgit@noble> Message-ID: On Oct 22, 2017, at 18:53, NeilBrown wrote: > > it is only ever set to '1', so we can just assume that and remove the code. > > Signed-off-by: NeilBrown Reviewed-by: Andreas Dilger > --- > drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 15 ++------------- > 1 file changed, 2 insertions(+), 13 deletions(-) > > diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > index cb826e9e840e..f719dc05e1ea 100644 > --- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > @@ -121,15 +121,9 @@ ldlm_flock_destroy(struct ldlm_lock *lock, enum ldlm_mode mode, __u64 flags) > * It is also responsible for splitting a lock if a portion of the lock > * is released. > * > - * If \a first_enq is 0 (ie, called from ldlm_reprocess_queue): > - * - blocking ASTs have already been sent > - * > - * If \a first_enq is 1 (ie, called from ldlm_lock_enqueue): > - * - blocking ASTs have not been sent yet, so list of conflicting locks > - * would be collected and ASTs sent. > */ > static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags, > - int first_enq, enum ldlm_error *err, > + enum ldlm_error *err, > struct list_head *work_list) > { > struct ldlm_resource *res = req->l_resource; > @@ -197,11 +191,6 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags, > if (!ldlm_flocks_overlap(lock, req)) > continue; > > - if (!first_enq) { > - reprocess_failed = 1; > - continue; > - } > - > if (*flags & LDLM_FL_BLOCK_NOWAIT) { > ldlm_flock_destroy(req, mode, *flags); > *err = -EAGAIN; > @@ -605,7 +594,7 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data) > /* We need to reprocess the lock to do merges or splits > * with existing locks owned by this process. > */ > - ldlm_process_flock_lock(lock, &noreproc, 1, &err, NULL); > + ldlm_process_flock_lock(lock, &noreproc, &err, NULL); > } > unlock_res_and_lock(lock); > return rc; > > Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation From andreas.dilger at intel.com Fri Oct 27 09:09:36 2017 From: andreas.dilger at intel.com (Dilger, Andreas) Date: Fri, 27 Oct 2017 09:09:36 +0000 Subject: [lustre-devel] [PATCH 2/9] staging: lustre: ldlm: remove unused 'work_list' arg from ldlm_process_flock_lock() In-Reply-To: <150872002962.3340.16967380600702796184.stgit@noble> References: <150871988297.3340.4522589460981284121.stgit@noble> <150872002962.3340.16967380600702796184.stgit@noble> Message-ID: <467F8795-483A-465C-ADD7-9A3D85CC75AA@intel.com> On Oct 22, 2017, at 18:53, NeilBrown wrote: > > 'work_list' is only set to NULL, and is never used. > So discard it. > > Signed-off-by: NeilBrown Reviewed-by: Andreas Dilger > --- > drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > index f719dc05e1ea..766653b4d8a5 100644 > --- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > @@ -123,8 +123,7 @@ ldlm_flock_destroy(struct ldlm_lock *lock, enum ldlm_mode mode, __u64 flags) > * > */ > static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags, > - enum ldlm_error *err, > - struct list_head *work_list) > + enum ldlm_error *err) > { > struct ldlm_resource *res = req->l_resource; > struct ldlm_namespace *ns = ldlm_res_to_ns(res); > @@ -594,7 +593,7 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data) > /* We need to reprocess the lock to do merges or splits > * with existing locks owned by this process. > */ > - ldlm_process_flock_lock(lock, &noreproc, &err, NULL); > + ldlm_process_flock_lock(lock, &noreproc, &err); > } > unlock_res_and_lock(lock); > return rc; > > Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation From andreas.dilger at intel.com Fri Oct 27 09:11:55 2017 From: andreas.dilger at intel.com (Dilger, Andreas) Date: Fri, 27 Oct 2017 09:11:55 +0000 Subject: [lustre-devel] [PATCH 3/9] staging: lustre: ldlm: remove unneeded 'err' arg to ldlm_process_flock_lock() In-Reply-To: <150872002965.3340.8937896457096417746.stgit@noble> References: <150871988297.3340.4522589460981284121.stgit@noble> <150872002965.3340.8937896457096417746.stgit@noble> Message-ID: <848A263F-507D-4931-A6A0-F16709C05A30@intel.com> On Oct 22, 2017, at 18:53, NeilBrown wrote: > > This arg is used to return an error code, but the returned code is never > looked at. So there is no point returning it. > > Signed-off-by: NeilBrown Reviewed-by: Andreas Dilger > --- > drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 10 ++-------- > 1 file changed, 2 insertions(+), 8 deletions(-) > > diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > index 766653b4d8a5..05e6b67b0e72 100644 > --- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > @@ -122,8 +122,7 @@ ldlm_flock_destroy(struct ldlm_lock *lock, enum ldlm_mode mode, __u64 flags) > * is released. > * > */ > -static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags, > - enum ldlm_error *err) > +static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags) > { > struct ldlm_resource *res = req->l_resource; > struct ldlm_namespace *ns = ldlm_res_to_ns(res); > @@ -145,8 +144,6 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags, > req->l_policy_data.l_flock.start, > req->l_policy_data.l_flock.end); > > - *err = ELDLM_OK; > - > /* No blocking ASTs are sent to the clients for > * Posix file & record locks > */ > @@ -192,7 +189,6 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags, > > if (*flags & LDLM_FL_BLOCK_NOWAIT) { > ldlm_flock_destroy(req, mode, *flags); > - *err = -EAGAIN; > return LDLM_ITER_STOP; > } > > @@ -330,7 +326,6 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags, > if (IS_ERR(new2)) { > ldlm_flock_destroy(req, lock->l_granted_mode, > *flags); > - *err = PTR_ERR(new2); > return LDLM_ITER_STOP; > } > goto reprocess; > @@ -440,7 +435,6 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data) > struct obd_import *imp = NULL; > struct ldlm_flock_wait_data fwd; > struct l_wait_info lwi; > - enum ldlm_error err; > int rc = 0; > > OBD_FAIL_TIMEOUT(OBD_FAIL_LDLM_CP_CB_WAIT2, 4); > @@ -593,7 +587,7 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data) > /* We need to reprocess the lock to do merges or splits > * with existing locks owned by this process. > */ > - ldlm_process_flock_lock(lock, &noreproc, &err); > + ldlm_process_flock_lock(lock, &noreproc); > } > unlock_res_and_lock(lock); > return rc; > > Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation From andreas.dilger at intel.com Fri Oct 27 09:19:27 2017 From: andreas.dilger at intel.com (Dilger, Andreas) Date: Fri, 27 Oct 2017 09:19:27 +0000 Subject: [lustre-devel] [PATCH 4/9] staging: lustre: ldlm: remove 'flags' arg from ldlm_process_flock_lock() In-Reply-To: <150872002969.3340.14527228729799786026.stgit@noble> References: <150871988297.3340.4522589460981284121.stgit@noble> <150872002969.3340.14527228729799786026.stgit@noble> Message-ID: On Oct 22, 2017, at 18:53, NeilBrown wrote: > > This is only ever set to LDLM_FL_WAIT_NOREPROC, so we can remove the arg > and discard any code that is only run when it doesn't have that value. > > Signed-off-by: NeilBrown Reviewed-by: Andreas Dilger > --- > drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 110 ++++------------------- > 1 file changed, 21 insertions(+), 89 deletions(-) > > diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > index 05e6b67b0e72..2d1fa2b33129 100644 > --- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > @@ -122,7 +122,7 @@ ldlm_flock_destroy(struct ldlm_lock *lock, enum ldlm_mode mode, __u64 flags) > * is released. > * > */ > -static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags) > +static int ldlm_process_flock_lock(struct ldlm_lock *req) > { > struct ldlm_resource *res = req->l_resource; > struct ldlm_namespace *ns = ldlm_res_to_ns(res); > @@ -138,8 +138,8 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags) > const struct ldlm_callback_suite null_cbs = { }; > > CDEBUG(D_DLMTRACE, > - "flags %#llx owner %llu pid %u mode %u start %llu end %llu\n", > - *flags, new->l_policy_data.l_flock.owner, > + "owner %llu pid %u mode %u start %llu end %llu\n", > + new->l_policy_data.l_flock.owner, > new->l_policy_data.l_flock.pid, mode, > req->l_policy_data.l_flock.start, > req->l_policy_data.l_flock.end); > @@ -150,74 +150,16 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags) > req->l_blocking_ast = NULL; > > reprocess: > - if ((*flags == LDLM_FL_WAIT_NOREPROC) || (mode == LCK_NL)) { > - /* This loop determines where this processes locks start > - * in the resource lr_granted list. > - */ > - list_for_each(tmp, &res->lr_granted) { > - lock = list_entry(tmp, struct ldlm_lock, > - l_res_link); > - if (ldlm_same_flock_owner(lock, req)) { > - ownlocks = tmp; > - break; > - } > - } > - } else { > - int reprocess_failed = 0; > - > - lockmode_verify(mode); > - > - /* This loop determines if there are existing locks > - * that conflict with the new lock request. > - */ > - list_for_each(tmp, &res->lr_granted) { > - lock = list_entry(tmp, struct ldlm_lock, > - l_res_link); > - > - if (ldlm_same_flock_owner(lock, req)) { > - if (!ownlocks) > - ownlocks = tmp; > - continue; > - } > - > - /* locks are compatible, overlap doesn't matter */ > - if (lockmode_compat(lock->l_granted_mode, mode)) > - continue; > - > - if (!ldlm_flocks_overlap(lock, req)) > - continue; > - > - if (*flags & LDLM_FL_BLOCK_NOWAIT) { > - ldlm_flock_destroy(req, mode, *flags); > - return LDLM_ITER_STOP; > - } > - > - if (*flags & LDLM_FL_TEST_LOCK) { > - ldlm_flock_destroy(req, mode, *flags); > - req->l_req_mode = lock->l_granted_mode; > - req->l_policy_data.l_flock.pid = > - lock->l_policy_data.l_flock.pid; > - req->l_policy_data.l_flock.start = > - lock->l_policy_data.l_flock.start; > - req->l_policy_data.l_flock.end = > - lock->l_policy_data.l_flock.end; > - *flags |= LDLM_FL_LOCK_CHANGED; > - return LDLM_ITER_STOP; > - } > - > - ldlm_resource_add_lock(res, &res->lr_waiting, req); > - *flags |= LDLM_FL_BLOCK_GRANTED; > - return LDLM_ITER_STOP; > + /* This loop determines where this processes locks start > + * in the resource lr_granted list. > + */ > + list_for_each(tmp, &res->lr_granted) { > + lock = list_entry(tmp, struct ldlm_lock, > + l_res_link); > + if (ldlm_same_flock_owner(lock, req)) { > + ownlocks = tmp; > + break; > } > - if (reprocess_failed) > - return LDLM_ITER_CONTINUE; > - } > - > - if (*flags & LDLM_FL_TEST_LOCK) { > - ldlm_flock_destroy(req, mode, *flags); > - req->l_req_mode = LCK_NL; > - *flags |= LDLM_FL_LOCK_CHANGED; > - return LDLM_ITER_STOP; > } > > /* Scan the locks owned by this process that overlap this request. > @@ -267,7 +209,8 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags) > } > > if (added) { > - ldlm_flock_destroy(lock, mode, *flags); > + ldlm_flock_destroy(lock, mode, > + LDLM_FL_WAIT_NOREPROC); > } else { > new = lock; > added = 1; > @@ -293,7 +236,8 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags) > new->l_policy_data.l_flock.end + 1; > break; > } > - ldlm_flock_destroy(lock, lock->l_req_mode, *flags); > + ldlm_flock_destroy(lock, lock->l_req_mode, > + LDLM_FL_WAIT_NOREPROC); > continue; > } > if (new->l_policy_data.l_flock.end >= > @@ -325,7 +269,7 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags) > lock_res_and_lock(req); > if (IS_ERR(new2)) { > ldlm_flock_destroy(req, lock->l_granted_mode, > - *flags); > + LDLM_FL_WAIT_NOREPROC); > return LDLM_ITER_STOP; > } > goto reprocess; > @@ -354,9 +298,8 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags) > &new2->l_remote_handle, > &new2->l_exp_hash); > } > - if (*flags == LDLM_FL_WAIT_NOREPROC) > - ldlm_lock_addref_internal_nolock(new2, > - lock->l_granted_mode); > + ldlm_lock_addref_internal_nolock(new2, > + lock->l_granted_mode); > > /* insert new2 at lock */ > ldlm_resource_add_lock(res, ownlocks, new2); > @@ -377,22 +320,13 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags) > ldlm_resource_add_lock(res, ownlocks, req); > } > > - if (*flags != LDLM_FL_WAIT_NOREPROC) { > - /* The only one possible case for client-side calls flock > - * policy function is ldlm_flock_completion_ast inside which > - * carries LDLM_FL_WAIT_NOREPROC flag. > - */ > - CERROR("Illegal parameter for client-side-only module.\n"); > - LBUG(); > - } > - > /* In case we're reprocessing the requested lock we can't destroy > * it until after calling ldlm_add_ast_work_item() above so that laawi() > * can bump the reference count on \a req. Otherwise \a req > * could be freed before the completion AST can be sent. > */ > if (added) > - ldlm_flock_destroy(req, mode, *flags); > + ldlm_flock_destroy(req, mode, LDLM_FL_WAIT_NOREPROC); > > ldlm_resource_dump(D_INFO, res); > return LDLM_ITER_CONTINUE; > @@ -582,12 +516,10 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data) > getlk->fl_start = (loff_t)lock->l_policy_data.l_flock.start; > getlk->fl_end = (loff_t)lock->l_policy_data.l_flock.end; > } else { > - __u64 noreproc = LDLM_FL_WAIT_NOREPROC; > - > /* We need to reprocess the lock to do merges or splits > * with existing locks owned by this process. > */ > - ldlm_process_flock_lock(lock, &noreproc); > + ldlm_process_flock_lock(lock); > } > unlock_res_and_lock(lock); > return rc; > > Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation From andreas.dilger at intel.com Fri Oct 27 09:20:31 2017 From: andreas.dilger at intel.com (Dilger, Andreas) Date: Fri, 27 Oct 2017 09:20:31 +0000 Subject: [lustre-devel] [PATCH 5/9] staging: lustre: ldlm: remove unused 'overlaps' variable In-Reply-To: <150872002972.3340.9372825368625571993.stgit@noble> References: <150871988297.3340.4522589460981284121.stgit@noble> <150872002972.3340.9372825368625571993.stgit@noble> Message-ID: <77ADF410-2FBC-4F06-B5C5-275EE18D703D@intel.com> On Oct 22, 2017, at 18:53, NeilBrown wrote: > > 'overlaps' is never used, only incremented. > > Signed-off-by: NeilBrown Reviewed-by: Andreas Dilger > --- > drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > index 2d1fa2b33129..d5a5742a1171 100644 > --- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > @@ -133,7 +133,6 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req) > struct ldlm_lock *new2 = NULL; > enum ldlm_mode mode = req->l_req_mode; > int added = (mode == LCK_NL); > - int overlaps = 0; > int splitted = 0; > const struct ldlm_callback_suite null_cbs = { }; > > @@ -226,8 +225,6 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req) > lock->l_policy_data.l_flock.start) > break; > > - ++overlaps; > - > if (new->l_policy_data.l_flock.start <= > lock->l_policy_data.l_flock.start) { > if (new->l_policy_data.l_flock.end < > > Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation From andreas.dilger at intel.com Fri Oct 27 09:23:59 2017 From: andreas.dilger at intel.com (Dilger, Andreas) Date: Fri, 27 Oct 2017 09:23:59 +0000 Subject: [lustre-devel] [PATCH 6/9] staging: lustre: ldlm: remove 'flags' arg from ldlm_flock_destroy() In-Reply-To: <150872002976.3340.17760141414233585370.stgit@noble> References: <150871988297.3340.4522589460981284121.stgit@noble> <150872002976.3340.17760141414233585370.stgit@noble> Message-ID: On Oct 22, 2017, at 18:53, NeilBrown wrote: > > The only value ever passed in LDLM_FL_WAIT_NOREPROC, so assume that > instead of passing it. > > Signed-off-by: NeilBrown Reviewed-by: Andreas Dilger > --- > drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 36 ++++++++++------------- > 1 file changed, 16 insertions(+), 20 deletions(-) > > diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > index d5a5742a1171..1bf56892fcf5 100644 > --- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > @@ -88,24 +88,23 @@ ldlm_flocks_overlap(struct ldlm_lock *lock, struct ldlm_lock *new) > } > > static inline void > -ldlm_flock_destroy(struct ldlm_lock *lock, enum ldlm_mode mode, __u64 flags) > +ldlm_flock_destroy(struct ldlm_lock *lock, enum ldlm_mode mode) > { > - LDLM_DEBUG(lock, "%s(mode: %d, flags: 0x%llx)", > - __func__, mode, flags); > + LDLM_DEBUG(lock, "%s(mode: %d)", > + __func__, mode); > > /* Safe to not lock here, since it should be empty anyway */ > LASSERT(hlist_unhashed(&lock->l_exp_flock_hash)); > > list_del_init(&lock->l_res_link); > - if (flags == LDLM_FL_WAIT_NOREPROC) { > - /* client side - set a flag to prevent sending a CANCEL */ > - lock->l_flags |= LDLM_FL_LOCAL_ONLY | LDLM_FL_CBPENDING; > > - /* when reaching here, it is under lock_res_and_lock(). Thus, > - * need call the nolock version of ldlm_lock_decref_internal > - */ > - ldlm_lock_decref_internal_nolock(lock, mode); > - } > + /* client side - set a flag to prevent sending a CANCEL */ > + lock->l_flags |= LDLM_FL_LOCAL_ONLY | LDLM_FL_CBPENDING; > + > + /* when reaching here, it is under lock_res_and_lock(). Thus, > + * need call the nolock version of ldlm_lock_decref_internal > + */ > + ldlm_lock_decref_internal_nolock(lock, mode); > > ldlm_lock_destroy_nolock(lock); > } > @@ -208,8 +207,7 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req) > } > > if (added) { > - ldlm_flock_destroy(lock, mode, > - LDLM_FL_WAIT_NOREPROC); > + ldlm_flock_destroy(lock, mode); > } else { > new = lock; > added = 1; > @@ -233,8 +231,7 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req) > new->l_policy_data.l_flock.end + 1; > break; > } > - ldlm_flock_destroy(lock, lock->l_req_mode, > - LDLM_FL_WAIT_NOREPROC); > + ldlm_flock_destroy(lock, lock->l_req_mode); > continue; > } > if (new->l_policy_data.l_flock.end >= > @@ -265,8 +262,7 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req) > NULL, 0, LVB_T_NONE); > lock_res_and_lock(req); > if (IS_ERR(new2)) { > - ldlm_flock_destroy(req, lock->l_granted_mode, > - LDLM_FL_WAIT_NOREPROC); > + ldlm_flock_destroy(req, lock->l_granted_mode); > return LDLM_ITER_STOP; > } > goto reprocess; > @@ -323,7 +319,7 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req) > * could be freed before the completion AST can be sent. > */ > if (added) > - ldlm_flock_destroy(req, mode, LDLM_FL_WAIT_NOREPROC); > + ldlm_flock_destroy(req, mode); > > ldlm_resource_dump(D_INFO, res); > return LDLM_ITER_CONTINUE; > @@ -477,7 +473,7 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data) > LDLM_DEBUG(lock, "client-side enqueue deadlock received"); > rc = -EDEADLK; > } > - ldlm_flock_destroy(lock, mode, LDLM_FL_WAIT_NOREPROC); > + ldlm_flock_destroy(lock, mode); > unlock_res_and_lock(lock); > > /* Need to wake up the waiter if we were evicted */ > @@ -498,7 +494,7 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data) > * in the lock changes we can decref the appropriate refcount. > */ > LASSERT(ldlm_is_test_lock(lock)); > - ldlm_flock_destroy(lock, getlk->fl_type, LDLM_FL_WAIT_NOREPROC); > + ldlm_flock_destroy(lock, getlk->fl_type); > switch (lock->l_granted_mode) { > case LCK_PR: > getlk->fl_type = F_RDLCK; > > Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation From andreas.dilger at intel.com Fri Oct 27 09:32:49 2017 From: andreas.dilger at intel.com (Dilger, Andreas) Date: Fri, 27 Oct 2017 09:32:49 +0000 Subject: [lustre-devel] [PATCH 7/9] staging: lustre: ldlm: tidy list walking in ldlm_flock() In-Reply-To: <150872002980.3340.10618324564169458593.stgit@noble> References: <150871988297.3340.4522589460981284121.stgit@noble> <150872002980.3340.10618324564169458593.stgit@noble> Message-ID: <4DED46B3-BACE-4D6F-9A90-E35C21C3F0DC@intel.com> On Oct 22, 2017, at 18:53, NeilBrown wrote: > > Use list_for_each_entry variants to > avoid the explicit list_entry() calls. > This allows us to use list_for_each_entry_safe_from() > instread of adding a local list-walking macro. > > Also improve some comments so that it is more obvious > that the locks are sorted per-owner and that we need > to find the insertion point. > > Signed-off-by: NeilBrown The conversion looks a bit tricky, but appears to be correct. Reviewed-by: Andreas Dilger > --- > drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 45 ++++++++++------------- > 1 file changed, 19 insertions(+), 26 deletions(-) > > diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > index 1bf56892fcf5..0bf6dce1c5b1 100644 > --- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > @@ -59,17 +59,6 @@ > #include > #include "ldlm_internal.h" > > -/** > - * list_for_remaining_safe - iterate over the remaining entries in a list > - * and safeguard against removal of a list entry. > - * \param pos the &struct list_head to use as a loop counter. pos MUST > - * have been initialized prior to using it in this macro. > - * \param n another &struct list_head to use as temporary storage > - * \param head the head for your list. > - */ > -#define list_for_remaining_safe(pos, n, head) \ > - for (n = pos->next; pos != (head); pos = n, n = pos->next) > - > static inline int > ldlm_same_flock_owner(struct ldlm_lock *lock, struct ldlm_lock *new) > { > @@ -125,8 +114,8 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req) > { > struct ldlm_resource *res = req->l_resource; > struct ldlm_namespace *ns = ldlm_res_to_ns(res); > - struct list_head *tmp; > - struct list_head *ownlocks = NULL; > + struct ldlm_lock *tmp; > + struct ldlm_lock *ownlocks = NULL; > struct ldlm_lock *lock = NULL; > struct ldlm_lock *new = req; > struct ldlm_lock *new2 = NULL; > @@ -151,23 +140,23 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req) > /* This loop determines where this processes locks start > * in the resource lr_granted list. > */ > - list_for_each(tmp, &res->lr_granted) { > - lock = list_entry(tmp, struct ldlm_lock, > - l_res_link); > + list_for_each_entry(lock, &res->lr_granted, l_res_link) { > if (ldlm_same_flock_owner(lock, req)) { > - ownlocks = tmp; > + ownlocks = lock; > break; > } > } > > - /* Scan the locks owned by this process that overlap this request. > + /* Scan the locks owned by this process to find the insertion point > + * (as locks are ordered), and to handle overlaps. > * We may have to merge or split existing locks. > */ > - if (!ownlocks) > - ownlocks = &res->lr_granted; > - > - list_for_remaining_safe(ownlocks, tmp, &res->lr_granted) { > - lock = list_entry(ownlocks, struct ldlm_lock, l_res_link); > + if (ownlocks) > + lock = ownlocks; > + else > + lock = list_entry(&res->lr_granted, > + struct ldlm_lock, l_res_link); > + list_for_each_entry_safe_from(lock, tmp, &res->lr_granted, l_res_link) { > > if (!ldlm_same_flock_owner(lock, new)) > break; > @@ -295,7 +284,7 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req) > lock->l_granted_mode); > > /* insert new2 at lock */ > - ldlm_resource_add_lock(res, ownlocks, new2); > + ldlm_resource_add_lock(res, &lock->l_res_link, new2); > LDLM_LOCK_RELEASE(new2); > break; > } > @@ -309,8 +298,12 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req) > > if (!added) { > list_del_init(&req->l_res_link); > - /* insert new lock before ownlocks in list. */ > - ldlm_resource_add_lock(res, ownlocks, req); > + /* insert new lock before "lock", which might be the > + * next lock for this owner, or might be the first > + * lock for the next owner, or might not be a lock at > + * all, but instead points at the head of the list > + */ > + ldlm_resource_add_lock(res, &lock->l_res_link, req); > } > > /* In case we're reprocessing the requested lock we can't destroy > > Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation From andreas.dilger at intel.com Fri Oct 27 09:33:56 2017 From: andreas.dilger at intel.com (Dilger, Andreas) Date: Fri, 27 Oct 2017 09:33:56 +0000 Subject: [lustre-devel] [PATCH 8/9] staging: lustre: ldlm: remove unnecessary 'ownlocks' variable. In-Reply-To: <150872002983.3340.10585764760968162389.stgit@noble> References: <150871988297.3340.4522589460981284121.stgit@noble> <150872002983.3340.10585764760968162389.stgit@noble> Message-ID: On Oct 22, 2017, at 18:53, NeilBrown wrote: > > Now that the code has been simplified, 'ownlocks' is not > necessary. > > The loop which sets it exits with 'lock' having the same value as > 'ownlocks', or pointing to the head of the list if ownlocks is NULL. > > The current code then tests ownlocks and sets 'lock' to exactly the > value that it currently has. > > So discard 'ownlocks'. > > Also remove unnecessary initialization of 'lock'. > > Signed-off-by: NeilBrown Reviewed-by: Andreas Dilger > --- > drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 15 +++------------ > 1 file changed, 3 insertions(+), 12 deletions(-) > > diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > index 0bf6dce1c5b1..774d8667769a 100644 > --- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > @@ -115,8 +115,7 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req) > struct ldlm_resource *res = req->l_resource; > struct ldlm_namespace *ns = ldlm_res_to_ns(res); > struct ldlm_lock *tmp; > - struct ldlm_lock *ownlocks = NULL; > - struct ldlm_lock *lock = NULL; > + struct ldlm_lock *lock; > struct ldlm_lock *new = req; > struct ldlm_lock *new2 = NULL; > enum ldlm_mode mode = req->l_req_mode; > @@ -140,22 +139,14 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req) > /* This loop determines where this processes locks start > * in the resource lr_granted list. > */ > - list_for_each_entry(lock, &res->lr_granted, l_res_link) { > - if (ldlm_same_flock_owner(lock, req)) { > - ownlocks = lock; > + list_for_each_entry(lock, &res->lr_granted, l_res_link) > + if (ldlm_same_flock_owner(lock, req)) > break; > - } > - } > > /* Scan the locks owned by this process to find the insertion point > * (as locks are ordered), and to handle overlaps. > * We may have to merge or split existing locks. > */ > - if (ownlocks) > - lock = ownlocks; > - else > - lock = list_entry(&res->lr_granted, > - struct ldlm_lock, l_res_link); > list_for_each_entry_safe_from(lock, tmp, &res->lr_granted, l_res_link) { > > if (!ldlm_same_flock_owner(lock, new)) > > Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation From andreas.dilger at intel.com Fri Oct 27 09:39:01 2017 From: andreas.dilger at intel.com (Dilger, Andreas) Date: Fri, 27 Oct 2017 09:39:01 +0000 Subject: [lustre-devel] [PATCH 9/9] staging: lustre: ldlm: remove unused field 'fwd_generation' In-Reply-To: <150872002986.3340.15607846693582678949.stgit@noble> References: <150871988297.3340.4522589460981284121.stgit@noble> <150872002986.3340.15607846693582678949.stgit@noble> Message-ID: On Oct 22, 2017, at 18:53, NeilBrown wrote: > > With this field gone, we don't need local variables 'imp' or 'obd' > any more. > > Signed-off-by: NeilBrown Thanks for the patches. Reviewed-by: Andreas Dilger > --- > drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 21 +++------------------ > 1 file changed, 3 insertions(+), 18 deletions(-) > > diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > index 774d8667769a..9c0e9cd00000 100644 > --- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > @@ -311,7 +311,6 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req) > > struct ldlm_flock_wait_data { > struct ldlm_lock *fwd_lock; > - int fwd_generation; > }; > > static void > @@ -342,11 +341,9 @@ int > ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data) > { > struct file_lock *getlk = lock->l_ast_data; > - struct obd_device *obd; > - struct obd_import *imp = NULL; > - struct ldlm_flock_wait_data fwd; > - struct l_wait_info lwi; > - int rc = 0; > + struct ldlm_flock_wait_data fwd; > + struct l_wait_info lwi; > + int rc = 0; > > OBD_FAIL_TIMEOUT(OBD_FAIL_LDLM_CP_CB_WAIT2, 4); > if (OBD_FAIL_PRECHECK(OBD_FAIL_LDLM_CP_CB_WAIT3)) { > @@ -374,18 +371,6 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data) > > LDLM_DEBUG(lock, "client-side enqueue returned a blocked lock, sleeping"); > fwd.fwd_lock = lock; > - obd = class_exp2obd(lock->l_conn_export); > - > - /* if this is a local lock, there is no import */ > - if (obd) > - imp = obd->u.cli.cl_import; > - > - if (imp) { > - spin_lock(&imp->imp_lock); > - fwd.fwd_generation = imp->imp_generation; > - spin_unlock(&imp->imp_lock); > - } > - > lwi = LWI_TIMEOUT_INTR(0, NULL, ldlm_flock_interrupted_wait, &fwd); > > /* Go to sleep until the lock is granted. */ > > > _______________________________________________ > lustre-devel mailing list > lustre-devel at lists.lustre.org > http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation From neilb at suse.com Fri Oct 27 11:10:27 2017 From: neilb at suse.com (NeilBrown) Date: Fri, 27 Oct 2017 22:10:27 +1100 Subject: [lustre-devel] [PATCH 9/9] staging: lustre: ldlm: remove unused field 'fwd_generation' In-Reply-To: References: <150871988297.3340.4522589460981284121.stgit@noble> <150872002986.3340.15607846693582678949.stgit@noble> Message-ID: <87h8ukdexo.fsf@notabene.neil.brown.name> On Fri, Oct 27 2017, Dilger, Andreas wrote: > On Oct 22, 2017, at 18:53, NeilBrown wrote: >> >> With this field gone, we don't need local variables 'imp' or 'obd' >> any more. >> >> Signed-off-by: NeilBrown > > Thanks for the patches. And thanks a lot for the review! NeilBrown > > Reviewed-by: Andreas Dilger -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 832 bytes Desc: not available URL: From romeusmeister at gmail.com Sun Oct 29 17:58:39 2017 From: romeusmeister at gmail.com (Roman Storozhenko) Date: Sun, 29 Oct 2017 20:58:39 +0300 Subject: [lustre-devel] [PATCH] staging: lustre: Replaces 'uint32_t' with '__u32' and 'uint64_t' with '__u64'. Message-ID: <20171029175839.GA19864@home> 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 use such types. In the most cases it uses '__u32' and '__u64'. Signed-off-by: Roman Storozhenko --- drivers/staging/lustre/lustre/include/lustre_sec.h | 4 ++-- drivers/staging/lustre/lustre/llite/vvp_dev.c | 2 +- drivers/staging/lustre/lustre/lov/lov_internal.h | 12 ++++++------ drivers/staging/lustre/lustre/osc/osc_internal.h | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre_sec.h b/drivers/staging/lustre/lustre/include/lustre_sec.h index 03a970b..c616ae5 100644 --- a/drivers/staging/lustre/lustre/include/lustre_sec.h +++ b/drivers/staging/lustre/lustre/include/lustre_sec.h @@ -340,8 +340,8 @@ void sptlrpc_conf_client_adapt(struct obd_device *obd); #define SPTLRPC_MAX_PAYLOAD (1024) struct vfs_cred { - uint32_t vc_uid; - uint32_t vc_gid; + __u32 vc_uid; + __u32 vc_gid; }; struct ptlrpc_ctx_ops { diff --git a/drivers/staging/lustre/lustre/llite/vvp_dev.c b/drivers/staging/lustre/lustre/llite/vvp_dev.c index f9d9a16..9a98a95 100644 --- a/drivers/staging/lustre/lustre/llite/vvp_dev.c +++ b/drivers/staging/lustre/lustre/llite/vvp_dev.c @@ -383,7 +383,7 @@ int cl_sb_fini(struct super_block *sb) struct vvp_pgcache_id { unsigned int vpi_bucket; unsigned int vpi_depth; - uint32_t vpi_index; + __u32 vpi_index; unsigned int vpi_curdep; struct lu_object_header *vpi_obj; diff --git a/drivers/staging/lustre/lustre/lov/lov_internal.h b/drivers/staging/lustre/lustre/lov/lov_internal.h index a21f074..49a106c 100644 --- a/drivers/staging/lustre/lustre/lov/lov_internal.h +++ b/drivers/staging/lustre/lustre/lov/lov_internal.h @@ -114,19 +114,19 @@ static inline const struct lsm_operations *lsm_op_find(int magic) */ #if BITS_PER_LONG == 64 # define lov_do_div64(n, base) ({ \ - uint64_t __base = (base); \ - uint64_t __rem; \ - __rem = ((uint64_t)(n)) % __base; \ - (n) = ((uint64_t)(n)) / __base; \ + __u64 __base = (base); \ + __u64 __rem; \ + __rem = ((__u64)(n)) % __base; \ + (n) = ((__u64)(n)) / __base; \ __rem; \ }) #elif BITS_PER_LONG == 32 # define lov_do_div64(n, base) ({ \ - uint64_t __rem; \ + __u64 __rem; \ if ((sizeof(base) > 4) && (((base) & 0xffffffff00000000ULL) != 0)) { \ int __remainder; \ LASSERTF(!((base) & (LOV_MIN_STRIPE_SIZE - 1)), "64 bit lov " \ - "division %llu / %llu\n", (n), (uint64_t)(base)); \ + "division %llu / %llu\n", (n), (__u64)(base)); \ __remainder = (n) & (LOV_MIN_STRIPE_SIZE - 1); \ (n) >>= LOV_MIN_STRIPE_BITS; \ __rem = do_div(n, (base) >> LOV_MIN_STRIPE_BITS); \ diff --git a/drivers/staging/lustre/lustre/osc/osc_internal.h b/drivers/staging/lustre/lustre/osc/osc_internal.h index a536908..92d2e1f 100644 --- a/drivers/staging/lustre/lustre/osc/osc_internal.h +++ b/drivers/staging/lustre/lustre/osc/osc_internal.h @@ -167,9 +167,9 @@ struct osc_device { /* Write stats is actually protected by client_obd's lock. */ struct osc_stats { - uint64_t os_lockless_writes; /* by bytes */ - uint64_t os_lockless_reads; /* by bytes */ - uint64_t os_lockless_truncates; /* by times */ + __u64 os_lockless_writes; /* by bytes */ + __u64 os_lockless_reads; /* by bytes */ + __u64 os_lockless_truncates; /* by times */ } od_stats; /* configuration item(s) */ -- 2.7.4 From neilb at suse.com Mon Oct 30 04:59:27 2017 From: neilb at suse.com (NeilBrown) Date: Mon, 30 Oct 2017 15:59:27 +1100 Subject: [lustre-devel] [PATCH 00/10] staging: lustre: assorted code improvements for list manipulations. Message-ID: <150933945578.22133.8029060522107378499.stgit@noble> There are mostly conversions of list_for_each() to list_for_each_entry() and similar. list_first_entry() also makes a few appearances. Thanks, NeilBrown --- NeilBrown (10): staging: lustre: use list_last_entry to simplify fld_cache_shrink staging: lustre: ldlm: use list_for_each_entry in ldlm_extent_shift_kms() staging: lustre: ldlm: use list_first_entry in ldlm_lock staging: lustre: ldlm: use list_for_each_entry in ldlm_lock.c staging: lustre: ldlm: use list_first_entry in ldlm_lockd.c staging: lustre: ldlm: minor list_entry improvements in ldlm_request.c staging: lustre: ldlm: use list_for_each_entry in ldlm_resource.c staging: lustre: lov: use list_for_each_entry in lov_obd.c staging: lustre: simplfy lov_finish_set() staging: lustre: obdclass: simplify cl_lock_fini() drivers/staging/lustre/lustre/fld/fld_cache.c | 13 ++++++------- drivers/staging/lustre/lustre/ldlm/ldlm_extent.c | 4 +--- drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 18 +++++++----------- drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 10 +++++----- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 12 ++++-------- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 20 +++++++------------- drivers/staging/lustre/lustre/lov/lov_obd.c | 6 ++---- drivers/staging/lustre/lustre/lov/lov_request.c | 10 ++++------ drivers/staging/lustre/lustre/obdclass/cl_lock.c | 9 ++++----- 9 files changed, 40 insertions(+), 62 deletions(-) -- Signature From neilb at suse.com Mon Oct 30 04:59:27 2017 From: neilb at suse.com (NeilBrown) Date: Mon, 30 Oct 2017 15:59:27 +1100 Subject: [lustre-devel] [PATCH 02/10] staging: lustre: ldlm: use list_for_each_entry in ldlm_extent_shift_kms() In-Reply-To: <150933945578.22133.8029060522107378499.stgit@noble> References: <150933945578.22133.8029060522107378499.stgit@noble> Message-ID: <150933956707.22133.18031734709320073959.stgit@noble> Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/ldlm/ldlm_extent.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_extent.c b/drivers/staging/lustre/lustre/ldlm/ldlm_extent.c index 2cc6dc2b281f..c9bf9ae40f7d 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_extent.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_extent.c @@ -63,7 +63,6 @@ __u64 ldlm_extent_shift_kms(struct ldlm_lock *lock, __u64 old_kms) { struct ldlm_resource *res = lock->l_resource; - struct list_head *tmp; struct ldlm_lock *lck; __u64 kms = 0; @@ -73,8 +72,7 @@ __u64 ldlm_extent_shift_kms(struct ldlm_lock *lock, __u64 old_kms) */ ldlm_set_kms_ignore(lock); - list_for_each(tmp, &res->lr_granted) { - lck = list_entry(tmp, struct ldlm_lock, l_res_link); + list_for_each_entry(lck, &res->lr_granted, l_res_link) { if (ldlm_is_kms_ignore(lck)) continue; From neilb at suse.com Mon Oct 30 04:59:27 2017 From: neilb at suse.com (NeilBrown) Date: Mon, 30 Oct 2017 15:59:27 +1100 Subject: [lustre-devel] [PATCH 01/10] staging: lustre: use list_last_entry to simplify fld_cache_shrink In-Reply-To: <150933945578.22133.8029060522107378499.stgit@noble> References: <150933945578.22133.8029060522107378499.stgit@noble> Message-ID: <150933956703.22133.5329157273101330596.stgit@noble> Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/fld/fld_cache.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/staging/lustre/lustre/fld/fld_cache.c b/drivers/staging/lustre/lustre/fld/fld_cache.c index b723ece02eff..c01709cd22a1 100644 --- a/drivers/staging/lustre/lustre/fld/fld_cache.c +++ b/drivers/staging/lustre/lustre/fld/fld_cache.c @@ -212,19 +212,18 @@ static inline void fld_cache_entry_add(struct fld_cache *cache, */ static int fld_cache_shrink(struct fld_cache *cache) { - struct fld_cache_entry *flde; - struct list_head *curr; int num = 0; if (cache->fci_cache_count < cache->fci_cache_size) return 0; - curr = cache->fci_lru.prev; - while (cache->fci_cache_count + cache->fci_threshold > - cache->fci_cache_size && curr != &cache->fci_lru) { - flde = list_entry(curr, struct fld_cache_entry, fce_lru); - curr = curr->prev; + cache->fci_cache_size && + !list_empty(&cache->fci_lru)) { + struct fld_cache_entry *flde = + list_last_entry(&cache->fci_lru, + struct fld_cache_entry, fce_lru); + fld_cache_entry_delete(cache, flde); num++; } From neilb at suse.com Mon Oct 30 04:59:27 2017 From: neilb at suse.com (NeilBrown) Date: Mon, 30 Oct 2017 15:59:27 +1100 Subject: [lustre-devel] [PATCH 04/10] staging: lustre: ldlm: use list_for_each_entry in ldlm_lock.c In-Reply-To: <150933945578.22133.8029060522107378499.stgit@noble> References: <150933945578.22133.8029060522107378499.stgit@noble> Message-ID: <150933956714.22133.9335034661380882104.stgit@noble> This makes some slightly-confusing code a bit clearer, and avoids the need for 'tmp'. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c index ed061cc46986..036a509eb515 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c @@ -885,17 +885,15 @@ static void search_granted_lock(struct list_head *queue, struct ldlm_lock *req, struct sl_insert_point *prev) { - struct list_head *tmp; struct ldlm_lock *lock, *mode_end, *policy_end; - list_for_each(tmp, queue) { - lock = list_entry(tmp, struct ldlm_lock, l_res_link); + list_for_each_entry(lock, queue, l_res_link) { mode_end = list_prev_entry(lock, l_sl_mode); if (lock->l_req_mode != req->l_req_mode) { /* jump to last lock of mode group */ - tmp = &mode_end->l_res_link; + lock = mode_end; continue; } @@ -932,9 +930,7 @@ static void search_granted_lock(struct list_head *queue, break; /* go to next policy group within mode group */ - tmp = policy_end->l_res_link.next; - lock = list_entry(tmp, struct ldlm_lock, - l_res_link); + lock = list_next_entry(policy_end, l_res_link); } /* loop over policy groups within the mode group */ /* insert point is last lock of the mode group, From neilb at suse.com Mon Oct 30 04:59:27 2017 From: neilb at suse.com (NeilBrown) Date: Mon, 30 Oct 2017 15:59:27 +1100 Subject: [lustre-devel] [PATCH 03/10] staging: lustre: ldlm: use list_first_entry in ldlm_lock In-Reply-To: <150933945578.22133.8029060522107378499.stgit@noble> References: <150933945578.22133.8029060522107378499.stgit@noble> Message-ID: <150933956711.22133.6246810949146823613.stgit@noble> This make the code (slightly) more readable. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c index b5d84f3f6071..ed061cc46986 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c @@ -1685,7 +1685,7 @@ ldlm_work_bl_ast_lock(struct ptlrpc_request_set *rqset, void *opaq) if (list_empty(arg->list)) return -ENOENT; - lock = list_entry(arg->list->next, struct ldlm_lock, l_bl_ast); + lock = list_first_entry(arg->list, struct ldlm_lock, l_bl_ast); /* nobody should touch l_bl_ast */ lock_res_and_lock(lock); @@ -1721,7 +1721,7 @@ ldlm_work_cp_ast_lock(struct ptlrpc_request_set *rqset, void *opaq) if (list_empty(arg->list)) return -ENOENT; - lock = list_entry(arg->list->next, struct ldlm_lock, l_cp_ast); + lock = list_first_entry(arg->list, struct ldlm_lock, l_cp_ast); /* It's possible to receive a completion AST before we've set * the l_completion_ast pointer: either because the AST arrived @@ -1767,7 +1767,7 @@ ldlm_work_revoke_ast_lock(struct ptlrpc_request_set *rqset, void *opaq) if (list_empty(arg->list)) return -ENOENT; - lock = list_entry(arg->list->next, struct ldlm_lock, l_rk_ast); + lock = list_first_entry(arg->list, struct ldlm_lock, l_rk_ast); list_del_init(&lock->l_rk_ast); /* the desc just pretend to exclusive */ @@ -1794,7 +1794,7 @@ static int ldlm_work_gl_ast_lock(struct ptlrpc_request_set *rqset, void *opaq) if (list_empty(arg->list)) return -ENOENT; - gl_work = list_entry(arg->list->next, struct ldlm_glimpse_work, + gl_work = list_first_entry(arg->list, struct ldlm_glimpse_work, gl_list); list_del_init(&gl_work->gl_list); From neilb at suse.com Mon Oct 30 04:59:27 2017 From: neilb at suse.com (NeilBrown) Date: Mon, 30 Oct 2017 15:59:27 +1100 Subject: [lustre-devel] [PATCH 05/10] staging: lustre: ldlm: use list_first_entry in ldlm_lockd.c In-Reply-To: <150933945578.22133.8029060522107378499.stgit@noble> References: <150933945578.22133.8029060522107378499.stgit@noble> Message-ID: <150933956718.22133.9494510718272127912.stgit@noble> Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c index e2707336586c..2aaa5e91c66c 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c @@ -693,13 +693,13 @@ static int ldlm_bl_get_work(struct ldlm_bl_pool *blp, /* process a request from the blp_list at least every blp_num_threads */ if (!list_empty(&blp->blp_list) && (list_empty(&blp->blp_prio_list) || num_bl == 0)) - blwi = list_entry(blp->blp_list.next, - struct ldlm_bl_work_item, blwi_entry); + blwi = list_first_entry(&blp->blp_list, + struct ldlm_bl_work_item, blwi_entry); else if (!list_empty(&blp->blp_prio_list)) - blwi = list_entry(blp->blp_prio_list.next, - struct ldlm_bl_work_item, - blwi_entry); + blwi = list_first_entry(&blp->blp_prio_list, + struct ldlm_bl_work_item, + blwi_entry); if (blwi) { if (++num_bl >= num_th) From neilb at suse.com Mon Oct 30 04:59:27 2017 From: neilb at suse.com (NeilBrown) Date: Mon, 30 Oct 2017 15:59:27 +1100 Subject: [lustre-devel] [PATCH 06/10] staging: lustre: ldlm: minor list_entry improvements in ldlm_request.c In-Reply-To: <150933945578.22133.8029060522107378499.stgit@noble> References: <150933945578.22133.8029060522107378499.stgit@noble> Message-ID: <150933956722.22133.16215765622967632452.stgit@noble> Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c index f5e791a92f62..1e7b8fc4dd00 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c @@ -1642,7 +1642,7 @@ int ldlm_cli_cancel_list(struct list_head *cancels, int count, */ while (count > 0) { LASSERT(!list_empty(cancels)); - lock = list_entry(cancels->next, struct ldlm_lock, l_bl_ast); + lock = list_first_entry(cancels, struct ldlm_lock, l_bl_ast); LASSERT(lock->l_conn_export); if (exp_connect_cancelset(lock->l_conn_export)) { @@ -1766,7 +1766,7 @@ EXPORT_SYMBOL(ldlm_cli_cancel_unused); static int ldlm_resource_foreach(struct ldlm_resource *res, ldlm_iterator_t iter, void *closure) { - struct list_head *tmp, *next; + struct ldlm_lock *tmp; struct ldlm_lock *lock; int rc = LDLM_ITER_CONTINUE; @@ -1774,18 +1774,14 @@ static int ldlm_resource_foreach(struct ldlm_resource *res, return LDLM_ITER_CONTINUE; lock_res(res); - list_for_each_safe(tmp, next, &res->lr_granted) { - lock = list_entry(tmp, struct ldlm_lock, l_res_link); - + list_for_each_entry_safe(lock, tmp, &res->lr_granted, l_res_link) { if (iter(lock, closure) == LDLM_ITER_STOP) { rc = LDLM_ITER_STOP; goto out; } } - list_for_each_safe(tmp, next, &res->lr_waiting) { - lock = list_entry(tmp, struct ldlm_lock, l_res_link); - + list_for_each_entry_safe(lock, tmp, &res->lr_waiting, l_res_link) { if (iter(lock, closure) == LDLM_ITER_STOP) { rc = LDLM_ITER_STOP; goto out; From neilb at suse.com Mon Oct 30 04:59:27 2017 From: neilb at suse.com (NeilBrown) Date: Mon, 30 Oct 2017 15:59:27 +1100 Subject: [lustre-devel] [PATCH 07/10] staging: lustre: ldlm: use list_for_each_entry in ldlm_resource.c In-Reply-To: <150933945578.22133.8029060522107378499.stgit@noble> References: <150933945578.22133.8029060522107378499.stgit@noble> Message-ID: <150933956725.22133.1599266866891541124.stgit@noble> Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c index c2ddf7312571..980d970174d8 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c @@ -751,24 +751,22 @@ extern struct ldlm_lock *ldlm_lock_get(struct ldlm_lock *lock); static void cleanup_resource(struct ldlm_resource *res, struct list_head *q, __u64 flags) { - struct list_head *tmp; int rc = 0; bool local_only = !!(flags & LDLM_FL_LOCAL_ONLY); do { - struct ldlm_lock *lock = NULL; + struct ldlm_lock *lock = NULL, *tmp; struct lustre_handle lockh; /* First, we look for non-cleaned-yet lock * all cleaned locks are marked by CLEANED flag. */ lock_res(res); - list_for_each(tmp, q) { - lock = list_entry(tmp, struct ldlm_lock, l_res_link); - if (ldlm_is_cleaned(lock)) { - lock = NULL; + list_for_each_entry(tmp, q, l_res_link) { + if (ldlm_is_cleaned(tmp)) continue; - } + + lock = tmp; LDLM_LOCK_GET(lock); ldlm_set_cleaned(lock); break; @@ -1282,19 +1280,15 @@ void ldlm_res2desc(struct ldlm_resource *res, struct ldlm_resource_desc *desc) */ void ldlm_dump_all_namespaces(enum ldlm_side client, int level) { - struct list_head *tmp; + struct ldlm_namespace *ns; if (!((libcfs_debug | D_ERROR) & level)) return; mutex_lock(ldlm_namespace_lock(client)); - list_for_each(tmp, ldlm_namespace_list(client)) { - struct ldlm_namespace *ns; - - ns = list_entry(tmp, struct ldlm_namespace, ns_list_chain); + list_for_each_entry(ns, ldlm_namespace_list(client), ns_list_chain) ldlm_namespace_dump(level, ns); - } mutex_unlock(ldlm_namespace_lock(client)); } From neilb at suse.com Mon Oct 30 04:59:27 2017 From: neilb at suse.com (NeilBrown) Date: Mon, 30 Oct 2017 15:59:27 +1100 Subject: [lustre-devel] [PATCH 08/10] staging: lustre: lov: use list_for_each_entry in lov_obd.c In-Reply-To: <150933945578.22133.8029060522107378499.stgit@noble> References: <150933945578.22133.8029060522107378499.stgit@noble> Message-ID: <150933956729.22133.13130557672702877610.stgit@noble> Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/lov/lov_obd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lustre/lov/lov_obd.c b/drivers/staging/lustre/lustre/lov/lov_obd.c index fefd3c588681..7e013229d7b5 100644 --- a/drivers/staging/lustre/lustre/lov/lov_obd.c +++ b/drivers/staging/lustre/lustre/lov/lov_obd.c @@ -827,11 +827,9 @@ int lov_setup(struct obd_device *obd, struct lustre_cfg *lcfg) static int lov_cleanup(struct obd_device *obd) { struct lov_obd *lov = &obd->u.lov; - struct list_head *pos, *tmp; - struct pool_desc *pool; + struct pool_desc *pool, *tmp; - list_for_each_safe(pos, tmp, &lov->lov_pool_list) { - pool = list_entry(pos, struct pool_desc, pool_list); + list_for_each_entry_safe(pool, tmp, &lov->lov_pool_list, pool_list) { /* free pool structs */ CDEBUG(D_INFO, "delete pool %p\n", pool); /* In the function below, .hs_keycmp resolves to From neilb at suse.com Mon Oct 30 04:59:27 2017 From: neilb at suse.com (NeilBrown) Date: Mon, 30 Oct 2017 15:59:27 +1100 Subject: [lustre-devel] [PATCH 09/10] staging: lustre: simplfy lov_finish_set() In-Reply-To: <150933945578.22133.8029060522107378499.stgit@noble> References: <150933945578.22133.8029060522107378499.stgit@noble> Message-ID: <150933956733.22133.5869125353037664313.stgit@noble> When deleting everything from a list, a while loop is cleaner than list_for_each_safe(). Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/lov/lov_request.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/staging/lustre/lustre/lov/lov_request.c b/drivers/staging/lustre/lustre/lov/lov_request.c index 9d3b3f3e9f10..54f883e359ce 100644 --- a/drivers/staging/lustre/lustre/lov/lov_request.c +++ b/drivers/staging/lustre/lustre/lov/lov_request.c @@ -48,15 +48,13 @@ static void lov_init_set(struct lov_request_set *set) static void lov_finish_set(struct lov_request_set *set) { - struct list_head *pos, *n; + struct lov_request *req; LASSERT(set); - list_for_each_safe(pos, n, &set->set_list) { - struct lov_request *req = list_entry(pos, - struct lov_request, - rq_link); + while ((req = list_first_entry_or_null(&set->set_list, + struct lov_request, + rq_link)) != NULL) { list_del_init(&req->rq_link); - kfree(req->rq_oi.oi_osfs); kfree(req); } From neilb at suse.com Mon Oct 30 04:59:27 2017 From: neilb at suse.com (NeilBrown) Date: Mon, 30 Oct 2017 15:59:27 +1100 Subject: [lustre-devel] [PATCH 10/10] staging: lustre: obdclass: simplify cl_lock_fini() In-Reply-To: <150933945578.22133.8029060522107378499.stgit@noble> References: <150933945578.22133.8029060522107378499.stgit@noble> Message-ID: <150933956737.22133.10532579319852492812.stgit@noble> Using list_first_entry_or_null() makes this (slightly) simpler. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/obdclass/cl_lock.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/cl_lock.c b/drivers/staging/lustre/lustre/obdclass/cl_lock.c index 20e64051d2d6..fa97f4b39bd1 100644 --- a/drivers/staging/lustre/lustre/obdclass/cl_lock.c +++ b/drivers/staging/lustre/lustre/obdclass/cl_lock.c @@ -78,13 +78,12 @@ EXPORT_SYMBOL(cl_lock_slice_add); void cl_lock_fini(const struct lu_env *env, struct cl_lock *lock) { + struct cl_lock_slice *slice; cl_lock_trace(D_DLMTRACE, env, "destroy lock", lock); - while (!list_empty(&lock->cll_layers)) { - struct cl_lock_slice *slice; - - slice = list_entry(lock->cll_layers.next, - struct cl_lock_slice, cls_linkage); + while ((slice = list_first_entry_or_null(&lock->cll_layers, + struct cl_lock_slice, + cls_linkage)) != NULL) { list_del_init(lock->cll_layers.next); slice->cls_ops->clo_fini(env, slice); } From andreas.dilger at intel.com Mon Oct 30 23:38:29 2017 From: andreas.dilger at intel.com (Dilger, Andreas) Date: Mon, 30 Oct 2017 23:38:29 +0000 Subject: [lustre-devel] [PATCH] lustre: don't set f_version in ll_readdir In-Reply-To: <20171030150012.2101-1-jlayton@kernel.org> References: <20171030150012.2101-1-jlayton@kernel.org> Message-ID: <884F92FF-0C9D-4B97-A034-865351D22D56@intel.com> 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 Layton Reviewed-by: Andreas Dilger > --- > drivers/staging/lustre/lustre/llite/dir.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c > index 1db3e7f345c5..9664447ffcd7 100644 > --- a/drivers/staging/lustre/lustre/llite/dir.c > +++ b/drivers/staging/lustre/lustre/llite/dir.c > @@ -367,8 +367,6 @@ static int ll_readdir(struct file *filp, struct dir_context *ctx) > } > ctx->pos = pos; > ll_finish_md_op_data(op_data); > - filp->f_version = inode->i_version; > - > out: > if (!rc) > ll_stats_ops_tally(sbi, LPROC_LL_READDIR, 1); > @@ -1675,7 +1673,6 @@ static loff_t ll_dir_seek(struct file *file, loff_t offset, int origin) > else > fd->lfd_pos = offset; > file->f_pos = offset; > - file->f_version = 0; > } > ret = offset; > } > -- > 2.13.6 > Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation From andreas.dilger at intel.com Tue Oct 31 07:44:01 2017 From: andreas.dilger at intel.com (Dilger, Andreas) Date: Tue, 31 Oct 2017 07:44:01 +0000 Subject: [lustre-devel] [PATCH] staging: lustre: Replaces 'uint32_t' with '__u32' and 'uint64_t' with '__u64'. In-Reply-To: <20171029175839.GA19864@home> References: <20171029175839.GA19864@home> Message-ID: <5A7491DD-5D1D-4302-82B5-658F876BDD44@intel.com> 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 use such types. > In the most cases it uses '__u32' and '__u64'. > > Signed-off-by: Roman Storozhenko Reviewed-by: Andreas Dilger > --- > drivers/staging/lustre/lustre/include/lustre_sec.h | 4 ++-- > drivers/staging/lustre/lustre/llite/vvp_dev.c | 2 +- > drivers/staging/lustre/lustre/lov/lov_internal.h | 12 ++++++------ > drivers/staging/lustre/lustre/osc/osc_internal.h | 6 +++--- > 4 files changed, 12 insertions(+), 12 deletions(-) > > diff --git a/drivers/staging/lustre/lustre/include/lustre_sec.h b/drivers/staging/lustre/lustre/include/lustre_sec.h > index 03a970b..c616ae5 100644 > --- a/drivers/staging/lustre/lustre/include/lustre_sec.h > +++ b/drivers/staging/lustre/lustre/include/lustre_sec.h > @@ -340,8 +340,8 @@ void sptlrpc_conf_client_adapt(struct obd_device *obd); > #define SPTLRPC_MAX_PAYLOAD (1024) > > struct vfs_cred { > - uint32_t vc_uid; > - uint32_t vc_gid; > + __u32 vc_uid; > + __u32 vc_gid; > }; > > struct ptlrpc_ctx_ops { > diff --git a/drivers/staging/lustre/lustre/llite/vvp_dev.c b/drivers/staging/lustre/lustre/llite/vvp_dev.c > index f9d9a16..9a98a95 100644 > --- a/drivers/staging/lustre/lustre/llite/vvp_dev.c > +++ b/drivers/staging/lustre/lustre/llite/vvp_dev.c > @@ -383,7 +383,7 @@ int cl_sb_fini(struct super_block *sb) > struct vvp_pgcache_id { > unsigned int vpi_bucket; > unsigned int vpi_depth; > - uint32_t vpi_index; > + __u32 vpi_index; > > unsigned int vpi_curdep; > struct lu_object_header *vpi_obj; > diff --git a/drivers/staging/lustre/lustre/lov/lov_internal.h b/drivers/staging/lustre/lustre/lov/lov_internal.h > index a21f074..49a106c 100644 > --- a/drivers/staging/lustre/lustre/lov/lov_internal.h > +++ b/drivers/staging/lustre/lustre/lov/lov_internal.h > @@ -114,19 +114,19 @@ static inline const struct lsm_operations *lsm_op_find(int magic) > */ > #if BITS_PER_LONG == 64 > # define lov_do_div64(n, base) ({ \ > - uint64_t __base = (base); \ > - uint64_t __rem; \ > - __rem = ((uint64_t)(n)) % __base; \ > - (n) = ((uint64_t)(n)) / __base; \ > + __u64 __base = (base); \ > + __u64 __rem; \ > + __rem = ((__u64)(n)) % __base; \ > + (n) = ((__u64)(n)) / __base; \ > __rem; \ > }) > #elif BITS_PER_LONG == 32 > # define lov_do_div64(n, base) ({ \ > - uint64_t __rem; \ > + __u64 __rem; \ > if ((sizeof(base) > 4) && (((base) & 0xffffffff00000000ULL) != 0)) { \ > int __remainder; \ > LASSERTF(!((base) & (LOV_MIN_STRIPE_SIZE - 1)), "64 bit lov " \ > - "division %llu / %llu\n", (n), (uint64_t)(base)); \ > + "division %llu / %llu\n", (n), (__u64)(base)); \ > __remainder = (n) & (LOV_MIN_STRIPE_SIZE - 1); \ > (n) >>= LOV_MIN_STRIPE_BITS; \ > __rem = do_div(n, (base) >> LOV_MIN_STRIPE_BITS); \ > diff --git a/drivers/staging/lustre/lustre/osc/osc_internal.h b/drivers/staging/lustre/lustre/osc/osc_internal.h > index a536908..92d2e1f 100644 > --- a/drivers/staging/lustre/lustre/osc/osc_internal.h > +++ b/drivers/staging/lustre/lustre/osc/osc_internal.h > @@ -167,9 +167,9 @@ struct osc_device { > > /* Write stats is actually protected by client_obd's lock. */ > struct osc_stats { > - uint64_t os_lockless_writes; /* by bytes */ > - uint64_t os_lockless_reads; /* by bytes */ > - uint64_t os_lockless_truncates; /* by times */ > + __u64 os_lockless_writes; /* by bytes */ > + __u64 os_lockless_reads; /* by bytes */ > + __u64 os_lockless_truncates; /* by times */ > } od_stats; > > /* configuration item(s) */ > -- > 2.7.4 > Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation