Skip to contentSkip to conversation

lustre: Update to OpenSFS tree as of April 25, 2020

PATCH New James Simmons 1 participant 30 messages Apr 25, 2021 Networking

lore
Share & tools
lore
#0 lore raw

cover lustre: Update to OpenSFS tree as of April 25, 2020

Update the Linux lustre client to the lastes OpenSFS tree as of April 25, 2020. Only thing missing is the fake symlink which needs more work to make it function with newer kernels.

Andreas Dilger (5):
lustre: lmv: reduce struct lmv_obd size
lustre: uapi: remove obsolete ioctls
lnet: libcfs: fix setting of debug_path
lustre: osc: fall back to vmalloc for large RPCs
lustre: misc: limit CDEBUG console message frequency

Arshad Hussain (1):
lustre: fallocate: Add punch mode to fallocate

Chris Horn (3):
lnet: o2iblnd: Use REMOTE_DROPPED for ECONNREFUSED
lnet: Use lr_hops for avoid_asym_router_failure
lnet: Leverage peer aliveness more efficiently

Lai Siyao (2):
lustre: mdc: set fid2path RPC interruptible
lustre: mdt: mkdir should return -EEXIST if exists

Li Dongyang (2):
lnet: o2iblnd: don't resend if there's no listener
lnet: obi2lnd: don't try to reconnect if there's no listener

Mikhail Pershin (1):
lustre: llite: do fallocate() size checks under lock

Mr NeilBrown (10):
lnet: socklnd: use sockaddr instead of u32 addresses.
lnet: allow creation of IPv6 socket.
lnet: allow lnet_connect() to use IPv6 addresses
lnet: handle possiblity of IPv6 being unavailable.
lustre: include: remove references to Sun Trademark.
lustre: lmv: don't include struct lu_qos_rr in client
lustre: ldlm: discard l_lock from struct ldlm_lock.
lustre: various: only use wake_up_all() on exclusive waitqs
lnet: remove references to Sun Trademark.
lustre: remove references to Sun Trademark.

Serguei Smirnov (2):
lnet: socklnd: remove tcp bonding
lnet: socklnd: replace route construct

Wang Shilong (2):
lustre: readahead: limit over reservation
lustre: clio: fix hang on urgent cached pages

Yang Sheng (1):
lustre: uapi: add mdt_hash_name

 fs/lustre/fid/fid_internal.h               |    1 -
 fs/lustre/fid/fid_lib.c                    |    1 -
 fs/lustre/fid/fid_request.c                |    1 -
 fs/lustre/fid/lproc_fid.c                  |    1 -
 fs/lustre/fld/fld_cache.c                  |    1 -
 fs/lustre/fld/fld_internal.h               |    1 -
 fs/lustre/fld/fld_request.c                |    1 -
 fs/lustre/fld/lproc_fld.c                  |    1 -
 fs/lustre/include/cl_object.h              |   18 +-
 fs/lustre/include/lprocfs_status.h         |    1 -
 fs/lustre/include/lu_object.h              |   31 +-
 fs/lustre/include/lustre_acl.h             |    1 -
 fs/lustre/include/lustre_disk.h            |    1 -
 fs/lustre/include/lustre_dlm.h             |   18 +-
 fs/lustre/include/lustre_export.h          |    1 -
 fs/lustre/include/lustre_fid.h             |    1 -
 fs/lustre/include/lustre_fld.h             |    1 -
 fs/lustre/include/lustre_ha.h              |    1 -
 fs/lustre/include/lustre_handles.h         |    2 -
 fs/lustre/include/lustre_import.h          |    2 -
 fs/lustre/include/lustre_intent.h          |    1 -
 fs/lustre/include/lustre_lib.h             |    1 -
 fs/lustre/include/lustre_log.h             |    1 -
 fs/lustre/include/lustre_mdc.h             |    1 -
 fs/lustre/include/lustre_net.h             |    5 +-
 fs/lustre/include/lustre_osc.h             |   11 +-
 fs/lustre/include/lustre_req_layout.h      |    1 -
 fs/lustre/include/lustre_sec.h             |    1 -
 fs/lustre/include/obd.h                    |    1 -
 fs/lustre/include/obd_cksum.h              |    1 -
 fs/lustre/include/obd_class.h              |    1 -
 fs/lustre/include/obd_support.h            |    1 -
 fs/lustre/include/obd_target.h             |    1 -
 fs/lustre/ldlm/l_lock.c                    |   28 +-
 fs/lustre/ldlm/ldlm_extent.c               |    1 -
 fs/lustre/ldlm/ldlm_flock.c                |    1 -
 fs/lustre/ldlm/ldlm_inodebits.c            |    1 -
 fs/lustre/ldlm/ldlm_internal.h             |    1 -
 fs/lustre/ldlm/ldlm_lib.c                  |    1 -
 fs/lustre/ldlm/ldlm_lock.c                 |   35 +-
 fs/lustre/ldlm/ldlm_lockd.c                |   23 +-
 fs/lustre/ldlm/ldlm_plain.c                |    1 -
 fs/lustre/ldlm/ldlm_pool.c                 |    1 -
 fs/lustre/ldlm/ldlm_request.c              |    1 -
 fs/lustre/ldlm/ldlm_resource.c             |   13 +-
 fs/lustre/llite/acl.c                      |    1 -
 fs/lustre/llite/dcache.c                   |    1 -
 fs/lustre/llite/dir.c                      |   15 +-
 fs/lustre/llite/file.c                     |   94 ++-
 fs/lustre/llite/glimpse.c                  |    1 -
 fs/lustre/llite/lcommon_cl.c               |    1 -
 fs/lustre/llite/lcommon_misc.c             |    1 -
 fs/lustre/llite/llite_internal.h           |    1 -
 fs/lustre/llite/llite_lib.c                |    3 +-
 fs/lustre/llite/llite_mmap.c               |    1 -
 fs/lustre/llite/llite_nfs.c                |    1 -
 fs/lustre/llite/lproc_llite.c              |   11 +-
 fs/lustre/llite/namei.c                    |    1 -
 fs/lustre/llite/pcc.c                      |    2 +-
 fs/lustre/llite/rw.c                       |   40 +-
 fs/lustre/llite/rw26.c                     |    1 -
 fs/lustre/llite/statahead.c                |    1 -
 fs/lustre/llite/super25.c                  |    1 -
 fs/lustre/llite/symlink.c                  |    1 -
 fs/lustre/llite/vvp_dev.c                  |    1 -
 fs/lustre/llite/vvp_internal.h             |    1 -
 fs/lustre/llite/vvp_io.c                   |   35 +-
 fs/lustre/llite/vvp_object.c               |    1 -
 fs/lustre/llite/vvp_page.c                 |    1 -
 fs/lustre/llite/xattr.c                    |    1 -
 fs/lustre/lmv/lmv_fld.c                    |    1 -
 fs/lustre/lmv/lmv_intent.c                 |    1 -
 fs/lustre/lmv/lmv_internal.h               |    1 -
 fs/lustre/lmv/lmv_obd.c                    |    1 -
 fs/lustre/lmv/lproc_lmv.c                  |    1 -
 fs/lustre/lov/lov_cl_internal.h            |    2 -
 fs/lustre/lov/lov_dev.c                    |    1 -
 fs/lustre/lov/lov_ea.c                     |    1 -
 fs/lustre/lov/lov_internal.h               |    1 -
 fs/lustre/lov/lov_io.c                     |   86 ++-
 fs/lustre/lov/lov_lock.c                   |    1 -
 fs/lustre/lov/lov_merge.c                  |    1 -
 fs/lustre/lov/lov_obd.c                    |   11 +-
 fs/lustre/lov/lov_object.c                 |    1 -
 fs/lustre/lov/lov_offset.c                 |    1 -
 fs/lustre/lov/lov_pack.c                   |    1 -
 fs/lustre/lov/lov_page.c                   |    1 -
 fs/lustre/lov/lov_pool.c                   |    1 -
 fs/lustre/lov/lov_request.c                |    1 -
 fs/lustre/lov/lovsub_dev.c                 |    1 -
 fs/lustre/lov/lovsub_object.c              |    1 -
 fs/lustre/lov/lproc_lov.c                  |    1 -
 fs/lustre/mdc/lproc_mdc.c                  |    1 -
 fs/lustre/mdc/mdc_changelog.c              |    8 +-
 fs/lustre/mdc/mdc_dev.c                    |   13 +-
 fs/lustre/mdc/mdc_internal.h               |    1 -
 fs/lustre/mdc/mdc_lib.c                    |    6 +-
 fs/lustre/mdc/mdc_locks.c                  |    1 -
 fs/lustre/mdc/mdc_reint.c                  |    1 -
 fs/lustre/mdc/mdc_request.c                |   13 +-
 fs/lustre/mgc/lproc_mgc.c                  |    1 -
 fs/lustre/mgc/mgc_internal.h               |    1 -
 fs/lustre/mgc/mgc_request.c                |    6 +-
 fs/lustre/obdclass/cl_internal.h           |    1 -
 fs/lustre/obdclass/cl_io.c                 |   31 +-
 fs/lustre/obdclass/cl_lock.c               |    1 -
 fs/lustre/obdclass/cl_object.c             |    1 -
 fs/lustre/obdclass/cl_page.c               |    1 -
 fs/lustre/obdclass/class_obd.c             |    1 -
 fs/lustre/obdclass/genops.c                |    1 -
 fs/lustre/obdclass/kernelcomm.c            |    1 -
 fs/lustre/obdclass/llog.c                  |    1 -
 fs/lustre/obdclass/llog_cat.c              |    1 -
 fs/lustre/obdclass/llog_internal.h         |    1 -
 fs/lustre/obdclass/llog_obd.c              |    1 -
 fs/lustre/obdclass/llog_swab.c             |    1 -
 fs/lustre/obdclass/lprocfs_counters.c      |    1 -
 fs/lustre/obdclass/lprocfs_status.c        |    1 -
 fs/lustre/obdclass/lu_object.c             |    3 +-
 fs/lustre/obdclass/lu_ref.c                |    1 -
 fs/lustre/obdclass/lu_tgt_descs.c          |   16 +-
 fs/lustre/obdclass/lu_tgt_pool.c           |    2 -
 fs/lustre/obdclass/lustre_handles.c        |    1 -
 fs/lustre/obdclass/lustre_peer.c           |    1 -
 fs/lustre/obdclass/obd_config.c            |    1 -
 fs/lustre/obdclass/obd_mount.c             |    1 -
 fs/lustre/obdclass/obd_sysfs.c             |    1 -
 fs/lustre/obdclass/obdo.c                  |    1 -
 fs/lustre/obdclass/statfs_pack.c           |    1 -
 fs/lustre/obdecho/debug.c                  |    1 -
 fs/lustre/obdecho/echo_client.c            |    6 +-
 fs/lustre/obdecho/echo_internal.h          |    1 -
 fs/lustre/osc/lproc_osc.c                  |    1 -
 fs/lustre/osc/osc_cache.c                  |    1 -
 fs/lustre/osc/osc_dev.c                    |    1 -
 fs/lustre/osc/osc_internal.h               |    1 -
 fs/lustre/osc/osc_io.c                     |  132 ++--
 fs/lustre/osc/osc_lock.c                   |    1 -
 fs/lustre/osc/osc_object.c                 |    1 -
 fs/lustre/osc/osc_page.c                   |   45 +-
 fs/lustre/osc/osc_request.c                |   18 +-
 fs/lustre/ptlrpc/client.c                  |   44 +-
 fs/lustre/ptlrpc/connection.c              |    1 -
 fs/lustre/ptlrpc/events.c                  |   17 +-
 fs/lustre/ptlrpc/import.c                  |    1 -
 fs/lustre/ptlrpc/layout.c                  |    1 -
 fs/lustre/ptlrpc/llog_client.c             |    1 -
 fs/lustre/ptlrpc/llog_net.c                |    1 -
 fs/lustre/ptlrpc/lproc_ptlrpc.c            |    1 -
 fs/lustre/ptlrpc/niobuf.c                  |    1 -
 fs/lustre/ptlrpc/pack_generic.c            |    1 -
 fs/lustre/ptlrpc/pers.c                    |    1 -
 fs/lustre/ptlrpc/pinger.c                  |    1 -
 fs/lustre/ptlrpc/ptlrpc_internal.h         |    1 -
 fs/lustre/ptlrpc/ptlrpc_module.c           |    1 -
 fs/lustre/ptlrpc/ptlrpcd.c                 |    1 -
 fs/lustre/ptlrpc/recover.c                 |    1 -
 fs/lustre/ptlrpc/sec.c                     |    1 -
 fs/lustre/ptlrpc/sec_bulk.c                |    3 +-
 fs/lustre/ptlrpc/sec_config.c              |    1 -
 fs/lustre/ptlrpc/sec_gc.c                  |    1 -
 fs/lustre/ptlrpc/sec_lproc.c               |    1 -
 fs/lustre/ptlrpc/sec_null.c                |    1 -
 fs/lustre/ptlrpc/sec_plain.c               |    1 -
 fs/lustre/ptlrpc/service.c                 |    3 +-
 fs/lustre/ptlrpc/wiretest.c                |    1 -
 include/linux/libcfs/libcfs_debug.h        |    2 +-
 include/linux/lnet/lib-lnet.h              |   24 +-
 include/linux/lnet/lib-types.h             |    7 +-
 include/uapi/linux/lnet/libcfs_debug.h     |    1 -
 include/uapi/linux/lnet/libcfs_ioctl.h     |    1 -
 include/uapi/linux/lnet/lnet-dlc.h         |    5 +-
 include/uapi/linux/lnet/lnet-idl.h         |    1 -
 include/uapi/linux/lnet/socklnd.h          |    1 -
 include/uapi/linux/lustre/lustre_cfg.h     |    1 -
 include/uapi/linux/lustre/lustre_fiemap.h  |    1 -
 include/uapi/linux/lustre/lustre_idl.h     |    3 +-
 include/uapi/linux/lustre/lustre_ioctl.h   |   28 +-
 include/uapi/linux/lustre/lustre_param.h   |    1 -
 include/uapi/linux/lustre/lustre_user.h    |   13 +-
 net/lnet/klnds/o2iblnd/o2iblnd-idl.h       |    1 -
 net/lnet/klnds/o2iblnd/o2iblnd.c           |   21 +-
 net/lnet/klnds/o2iblnd/o2iblnd.h           |    3 -
 net/lnet/klnds/o2iblnd/o2iblnd_cb.c        |   41 +-
 net/lnet/klnds/o2iblnd/o2iblnd_modparams.c |    1 -
 net/lnet/klnds/socklnd/socklnd.c           | 1123 ++++++++--------------------
 net/lnet/klnds/socklnd/socklnd.h           |   53 +-
 net/lnet/klnds/socklnd/socklnd_cb.c        |  320 ++++----
 net/lnet/klnds/socklnd/socklnd_lib.c       |    8 +-
 net/lnet/klnds/socklnd/socklnd_proto.c     |   52 +-
 net/lnet/libcfs/debug.c                    |   18 +-
 net/lnet/lnet/acceptor.c                   |  115 ++-
 net/lnet/lnet/api-ni.c                     |   59 +-
 net/lnet/lnet/config.c                     |   59 +-
 net/lnet/lnet/lib-md.c                     |    1 -
 net/lnet/lnet/lib-me.c                     |    1 -
 net/lnet/lnet/lib-move.c                   |   38 +-
 net/lnet/lnet/lib-msg.c                    |    1 -
 net/lnet/lnet/lib-ptl.c                    |    1 -
 net/lnet/lnet/lib-socket.c                 |  113 ++-
 net/lnet/lnet/lo.c                         |    1 -
 net/lnet/lnet/module.c                     |    1 -
 net/lnet/lnet/nidstrings.c                 |    1 -
 net/lnet/lnet/peer.c                       |    3 +-
 net/lnet/lnet/router.c                     |   39 +-
 net/lnet/selftest/brw_test.c               |    1 -
 net/lnet/selftest/conctl.c                 |    1 -
 net/lnet/selftest/conrpc.c                 |    1 -
 net/lnet/selftest/conrpc.h                 |    1 -
 net/lnet/selftest/console.c                |    1 -
 net/lnet/selftest/console.h                |    1 -
 net/lnet/selftest/framework.c              |    1 -
 net/lnet/selftest/module.c                 |    1 -
 net/lnet/selftest/ping_test.c              |    1 -
 net/lnet/selftest/rpc.c                    |    1 -
 net/lnet/selftest/rpc.h                    |    1 -
 net/lnet/selftest/selftest.h               |    1 -
 net/lnet/selftest/timer.c                  |    1 -
 net/lnet/selftest/timer.h                  |    1 -
 219 files changed, 1369 insertions(+), 1787 deletions(-)
Signature · 6 lines
1.8.3.1

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
#1 lore raw

PATCH 1/29 lnet: socklnd: use sockaddr instead of u32 addresses.

From: Mr NeilBrown <[email protected]>

LNet/socklnd often uses u32 to hold an ipv4 address. As we want to extend socklnd to work with IPv6 addresses too, this needs to change.

This patch changes many u32s to variants of 'struct sockaddr'.

Library code from sunrpc is used for copying and comparing addresses
rpc_copy_addr() and rpc_cmp_addr()
and for extracting or setting the port:
rpc_get_port() and rpc_set_port().

The "%pIS" printf format is used for printing a sockaddr (works for both IPv4 and IPv6), and "%pISp" for printing the address with the port.

The u32 is in host-byte-order, while addresses in sockaddr are always network-order, so htonl and ntohl are used as needed.

When storing an address (e.g. in a structure), 'struct sockaddr_storage' is used. When passing an address to a function, 'struct sockaddr' is used. When an address is known to be IPv4 (i.e. when converting to or from u32), 'struct sockaddr_in' is used.

The following functions are changed to take a 'struct sockaddr*' argument:

lnet_connect()
lnet_connect_console_error()
lnet_sock_getaddr()
ksocknal_ip2iface()
ksocknal_ip2index()
ksocknal_create_route()
ksocknal_connecting()
ksocknal_close_peer_conns_locked()
ksocknal_peer_del_interface_locked()

The following structures have had fields changed to 'struct sockaddr_storage'

struct ksock_interface:

      ksni_ipaddr -> ksni_addr
 struct ksock_conn
      ksnc_myipaddr -> ksnc_myaddr
      ksnc_ipaddr and ksnc_port -> ksnc_peeraddr
 struct ksock_route
      ksnr_myipaddr -> ksnr_myaddr
      ksnr_ipaddr and ksnr_port -> ksnr_addr

Assorted strings have been joined onto a single line, and various indented have been changed from space to tabs.

There should be no behaviour changes, though the structures mentioned above will now be a little larger.

WC-bug-id: https://jira.whamcloud.com/browse/LU-10391
Lustre-commit: c35c1babc7466ed ("LU-10391 socklnd: use sockaddr instead of __u32 addresses.")

Reviewed-on: https://review.whamcloud.com/37704

---
 include/linux/lnet/lib-lnet.h          |   9 +-
 net/lnet/klnds/socklnd/socklnd.c       | 330 +++++++++++++++++++++++----------
 net/lnet/klnds/socklnd/socklnd.h       |  12 +-
 net/lnet/klnds/socklnd/socklnd_cb.c    | 132 +++++++------
 net/lnet/klnds/socklnd/socklnd_lib.c   |   7 +-
 net/lnet/klnds/socklnd/socklnd_proto.c |  52 +++---
 net/lnet/lnet/acceptor.c               | 113 ++++++-----
 net/lnet/lnet/lib-socket.c             |  14 +-
 8 files changed, 392 insertions(+), 277 deletions(-)
include/linux/lnet/lib-lnet.h +5 -4
index e4dbe0e..2e88d80 100644
@@ -713,10 +713,10 @@ void lnet_copy_kiov2iter(struct iov_iter *to,
 void lnet_register_lnd(struct lnet_lnd *lnd);
 void lnet_unregister_lnd(struct lnet_lnd *lnd);
 
-struct socket *lnet_connect(lnet_nid_t peer_nid, int interface, u32 peer_ip,
-			    int peer_port, struct net *ns);
+struct socket *lnet_connect(lnet_nid_t peer_nid, int interface,
+			    struct sockaddr *peeraddr, struct net *ns);
 void lnet_connect_console_error(int rc, lnet_nid_t peer_nid,
-				u32 peer_ip, int port);
+				struct sockaddr *sa);
 int lnet_count_acceptor_nets(void);
 int lnet_acceptor_timeout(void);
 int lnet_acceptor_port(void);
@@ -738,7 +738,8 @@ struct lnet_inetdev {
 int lnet_inet_enumerate(struct lnet_inetdev **dev_list, struct net *ns);
 int lnet_sock_setbuf(struct socket *socket, int txbufsize, int rxbufsize);
 int lnet_sock_getbuf(struct socket *socket, int *txbufsize, int *rxbufsize);
-int lnet_sock_getaddr(struct socket *socket, bool remote, u32 *ip, int *port);
+int lnet_sock_getaddr(struct socket *socket, bool remote,
+		      struct sockaddr_storage *peer);
 int lnet_sock_write(struct socket *sock, void *buffer, int nob, int timeout);
 int lnet_sock_read(struct socket *sock, void *buffer, int nob, int timeout);
 
net/lnet/klnds/socklnd/socklnd.c +227 -103

760 lines not on this page · raw message

net/lnet/klnds/socklnd/socklnd.h +5 -7
index 261cbb46..83f0e3c 100644
@@ -100,7 +100,7 @@ struct ksock_sched {				/* per scheduler state */
 
 struct ksock_interface {			/* in-use interface */
 	int		ksni_index;		/* Linux interface index */
-	u32		ksni_ipaddr;		/* interface's IP address */
+	struct sockaddr_storage ksni_addr;	/* interface's address */
 	u32		ksni_netmask;		/* interface's network mask */
 	int		ksni_nroutes;		/* # routes using (active) */
 	int		ksni_npeers;		/* # peers using (passive) */
@@ -316,9 +316,8 @@ struct ksock_conn {
 	refcount_t		ksnc_sock_refcount;	/* sock refcount */
 	struct ksock_sched     *ksnc_scheduler;		/* who schedules this connection
 							 */
-	u32			ksnc_myipaddr;		/* my IP */
-	u32			ksnc_ipaddr;		/* peer_ni's IP */
-	int			ksnc_port;		/* peer_ni's port */
+	struct sockaddr_storage	ksnc_myaddr;		/* my address */
+	struct sockaddr_storage ksnc_peeraddr;		/* peer_ni's address */
 	signed int		ksnc_type:3;		/* type of connection, should be
 							 * signed value
 							 */
@@ -381,8 +380,7 @@ struct ksock_route {
 							 */
 	time64_t		ksnr_retry_interval;	/* how long between retries */
 	int			ksnr_myiface;		/* my IP */
-	u32			ksnr_ipaddr;		/* IP address to connect to */
-	int			ksnr_port;		/* port to connect to */
+	struct sockaddr_storage	ksnr_addr;		/* IP address to connect to */
 	unsigned int		ksnr_scheduled:1;	/* scheduled for attention */
 	unsigned int		ksnr_connecting:1;	/* connection establishment in
 							 * progress
@@ -624,7 +622,7 @@ int ksocknal_create_conn(struct lnet_ni *ni, struct ksock_route *route,
 void ksocknal_terminate_conn(struct ksock_conn *conn);
 void ksocknal_destroy_conn(struct ksock_conn *conn);
 int ksocknal_close_peer_conns_locked(struct ksock_peer_ni *peer_ni,
-				     u32 ipaddr, int why);
+				     struct sockaddr *peer, int why);
 int ksocknal_close_conn_and_siblings(struct ksock_conn *conn, int why);
 int ksocknal_close_matching_conns(struct lnet_process_id id, u32 ipaddr);
 struct ksock_conn *ksocknal_find_conn_locked(struct ksock_peer_ni *peer_ni,
net/lnet/klnds/socklnd/socklnd_cb.c +65 -67

287 lines not on this page · raw message

net/lnet/klnds/socklnd/socklnd_lib.c +4 -3
index 1d6cd0e..6ce5ca4 100644
@@ -37,8 +37,8 @@
 int
 ksocknal_lib_get_conn_addrs(struct ksock_conn *conn)
 {
-	int rc = lnet_sock_getaddr(conn->ksnc_sock, 1, &conn->ksnc_ipaddr,
-				   &conn->ksnc_port);
+	int rc = lnet_sock_getaddr(conn->ksnc_sock, true,
+				   &conn->ksnc_peeraddr);
 
 	/* Didn't need the {get,put}connsock dance to deref ksnc_sock... */
 	LASSERT(!conn->ksnc_closing);
@@ -48,7 +48,8 @@
 		return rc;
 	}
 
-	rc = lnet_sock_getaddr(conn->ksnc_sock, 0, &conn->ksnc_myipaddr, NULL);
+	rc = lnet_sock_getaddr(conn->ksnc_sock, false,
+			       &conn->ksnc_myaddr);
 	if (rc) {
 		CERROR("Error %d getting sock local IP\n", rc);
 		return rc;
net/lnet/klnds/socklnd/socklnd_proto.c +26 -26

133 lines not on this page · raw message

net/lnet/lnet/acceptor.c +56 -57

245 lines not on this page · raw message

net/lnet/lnet/lib-socket.c +4 -10
index e082b52..5c5366f 100644
@@ -267,27 +267,21 @@ int choose_ipv4_src(__u32 *ret, int interface, __u32 dst_ipaddr, struct net *ns)
 EXPORT_SYMBOL(lnet_sock_setbuf);
 
 int
-lnet_sock_getaddr(struct socket *sock, bool remote, u32 *ip, int *port)
+lnet_sock_getaddr(struct socket *sock, bool remote,
+		  struct sockaddr_storage *peer)
 {
-	struct sockaddr_in sin;
 	int rc;
 
 	if (remote)
-		rc = kernel_getpeername(sock, (struct sockaddr *)&sin);
+		rc = kernel_getpeername(sock, (struct sockaddr *)peer);
 	else
-		rc = kernel_getsockname(sock, (struct sockaddr *)&sin);
+		rc = kernel_getsockname(sock, (struct sockaddr *)peer);
 	if (rc < 0) {
 		CERROR("Error %d getting sock %s IP/port\n",
 		       rc, remote ? "peer" : "local");
 		return rc;
 	}
 
-	if (ip)
-		*ip = ntohl(sin.sin_addr.s_addr);
-
-	if (port)
-		*port = ntohs(sin.sin_port);
-
 	return 0;
 }
 EXPORT_SYMBOL(lnet_sock_getaddr);
Signature · 6 lines
1.8.3.1

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
#2 lore raw

PATCH 2/29 lnet: allow creation of IPv6 socket.

In reply to James Simmons

From: Mr NeilBrown <[email protected]>

With this patch, lnet_sock_create() can make IPv6 sockets. If an interface and destination is given, completely different code is needed to bind the local address.

When no interface or destination is given, an IPv6 socket is always created, so lnet_acceptor() needs to request that IPv4 connections are accepted as well, and lnet_sock_getaddr() needs to detect mapped v4 addresses and present them as true v4 addresses.

WC-bug-id: https://jira.whamcloud.com/browse/LU-10391
Lustre-commit: e4fa181abf103219 ("LU-10391 lnet: allow creation of IPv6 socket.")

Reviewed-on: https://review.whamcloud.com/37705

---
 net/lnet/lnet/lib-socket.c | 85 +++++++++++++++++++++++++++++++++++-----------
 1 file changed, 65 insertions(+), 20 deletions(-)
net/lnet/lnet/lib-socket.c +65 -20
index 5c5366f..eb6559c 100644
@@ -35,6 +35,8 @@
 #include <linux/if.h>
 #include <linux/in.h>
 #include <linux/net.h>
+#include <net/addrconf.h>
+#include <net/ipv6.h>
 #include <linux/file.h>
 #include <linux/pagemap.h>
 /* For sys_open & sys_close */
@@ -141,7 +143,7 @@
 }
 EXPORT_SYMBOL(lnet_sock_read);
 
-int choose_ipv4_src(__u32 *ret, int interface, __u32 dst_ipaddr, struct net *ns)
+int choose_ipv4_src(u32 *ret, int interface, u32 dst_ipaddr, struct net *ns)
 {
 	struct net_device *dev;
 	struct in_device *in_dev;
@@ -181,8 +183,12 @@ int choose_ipv4_src(__u32 *ret, int interface, __u32 dst_ipaddr, struct net *ns)
 	struct socket *sock;
 	int rc;
 	int option;
+	int family;
 
-	rc = sock_create_kern(ns, PF_INET, SOCK_STREAM, 0, &sock);
+	family = AF_INET6;
+	if (remaddr)
+		family = remaddr->sa_family;
+	rc = sock_create_kern(ns, family, SOCK_STREAM, 0, &sock);
 	if (rc) {
 		CERROR("Can't create socket: %d\n", rc);
 		return ERR_PTR(rc);
@@ -197,25 +203,44 @@ int choose_ipv4_src(__u32 *ret, int interface, __u32 dst_ipaddr, struct net *ns)
 	}
 
 	if (interface >= 0 || local_port) {
-		struct sockaddr_in locaddr = {};
-
-		locaddr.sin_family = AF_INET;
-		locaddr.sin_addr.s_addr = INADDR_ANY;
-		if (interface >= 0) {
-			struct sockaddr_in *sin = (void *)remaddr;
-			u32 ip;
-
-			rc = choose_ipv4_src(&ip,
-					     interface,
-					     ntohl(sin->sin_addr.s_addr),
-					     ns);
-			if (rc)
-				goto failed;
-			locaddr.sin_addr.s_addr = htonl(ip);
+		struct sockaddr_storage locaddr = {};
+		struct sockaddr_in *sin = (void *)&locaddr;
+		struct sockaddr_in6 *sin6 = (void *)&locaddr;
+
+		switch (family) {
+		case AF_INET:
+			sin->sin_family = AF_INET;
+			sin->sin_addr.s_addr = INADDR_ANY;
+			if (interface >= 0 && remaddr) {
+				struct sockaddr_in *rem = (void *)remaddr;
+				u32 ip;
+
+				rc = choose_ipv4_src(&ip,
+						     interface,
+						     ntohl(rem->sin_addr.s_addr),
+						     ns);
+				if (rc)
+					goto failed;
+				sin->sin_addr.s_addr = htonl(ip);
+			}
+			sin->sin_port = htons(local_port);
+			break;
+		case AF_INET6:
+			sin6->sin6_family = AF_INET6;
+			sin6->sin6_addr = in6addr_any;
+			if (interface >= 0 && remaddr) {
+				struct sockaddr_in6 *rem = (void *)remaddr;
+
+				ipv6_dev_get_saddr(ns,
+						   dev_get_by_index(ns,
+								    interface),
+						   &rem->sin6_addr, 0,
+						   &sin6->sin6_addr);
+			}
+			sin6->sin6_port = htons(local_port);
+			break;
 		}
 
-		locaddr.sin_port = htons(local_port);
-
 		rc = kernel_bind(sock, (struct sockaddr *)&locaddr,
 				 sizeof(locaddr));
 		if (rc == -EADDRINUSE) {
@@ -281,7 +306,19 @@ int choose_ipv4_src(__u32 *ret, int interface, __u32 dst_ipaddr, struct net *ns)
 		       rc, remote ? "peer" : "local");
 		return rc;
 	}
-
+	if (peer->ss_family == AF_INET6) {
+		struct sockaddr_in6 *in6 = (void *)peer;
+		struct sockaddr_in *in = (void *)peer;
+		short port = in6->sin6_port;
+
+		if (ipv6_addr_v4mapped(&in6->sin6_addr)) {
+			/* Pretend it is a v4 socket */
+			memset(in, 0, sizeof(*in));
+			in->sin_family = AF_INET;
+			in->sin_port = port;
+			memcpy(&in->sin_addr, &in6->sin6_addr.s6_addr32[3], 4);
+		}
+	}
 	return 0;
 }
 EXPORT_SYMBOL(lnet_sock_getaddr);
@@ -303,6 +340,7 @@ struct socket *
 lnet_sock_listen(int local_port, int backlog, struct net *ns)
 {
 	struct socket *sock;
+	int val = 0;
 	int rc;
 
 	sock = lnet_sock_create(-1, NULL, local_port, ns);
@@ -314,6 +352,13 @@ struct socket *
 		return ERR_PTR(rc);
 	}
 
+	/* Make sure we get both IPv4 and IPv6 connections.
+	 * This is the default, but it can be overridden so
+	 * we force it back.
+	 */
+	kernel_setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY,
+			  (char *)&val, sizeof(val));
+
 	rc = kernel_listen(sock, backlog);
 	if (!rc)
 		return sock;
Signature · 6 lines
1.8.3.1

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
#3 lore raw

PATCH 3/29 lnet: allow lnet_connect() to use IPv6 addresses

In reply to James Simmons

From: Mr NeilBrown <[email protected]>

Now that we can created and bind IPv6 sockets, connecting to them is trivial.

WC-bug-id: https://jira.whamcloud.com/browse/LU-10391
Lustre-commit: fb40f0b62d77d69 ("LU-10391 lnet: allow lnet_connect() to use IPv6 addresses.")

Reviewed-on: https://review.whamcloud.com/37706

---
 net/lnet/lnet/acceptor.c   | 3 ++-
 net/lnet/lnet/lib-socket.c | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
net/lnet/lnet/acceptor.c +2 -1
index 5765a08..d326e39 100644
@@ -140,7 +140,8 @@ struct socket *
 
 	BUILD_BUG_ON(sizeof(cr) > 16);		/* too big to be on the stack */
 
-	LASSERT(peeraddr->sa_family == AF_INET);
+	LASSERT(peeraddr->sa_family == AF_INET ||
+		peeraddr->sa_family == AF_INET6);
 
 	for (port = LNET_ACCEPTOR_MAX_RESERVED_PORT;
 	     port >= LNET_ACCEPTOR_MIN_RESERVED_PORT;
net/lnet/lnet/lib-socket.c +1 -1
index eb6559c..ee675ae 100644
@@ -380,7 +380,7 @@ struct socket *
 	if (IS_ERR(sock))
 		return sock;
 
-	rc = kernel_connect(sock, peeraddr, sizeof(struct sockaddr_in), 0);
+	rc = kernel_connect(sock, peeraddr, sizeof(struct sockaddr_in6), 0);
 	if (!rc)
 		return sock;
 
Signature · 6 lines
1.8.3.1

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
#4 lore raw

PATCH 4/29 lnet: handle possiblity of IPv6 being unavailable.

In reply to James Simmons

From: Mr NeilBrown <[email protected]>

If CONFIG_IPV6 is not enabled, the attempt to create an IPv6 socket for accepting new incoming connections will fail. In that case we need to creae an IPv4 socket instead.

Also ipv6_dev_get_saddr will not be available, so we must not include the code that tries to use it.

Fixes 7314102c80ae ("lnet: allow creation of IPv6 socket")

WC-bug-id: https://jira.whamcloud.com/browse/LU-14477
Lustre-commit: 6376551ca266f839 ("LU-14477 lnet: handle possiblity of IPv6 being unavailable.")

Reviewed-on: https://review.whamcloud.com/41791

---
 net/lnet/lnet/lib-socket.c | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)
net/lnet/lnet/lib-socket.c +16 -4
index ee675ae..317d3cf 100644
@@ -188,7 +188,13 @@ int choose_ipv4_src(u32 *ret, int interface, u32 dst_ipaddr, struct net *ns)
 	family = AF_INET6;
 	if (remaddr)
 		family = remaddr->sa_family;
+retry:
 	rc = sock_create_kern(ns, family, SOCK_STREAM, 0, &sock);
+	if (rc == -EAFNOSUPPORT && family == AF_INET6 && !remaddr) {
+		family = AF_INET;
+		goto retry;
+	}
+
 	if (rc) {
 		CERROR("Can't create socket: %d\n", rc);
 		return ERR_PTR(rc);
@@ -204,11 +210,11 @@ int choose_ipv4_src(u32 *ret, int interface, u32 dst_ipaddr, struct net *ns)
 
 	if (interface >= 0 || local_port) {
 		struct sockaddr_storage locaddr = {};
-		struct sockaddr_in *sin = (void *)&locaddr;
-		struct sockaddr_in6 *sin6 = (void *)&locaddr;
 
 		switch (family) {
-		case AF_INET:
+		case AF_INET: {
+			struct sockaddr_in *sin = (void *)&locaddr;
+
 			sin->sin_family = AF_INET;
 			sin->sin_addr.s_addr = INADDR_ANY;
 			if (interface >= 0 && remaddr) {
@@ -225,7 +231,11 @@ int choose_ipv4_src(u32 *ret, int interface, u32 dst_ipaddr, struct net *ns)
 			}
 			sin->sin_port = htons(local_port);
 			break;
-		case AF_INET6:
+		}
+#if IS_ENABLED(CONFIG_IPV6)
+		case AF_INET6: {
+			struct sockaddr_in6 *sin6 = (void *)&locaddr;
+
 			sin6->sin6_family = AF_INET6;
 			sin6->sin6_addr = in6addr_any;
 			if (interface >= 0 && remaddr) {
@@ -240,6 +250,8 @@ int choose_ipv4_src(u32 *ret, int interface, u32 dst_ipaddr, struct net *ns)
 			sin6->sin6_port = htons(local_port);
 			break;
 		}
+#endif /* IS_ENABLED(CONFIG_IPV6) */
+		}
 
 		rc = kernel_bind(sock, (struct sockaddr *)&locaddr,
 				 sizeof(locaddr));
Signature · 6 lines
1.8.3.1

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
#5 lore raw

PATCH 5/29 lnet: socklnd: remove tcp bonding

In reply to James Simmons

From: Serguei Smirnov <[email protected]>

TCP bonding in the socklnd has become obsolete with LNet Multi-Rail and there's no evidence it's being used anywhere. Remove it to keep the code simple.

WC-bug-id: https://jira.whamcloud.com/browse/LU-13641
Lustre-commit: d123c47a18adbf56 ("LU-13641 socklnd: remove tcp bonding")

Reviewed-on: https://review.whamcloud.com/40000

---
 include/linux/lnet/lib-lnet.h      |   3 +-
 include/linux/lnet/lib-types.h     |   5 +-
 include/uapi/linux/lnet/lnet-dlc.h |   5 +-
 net/lnet/klnds/o2iblnd/o2iblnd.c   |  16 +-
 net/lnet/klnds/socklnd/socklnd.c   | 683 +++----------------------------------
 net/lnet/klnds/socklnd/socklnd.h   |   3 +-
 net/lnet/lnet/api-ni.c             |  58 +---
 net/lnet/lnet/config.c             |  58 +---
 8 files changed, 91 insertions(+), 740 deletions(-)
include/linux/lnet/lib-lnet.h +1 -2
index 2e88d80..4712e2d 100644
@@ -793,8 +793,7 @@ int lnet_push_target_post(struct lnet_ping_buffer *pbuf,
 
 int lnet_parse_ip2nets(const char **networksp, const char *ip2nets);
 int lnet_parse_routes(const char *route_str, int *im_a_router);
-int lnet_parse_networks(struct list_head *nilist, const char *networks,
-			bool use_tcp_bonding);
+int lnet_parse_networks(struct list_head *nilist, const char *networks);
 bool lnet_net_unique(u32 net_id, struct list_head *nilist,
 		     struct lnet_net **net);
 bool lnet_ni_unique_net(struct list_head *nilist, char *iface);
include/linux/lnet/lib-types.h +2 -3
index ce067b3..f479efe 100644
@@ -496,10 +496,9 @@ struct lnet_ni {
 	u32			ni_sel_priority;
 
 	/*
-	 * equivalent interfaces to use
-	 * This is an array because socklnd bonding can still be configured
+	 * equivalent interface to use
 	 */
-	char			*ni_interfaces[LNET_INTERFACES_NUM];
+	char			*ni_interface;
 	/* original net namespace */
 	struct net		*ni_net_ns;
 };
include/uapi/linux/lnet/lnet-dlc.h +2 -3
index e775dfe..b375d0a 100644
@@ -93,7 +93,7 @@ struct lnet_ioctl_config_lnd_tunables {
 };
 
 struct lnet_ioctl_net_config {
-	char ni_interfaces[LNET_INTERFACES_NUM][LNET_MAX_STR_LEN];
+	char ni_interface[LNET_MAX_STR_LEN];
 	__u32 ni_status;
 	__u32 ni_cpts[LNET_MAX_SHOW_NUM_CPT];
 	char cfg_bulk[0];
@@ -222,12 +222,11 @@ struct lnet_ioctl_element_msg_stats {
 struct lnet_ioctl_config_ni {
 	struct libcfs_ioctl_hdr lic_cfg_hdr;
 	lnet_nid_t		lic_nid;
-	char			lic_ni_intf[LNET_INTERFACES_NUM][LNET_MAX_STR_LEN];
+	char			lic_ni_intf[LNET_MAX_STR_LEN];
 	char			lic_legacy_ip2nets[LNET_MAX_STR_LEN];
 	__u32			lic_cpts[LNET_MAX_SHOW_NUM_CPT];
 	__u32			lic_ncpts;
 	__u32			lic_status;
-	__u32			lic_tcp_bonding;
 	__u32			lic_idx;
 	__s32			lic_dev_cpt;
 	char			pad[4];
net/lnet/klnds/o2iblnd/o2iblnd.c +4 -12
index 01cc1ed..782e29b 100644
@@ -2822,20 +2822,12 @@ static int kiblnd_startup(struct lnet_ni *ni)
 	if (rc)
 		goto net_failed;
 
-	/* ni_interfaces is only to support legacy pre Multi-Rail
-	 * tcp bonding for ksocklnd. Multi-Rail wants each secondary
-	 * IP to be treated as an unique 'struct ni' interfaces instead.
+	/* Multi-Rail wants each secondary
+	 * IP to be treated as an unique 'struct ni' interface.
 	 */
-	if (ni->ni_interfaces[0]) {
+	if (ni->ni_interface) {
 		/* Use the IPoIB interface specified in 'networks=' */
-
-		if (ni->ni_interfaces[1]) {
-			CERROR("ko2iblnd: Multiple interfaces not supported\n");
-			rc = -EINVAL;
-			goto failed;
-		}
-
-		ifname = ni->ni_interfaces[0];
+		ifname = ni->ni_interface;
 	} else {
 		ifname = *kiblnd_tunables.kib_default_ipif;
 	}
net/lnet/klnds/socklnd/socklnd.c +51 -632

803 lines not on this page · raw message

net/lnet/klnds/socklnd/socklnd.h +1 -2
index 83f0e3c..e6df3ed 100644
@@ -169,8 +169,7 @@ struct ksock_net {
 	u64			ksnn_incarnation;	/* my epoch */
 	struct list_head	ksnn_list;		/* chain on global list */
 	atomic_t		ksnn_npeers;		/* # peers */
-	int			ksnn_ninterfaces;	/* IP interfaces */
-	struct ksock_interface	ksnn_interfaces[LNET_INTERFACES_NUM];
+	struct ksock_interface	ksnn_interface;		/* IP interface */
 };
 
 /* When the ksock_net is shut down, this bias is added to
net/lnet/lnet/api-ni.c +17 -41

127 lines not on this page · raw message

net/lnet/lnet/config.c +13 -45

114 lines not on this page · raw message

Signature · 6 lines
1.8.3.1

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
#6 lore raw

PATCH 6/29 lnet: socklnd: replace route construct

In reply to James Simmons

From: Serguei Smirnov <[email protected]>

With TCP bonding removed, it's no longer necessary to maintain multiple route constructs per peer_ni in socklnd. Replace the route construct with connection control block, conn_cb, and make sure there's a single conn_cb per peer_ni.

WC-bug-id: https://jira.whamcloud.com/browse/LU-13641
Lustre-commit: 7766f01e891c378d ("LU-13641 socklnd: replace route construct")

Reviewed-on: https://review.whamcloud.com/40774

---
 net/lnet/klnds/socklnd/socklnd.c    | 367 +++++++++++++++---------------------
 net/lnet/klnds/socklnd/socklnd.h    |  38 ++--
 net/lnet/klnds/socklnd/socklnd_cb.c | 200 ++++++++++----------
 3 files changed, 273 insertions(+), 332 deletions(-)
net/lnet/klnds/socklnd/socklnd.c +153 -214
index 55d1ba5..141da88 100644
@@ -112,40 +112,40 @@ static int ksocknal_ip2index(struct sockaddr *addr, struct lnet_ni *ni)
 	return ret;
 }
 
-static struct ksock_route *
-ksocknal_create_route(struct sockaddr *addr)
+static struct ksock_conn_cb *
+ksocknal_create_conn_cb(struct sockaddr *addr)
 {
-	struct ksock_route *route;
+	struct ksock_conn_cb *conn_cb;
 
-	route = kzalloc(sizeof(*route), GFP_NOFS);
-	if (!route)
+	conn_cb = kzalloc(sizeof(*conn_cb), GFP_NOFS);
+	if (!conn_cb)
 		return NULL;
 
-	refcount_set(&route->ksnr_refcount, 1);
-	route->ksnr_peer = NULL;
-	route->ksnr_retry_interval = 0;		/* OK to connect at any time */
-	rpc_copy_addr((struct sockaddr *)&route->ksnr_addr, addr);
-	rpc_set_port((struct sockaddr *)&route->ksnr_addr, rpc_get_port(addr));
-	route->ksnr_myiface = -1;
-	route->ksnr_scheduled = 0;
-	route->ksnr_connecting = 0;
-	route->ksnr_connected = 0;
-	route->ksnr_deleted = 0;
-	route->ksnr_conn_count = 0;
-	route->ksnr_share_count = 0;
-
-	return route;
+	refcount_set(&conn_cb->ksnr_refcount, 1);
+	conn_cb->ksnr_peer = NULL;
+	conn_cb->ksnr_retry_interval = 0;	/* OK to connect at any time */
+	rpc_copy_addr((struct sockaddr *)&conn_cb->ksnr_addr, addr);
+	rpc_set_port((struct sockaddr *)&conn_cb->ksnr_addr,
+		     rpc_get_port(addr));
+	conn_cb->ksnr_myiface = -1;
+	conn_cb->ksnr_scheduled = 0;
+	conn_cb->ksnr_connecting = 0;
+	conn_cb->ksnr_connected = 0;
+	conn_cb->ksnr_deleted = 0;
+	conn_cb->ksnr_conn_count = 0;
+
+	return conn_cb;
 }
 
 void
-ksocknal_destroy_route(struct ksock_route *route)
+ksocknal_destroy_conn_cb(struct ksock_conn_cb *conn_cb)
 {
-	LASSERT(!refcount_read(&route->ksnr_refcount));
+	LASSERT(refcount_read(&conn_cb->ksnr_refcount) == 0);
 
-	if (route->ksnr_peer)
-		ksocknal_peer_decref(route->ksnr_peer);
+	if (conn_cb->ksnr_peer)
+		ksocknal_peer_decref(conn_cb->ksnr_peer);
 
-	kfree(route);
+	kfree(conn_cb);
 }
 
 static struct ksock_peer_ni *
@@ -178,9 +178,9 @@ static int ksocknal_ip2index(struct sockaddr *addr, struct lnet_ni *ni)
 	peer_ni->ksnp_proto = NULL;
 	peer_ni->ksnp_last_alive = 0;
 	peer_ni->ksnp_zc_next_cookie = SOCKNAL_KEEPALIVE_PING + 1;
+	peer_ni->ksnp_conn_cb = NULL;
 
 	INIT_LIST_HEAD(&peer_ni->ksnp_conns);
-	INIT_LIST_HEAD(&peer_ni->ksnp_routes);
 	INIT_LIST_HEAD(&peer_ni->ksnp_tx_queue);
 	INIT_LIST_HEAD(&peer_ni->ksnp_zc_req_list);
 	spin_lock_init(&peer_ni->ksnp_lock);
@@ -199,17 +199,16 @@ static int ksocknal_ip2index(struct sockaddr *addr, struct lnet_ni *ni)
 	LASSERT(!refcount_read(&peer_ni->ksnp_refcount));
 	LASSERT(!peer_ni->ksnp_accepting);
 	LASSERT(list_empty(&peer_ni->ksnp_conns));
-	LASSERT(list_empty(&peer_ni->ksnp_routes));
+	LASSERT(!peer_ni->ksnp_conn_cb);
 	LASSERT(list_empty(&peer_ni->ksnp_tx_queue));
 	LASSERT(list_empty(&peer_ni->ksnp_zc_req_list));
 
 	kfree(peer_ni);
 
-	/*
-	 * NB a peer_ni's connections and routes keep a reference on their peer
-	 * until they are destroyed, so we can be assured that _all_ state to
-	 * do with this peer_ni has been cleaned up when its refcount drops to
-	 * zero.
+	/* NB a peer_ni's connections and conn_cb keep a reference on their
+	 * peer until they are destroyed, so we can be assured that _all_
+	 * state to do with this peer_ni has been cleaned up when its refcount
+	 * drops to zero.
 	 */
 	if (atomic_dec_and_test(&net->ksnn_npeers))
 		wake_up_var(&net->ksnn_npeers);
@@ -279,7 +278,7 @@ struct ksock_peer_ni *
 	}
 
 	LASSERT(list_empty(&peer_ni->ksnp_conns));
-	LASSERT(list_empty(&peer_ni->ksnp_routes));
+	LASSERT(!peer_ni->ksnp_conn_cb);
 	LASSERT(!peer_ni->ksnp_closing);
 	peer_ni->ksnp_closing = 1;
 	hlist_del(&peer_ni->ksnp_list);
@@ -293,7 +292,7 @@ struct ksock_peer_ni *
 		       int *port, int *conn_count, int *share_count)
 {
 	struct ksock_peer_ni *peer_ni;
-	struct ksock_route *route;
+	struct ksock_conn_cb *conn_cb;
 	int i;
 	int j;
 	int rc = -ENOENT;
@@ -305,7 +304,7 @@ struct ksock_peer_ni *
 			continue;
 
 		if (!peer_ni->ksnp_n_passive_ips &&
-		    list_empty(&peer_ni->ksnp_routes)) {
+		    !peer_ni->ksnp_conn_cb) {
 			if (index-- > 0)
 				continue;
 
@@ -333,18 +332,19 @@ struct ksock_peer_ni *
 			goto out;
 		}
 
-		list_for_each_entry(route, &peer_ni->ksnp_routes,
-				    ksnr_list) {
+		if (peer_ni->ksnp_conn_cb) {
 			if (index-- > 0)
 				continue;
 
+			conn_cb = peer_ni->ksnp_conn_cb;
+
 			*id = peer_ni->ksnp_id;
-			if (route->ksnr_addr.ss_family == AF_INET) {
+			if (conn_cb->ksnr_addr.ss_family == AF_INET) {
 				struct sockaddr_in *sa;
 
-				sa = (void *)&route->ksnr_addr;
+				sa = (void *)&conn_cb->ksnr_addr;
 				rc = choose_ipv4_src(myip,
-						     route->ksnr_myiface,
+						     conn_cb->ksnr_myiface,
 						     ntohl(sa->sin_addr.s_addr),
 						     ni->ni_net_ns);
 				*peer_ip = ntohl(sa->sin_addr.s_addr);
@@ -355,8 +355,8 @@ struct ksock_peer_ni *
 				*port = 0;
 				rc = -ENOTSUPP;
 			}
-			*conn_count = route->ksnr_conn_count;
-			*share_count = route->ksnr_share_count;
+			*conn_count = conn_cb->ksnr_conn_count;
+			*share_count = 1;
 			goto out;
 		}
 	}
@@ -366,133 +366,121 @@ struct ksock_peer_ni *
 }
 
 static void
-ksocknal_associate_route_conn_locked(struct ksock_route *route,
-				     struct ksock_conn *conn)
+ksocknal_associate_cb_conn_locked(struct ksock_conn_cb *conn_cb,
+				  struct ksock_conn *conn)
 {
-	struct ksock_peer_ni *peer_ni = route->ksnr_peer;
+	struct ksock_peer_ni *peer_ni = conn_cb->ksnr_peer;
 	int type = conn->ksnc_type;
 	struct ksock_interface *iface;
 	int conn_iface;
 
 	conn_iface = ksocknal_ip2index((struct sockaddr *)&conn->ksnc_myaddr,
-				       route->ksnr_peer->ksnp_ni);
-	conn->ksnc_route = route;
-	ksocknal_route_addref(route);
-
-	if (route->ksnr_myiface != conn_iface) {
-		if (route->ksnr_myiface < 0) {
-			/* route wasn't bound locally yet (the initial route) */
+				       peer_ni->ksnp_ni);
+	conn->ksnc_conn_cb = conn_cb;
+	ksocknal_conn_cb_addref(conn_cb);
+
+	if (conn_cb->ksnr_myiface != conn_iface) {
+		if (conn_cb->ksnr_myiface < 0) {
+			/* conn_cb wasn't bound locally yet (the initial
+			 * conn_cb)
+			 */
 			CDEBUG(D_NET, "Binding %s %pIS to interface %d\n",
 			       libcfs_id2str(peer_ni->ksnp_id),
-			       &route->ksnr_addr,
+			       &conn_cb->ksnr_addr,
 			       conn_iface);
 		} else {
 			CDEBUG(D_NET,
 			       "Rebinding %s %pIS from interface %d to %d\n",
 			       libcfs_id2str(peer_ni->ksnp_id),
-			       &route->ksnr_addr,
-			       route->ksnr_myiface,
+			       &conn_cb->ksnr_addr,
+			       conn_cb->ksnr_myiface,
 			       conn_iface);
 
-			iface = ksocknal_index2iface(route->ksnr_peer->ksnp_ni,
-						     route->ksnr_myiface);
+			iface = ksocknal_index2iface(peer_ni->ksnp_ni,
+						     conn_cb->ksnr_myiface);
 			if (iface)
 				iface->ksni_nroutes--;
 		}
-		route->ksnr_myiface = conn_iface;
-		iface = ksocknal_index2iface(route->ksnr_peer->ksnp_ni,
-					     route->ksnr_myiface);
+		conn_cb->ksnr_myiface = conn_iface;
+		iface = ksocknal_index2iface(peer_ni->ksnp_ni,
+					     conn_cb->ksnr_myiface);
 		if (iface)
 			iface->ksni_nroutes++;
 	}
 
-	route->ksnr_connected |= (1 << type);
-	route->ksnr_conn_count++;
+	conn_cb->ksnr_connected |= (1 << type);
+	conn_cb->ksnr_conn_count++;
 
-	/*
-	 * Successful connection => further attempts can
+	/* Successful connection => further attempts can
 	 * proceed immediately
 	 */
-	route->ksnr_retry_interval = 0;
+	conn_cb->ksnr_retry_interval = 0;
 }
 
 static void
-ksocknal_add_route_locked(struct ksock_peer_ni *peer_ni, struct ksock_route *route)
+ksocknal_add_conn_cb_locked(struct ksock_peer_ni *peer_ni,
+			    struct ksock_conn_cb *conn_cb)
 {
 	struct ksock_conn *conn;
-	struct ksock_route *route2;
 	struct ksock_net *net = peer_ni->ksnp_ni->ni_data;
 
 	LASSERT(!peer_ni->ksnp_closing);
-	LASSERT(!route->ksnr_peer);
-	LASSERT(!route->ksnr_scheduled);
-	LASSERT(!route->ksnr_connecting);
-	LASSERT(!route->ksnr_connected);
-
-	/* LASSERT(unique) */
-	list_for_each_entry(route2, &peer_ni->ksnp_routes, ksnr_list) {
-		if (rpc_cmp_addr((struct sockaddr *)&route2->ksnr_addr,
-				 (struct sockaddr *)&route->ksnr_addr)) {
-			CERROR("Duplicate route %s %pIS\n",
-			       libcfs_id2str(peer_ni->ksnp_id),
-			       &route->ksnr_addr);
-			LBUG();
-		}
-	}
+	LASSERT(!conn_cb->ksnr_peer);
+	LASSERT(!conn_cb->ksnr_scheduled);
+	LASSERT(!conn_cb->ksnr_connecting);
+	LASSERT(!conn_cb->ksnr_connected);
 
-	route->ksnr_peer = peer_ni;
+	conn_cb->ksnr_peer = peer_ni;
 	ksocknal_peer_addref(peer_ni);
 
-	/* set the route's interface to the current net's interface */
-	route->ksnr_myiface = net->ksnn_interface.ksni_index;
+	/* set the conn_cb's interface to the current net's interface */
+	conn_cb->ksnr_myiface = net->ksnn_interface.ksni_index;
 	net->ksnn_interface.ksni_nroutes++;
 
-	/* peer_ni's routelist takes over my ref on 'route' */
-	list_add_tail(&route->ksnr_list, &peer_ni->ksnp_routes);
+	/* peer_ni's route list takes over my ref on 'route' */
+	peer_ni->ksnp_conn_cb = conn_cb;
 
 	list_for_each_entry(conn, &peer_ni->ksnp_conns, ksnc_list) {
 		if (!rpc_cmp_addr((struct sockaddr *)&conn->ksnc_peeraddr,
-				  (struct sockaddr *)&route->ksnr_addr))
+				  (struct sockaddr *)&conn_cb->ksnr_addr))
 			continue;
 
-		ksocknal_associate_route_conn_locked(route, conn);
-		/* keep going (typed routes) */
+		ksocknal_associate_cb_conn_locked(conn_cb, conn);
+		/* keep going (typed conns) */
 	}
 }
 
 static void
-ksocknal_del_route_locked(struct ksock_route *route)
+ksocknal_del_conn_cb_locked(struct ksock_conn_cb *conn_cb)
 {
-	struct ksock_peer_ni *peer_ni = route->ksnr_peer;
+	struct ksock_peer_ni *peer_ni = conn_cb->ksnr_peer;
 	struct ksock_interface *iface;
 	struct ksock_conn *conn;
 	struct ksock_conn *cnxt;
 
-	LASSERT(!route->ksnr_deleted);
+	LASSERT(!conn_cb->ksnr_deleted);
 
 	/* Close associated conns */
 	list_for_each_entry_safe(conn, cnxt, &peer_ni->ksnp_conns, ksnc_list) {
-		if (conn->ksnc_route != route)
+		if (conn->ksnc_conn_cb != conn_cb)
 			continue;
 
 		ksocknal_close_conn_locked(conn, 0);
 	}
 
-	if (route->ksnr_myiface >= 0) {
-		iface = ksocknal_index2iface(route->ksnr_peer->ksnp_ni,
-					     route->ksnr_myiface);
+	if (conn_cb->ksnr_myiface >= 0) {
+		iface = ksocknal_index2iface(peer_ni->ksnp_ni,
+					     conn_cb->ksnr_myiface);
 		if (iface)
 			iface->ksni_nroutes--;
 	}
 
-	route->ksnr_deleted = 1;
-	list_del(&route->ksnr_list);
-	ksocknal_route_decref(route);		/* drop peer_ni's ref */
+	conn_cb->ksnr_deleted = 1;
+	ksocknal_conn_cb_decref(conn_cb);	/* drop peer_ni's ref */
+	peer_ni->ksnp_conn_cb = NULL;
 
-	if (list_empty(&peer_ni->ksnp_routes) &&
-	    list_empty(&peer_ni->ksnp_conns)) {
-		/*
-		 * I've just removed the last route to a peer_ni with no active
+	if (list_empty(&peer_ni->ksnp_conns)) {
+		/* I've just removed the last route to a peer_ni with no active
 		 * connections
 		 */
 		ksocknal_unlink_peer_locked(peer_ni);
@@ -505,8 +493,7 @@ struct ksock_peer_ni *
 {
 	struct ksock_peer_ni *peer_ni;
 	struct ksock_peer_ni *peer2;
-	struct ksock_route *route;
-	struct ksock_route *route2;
+	struct ksock_conn_cb *conn_cb;
 	struct sockaddr_in sa = {.sin_family = AF_INET};
 
 	if (id.nid == LNET_NID_ANY ||
@@ -520,8 +507,8 @@ struct ksock_peer_ni *
 
 	sa.sin_addr.s_addr = htonl(ipaddr);
 	sa.sin_port = htons(port);
-	route = ksocknal_create_route((struct sockaddr *)&sa);
-	if (!route) {
+	conn_cb = ksocknal_create_conn_cb((struct sockaddr *)&sa);
+	if (!conn_cb) {
 		ksocknal_peer_decref(peer_ni);
 		return -ENOMEM;
 	}
@@ -540,20 +527,8 @@ struct ksock_peer_ni *
 		hash_add(ksocknal_data.ksnd_peers, &peer_ni->ksnp_list, id.nid);
 	}
 
-	list_for_each_entry(route2, &peer_ni->ksnp_routes, ksnr_list) {
-		struct sockaddr_in *sa = (void *)&route->ksnr_addr;
+	ksocknal_add_conn_cb_locked(peer_ni, conn_cb);
 
-		if (ipaddr != ntohl(sa->sin_addr.s_addr)) {
-			/* Route already exists, use the old one */
-			ksocknal_route_decref(route);
-			route2->ksnr_share_count++;
-			goto out;
-		}
-	}
-	/* Route doesn't already exist, add the new one */
-	ksocknal_add_route_locked(peer_ni, route);
-	route->ksnr_share_count++;
-out:
 	write_unlock_bh(&ksocknal_data.ksnd_global_lock);
 
 	return 0;
@@ -564,50 +539,22 @@ struct ksock_peer_ni *
 {
 	struct ksock_conn *conn;
 	struct ksock_conn *cnxt;
-	struct ksock_route *route;
-	struct ksock_route *rnxt;
-	int nshared;
+	struct ksock_conn_cb *conn_cb;
 
 	LASSERT(!peer_ni->ksnp_closing);
 
 	/* Extra ref prevents peer_ni disappearing until I'm done with it */
 	ksocknal_peer_addref(peer_ni);
+	conn_cb = peer_ni->ksnp_conn_cb;
+	if (conn_cb)
+		ksocknal_del_conn_cb_locked(conn_cb);
 
-	list_for_each_entry_safe(route, rnxt, &peer_ni->ksnp_routes,
-				 ksnr_list) {
-		struct sockaddr_in *sa = (void *)&route->ksnr_addr;
-
-		/* no match */
-		if (!(!ip || ntohl(sa->sin_addr.s_addr) == ip))
-			continue;
-
-		route->ksnr_share_count = 0;
-		/* This deletes associated conns too */
-		ksocknal_del_route_locked(route);
-	}
-
-	nshared = 0;
-	list_for_each_entry(route, &peer_ni->ksnp_routes, ksnr_list)
-		nshared += route->ksnr_share_count;
-
-	if (!nshared) {
-		/* remove everything else if there are no explicit entries
-		 * left
-		 */
-		list_for_each_entry_safe(route, rnxt, &peer_ni->ksnp_routes,
-					 ksnr_list) {
-			/* we should only be removing auto-entries */
-			LASSERT(!route->ksnr_share_count);
-			ksocknal_del_route_locked(route);
-		}
-
-		list_for_each_entry_safe(conn, cnxt, &peer_ni->ksnp_conns,
-					 ksnc_list)
-			ksocknal_close_conn_locked(conn, 0);
-	}
+	list_for_each_entry_safe(conn, cnxt, &peer_ni->ksnp_conns,
+				 ksnc_list)
+		ksocknal_close_conn_locked(conn, 0);
 
 	ksocknal_peer_decref(peer_ni);
-	/* NB peer_ni unlinks itself when last conn/route is removed */
+	/* NB peer_ni unlinks itself when last conn/conn_cb is removed */
 }
 
 static int
@@ -651,7 +598,7 @@ struct ksock_peer_ni *
 			if (peer_ni->ksnp_closing &&
 			    !list_empty(&peer_ni->ksnp_tx_queue)) {
 				LASSERT(list_empty(&peer_ni->ksnp_conns));
-				LASSERT(list_empty(&peer_ni->ksnp_routes));
+				LASSERT(!peer_ni->ksnp_conn_cb);
 
 				list_splice_init(&peer_ni->ksnp_tx_queue,
 						 &zombies);
@@ -753,19 +700,16 @@ struct ksock_peer_ni *
 }
 
 static int
-ksocknal_connecting(struct ksock_peer_ni *peer_ni, struct sockaddr *sa)
+ksocknal_connecting(struct ksock_conn_cb *conn_cb, struct sockaddr *sa)
 {
-	struct ksock_route *route;
-
-	list_for_each_entry(route, &peer_ni->ksnp_routes, ksnr_list) {
-		if (rpc_cmp_addr((struct sockaddr *)&route->ksnr_addr, sa))
-			return route->ksnr_connecting;
-	}
+	if (conn_cb &&
+	    rpc_cmp_addr((struct sockaddr *)&conn_cb->ksnr_addr, sa))
+		return conn_cb->ksnr_connecting;
 	return 0;
 }
 
 int
-ksocknal_create_conn(struct lnet_ni *ni, struct ksock_route *route,
+ksocknal_create_conn(struct lnet_ni *ni, struct ksock_conn_cb *conn_cb,
 		     struct socket *sock, int type)
 {
 	rwlock_t *global_lock = &ksocknal_data.ksnd_global_lock;
@@ -787,7 +731,7 @@ struct ksock_peer_ni *
 	int active;
 	char *warn = NULL;
 
-	active = !!route;
+	active = !!conn_cb;
 
 	LASSERT(active == (type != SOCKLND_CONN_NONE));
 
@@ -798,7 +742,7 @@ struct ksock_peer_ni *
 	}
 
 	conn->ksnc_peer = NULL;
-	conn->ksnc_route = NULL;
+	conn->ksnc_conn_cb = NULL;
 	conn->ksnc_sock = sock;
 	/*
 	 * 2 ref, 1 for conn, another extra ref prevents socket
@@ -838,7 +782,7 @@ struct ksock_peer_ni *
 	 * eagerly
 	 */
 	if (active) {
-		peer_ni = route->ksnr_peer;
+		peer_ni = conn_cb->ksnr_peer;
 		LASSERT(ni == peer_ni->ksnp_ni);
 
 		/* Active connection sends HELLO eagerly */
@@ -917,8 +861,8 @@ struct ksock_peer_ni *
 		 * favour of higher NID...
 		 */
 		if (peerid.nid < ni->ni_nid &&
-		    ksocknal_connecting(peer_ni, ((struct sockaddr *)
-						 &conn->ksnc_peeraddr))) {
+		    ksocknal_connecting(peer_ni->ksnp_conn_cb,
+					((struct sockaddr *)&conn->ksnc_peeraddr))) {
 			rc = EALREADY;
 			warn = "connection race resolution";
 			goto failed_2;
@@ -926,10 +870,10 @@ struct ksock_peer_ni *
 	}
 
 	if (peer_ni->ksnp_closing ||
-	    (active && route->ksnr_deleted)) {
-		/* peer_ni/route got closed under me */
+	    (active && conn_cb->ksnr_deleted)) {
+		/* peer_ni/conn_cb got closed under me */
 		rc = -ESTALE;
-		warn = "peer_ni/route removed";
+		warn = "peer_ni/conn_cb removed";
 		goto failed_2;
 	}
 
@@ -998,34 +942,29 @@ struct ksock_peer_ni *
 		}
 	}
 
-	/*
-	 * If the connection created by this route didn't bind to the IP
-	 * address the route connected to, the connection/route matching
+	/* If the connection created by this conn_cb didn't bind to the IP
+	 * address the conn_cb connected to, the connection/conn_cb matching
 	 * code below probably isn't going to work.
 	 */
 	if (active &&
-	    !rpc_cmp_addr((struct sockaddr *)&route->ksnr_addr,
+	    !rpc_cmp_addr((struct sockaddr *)&conn_cb->ksnr_addr,
 			  (struct sockaddr *)&conn->ksnc_peeraddr)) {
 		CERROR("Route %s %pIS connected to %pIS\n",
 		       libcfs_id2str(peer_ni->ksnp_id),
-		       &route->ksnr_addr,
+		       &conn_cb->ksnr_addr,
 		       &conn->ksnc_peeraddr);
 	}
 
-	/*
-	 * Search for a route corresponding to the new connection and
+	/* Search for a conn_cb corresponding to the new connection and
 	 * create an association. This allows incoming connections created
-	 * by routes in my peer_ni to match my own route entries so I don't
-	 * continually create duplicate routes.
+	 * by conn_cb in my peer_ni to match my own conn_cb entries so I don't
+	 * continually create duplicate conn_cbs.
 	 */
-	list_for_each_entry(route, &peer_ni->ksnp_routes, ksnr_list) {
-		if (!rpc_cmp_addr((struct sockaddr *)&route->ksnr_addr,
-				  (struct sockaddr *)&conn->ksnc_peeraddr))
-			continue;
+	conn_cb = peer_ni->ksnp_conn_cb;
 
-		ksocknal_associate_route_conn_locked(route, conn);
-		break;
-	}
+	if (conn_cb && rpc_cmp_addr((struct sockaddr *)&conn->ksnc_peeraddr,
+				    (struct sockaddr *)&conn_cb->ksnr_addr))
+		ksocknal_associate_cb_conn_locked(conn_cb, conn);
 
 	conn->ksnc_peer = peer_ni;	/* conn takes my ref on peer_ni */
 	peer_ni->ksnp_last_alive = ktime_get_seconds();
@@ -1135,7 +1074,7 @@ struct ksock_peer_ni *
 failed_2:
 	if (!peer_ni->ksnp_closing &&
 	    list_empty(&peer_ni->ksnp_conns) &&
-	    list_empty(&peer_ni->ksnp_routes)) {
+	    !peer_ni->ksnp_conn_cb) {
 		list_splice_init(&peer_ni->ksnp_tx_queue, &zombies);
 		ksocknal_unlink_peer_locked(peer_ni);
 	}
@@ -1183,6 +1122,7 @@ struct ksock_peer_ni *
 
 failed_0:
 	sock_release(sock);
+
 	return rc;
 }
 
@@ -1195,7 +1135,7 @@ struct ksock_peer_ni *
 	 * Caller holds ksnd_global_lock exclusively in irq context
 	 */
 	struct ksock_peer_ni *peer_ni = conn->ksnc_peer;
-	struct ksock_route *route;
+	struct ksock_conn_cb *conn_cb;
 	struct ksock_conn *conn2;
 
 	LASSERT(!peer_ni->ksnp_error);
@@ -1205,22 +1145,23 @@ struct ksock_peer_ni *
 	/* ksnd_deathrow_conns takes over peer_ni's ref */
 	list_del(&conn->ksnc_list);
 
-	route = conn->ksnc_route;
-	if (route) {
-		/* dissociate conn from route... */
-		LASSERT(!route->ksnr_deleted);
-		LASSERT(route->ksnr_connected & (1 << conn->ksnc_type));
+	conn_cb = conn->ksnc_conn_cb;
+	if (conn_cb) {
+		/* dissociate conn from cb... */
+		LASSERT(!conn_cb->ksnr_deleted);
+		LASSERT(conn_cb->ksnr_connected & BIT(conn->ksnc_type));
 
 		list_for_each_entry(conn2, &peer_ni->ksnp_conns, ksnc_list) {
-			if (conn2->ksnc_route == route &&
+			if (conn2->ksnc_conn_cb == conn_cb &&
 			    conn2->ksnc_type == conn->ksnc_type)
 				goto conn2_found;
 		}
-		route->ksnr_connected &= ~(1 << conn->ksnc_type);
+		conn_cb->ksnr_connected &= ~BIT(conn->ksnc_type);
 conn2_found:
-		conn->ksnc_route = NULL;
+		conn->ksnc_conn_cb = NULL;
 
-		ksocknal_route_decref(route);     /* drop conn's ref on route */
+		/* drop conn's ref on route */
+		ksocknal_conn_cb_decref(conn_cb);
 	}
 
 	if (list_empty(&peer_ni->ksnp_conns)) {
@@ -1248,10 +1189,9 @@ struct ksock_peer_ni *
 		peer_ni->ksnp_proto = NULL;  /* renegotiate protocol version */
 		peer_ni->ksnp_error = error; /* stash last conn close reason */
 
-		if (list_empty(&peer_ni->ksnp_routes)) {
-			/*
-			 * I've just closed last conn belonging to a
-			 * peer_ni with no routes to it
+		if (!peer_ni->ksnp_conn_cb) {
+			/* I've just closed last conn belonging to a
+			 * peer_ni with no connections to it
 			 */
 			ksocknal_unlink_peer_locked(peer_ni);
 		}
@@ -1282,7 +1222,7 @@ struct ksock_peer_ni *
 	if (!(peer_ni->ksnp_id.pid & LNET_PID_USERFLAG) &&
 	    list_empty(&peer_ni->ksnp_conns) &&
 	    !peer_ni->ksnp_accepting &&
-	    !ksocknal_find_connecting_route_locked(peer_ni)) {
+	    !ksocknal_find_connecting_conn_cb_locked(peer_ni)) {
 		notify = true;
 		last_alive = peer_ni->ksnp_last_alive;
 	}
@@ -1422,7 +1362,7 @@ struct ksock_peer_ni *
 	LASSERT(!refcount_read(&conn->ksnc_conn_refcount));
 	LASSERT(!refcount_read(&conn->ksnc_sock_refcount));
 	LASSERT(!conn->ksnc_sock);
-	LASSERT(!conn->ksnc_route);
+	LASSERT(!conn->ksnc_conn_cb);
 	LASSERT(!conn->ksnc_tx_scheduled);
 	LASSERT(!conn->ksnc_rx_scheduled);
 	LASSERT(list_empty(&conn->ksnc_tx_queue));
@@ -2012,7 +1952,7 @@ static int ksocknal_push(struct lnet_ni *ni, struct lnet_process_id id)
 	read_lock(&ksocknal_data.ksnd_global_lock);
 
 	hash_for_each(ksocknal_data.ksnd_peers, i, peer_ni, ksnp_list) {
-		struct ksock_route *route;
+		struct ksock_conn_cb *conn_cb;
 		struct ksock_conn *conn;
 
 		if (peer_ni->ksnp_ni != ni)
@@ -2027,13 +1967,12 @@ static int ksocknal_push(struct lnet_ni *ni, struct lnet_process_id id)
 		      !list_empty(&peer_ni->ksnp_tx_queue),
 		      !list_empty(&peer_ni->ksnp_zc_req_list));
 
-		list_for_each_entry(route, &peer_ni->ksnp_routes, ksnr_list) {
-			CWARN("Route: ref %d, schd %d, conn %d, cnted %d, del %d\n",
-			      refcount_read(&route->ksnr_refcount),
-			      route->ksnr_scheduled,
-			      route->ksnr_connecting,
-			      route->ksnr_connected,
-			      route->ksnr_deleted);
+		conn_cb = peer_ni->ksnp_conn_cb;
+		if (conn_cb) {
+			CWARN("ConnCB: ref %d, schd %d, conn %d, cnted %d, del %d\n",
+			      refcount_read(&conn_cb->ksnr_refcount),
+			      conn_cb->ksnr_scheduled, conn_cb->ksnr_connecting,
+			      conn_cb->ksnr_connected, conn_cb->ksnr_deleted);
 		}
 
 		list_for_each_entry(conn, &peer_ni->ksnp_conns, ksnc_list) {
net/lnet/klnds/socklnd/socklnd.h +19 -19
index e6df3ed..9f8fe8a 100644
@@ -263,7 +263,7 @@ struct ksock_nal_data {
  * received into struct bio_vec fragments.
  */
 struct ksock_conn;				/* forward ref */
-struct ksock_route;				/* forward ref */
+struct ksock_conn_cb;				/* forward ref */
 struct ksock_proto;				/* forward ref */
 
 struct ksock_tx {				/* transmit packet */
@@ -302,8 +302,10 @@ struct ksock_tx {				/* transmit packet */
 
 struct ksock_conn {
 	struct ksock_peer_ni   *ksnc_peer;		/* owning peer_ni */
-	struct ksock_route     *ksnc_route;		/* owning route */
-	struct list_head	ksnc_list;		/* stash on peer_ni's conn list */
+	struct ksock_conn_cb   *ksnc_conn_cb;		/* owning conn control
+							 * block
+							 */
+	struct list_head	ksnc_list;		/* on peer_ni's conn list */
 	struct socket	       *ksnc_sock;		/* actual socket */
 	void		       *ksnc_saved_data_ready;	/* socket's original
 							 * data_ready() callback
@@ -369,8 +371,7 @@ struct ksock_conn {
 							 */
 };
 
-struct ksock_route {
-	struct list_head	ksnr_list;		/* chain on peer_ni route list */
+struct ksock_conn_cb {
 	struct list_head	ksnr_connd_list;	/* chain on ksnr_connd_routes */
 	struct ksock_peer_ni   *ksnr_peer;		/* owning peer_ni */
 	refcount_t		ksnr_refcount;		/* # users */
@@ -388,7 +389,6 @@ struct ksock_route {
 							 * type
 							 */
 	unsigned int		ksnr_deleted:1;		/* been removed from peer_ni? */
-	unsigned int		ksnr_share_count;	/* created explicitly? */
 	int			ksnr_conn_count;	/* # conns established by this
 							 * route
 							 */
@@ -415,7 +415,7 @@ struct ksock_peer_ni {
 							 * protocol
 							 */
 	struct list_head	ksnp_conns;		/* all active connections */
-	struct list_head	ksnp_routes;		/* routes */
+	struct ksock_conn_cb	*ksnp_conn_cb;		/* conn control block */
 	struct list_head	ksnp_tx_queue;		/* waiting packets */
 	spinlock_t		ksnp_lock;		/* serialize, g_lock unsafe */
 	struct list_head	ksnp_zc_req_list;	/* zero copy requests wait for
@@ -495,7 +495,7 @@ struct ksock_proto {
 #endif
 
 static inline int
-ksocknal_route_mask(void)
+ksocknal_conn_cb_mask(void)
 {
 	if (!*ksocknal_tunables.ksnd_typed_conns)
 		return (1 << SOCKLND_CONN_ANY);
@@ -564,18 +564,18 @@ struct ksock_proto {
 }
 
 static inline void
-ksocknal_route_addref(struct ksock_route *route)
+ksocknal_conn_cb_addref(struct ksock_conn_cb *conn_cb)
 {
-	refcount_inc(&route->ksnr_refcount);
+	refcount_inc(&conn_cb->ksnr_refcount);
 }
 
-void ksocknal_destroy_route(struct ksock_route *route);
+void ksocknal_destroy_conn_cb(struct ksock_conn_cb *conn_cb);
 
 static inline void
-ksocknal_route_decref(struct ksock_route *route)
+ksocknal_conn_cb_decref(struct ksock_conn_cb *conn_cb)
 {
-	if (refcount_dec_and_test(&route->ksnr_refcount))
-		ksocknal_destroy_route(route);
+	if (refcount_dec_and_test(&conn_cb->ksnr_refcount))
+		ksocknal_destroy_conn_cb(conn_cb);
 }
 
 static inline void
@@ -615,7 +615,7 @@ struct ksock_peer_ni *ksocknal_find_peer_locked(struct lnet_ni *ni,
 struct ksock_peer_ni *ksocknal_find_peer(struct lnet_ni *ni,
 				         struct lnet_process_id id);
 void ksocknal_peer_failed(struct ksock_peer_ni *peer_ni);
-int ksocknal_create_conn(struct lnet_ni *ni, struct ksock_route *route,
+int ksocknal_create_conn(struct lnet_ni *ni, struct ksock_conn_cb *conn_cb,
 			 struct socket *sock, int type);
 void ksocknal_close_conn_locked(struct ksock_conn *conn, int why);
 void ksocknal_terminate_conn(struct ksock_conn *conn);
@@ -639,10 +639,10 @@ int ksocknal_launch_packet(struct lnet_ni *ni, struct ksock_tx *tx,
 int ksocknal_thread_start(int (*fn)(void *arg), void *arg, char *name);
 void ksocknal_thread_fini(void);
 void ksocknal_launch_all_connections_locked(struct ksock_peer_ni *peer_ni);
-struct ksock_route *
-ksocknal_find_connectable_route_locked(struct ksock_peer_ni *peer_ni);
-struct ksock_route *
-ksocknal_find_connecting_route_locked(struct ksock_peer_ni *peer_ni);
+struct ksock_conn_cb *
+ksocknal_find_connectable_conn_cb_locked(struct ksock_peer_ni *peer_ni);
+struct ksock_conn_cb *
+ksocknal_find_connecting_conn_cb_locked(struct ksock_peer_ni *peer_ni);
 int ksocknal_new_packet(struct ksock_conn *conn, int skip);
 int ksocknal_scheduler(void *arg);
 int ksocknal_connd(void *arg);
net/lnet/klnds/socklnd/socklnd_cb.c +101 -99

366 lines not on this page · raw message

Signature · 6 lines
1.8.3.1

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
#7 lore raw

PATCH 7/29 lustre: readahead: limit over reservation

In reply to James Simmons

From: Wang Shilong <[email protected]>

For performance reason, exceeding @ra_max_pages are allowed to cover current read window, but this should be limited with RPC size in case a large block size read issued. Trim to RPC boundary.

Otherwise, too many read ahead pages might be issued and make client short of LRU pages.

Fixes 35b7c43c21 ("lustre: llite: allow current readahead to exceed reservation")

WC-bug-id: https://jira.whamcloud.com/browse/LU-12142

Reviewed-on: https://review.whamcloud.com/42060

---
 fs/lustre/llite/lproc_llite.c | 10 ++++++++--
 fs/lustre/llite/rw.c          |  8 ++++++++
 2 files changed, 16 insertions(+), 2 deletions(-)
fs/lustre/llite/lproc_llite.c +8 -2
index ec241a4..4ce6fab 100644
@@ -455,6 +455,7 @@ static int ll_max_cached_mb_seq_show(struct seq_file *m, void *v)
 	struct super_block *sb = m->private;
 	struct ll_sb_info *sbi = ll_s2sbi(sb);
 	struct cl_client_cache *cache = sbi->ll_cache;
+	struct ll_ra_info *ra = &sbi->ll_ra_info;
 	long max_cached_mb;
 	long unused_mb;
 
@@ -462,17 +463,22 @@ static int ll_max_cached_mb_seq_show(struct seq_file *m, void *v)
 	max_cached_mb = PAGES_TO_MiB(cache->ccc_lru_max);
 	unused_mb = PAGES_TO_MiB(atomic_long_read(&cache->ccc_lru_left));
 	mutex_unlock(&cache->ccc_max_cache_mb_lock);
+
 	seq_printf(m,
 		   "users: %d\n"
 		   "max_cached_mb: %ld\n"
 		   "used_mb: %ld\n"
 		   "unused_mb: %ld\n"
-		   "reclaim_count: %u\n",
+		   "reclaim_count: %u\n"
+		   "max_read_ahead_mb: %lu\n"
+		   "used_read_ahead_mb: %d\n",
 		   refcount_read(&cache->ccc_users),
 		   max_cached_mb,
 		   max_cached_mb - unused_mb,
 		   unused_mb,
-		   cache->ccc_lru_shrinkers);
+		   cache->ccc_lru_shrinkers,
+		   PAGES_TO_MiB(ra->ra_max_pages),
+		   PAGES_TO_MiB(atomic_read(&ra->ra_cur_pages)));
 	return 0;
 }
 
fs/lustre/llite/rw.c +8 -0
index 8bba97f..2d08767 100644
@@ -788,6 +788,14 @@ static int ll_readahead(const struct lu_env *env, struct cl_io *io,
 			vio->vui_ra_start_idx + vio->vui_ra_pages - 1;
 		pages_min = vio->vui_ra_start_idx + vio->vui_ra_pages -
 			    ria->ria_start_idx;
+		/**
+		 * For performance reason, exceeding @ra_max_pages
+		 * are allowed, but this should be limited with RPC
+		 * size in case a large block size read issued. Trim
+		 * to RPC boundary.
+		 */
+		pages_min = min(pages_min, ras->ras_rpc_pages -
+				(ria->ria_start_idx % ras->ras_rpc_pages));
 	}
 
 	/* don't over reserved for mmap range read */
Signature · 6 lines
1.8.3.1

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
#8 lore raw

PATCH 8/29 lustre: clio: fix hang on urgent cached pages

In reply to James Simmons

From: Wang Shilong <[email protected]>

Few problems addressed by this patch:

1) We try to reserve cl_pages in batch, but we don't do that for append IO, there is no reason to skip that.

2) IO might be not page aligned, calculate reserved pages correctly for this case.

3) If we issue one large IO block size which is larger than max_cached_mb, IO will never be finished, because we don't have enough cl pages to finish it, split IO in this case.

4) Readahead should fail if we are short of LRU page slots to avoid deadlock.

After above adjustment, LRU slots are guranteed for normal buffer write before IO starts, if block size is too large for max LRU slots, IO will be split.

For extra readahead, don't try hard and quit if we are short of LRU pages, since readahead could tolerate errors, applications won't be aware of it.

besides newly added tests, following command with 64M max_cached_mb setting and don't see client hang any more.

/usr/lib64/openmpi/bin/mpirun --allow-run-as-root -np 12 -wd /mnt/lustre ior -g -e -w -r -b 1g -T 10 -F -C -t 64m

Todo:
Performance benchmark for readahead

WC-bug-id: https://jira.whamcloud.com/browse/LU-12142
Lustre-commit: 2a34dc95bd100c181 ("LU-12142 clio: fix hang on urgent cached pages")

Reviewed-on: https://review.whamcloud.com/40237

---
 fs/lustre/include/cl_object.h  | 16 ++++++++---
 fs/lustre/include/lustre_osc.h | 10 ++++---
 fs/lustre/llite/file.c         | 36 ++++++++++++++++++++++---
 fs/lustre/llite/rw.c           | 31 ++++++++++++++++++++-
 fs/lustre/llite/vvp_io.c       | 12 +++++++++
 fs/lustre/lov/lov_io.c         | 53 ++++++++++++++++++++++++++++++++++++
 fs/lustre/mdc/mdc_dev.c        | 10 ++++---
 fs/lustre/obdclass/cl_io.c     | 28 +++++++++++++++++++
 fs/lustre/osc/osc_io.c         | 61 ++++++++++++++++++++++++------------------
 fs/lustre/osc/osc_page.c       | 38 ++++++++++++++++++++------
 10 files changed, 247 insertions(+), 48 deletions(-)
fs/lustre/include/cl_object.h +13 -3
index b36942a..6554e3d 100644
@@ -1490,9 +1490,10 @@ struct cl_read_ahead {
 	 * function should be called to release it.
 	 */
 	void				(*cra_release)(const struct lu_env *env,
-						       void *cbdata);
+						       struct cl_read_ahead *ra);
 	/* Callback data for cra_release routine */
-	void				*cra_cbdata;
+	void				*cra_dlmlock;
+	void				*cra_oio;
 	/* whether lock is in contention */
 	bool				cra_contention;
 };
@@ -1501,7 +1502,7 @@ static inline void cl_read_ahead_release(const struct lu_env *env,
 					 struct cl_read_ahead *ra)
 {
 	if (ra->cra_release)
-		ra->cra_release(env, ra->cra_cbdata);
+		ra->cra_release(env, ra);
 	memset(ra, 0, sizeof(*ra));
 }
 
@@ -1624,6 +1625,13 @@ struct cl_io_operations {
 			      const struct cl_io_slice *slice,
 			      pgoff_t start, struct cl_read_ahead *ra);
 	/**
+	 *
+	 * Reserve LRU slots before IO.
+	 */
+	int (*cio_lru_reserve)(const struct lu_env *env,
+			       const struct cl_io_slice *slice,
+			       loff_t pos, size_t bytes);
+	/**
 	 * Optional debugging helper. Print given io slice.
 	 */
 	int (*cio_print)(const struct lu_env *env, void *cookie,
@@ -2445,6 +2453,8 @@ int cl_io_commit_async(const struct lu_env *env, struct cl_io *io,
 		       struct cl_page_list *queue, int from, int to,
 		       cl_commit_cbt cb);
 void cl_io_extent_release(const struct lu_env *env, struct cl_io *io);
+int cl_io_lru_reserve(const struct lu_env *env, struct cl_io *io,
+		      loff_t pos, size_t bytes);
 int cl_io_read_ahead(const struct lu_env *env, struct cl_io *io,
 		     pgoff_t start, struct cl_read_ahead *ra);
 
fs/lustre/include/lustre_osc.h +6 -4
index 4575956..17bfbfb 100644
@@ -142,7 +142,9 @@ struct osc_io {
 	/* true if this io is counted as active IO */
 				oi_is_active:1,
 	/** true if this io has CAP_SYS_RESOURCE */
-				oi_cap_sys_resource:1;
+				oi_cap_sys_resource:1,
+	/** true if this io issued by readahead */
+				oi_is_readahead:1;
 	/* how many LRU pages are reserved for this IO */
 	unsigned long		oi_lru_reserved;
 
@@ -694,8 +696,6 @@ void osc_io_extent_release(const struct lu_env *env,
 int osc_io_iter_init(const struct lu_env *env, const struct cl_io_slice *ios);
 void osc_io_iter_fini(const struct lu_env *env,
 		      const struct cl_io_slice *ios);
-int osc_io_rw_iter_init(const struct lu_env *env,
-			const struct cl_io_slice *ios);
 void osc_io_rw_iter_fini(const struct lu_env *env,
 			    const struct cl_io_slice *ios);
 int osc_io_fault_start(const struct lu_env *env, const struct cl_io_slice *ios);
@@ -710,11 +710,13 @@ int osc_fsync_ost(const struct lu_env *env, struct osc_object *obj,
 		  struct cl_fsync_io *fio);
 void osc_io_fsync_end(const struct lu_env *env,
 		      const struct cl_io_slice *slice);
-void osc_read_ahead_release(const struct lu_env *env, void *cbdata);
+void osc_read_ahead_release(const struct lu_env *env, struct cl_read_ahead *ra);
 int osc_io_lseek_start(const struct lu_env *env,
 		       const struct cl_io_slice *slice);
 void osc_io_lseek_end(const struct lu_env *env,
 		      const struct cl_io_slice *slice);
+int osc_io_lru_reserve(const struct lu_env *env, const struct cl_io_slice *ios,
+		       loff_t pos, size_t count);
 
 /* osc_lock.c */
 void osc_lock_to_lockless(const struct lu_env *env, struct osc_lock *ols,
fs/lustre/llite/file.c +33 -3
index 2558a60..e9f0fc9 100644
@@ -1564,8 +1564,10 @@ static void ll_heat_add(struct inode *inode, enum cl_io_type iot,
 		   struct file *file, enum cl_io_type iot,
 		   loff_t *ppos, size_t count)
 {
-	struct ll_inode_info *lli = ll_i2info(file_inode(file));
+	struct inode *inode = file_inode(file);
+	struct ll_inode_info *lli = ll_i2info(inode);
 	struct ll_file_data *fd = file->private_data;
+	struct ll_sb_info *sbi = ll_i2sbi(inode);
 	struct vvp_io *vio = vvp_env_io(env);
 	struct range_lock range;
 	struct cl_io *io;
@@ -1575,10 +1577,18 @@ static void ll_heat_add(struct inode *inode, enum cl_io_type iot,
 	unsigned int dio_lock = 0;
 	bool is_aio = false;
 	struct cl_dio_aio *ci_aio = NULL;
+	size_t per_bytes;
+	bool partial_io = false;
+	size_t max_io_pages, max_cached_pages;
 
 	CDEBUG(D_VFSTRACE, "file: %pD, type: %d ppos: %llu, count: %zu\n",
 	       file, iot, *ppos, count);
 
+	max_io_pages = PTLRPC_MAX_BRW_PAGES * OBD_MAX_RIF_DEFAULT;
+	max_cached_pages = sbi->ll_cache->ccc_lru_max;
+	if (max_io_pages > (max_cached_pages >> 2))
+		max_io_pages = max_cached_pages >> 2;
+
 	io = vvp_env_thread_io(env);
 	if (file->f_flags & O_DIRECT) {
 		if (!is_sync_kiocb(args->u.normal.via_iocb))
@@ -1591,19 +1601,29 @@ static void ll_heat_add(struct inode *inode, enum cl_io_type iot,
 	}
 
 restart:
+	/**
+	 * IO block size need be aware of cached page limit, otherwise
+	 * if we have small max_cached_mb but large block IO issued, io
+	 * could not be finished and blocked whole client.
+	 */
+	if (file->f_flags & O_DIRECT)
+		per_bytes = count;
+	else
+		per_bytes = min(max_io_pages << PAGE_SHIFT, count);
+	partial_io = per_bytes < count;
 	io = vvp_env_thread_io(env);
 	ll_io_init(io, file, iot == CIT_WRITE, args);
 	io->ci_aio = ci_aio;
 	io->ci_dio_lock = dio_lock;
 	io->ci_ndelay_tried = retried;
 
-	if (cl_io_rw_init(env, io, iot, *ppos, count) == 0) {
+	if (cl_io_rw_init(env, io, iot, *ppos, per_bytes) == 0) {
 		bool range_locked = false;
 
 		if (file->f_flags & O_APPEND)
 			range_lock_init(&range, 0, LUSTRE_EOF);
 		else
-			range_lock_init(&range, *ppos, *ppos + count - 1);
+			range_lock_init(&range, *ppos, *ppos + per_bytes - 1);
 
 		vio->vui_fd  = file->private_data;
 		vio->vui_iter = args->u.normal.via_iter;
@@ -1656,6 +1676,16 @@ static void ll_heat_add(struct inode *inode, enum cl_io_type iot,
 		/* prepare IO restart */
 		if (count > 0)
 			args->u.normal.via_iter = vio->vui_iter;
+
+		if (partial_io) {
+			/**
+			 * Reexpand iov count because it was zero
+			 * after IO finish.
+			 */
+			iov_iter_reexpand(vio->vui_iter, count);
+			if (per_bytes == io->ci_nob)
+				io->ci_need_restart = 1;
+		}
 	}
 out:
 	cl_io_fini(env, io);
fs/lustre/llite/rw.c +30 -1
index 2d08767..c64696d 100644
@@ -86,7 +86,14 @@ static unsigned long ll_ra_count_get(struct ll_sb_info *sbi,
 	struct ll_ra_info *ra = &sbi->ll_ra_info;
 	long ret;
 
-	/* If read-ahead pages left are less than 1M, do not do read-ahead,
+	/**
+	 * Don't try readahead agreesively if we are limited
+	 * LRU pages, otherwise, it could cause deadlock.
+	 */
+	pages = min(sbi->ll_cache->ccc_lru_max >> 2, pages);
+
+	/*
+	 * If read-ahead pages left are less than 1M, do not do read-ahead,
 	 * otherwise it will form small read RPC(< 1M), which hurt server
 	 * performance a lot.
 	 */
@@ -701,11 +708,24 @@ static int ll_readahead(const struct lu_env *env, struct cl_io *io,
 	struct inode *inode;
 	struct ra_io_arg *ria = &lti->lti_ria;
 	struct cl_object *clob;
+	struct ll_sb_info *sbi;
+	struct ll_ra_info *ra;
 	int ret = 0;
 	u64 kms;
 
 	clob = io->ci_obj;
 	inode = vvp_object_inode(clob);
+	sbi = ll_i2sbi(inode);
+	ra = &sbi->ll_ra_info;
+
+	/**
+	 * In case we have a limited max_cached_mb, readahead
+	 * should be stopped if it have run out of all LRU slots.
+	 */
+	if (atomic_read(&ra->ra_cur_pages) >= sbi->ll_cache->ccc_lru_max) {
+		ll_ra_stats_inc(inode, RA_STAT_MAX_IN_FLIGHT);
+		return 0;
+	}
 
 	memset(ria, 0, sizeof(*ria));
 	ret = ll_readahead_file_kms(env, io, &kms);
@@ -1706,6 +1726,15 @@ static int kickoff_async_readahead(struct file *file, unsigned long pages)
 	pgoff_t start_idx = ras_align(ras, ras->ras_next_readahead_idx);
 	pgoff_t end_idx = start_idx + pages - 1;
 
+	/**
+	 * In case we have a limited max_cached_mb, readahead
+	 * should be stopped if it have run out of all LRU slots.
+	 */
+	if (atomic_read(&ra->ra_cur_pages) >= sbi->ll_cache->ccc_lru_max) {
+		ll_ra_stats_inc(inode, RA_STAT_MAX_IN_FLIGHT);
+		return 0;
+	}
+
 	throttle = min(ra->ra_async_pages_per_file_threshold,
 		       ra->ra_max_pages_per_file);
 	/*
fs/lustre/llite/vvp_io.c +12 -0
index ac6aef0..cb59e94 100644
@@ -798,6 +798,12 @@ static int vvp_io_read_start(const struct lu_env *env,
 	if (!can_populate_pages(env, io, inode))
 		return 0;
 
+	if (!(file->f_flags & O_DIRECT)) {
+		result = cl_io_lru_reserve(env, io, pos, cnt);
+		if (result)
+			return result;
+	}
+
 	/* Unless this is reading a sparse file, otherwise the lock has already
 	 * been acquired so vvp_prep_size() is an empty op.
 	 */
@@ -1175,6 +1181,12 @@ static int vvp_io_write_start(const struct lu_env *env,
 	if (OBD_FAIL_CHECK(OBD_FAIL_LLITE_IMUTEX_NOSEC) && lock_inode)
 		return -EINVAL;
 
+	if (!(file->f_flags & O_DIRECT)) {
+		result = cl_io_lru_reserve(env, io, pos, cnt);
+		if (result)
+			return result;
+	}
+
 	if (!vio->vui_iter) {
 		/* from a temp io in ll_cl_init(). */
 		result = 0;
fs/lustre/lov/lov_io.c +53 -0

65 lines not on this page · raw message

fs/lustre/mdc/mdc_dev.c +7 -3
index 39c1213..7807f9e 100644
@@ -1113,12 +1113,14 @@ static int mdc_io_read_ahead(const struct lu_env *env,
 			     pgoff_t start, struct cl_read_ahead *ra)
 {
 	struct osc_object *osc = cl2osc(ios->cis_obj);
+	struct osc_io *oio = cl2osc_io(env, ios);
 	struct ldlm_lock *dlmlock;
 
 	dlmlock = mdc_dlmlock_at_pgoff(env, osc, start, 0);
 	if (!dlmlock)
 		return -ENODATA;
 
+	oio->oi_is_readahead = 1;
 	if (dlmlock->l_req_mode != LCK_PR) {
 		struct lustre_handle lockh;
 
@@ -1130,7 +1132,8 @@ static int mdc_io_read_ahead(const struct lu_env *env,
 	ra->cra_rpc_pages = osc_cli(osc)->cl_max_pages_per_rpc;
 	ra->cra_end_idx = CL_PAGE_EOF;
 	ra->cra_release = osc_read_ahead_release;
-	ra->cra_cbdata = dlmlock;
+	ra->cra_dlmlock = dlmlock;
+	ra->cra_oio = oio;
 
 	return 0;
 }
@@ -1287,12 +1290,12 @@ static void mdc_io_data_version_end(const struct lu_env *env,
 static const struct cl_io_operations mdc_io_ops = {
 	.op = {
 		[CIT_READ] = {
-			.cio_iter_init	= osc_io_rw_iter_init,
+			.cio_iter_init	= osc_io_iter_init,
 			.cio_iter_fini	= osc_io_rw_iter_fini,
 			.cio_start	= osc_io_read_start,
 		},
 		[CIT_WRITE] = {
-			.cio_iter_init	= osc_io_rw_iter_init,
+			.cio_iter_init	= osc_io_iter_init,
 			.cio_iter_fini	= osc_io_rw_iter_fini,
 			.cio_start	= osc_io_write_start,
 			.cio_end	= osc_io_end,
@@ -1323,6 +1326,7 @@ static void mdc_io_data_version_end(const struct lu_env *env,
 		},
 	},
 	.cio_read_ahead		= mdc_io_read_ahead,
+	.cio_lru_reserve	= osc_io_lru_reserve,
 	.cio_submit		= osc_io_submit,
 	.cio_commit_async	= osc_io_commit_async,
 	.cio_extent_release	= osc_io_extent_release,
fs/lustre/obdclass/cl_io.c +28 -0
index 138ff27..27804d3 100644
@@ -573,6 +573,34 @@ int cl_io_read_ahead(const struct lu_env *env, struct cl_io *io,
 EXPORT_SYMBOL(cl_io_read_ahead);
 
 /**
+ * Called before io start, to reserve enough LRU slots to avoid
+ * deadlock.
+ *
+ * \see cl_io_operations::cio_lru_reserve()
+ */
+int cl_io_lru_reserve(const struct lu_env *env, struct cl_io *io,
+		      loff_t pos, size_t bytes)
+{
+	const struct cl_io_slice *scan;
+	int result = 0;
+
+	LINVRNT(io->ci_type == CIT_READ || io->ci_type == CIT_WRITE);
+	LINVRNT(cl_io_invariant(io));
+
+	list_for_each_entry(scan, &io->ci_layers, cis_linkage) {
+		if (scan->cis_iop->cio_lru_reserve) {
+			result = scan->cis_iop->cio_lru_reserve(env, scan,
+								pos, bytes);
+			if (result)
+				break;
+		}
+	}
+
+	return result;
+}
+EXPORT_SYMBOL(cl_io_lru_reserve);
+
+/**
  * Commit a list of contiguous pages into writeback cache.
  *
  * \returns 0 if all pages committed, or errcode if error occurred.
fs/lustre/osc/osc_io.c +35 -26

111 lines not on this page · raw message

fs/lustre/osc/osc_page.c +30 -8
index bb605af..c59a5ac 100644
@@ -793,6 +793,13 @@ static int osc_lru_alloc(const struct lu_env *env, struct client_obd *cli,
 			break;
 		if (rc > 0)
 			continue;
+		/* IO issued by readahead, don't try hard */
+		if (oio->oi_is_readahead) {
+			if (atomic_long_read(cli->cl_lru_left) > 0)
+				continue;
+			rc = -EBUSY;
+			break;
+		}
 
 		cond_resched();
 
@@ -824,18 +831,23 @@ unsigned long osc_lru_reserve(struct client_obd *cli, unsigned long npages)
 	unsigned long reserved = 0;
 	unsigned long max_pages;
 	unsigned long c;
+	int rc;
 
-	/*
-	 * reserve a full RPC window at most to avoid that a thread accidentally
-	 * consumes too many LRU slots
-	 */
-	max_pages = cli->cl_max_pages_per_rpc * cli->cl_max_rpcs_in_flight;
-	if (npages > max_pages)
-		npages = max_pages;
-
+again:
 	c = atomic_long_read(cli->cl_lru_left);
 	if (c < npages && osc_lru_reclaim(cli, npages) > 0)
 		c = atomic_long_read(cli->cl_lru_left);
+
+	if (c < npages) {
+		/*
+		 * Trigger writeback in the hope some LRU slot could
+		 * be freed.
+		 */
+		rc = ptlrpcd_queue_work(cli->cl_writeback_work);
+		if (rc)
+			return 0;
+	}
+
 	while (c >= npages) {
 		if (c == atomic_long_cmpxchg(cli->cl_lru_left, c, c - npages)) {
 			reserved = npages;
@@ -843,6 +855,16 @@ unsigned long osc_lru_reserve(struct client_obd *cli, unsigned long npages)
 		}
 		c = atomic_long_read(cli->cl_lru_left);
 	}
+
+	if (reserved != npages) {
+		cond_resched();
+		rc = l_wait_event_abortable(
+			osc_lru_waitq,
+			atomic_long_read(cli->cl_lru_left) > 0);
+		goto again;
+	}
+
+	max_pages = cli->cl_max_pages_per_rpc * cli->cl_max_rpcs_in_flight;
 	if (atomic_long_read(cli->cl_lru_left) < max_pages) {
 		/*
 		 * If there aren't enough pages in the per-OSC LRU then
Signature · 6 lines
1.8.3.1

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
#9 lore raw

PATCH 9/29 lustre: uapi: add mdt_hash_name

In reply to James Simmons

From: Yang Sheng <[email protected]>

Add mdt_hash_name to map LMV_HASH_NAME_* to a string. Will be used to enhance debugging information.

WC-bug-id: https://jira.whamcloud.com/browse/LU-11776
Lustre-commit: 00141b1a746d4733 ("LU-11776 utils: add support lfs find with mdt hash flag")

Reviewed-on: https://review.whamcloud.com/39340

---
 include/uapi/linux/lustre/lustre_user.h | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
include/uapi/linux/lustre/lustre_user.h +7 -4
index 7d4a9e9..acc0eaf 100644
@@ -693,11 +693,14 @@ enum lmv_hash_type {
 	LMV_HASH_TYPE_MAX,
 };
 
-#define LMV_HASH_TYPE_DEFAULT LMV_HASH_TYPE_FNV_1A_64
+static __attribute__((unused)) const char *mdt_hash_name[] = {
+	"none",
+	"all_char",
+	"fnv_1a_64",
+	"crush",
+};
 
-#define LMV_HASH_NAME_ALL_CHARS	"all_char"
-#define LMV_HASH_NAME_FNV_1A_64	"fnv_1a_64"
-#define LMV_HASH_NAME_CRUSH	"crush"
+#define LMV_HASH_TYPE_DEFAULT LMV_HASH_TYPE_FNV_1A_64
 
 /* Right now only the lower part(0-16bits) of lmv_hash_type is being used,
  * and the higher part will be the flag to indicate the status of object,
Signature · 6 lines
1.8.3.1

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
#10 lore raw

PATCH 10/29 lustre: mdc: set fid2path RPC interruptible

In reply to James Simmons

From: Lai Siyao <[email protected]>

Sometimes OI scrub can't fix the inconsistency in FID and name, and server will return -EINPROGRESS for fid2path request. Upon such failure, client will keep resending the request. Set such request to be interruptible to avoid deadlock.

WC-bug-id: https://jira.whamcloud.com/browse/LU-14119
Lustre-commit: bf47526261067153 ("LU-14119 mdc: set fid2path RPC interruptible")

Reviewed-on: https://review.whamcloud.com/41219

---
 fs/lustre/include/lustre_net.h |  4 +++-
 fs/lustre/mdc/mdc_request.c    |  7 +++++++
 fs/lustre/ptlrpc/client.c      | 35 +++++++++++++++++++++++++++++++----
 3 files changed, 41 insertions(+), 5 deletions(-)
fs/lustre/include/lustre_net.h +3 -1
index 2b98468..abd16ea 100644
@@ -445,6 +445,7 @@ struct ptlrpc_request_set {
 	set_producer_func	set_producer;
 	/** opaq argument passed to the producer callback */
 	void			*set_producer_arg;
+	unsigned int		set_allow_intr:1;
 };
 
 struct ptlrpc_bulk_desc;
@@ -825,7 +826,8 @@ struct ptlrpc_request {
 		rq_allow_replay:1,
 		/* bulk request, sent to server, but uncommitted */
 		rq_unstable:1,
-		rq_early_free_repbuf:1; /* free reply buffer in advance */
+		rq_early_free_repbuf:1, /* free reply buffer in advance */
+		rq_allow_intr:1;
 	/** @} */
 
 	/** server-side flags @{ */
fs/lustre/mdc/mdc_request.c +7 -0
index ef27af6..6ac3a39 100644
@@ -2293,6 +2293,13 @@ static int mdc_get_info_rpc(struct obd_export *exp,
 			     RCL_SERVER, vallen);
 	ptlrpc_request_set_replen(req);
 
+	/* if server failed to resolve FID, and OI scrub not able to fix it, it
+	 * will return -EINPROGRESS, ptlrpc_queue_wait() will keep retrying,
+	 * set request interruptible to avoid deadlock.
+	 */
+	if (KEY_IS(KEY_FID2PATH))
+		req->rq_allow_intr = 1;
+
 	rc = ptlrpc_queue_wait(req);
 	/* -EREMOTE means the get_info result is partial, and it needs to
 	 * continue on another MDT, see fid2path part in lmv_iocontrol
fs/lustre/ptlrpc/client.c +31 -4
index 04e8fec..3c57b69 100644
@@ -1127,6 +1127,9 @@ void ptlrpc_set_add_req(struct ptlrpc_request_set *set,
 	LASSERT(req->rq_import->imp_state != LUSTRE_IMP_IDLE);
 	LASSERT(list_empty(&req->rq_set_chain));
 
+	if (req->rq_allow_intr)
+		set->set_allow_intr = 1;
+
 	/* The set takes over the caller's request reference */
 	list_add_tail(&req->rq_set_chain, &set->set_requests);
 	req->rq_set = set;
@@ -1725,6 +1728,7 @@ int ptlrpc_check_set(const struct lu_env *env, struct ptlrpc_request_set *set)
 	list_for_each_entry_safe(req, next, &set->set_requests, rq_set_chain) {
 		struct obd_import *imp = req->rq_import;
 		int unregistered = 0;
+		int async = 1;
 		int rc = 0;
 
 		/*
@@ -1736,6 +1740,24 @@ int ptlrpc_check_set(const struct lu_env *env, struct ptlrpc_request_set *set)
 		 */
 		cond_resched();
 
+		/*
+		 * If the caller requires to allow to be interpreted by force
+		 * and it has really been interpreted, then move the request
+		 * to RQ_PHASE_INTERPRET phase in spite of what the current
+		 * phase is.
+		 */
+		if (unlikely(req->rq_allow_intr && req->rq_intr)) {
+			req->rq_status = -EINTR;
+			ptlrpc_rqphase_move(req, RQ_PHASE_INTERPRET);
+
+			/*
+			 * Since it is interpreted and we have to wait for
+			 * the reply to be unlinked, then use sync mode.
+			 */
+			async = 0;
+			goto interpret;
+		}
+
 		if (req->rq_phase == RQ_PHASE_NEW &&
 		    ptlrpc_send_new_req(req)) {
 			force_timer_recalc = 1;
@@ -2067,13 +2089,13 @@ int ptlrpc_check_set(const struct lu_env *env, struct ptlrpc_request_set *set)
 		 * This moves to "unregistering" phase we need to wait for
 		 * reply unlink.
 		 */
-		if (!unregistered && !ptlrpc_unregister_reply(req, 1)) {
+		if (!unregistered && !ptlrpc_unregister_reply(req, async)) {
 			/* start async bulk unlink too */
 			ptlrpc_unregister_bulk(req, 1);
 			continue;
 		}
 
-		if (!ptlrpc_unregister_bulk(req, 1))
+		if (!ptlrpc_unregister_bulk(req, async))
 			continue;
 
 		/* When calling interpret receive should already be finished. */
@@ -2271,8 +2293,12 @@ static void ptlrpc_interrupted_set(struct ptlrpc_request_set *set)
 
 	CDEBUG(D_RPCTRACE, "INTERRUPTED SET %p\n", set);
 	list_for_each_entry(req, &set->set_requests, rq_set_chain) {
+		if (req->rq_intr)
+			continue;
+
 		if (req->rq_phase != RQ_PHASE_RPC &&
-		    req->rq_phase != RQ_PHASE_UNREG_RPC)
+		    req->rq_phase != RQ_PHASE_UNREG_RPC &&
+		    !req->rq_allow_intr)
 			continue;
 
 		spin_lock(&req->rq_lock);
@@ -2368,7 +2394,8 @@ int ptlrpc_set_wait(const struct lu_env *env, struct ptlrpc_request_set *set)
 		CDEBUG(D_RPCTRACE, "set %p going to sleep for %lld seconds\n",
 		       set, timeout);
 
-		if (timeout == 0 && !signal_pending(current)) {
+		if ((timeout == 0 && !signal_pending(current)) ||
+		    set->set_allow_intr) {
 			/*
 			 * No requests are in-flight (ether timed out
 			 * or delayed), so we can allow interrupts.
Signature · 6 lines
1.8.3.1

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
#11 lore raw

PATCH 11/29 lustre: include: remove references to Sun Trademark.

In reply to James Simmons

From: Mr NeilBrown <[email protected]>

"lustre" is no longer a Trademark of Sun Microsystems. There is no need to acknowledge the trademark is every file, so just remove all these claims.

WC-bug-id: https://jira.whamcloud.com/browse/LU-14487
Lustre-commit: 1d3c585194a907ad ("LU-14487 lustre: remove references to Sun Trademark.")

Reviewed-on: https://review.whamcloud.com/41880

---
 fs/lustre/include/cl_object.h             | 1 -
 fs/lustre/include/lprocfs_status.h        | 1 -
 fs/lustre/include/lu_object.h             | 1 -
 fs/lustre/include/lustre_acl.h            | 1 -
 fs/lustre/include/lustre_disk.h           | 1 -
 fs/lustre/include/lustre_dlm.h            | 1 -
 fs/lustre/include/lustre_export.h         | 1 -
 fs/lustre/include/lustre_fid.h            | 1 -
 fs/lustre/include/lustre_fld.h            | 1 -
 fs/lustre/include/lustre_ha.h             | 1 -
 fs/lustre/include/lustre_handles.h        | 2 --
 fs/lustre/include/lustre_import.h         | 2 --
 fs/lustre/include/lustre_intent.h         | 1 -
 fs/lustre/include/lustre_lib.h            | 1 -
 fs/lustre/include/lustre_log.h            | 1 -
 fs/lustre/include/lustre_mdc.h            | 1 -
 fs/lustre/include/lustre_net.h            | 1 -
 fs/lustre/include/lustre_osc.h            | 1 -
 fs/lustre/include/lustre_req_layout.h     | 1 -
 fs/lustre/include/lustre_sec.h            | 1 -
 fs/lustre/include/obd.h                   | 1 -
 fs/lustre/include/obd_cksum.h             | 1 -
 fs/lustre/include/obd_class.h             | 1 -
 fs/lustre/include/obd_support.h           | 1 -
 fs/lustre/include/obd_target.h            | 1 -
 include/uapi/linux/lustre/lustre_cfg.h    | 1 -
 include/uapi/linux/lustre/lustre_fiemap.h | 1 -
 include/uapi/linux/lustre/lustre_idl.h    | 1 -
 include/uapi/linux/lustre/lustre_param.h  | 1 -
 include/uapi/linux/lustre/lustre_user.h   | 1 -
 30 files changed, 32 deletions(-)
fs/lustre/include/cl_object.h +0 -1
index 6554e3d..3926aac 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 #ifndef _LUSTRE_CL_OBJECT_H
 #define _LUSTRE_CL_OBJECT_H
fs/lustre/include/lprocfs_status.h +0 -1
index 9051de7..c8923c8 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/include/lprocfs_status.h
  *
fs/lustre/include/lu_object.h +0 -1
index 34610d4..80cd36d 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #ifndef __LUSTRE_LU_OBJECT_H
fs/lustre/include/lustre_acl.h +0 -1
index bb161ba..43b6f1d 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/include/lustre_acl.h
  */
fs/lustre/include/lustre_disk.h +0 -1
index a54b5fd..81a0d40 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/include/lustre_disk.h
  *
fs/lustre/include/lustre_dlm.h +0 -1
index 8156f75..f1828df 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 /** \defgroup LDLM Lustre Distributed Lock Manager
fs/lustre/include/lustre_export.h +0 -1
index 4cc88ef..6a59e6c 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 /** \defgroup obd_export PortalRPC export definitions
  *
fs/lustre/include/lustre_fid.h +0 -1
index c67dfb2d..b8a3f2e 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/include/lustre_fid.h
  *
fs/lustre/include/lustre_fld.h +0 -1
index 92074ab..2382484 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #ifndef __LINUX_FLD_H
fs/lustre/include/lustre_ha.h +0 -1
index c914ef6..a072b95 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #ifndef _LUSTRE_HA_H
fs/lustre/include/lustre_handles.h +0 -2
index 9dbe7c9..88111ae 100644
@@ -1,4 +1,3 @@
-// SPDX-License-Identifier: GPL-2.0
 /*
  * GPL HEADER START
  *
@@ -28,7 +27,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #ifndef __LUSTRE_HANDLES_H_
fs/lustre/include/lustre_import.h +0 -2
index 72a303e..8c1fe65 100644
@@ -1,4 +1,3 @@
-// SPDX-License-Identifier: GPL-2.0
 /*
  * GPL HEADER START
  *
@@ -28,7 +27,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 /** \defgroup obd_import PtlRPC import definitions
  * Imports are client-side representation of remote obd target.
fs/lustre/include/lustre_intent.h +0 -1
index f97c318..e7d81f6 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #ifndef LUSTRE_INTENT_H
fs/lustre/include/lustre_lib.h +0 -1
index fc4b4c5..7210a56 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/include/lustre_lib.h
  *
fs/lustre/include/lustre_log.h +0 -1
index 24e6609..1fc7729 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/include/lustre_log.h
  *
fs/lustre/include/lustre_mdc.h +0 -1
index d7b6e4a..2ee77ce 100644
@@ -29,7 +29,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/include/lustre_mdc.h
  *
fs/lustre/include/lustre_net.h +0 -1
index abd16ea..e1eb888 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 /** \defgroup PtlRPC Portal RPC and networking module.
  *
fs/lustre/include/lustre_osc.h +0 -1
index 17bfbfb..f83d1e6 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 /*
  * fs/lustre/include/lustre_osc.h
fs/lustre/include/lustre_req_layout.h +0 -1
index 434bb08..f6ebda3 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/include/lustre_req_layout.h
  *
fs/lustre/include/lustre_sec.h +0 -1
index aec30bc..e8410e1 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #ifndef _LUSTRE_SEC_H_
fs/lustre/include/obd.h +0 -1
index 9957105..efd4538 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #ifndef __OBD_H
fs/lustre/include/obd_cksum.h +0 -1
index 08c1cb9..1189bc2 100644
@@ -26,7 +26,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #ifndef __OBD_CKSUM
fs/lustre/include/obd_class.h +0 -1
index 6bcd89b..1d1777a 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 #ifndef __CLASS_OBD_H
 #define __CLASS_OBD_H
fs/lustre/include/obd_support.h +0 -1
index 027667f..878a5cd 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #ifndef _OBD_SUPPORT
fs/lustre/include/obd_target.h +0 -1
index 466dd3c..5d8e8bb 100644
@@ -27,7 +27,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #ifndef __OBD_TARGET_H
include/uapi/linux/lustre/lustre_cfg.h +0 -1
index 1036d0d..2a1eabb 100644
@@ -27,7 +27,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #ifndef _UAPI_LUSTRE_CFG_H_
include/uapi/linux/lustre/lustre_fiemap.h +0 -1
index f93e107..c3e32ef 100644
@@ -27,7 +27,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * FIEMAP data structures and flags. This header file will be used until
  * fiemap.h is available in the upstream kernel.
include/uapi/linux/lustre/lustre_idl.h +0 -1
index b0c6191..d71fe47 100644
@@ -27,7 +27,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * Lustre wire protocol definitions.
  */
include/uapi/linux/lustre/lustre_param.h +0 -1
index ab026e3..fda6e7a 100644
@@ -27,7 +27,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * User-settable parameter keys
  *
include/uapi/linux/lustre/lustre_user.h +0 -1
index acc0eaf..3e2144a 100644
@@ -27,7 +27,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/include/lustre/lustre_user.h
  *
Signature · 6 lines
1.8.3.1

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
#12 lore raw

PATCH 12/29 lnet: o2iblnd: Use REMOTE_DROPPED for ECONNREFUSED

In reply to James Simmons

From: Chris Horn <[email protected]>

ECONNREFUSED means that we received a response from the remote end, so setting the LNet health status to REMOTE_DROPPED is more appropriate than setting LOCAL_DROPPED. Using REMOTE_DROPPED will decrement the peer NI health and allow us to try other peer NIs for future sends.

Decrementing the peer NI health will also result in routes being marked down, as appropriate, for cases where a router has refused the connection request.

HPE-bug-id: LUS-9853
WC-bug-id: https://jira.whamcloud.com/browse/LU-14540
Lustre-commit: f9d837b479232bfc ("LU-14540 o2iblnd: Use REMOTE_DROPPED for ECONNREFUSED")

Reviewed-on: https://review.whamcloud.com/42114

---
 net/lnet/klnds/o2iblnd/o2iblnd_cb.c | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)
net/lnet/klnds/o2iblnd/o2iblnd_cb.c +15 -6
index 5066c93..6445f0a 100644
@@ -2105,6 +2105,7 @@ static int kiblnd_map_tx(struct lnet_ni *ni, struct kib_tx *tx,
 {
 	LIST_HEAD(zombies);
 	unsigned long flags;
+	enum lnet_msg_hstatus hstatus;
 
 	LASSERT(error);
 	LASSERT(!in_interrupt());
@@ -2150,12 +2151,20 @@ static int kiblnd_map_tx(struct lnet_ni *ni, struct kib_tx *tx,
 	CNETERR("Deleting messages for %s: connection failed\n",
 		libcfs_nid2str(peer_ni->ibp_nid));
 
-	if (error == -EHOSTUNREACH || error == -ETIMEDOUT)
-		kiblnd_txlist_done(&zombies, error,
-				   LNET_MSG_STATUS_NETWORK_TIMEOUT);
-	else
-		kiblnd_txlist_done(&zombies, error,
-				   LNET_MSG_STATUS_LOCAL_DROPPED);
+	switch (error) {
+	case -EHOSTUNREACH:
+	case -ETIMEDOUT:
+		hstatus = LNET_MSG_STATUS_NETWORK_TIMEOUT;
+		break;
+	case -ECONNREFUSED:
+		hstatus = LNET_MSG_STATUS_REMOTE_DROPPED;
+		break;
+	default:
+		hstatus = LNET_MSG_STATUS_LOCAL_DROPPED;
+		break;
+	}
+
+	kiblnd_txlist_done(&zombies, error, hstatus);
 }
 
 static void
Signature · 6 lines
1.8.3.1

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
#13 lore raw

PATCH 13/29 lustre: lmv: reduce struct lmv_obd size

In reply to James Simmons

From: Andreas Dilger <[email protected]>

The lmv_obd struct contains lmv_mdt_descs which is large enough to reference 512 * 512 = 262144 targets, but there can be only 65536 OSTs or MDTs in a single filesystem today.

Shrink the allocation size to match the current limits, reducing the size of obd_device.u since this is the largest union member.

This reduces the size of each obd_device from 6752 to 4568 bytes.

WC-bug-id: https://jira.whamcloud.com/browse/LU-14055
Lustre-commit: e11deeb1e6d11460 ("LU-14055 lmv: reduce struct lmv_obd size")

Reviewed-on: https://review.whamcloud.com/41162

---
 fs/lustre/include/lu_object.h     | 8 ++++----
 fs/lustre/obdclass/lu_tgt_descs.c | 5 ++++-
 2 files changed, 8 insertions(+), 5 deletions(-)
fs/lustre/include/lu_object.h +4 -4
index 80cd36d..75bb6c3 100644
@@ -1473,10 +1473,10 @@ struct lu_tgt_desc {
 			ltd_connecting:1;  /* target is connecting */
 };
 
-/* number of pointers at 1st level */
-#define TGT_PTRS		(PAGE_SIZE / sizeof(void *))
 /* number of pointers at 2nd level */
 #define TGT_PTRS_PER_BLOCK	(PAGE_SIZE / sizeof(void *))
+/* number of pointers at 1st level - only need as many as max OST/MDT count */
+#define TGT_PTRS		((LOV_ALL_STRIPES + 1) / TGT_PTRS_PER_BLOCK)
 
 struct lu_tgt_desc_idx {
 	struct lu_tgt_desc *ldi_tgt[TGT_PTRS_PER_BLOCK];
@@ -1521,8 +1521,8 @@ struct lu_tgt_descs {
 };
 
 #define LTD_TGT(ltd, index)						\
-	 (ltd)->ltd_tgt_idx[(index) / TGT_PTRS_PER_BLOCK]		\
-			->ldi_tgt[(index) % TGT_PTRS_PER_BLOCK]
+	 (ltd)->ltd_tgt_idx[(index) / TGT_PTRS_PER_BLOCK]->		\
+		ldi_tgt[(index) % TGT_PTRS_PER_BLOCK]
 
 u64 lu_prandom_u64_max(u64 ep_ro);
 void lu_qos_rr_init(struct lu_qos_rr *lqr);
fs/lustre/obdclass/lu_tgt_descs.c +4 -1
index a77ce20..ef30ee3 100644
@@ -298,7 +298,7 @@ void lu_tgt_descs_fini(struct lu_tgt_descs *ltd)
 	int i;
 
 	bitmap_free(ltd->ltd_tgt_bitmap);
-	for (i = 0; i < TGT_PTRS; i++)
+	for (i = 0; i < ARRAY_SIZE(ltd->ltd_tgt_idx); i++)
 		kfree(ltd->ltd_tgt_idx[i]);
 	ltd->ltd_tgts_size = 0;
 }
@@ -368,6 +368,9 @@ int ltd_add_tgt(struct lu_tgt_descs *ltd, struct lu_tgt_desc *tgt)
 	if (index >= ltd->ltd_tgts_size) {
 		u32 newsize = 1;
 
+		if (index > TGT_PTRS * TGT_PTRS_PER_BLOCK)
+			return -ENFILE;
+
 		while (newsize < index + 1)
 			newsize = newsize << 1;
 
Signature · 6 lines
1.8.3.1

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
#14 lore raw

PATCH 14/29 lustre: uapi: remove obsolete ioctls

In reply to James Simmons

From: Andreas Dilger <[email protected]>

Remove some very obsolete ioctl number definitions.

Highlight that some of the ioctl codes conflict with upstream FSVerity ioctls that we may need to implement in the future. This does not necessarily mean the actual ioctl numbers will conflict (the "size" field can disambiguate them), but we should avoid this range when adding new ioctls.

WC-bug-id: https://jira.whamcloud.com/browse/LU-13107
Lustre-commit: 0f38a0b9db4f7c6c1 ("LU-13107 uapi: remove obsolete ioctls")

Reviewed-on: https://review.whamcloud.com/37107

---
 fs/lustre/llite/dir.c                    |  3 +++
 fs/lustre/llite/file.c                   |  3 +++
 fs/lustre/llite/llite_lib.c              |  2 +-
 include/uapi/linux/lustre/lustre_ioctl.h | 28 +++++++++-------------------
 include/uapi/linux/lustre/lustre_user.h  |  1 +
 5 files changed, 17 insertions(+), 20 deletions(-)
fs/lustre/llite/dir.c +3 -0
index 5dc93f4..76294ff5 100644
@@ -1865,7 +1865,10 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 		kfree(qctl);
 		return rc;
 	}
+	case OBD_IOC_GETNAME_OLD:
+		/* fall through */
 	case OBD_IOC_GETDTNAME:
+		/* fall through */
 	case OBD_IOC_GETMDNAME:
 		return ll_get_obd_name(inode, cmd, arg);
 	case LL_IOC_FLUSHCTX:
fs/lustre/llite/file.c +3 -0
index e9f0fc9..1ca4589 100644
@@ -3745,7 +3745,10 @@ static int ll_heat_set(struct inode *inode, enum lu_heat_flag flags)
 
 		return 0;
 	}
+	case OBD_IOC_GETNAME_OLD:
+		/* fall through */
 	case OBD_IOC_GETDTNAME:
+		/* fall through */
 	case OBD_IOC_GETMDNAME:
 		return ll_get_obd_name(inode, cmd, arg);
 	case LL_IOC_HSM_STATE_GET: {
fs/lustre/llite/llite_lib.c +1 -1
index 2f2d9f0..6af95fd 100644
@@ -2986,7 +2986,7 @@ int ll_get_obd_name(struct inode *inode, unsigned int cmd, unsigned long arg)
 	struct ll_sb_info *sbi = ll_i2sbi(inode);
 	struct obd_device *obd;
 
-	if (cmd == OBD_IOC_GETDTNAME)
+	if (cmd == OBD_IOC_GETNAME_OLD || cmd == OBD_IOC_GETDTNAME)
 		obd = class_exp2obd(sbi->ll_dt_exp);
 	else if (cmd == OBD_IOC_GETMDNAME)
 		obd = class_exp2obd(sbi->ll_md_exp);
include/uapi/linux/lustre/lustre_ioctl.h +9 -19
index be388fc..fb1e6f1 100644
@@ -132,11 +132,6 @@ static inline __u32 obd_ioctl_packlen(struct obd_ioctl_data *data)
  */
 #define OBD_IOC_DATA_TYPE	long
 
-/*	IOC_LDLM_TEST		_IOWR('f', 40, long) */
-/*	IOC_LDLM_DUMP		_IOWR('f', 41, long) */
-/*	IOC_LDLM_REGRESS_START	_IOWR('f', 42, long) */
-/*	IOC_LDLM_REGRESS_STOP	_IOWR('f', 43, long) */
-
 #define OBD_IOC_CREATE		_IOWR('f', 101, OBD_IOC_DATA_TYPE)
 #define OBD_IOC_DESTROY		_IOW('f', 104, OBD_IOC_DATA_TYPE)
 /*	OBD_IOC_PREALLOCATE	_IOWR('f', 105, OBD_IOC_DATA_TYPE) */
@@ -148,29 +143,24 @@ static inline __u32 obd_ioctl_packlen(struct obd_ioctl_data *data)
 
 #define OBD_IOC_STATFS		_IOWR('f', 113, OBD_IOC_DATA_TYPE)
 #define OBD_IOC_SYNC		_IOW('f', 114, OBD_IOC_DATA_TYPE)
-/*	OBD_IOC_READ2		_IOWR('f', 115, OBD_IOC_DATA_TYPE) */
-/*	OBD_IOC_FORMAT		_IOWR('f', 116, OBD_IOC_DATA_TYPE) */
-/*	OBD_IOC_PARTITION	_IOWR('f', 117, OBD_IOC_DATA_TYPE) */
-/*	OBD_IOC_COPY		_IOWR('f', 120, OBD_IOC_DATA_TYPE) */
-/*	OBD_IOC_MIGR		_IOWR('f', 121, OBD_IOC_DATA_TYPE) */
-/*	OBD_IOC_PUNCH		_IOWR('f', 122, OBD_IOC_DATA_TYPE) */
-
-/*	OBD_IOC_MODULE_DEBUG	_IOWR('f', 124, OBD_IOC_DATA_TYPE) */
+
 #define OBD_IOC_BRW_READ	_IOWR('f', 125, OBD_IOC_DATA_TYPE)
 #define OBD_IOC_BRW_WRITE	_IOWR('f', 126, OBD_IOC_DATA_TYPE)
 #define OBD_IOC_NAME2DEV	_IOWR('f', 127, OBD_IOC_DATA_TYPE)
+#define OBD_IOC_GETDTNAME	_IOR('f', 127, char[MAX_OBD_NAME])
+/* ioctl codes 128-143 are reserved for fsverity */
 #define OBD_IOC_UUID2DEV	_IOWR('f', 130, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_GETNAME		_IOWR('f', 131, OBD_IOC_DATA_TYPE)
+#define OBD_IOC_GETNAME_OLD	_IOWR('f', 131, OBD_IOC_DATA_TYPE)
 #define OBD_IOC_GETMDNAME	_IOR('f', 131, char[MAX_OBD_NAME])
-#define OBD_IOC_GETDTNAME	OBD_IOC_GETNAME
 /*	OBD_IOC_LOV_GET_CONFIG	_IOWR('f', 132, OBD_IOC_DATA_TYPE) until 2.14 */
 #define OBD_IOC_CLIENT_RECOVER	_IOW('f', 133, OBD_IOC_DATA_TYPE)
-/* was	OBD_IOC_PING_TARGET	_IOW('f', 136, OBD_IOC_DATA_TYPE) until 2.11 */
-/*	OBD_IOC_DEC_FS_USE_COUNT _IO('f', 139) */
-/* was OBD_IOC_NO_TRANSNO      _IOW('f', 140, OBD_IOC_DATA_TYPE) until 2.14 */
+/* ioctl codes 128-143 are reserved for fsverity */
+/* FS_IOC_ENABLE_VERITY		_IOW('f', 133, struct fsverity_enable_arg) */
+/* FS_IOC_MEASURE_VERITY	_IOW('f', 134, struct fsverity_digest) */
+/* was OBD_IOC_NO_TRANSNO	_IOW('f', 140, OBD_IOC_DATA_TYPE) until 2.14 */
 #define OBD_IOC_SET_READONLY	_IOW('f', 141, OBD_IOC_DATA_TYPE)
 #define OBD_IOC_ABORT_RECOVERY	_IOR('f', 142, OBD_IOC_DATA_TYPE)
-/*	OBD_IOC_ROOT_SQUASH	_IOWR('f', 143, OBD_IOC_DATA_TYPE) */
+/* ioctl codes 128-143 are reserved for fsverity */
 #define OBD_GET_VERSION		_IOWR('f', 144, OBD_IOC_DATA_TYPE)
 /*	OBD_IOC_GSS_SUPPORT	_IOWR('f', 145, OBD_IOC_DATA_TYPE) */
 /*	OBD_IOC_CLOSE_UUID	_IOWR('f', 147, OBD_IOC_DATA_TYPE) */
include/uapi/linux/lustre/lustre_user.h +1 -0
index 3e2144a..4a21cd6 100644
@@ -312,6 +312,7 @@ struct ll_ioc_lease_id {
  * *INFO    - set/get lov_user_mds_data
  */
 /*	lustre_ioctl.h			101-150 */
+/* ioctl codes 128-143 are reserved for fsverity */
 #define LL_IOC_GETFLAGS			_IOR('f', 151, long)
 #define LL_IOC_SETFLAGS			_IOW('f', 152, long)
 #define LL_IOC_CLRFLAGS			_IOW('f', 153, long)
Signature · 6 lines
1.8.3.1

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
#15 lore raw

PATCH 15/29 lustre: lmv: don't include struct lu_qos_rr in client

In reply to James Simmons

From: Mr NeilBrown <[email protected]>

The 'lqrr' field in 'struct lu_qos' is not used on the client (lmv). So make it server-only for use in lod. We can safely remove it from the Linux client.

WC-bug-id: https://jira.whamcloud.com/browse/LU-8837
Lustre-commit: b6882c8ae4f47e93 ("LU-8837 lmv: don't include struct lu_qos_rr in client")

Reviewed-on: https://review.whamcloud.com/41950

---
 fs/lustre/include/lu_object.h     | 22 +++++-----------------
 fs/lustre/obdclass/lu_tgt_descs.c | 11 -----------
 2 files changed, 5 insertions(+), 28 deletions(-)
fs/lustre/include/lu_object.h +5 -17
index 75bb6c3..0aa28c7 100644
@@ -1413,16 +1413,6 @@ enum lq_flag {
 	LQ_RESET,		/* zero current penalties */
 };
 
-/* round-robin QoS data for LOD/LMV */
-struct lu_qos_rr {
-	spinlock_t		 lqr_alloc;	/* protect allocation index */
-	u32			 lqr_start_idx;	/* start index of new inode */
-	u32			 lqr_offset_idx;/* aliasing for start_idx */
-	int			 lqr_start_count;/* reseed counter */
-	struct lu_tgt_pool	 lqr_pool;	/* round-robin optimized list */
-	unsigned long		 lqr_flags;
-};
-
 /* QoS data per MDS/OSS */
 struct lu_svr_qos {
 	struct obd_uuid		 lsq_uuid;	/* ptlrpc's c_remote_uuid */
@@ -1484,12 +1474,11 @@ struct lu_tgt_desc_idx {
 
 /* QoS data for LOD/LMV */
 struct lu_qos {
-	struct list_head	 lq_svr_list;	 /* lu_svr_qos list */
-	struct rw_semaphore	 lq_rw_sem;
-	u32			 lq_active_svr_count;
-	unsigned int		 lq_prio_free;	 /* priority for free space */
-	unsigned int		 lq_threshold_rr;/* priority for rr */
-	struct lu_qos_rr	 lq_rr;		 /* round robin qos data */
+	struct list_head	lq_svr_list;	 /* lu_svr_qos list */
+	struct rw_semaphore	lq_rw_sem;
+	u32			lq_active_svr_count;
+	unsigned int		lq_prio_free;	 /* priority for free space */
+	unsigned int		lq_threshold_rr;/* priority for rr */
 	unsigned long		lq_flags;
 };
 
@@ -1525,7 +1514,6 @@ struct lu_tgt_descs {
 		ldi_tgt[(index) % TGT_PTRS_PER_BLOCK]
 
 u64 lu_prandom_u64_max(u64 ep_ro);
-void lu_qos_rr_init(struct lu_qos_rr *lqr);
 int lu_qos_add_tgt(struct lu_qos *qos, struct lu_tgt_desc *ltd);
 void lu_tgt_qos_weight_calc(struct lu_tgt_desc *tgt);
 
fs/lustre/obdclass/lu_tgt_descs.c +0 -11
index ef30ee3..cb62ce4 100644
@@ -77,13 +77,6 @@ u64 lu_prandom_u64_max(u64 ep_ro)
 }
 EXPORT_SYMBOL(lu_prandom_u64_max);
 
-void lu_qos_rr_init(struct lu_qos_rr *lqr)
-{
-	spin_lock_init(&lqr->lqr_alloc);
-	set_bit(LQ_DIRTY, &lqr->lqr_flags);
-}
-EXPORT_SYMBOL(lu_qos_rr_init);
-
 /**
  * Add a new target to Quality of Service (QoS) target table.
  *
@@ -159,7 +152,6 @@ int lu_qos_add_tgt(struct lu_qos *qos, struct lu_tgt_desc *tgt)
 	list_add_tail(&svr->lsq_svr_list, &tempsvr->lsq_svr_list);
 
 	set_bit(LQ_DIRTY, &qos->lq_flags);
-	set_bit(LQ_DIRTY, &qos->lq_rr.lqr_flags);
 out:
 	up_write(&qos->lq_rw_sem);
 	return rc;
@@ -200,7 +192,6 @@ static int lu_qos_del_tgt(struct lu_qos *qos, struct lu_tgt_desc *ltd)
 	}
 
 	set_bit(LQ_DIRTY, &qos->lq_flags);
-	set_bit(LQ_DIRTY, &qos->lq_rr.lqr_flags);
 out:
 	up_write(&qos->lq_rw_sem);
 	return rc;
@@ -282,8 +273,6 @@ int lu_tgt_descs_init(struct lu_tgt_descs *ltd, bool is_mdt)
 	if (is_mdt)
 		ltd->ltd_lmv_desc.ld_pattern = LMV_HASH_TYPE_DEFAULT;
 
-	lu_qos_rr_init(&ltd->ltd_qos.lq_rr);
-
 	return 0;
 }
 EXPORT_SYMBOL(lu_tgt_descs_init);
Signature · 6 lines
1.8.3.1

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
#16 lore raw

PATCH 16/29 lnet: libcfs: fix setting of debug_path

In reply to James Simmons

From: Andreas Dilger <[email protected]>

While it was possible to set "lctl set_param debug_path=path" or "echo path > /sys/module/libcfs/parameters/libcfs_debug_file_path" this change does not affect the path used to dump debug logs.

Connect these parameters to the pathname used for the debug log.

WC-bug-id: https://jira.whamcloud.com/browse/LU-14550
Lustre-commit: f7392c7c4a16bc11 ("LU-14550 libcfs: fix setting of debug_path")

Reviewed-on: https://review.whamcloud.com/43109

---
 fs/lustre/osc/osc_request.c         |  5 ++---
 include/linux/libcfs/libcfs_debug.h |  2 +-
 net/lnet/libcfs/debug.c             | 18 +++++-------------
 3 files changed, 8 insertions(+), 17 deletions(-)
fs/lustre/osc/osc_request.c +2 -3
index 8046e33..1bd0d2c 100644
@@ -1804,9 +1804,8 @@ static void dump_all_bulk_pages(struct obdo *oa, u32 page_count,
 	 */
 	snprintf(dbgcksum_file_name, sizeof(dbgcksum_file_name),
 		 "%s-checksum_dump-osc-" DFID ":[%llu-%llu]-%x-%x",
-		 (strncmp(libcfs_debug_file_path_arr, "NONE", 4) != 0 ?
-		  libcfs_debug_file_path_arr :
-		  LIBCFS_DEBUG_FILE_PATH_DEFAULT),
+		 (strncmp(libcfs_debug_file_path, "NONE", 4) != 0 ?
+		  libcfs_debug_file_path : LIBCFS_DEBUG_FILE_PATH_DEFAULT),
 		 oa->o_valid & OBD_MD_FLFID ? oa->o_parent_seq : 0ULL,
 		 oa->o_valid & OBD_MD_FLFID ? oa->o_parent_oid : 0,
 		 oa->o_valid & OBD_MD_FLFID ? oa->o_parent_ver : 0,
include/linux/libcfs/libcfs_debug.h +1 -1
index 93eb752..bc85bb9 100644
@@ -55,7 +55,7 @@
 extern unsigned int libcfs_console_min_delay;
 extern unsigned int libcfs_console_backoff;
 extern unsigned int libcfs_debug_binary;
-extern char libcfs_debug_file_path_arr[PATH_MAX];
+extern char *libcfs_debug_file_path;
 
 struct task_struct;
 
net/lnet/libcfs/debug.c +5 -13
index e519fdb..cb6c33a 100644
@@ -225,11 +225,9 @@ static int param_set_uintpos(const char *val, const struct kernel_param *kp)
 
 static DECLARE_COMPLETION(debug_complete);
 
-char libcfs_debug_file_path_arr[PATH_MAX] = LIBCFS_DEBUG_FILE_PATH_DEFAULT;
-EXPORT_SYMBOL(libcfs_debug_file_path_arr);
-
 /* We need to pass a pointer here, but elsewhere this must be a const */
-static char *libcfs_debug_file_path = LIBCFS_DEBUG_FILE_PATH_DEFAULT;
+char *libcfs_debug_file_path = LIBCFS_DEBUG_FILE_PATH_DEFAULT;
+EXPORT_SYMBOL(libcfs_debug_file_path);
 module_param(libcfs_debug_file_path, charp, 0644);
 MODULE_PARM_DESC(libcfs_debug_file_path,
 		 "Path for dumping debug logs, set 'NONE' to prevent log dumping");
@@ -379,12 +377,12 @@ static void libcfs_debug_dumplog_internal(void *arg)
 
 	current_time = ktime_get_real_seconds();
 
-	if (strncmp(libcfs_debug_file_path_arr, "NONE", 4) &&
+	if (strncmp(libcfs_debug_file_path, "NONE", 4) != 0 &&
 	    current_time > last_dump_time) {
 		last_dump_time = current_time;
 		snprintf(debug_file_name, sizeof(debug_file_name) - 1,
-			 "%s.%lld.%ld", libcfs_debug_file_path_arr,
-			 (s64)current_time, (long)arg);
+			 "%s.%lld.%ld", libcfs_debug_file_path,
+			 (s64)current_time, (uintptr_t)arg);
 		pr_alert("LustreError: dumping log to %s\n", debug_file_name);
 		cfs_tracefile_dump_all_pages(debug_file_name);
 		libcfs_run_debug_log_upcall(debug_file_name);
@@ -545,12 +543,6 @@ int libcfs_debug_init(unsigned long bufsize)
 		libcfs_console_min_delay = CDEBUG_DEFAULT_MIN_DELAY;
 	}
 
-	if (libcfs_debug_file_path) {
-		strlcpy(libcfs_debug_file_path_arr,
-			libcfs_debug_file_path,
-			sizeof(libcfs_debug_file_path_arr));
-	}
-
 	/* If libcfs_debug_mb is uninitialized then just make the
 	 * total buffers smp_num_cpus * TCD_MAX_PAGES
 	 */
Signature · 6 lines
1.8.3.1

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
#17 lore raw

PATCH 17/29 lnet: Use lr_hops for avoid_asym_router_failure

In reply to James Simmons

From: Chris Horn <[email protected]>

In order for the asymmetric route failure avoidance feature to work properly it needs to know what the hop count of a route should be. This information is defined by the lr_hops field of the lnet_route. The lr_single_hop is what discovery was able to determine the hop count actually is (single or multi) based on the last ping reply. If a remote interface on a router goes missing, the route may be classified as multi-hop by discovery, but it should be considered single-hop for the purposes of avoiding asymmetric route failure.

HPE-bug-id: LUS-9099
WC-bug-id: https://jira.whamcloud.com/browse/LU-13785
Lustre-commit: 2e07619477684f28 ("LU-13785 lnet: Use lr_hops for avoid_asym_router_failure")

Reviewed-on: https://review.whamcloud.com/39362

---
 net/lnet/lnet/router.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
net/lnet/lnet/router.c +7 -3
index ee3c15f..af16263 100644
@@ -317,7 +317,8 @@ bool lnet_is_route_alive(struct lnet_route *route)
 	 * that the remote net must exist on the gateway. For multi-hop
 	 * routes the next-hop will not have the remote net.
 	 */
-	if (avoid_asym_router_failure && route->lr_single_hop) {
+	if (avoid_asym_router_failure &&
+	    (route->lr_hops == 1 || route->lr_hops == LNET_UNDEFINED_HOPS)) {
 		rlpn = lnet_peer_get_net_locked(gw, route->lr_net);
 		if (!rlpn)
 			return false;
@@ -367,7 +368,8 @@ bool lnet_is_route_alive(struct lnet_route *route)
 static inline void
 lnet_check_route_inconsistency(struct lnet_route *route)
 {
-	if (!route->lr_single_hop && (int)route->lr_hops <= 1) {
+	if (!route->lr_single_hop &&
+	    (route->lr_hops == 1 || route->lr_hops == LNET_UNDEFINED_HOPS)) {
 		CWARN("route %s->%s is detected to be multi-hop but hop count is set to %d\n",
 		      libcfs_net2str(route->lr_net),
 		      libcfs_nid2str(route->lr_gateway->lp_primary_nid),
@@ -482,7 +484,9 @@ bool lnet_is_route_alive(struct lnet_route *route)
 		}
 
 		route->lr_single_hop = single_hop;
-		if (avoid_asym_router_failure && single_hop)
+		if (avoid_asym_router_failure &&
+		    (route->lr_hops == 1 ||
+		     route->lr_hops == LNET_UNDEFINED_HOPS))
 			lnet_set_route_aliveness(route, net_up);
 		else
 			lnet_set_route_aliveness(route, true);
Signature · 6 lines
1.8.3.1

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
#18 lore raw

PATCH 18/29 lnet: Leverage peer aliveness more efficiently

In reply to James Simmons

From: Chris Horn <[email protected]>

When an LNet router is revived after going down, remote peers may discover it is alive before we do. Thus, remote peers may use it as a next-hop, and we may start receiving messages from it while we still consider it to be dead. We should mark router peers as alive when we receive a message from them.

If an LNet router does not respond to a discovery ping, then we currently mark all of its NIs as DOWN. This can actually slow down the process of returning a route to service. If we receive a message from a router, in the manner described above, then we can safely return the router to service. We already set the status of the router NI we received the message from to UP, but the remote NIs will still be DOWN and thus the route will be considered down until we get a reply to the next discovery ping.

When selecting a route, we only consider the aliveness of a gateway's remote NIs if avoid_asym_router_failure is enabled and the route is single-hop. In this case, as long as the gateway has at least one alive NI on the remote network then the route is considered UP. In the situation described above, we know the router has at least one NI alive because it was used to forward a message from a remote peer. Thus, when we receive a forwarded message from a router, we can reasonably set the NI status of all of its NIs that are on the same peer net as the message originator to UP. This does not impact the route status of any multi-hop routes because we do not consider the aliveness of remote NIs for multi-hop routes.

Similarly, we can set the cached lr_alive value to up for any routes whose lr_net matches the net ID of the message originator NID. This variable is converted to an atomic_t to get rid of the need for global locking when updating it.

HPE-bug-id: LUS-9088
WC-bug-id: https://jira.whamcloud.com/browse/LU-13780
Lustre-commit: 886e34ce56c491e8 ("LU-13780 lnet: Leverage peer aliveness more efficiently")

Reviewed-on: https://review.whamcloud.com/39350

---
 include/linux/lnet/lib-lnet.h  | 12 ++++++++++++
 include/linux/lnet/lib-types.h |  2 +-
 net/lnet/lnet/lib-move.c       | 37 ++++++++++++++++++++++++++++++++++---
 net/lnet/lnet/router.c         | 29 ++++++-----------------------
 4 files changed, 53 insertions(+), 27 deletions(-)
include/linux/lnet/lib-lnet.h +12 -0
index 4712e2d..fd24c10 100644
@@ -1040,4 +1040,16 @@ u32 lnet_sum_stats(struct lnet_element_stats *stats,
 void lnet_usr_translate_stats(struct lnet_ioctl_element_msg_stats *msg_stats,
 			      struct lnet_element_stats *stats);
 
+static inline void
+lnet_set_route_aliveness(struct lnet_route *route, bool alive)
+{
+	bool old = atomic_xchg(&route->lr_alive, alive);
+
+	if (old != alive)
+		CERROR("route to %s through %s has gone from %s to %s\n",
+		       libcfs_net2str(route->lr_net),
+		       libcfs_nid2str(route->lr_gateway->lp_primary_nid),
+		       old ? "up" : "down",
+		       alive ? "up" : "down");
+}
 #endif
include/linux/lnet/lib-types.h +1 -1
index f479efe..a6a7588 100644
@@ -868,7 +868,7 @@ struct lnet_route {
 	/* route priority */
 	unsigned int		lr_priority;
 	/* cached route aliveness */
-	bool			lr_alive;
+	atomic_t		lr_alive;
 	/* this route is single-hop */
 	bool			lr_single_hop;
 };
net/lnet/lnet/lib-move.c +34 -3
index ad1517d..a9399cc 100644
@@ -4360,7 +4360,12 @@ void lnet_monitor_thr_stop(void)
 		goto drop;
 	}
 
-	if (lnet_drop_asym_route && for_me &&
+	/* If this message was forwarded to us from a router then we may need
+	 * to update router aliveness or check for an asymmetrical route
+	 * (or both)
+	 */
+	if (((lnet_drop_asym_route && for_me) ||
+	     !lpni->lpni_peer_net->lpn_peer->lp_alive) &&
 	    LNET_NIDNET(src_nid) != LNET_NIDNET(from_nid)) {
 		u32 src_net_id = LNET_NIDNET(src_nid);
 		struct lnet_peer *gw = lpni->lpni_peer_net->lpn_peer;
@@ -4370,10 +4375,24 @@ void lnet_monitor_thr_stop(void)
 		list_for_each_entry(route, &gw->lp_routes, lr_gwlist) {
 			if (route->lr_net == src_net_id) {
 				found = true;
-				break;
+				/* If we're transitioning the gateway from
+				 * dead -> alive, and discovery is disabled
+				 * locally or on the gateway, then we need to
+				 * update the cached route aliveness for each
+				 * route to the src_nid's net.
+				 *
+				 * Otherwise, we're only checking for
+				 * symmetrical route, and we can break the
+				 * loop
+				 */
+				if (!gw->lp_alive &&
+				    lnet_is_discovery_disabled(gw))
+					lnet_set_route_aliveness(route, true);
+				else
+					break;
 			}
 		}
-		if (!found) {
+		if (lnet_drop_asym_route && for_me && !found) {
 			lnet_net_unlock(cpt);
 			/* we would not use from_nid to route a message to
 			 * src_nid
@@ -4385,6 +4404,18 @@ void lnet_monitor_thr_stop(void)
 			kfree(msg);
 			goto drop;
 		}
+		if (!gw->lp_alive) {
+			struct lnet_peer_net *lpn;
+			struct lnet_peer_ni *lpni2;
+
+			gw->lp_alive = true;
+			/* Mark all remote NIs on src_nid's net UP */
+			lpn = lnet_peer_get_net_locked(gw, src_net_id);
+			if (lpn)
+				list_for_each_entry(lpni2, &lpn->lpn_peer_nis,
+						    lpni_peer_nis)
+					lpni2->lpni_ns_status = LNET_NI_STATUS_UP;
+		}
 	}
 
 	lpni->lpni_last_alive = ktime_get_seconds();
net/lnet/lnet/router.c +6 -23
index af16263..ae7582ca 100644
@@ -303,7 +303,7 @@ bool lnet_is_route_alive(struct lnet_route *route)
 	 * enabled.
 	 */
 	if (lnet_is_discovery_disabled(gw))
-		return route->lr_alive;
+		return atomic_read(&route->lr_alive) == 1;
 
 	/* check the gateway's interfaces on the local network */
 	llpn = lnet_peer_get_net_locked(gw, route->lr_lnet);
@@ -394,21 +394,6 @@ bool lnet_is_route_alive(struct lnet_route *route)
 }
 
 /* Must hold net_lock/EX */
-static inline void
-lnet_set_route_aliveness(struct lnet_route *route, bool alive)
-{
-	/* Log when there's a state change */
-	if (route->lr_alive != alive) {
-		CERROR("route to %s through %s has gone from %s to %s\n",
-		       libcfs_net2str(route->lr_net),
-		       libcfs_nid2str(route->lr_gateway->lp_primary_nid),
-		       (route->lr_alive) ? "up" : "down",
-		       alive ? "up" : "down");
-		route->lr_alive = alive;
-	}
-}
-
-/* Must hold net_lock/EX */
 void
 lnet_router_discovery_ping_reply(struct lnet_peer *lp)
 {
@@ -706,6 +691,10 @@ static void lnet_shuffle_seed(void)
 	route->lr_nid = gateway;
 	route->lr_priority = priority;
 	route->lr_hops = hops;
+	if (lnet_peers_start_down())
+		atomic_set(&route->lr_alive, 0);
+	else
+		atomic_set(&route->lr_alive, 1);
 
 	lnet_net_lock(LNET_LOCK_EX);
 
@@ -1770,14 +1759,8 @@ bool lnet_router_checker_active(void)
 		 */
 		if (lnet_is_discovery_disabled(lp)) {
 			list_for_each_entry(route, &lp->lp_routes, lr_gwlist) {
-				if (route->lr_nid == lpni->lpni_nid &&
-				    route->lr_alive != alive) {
-					lnet_net_unlock(0);
-					lnet_net_lock(LNET_LOCK_EX);
+				if (route->lr_nid == lpni->lpni_nid)
 					lnet_set_route_aliveness(route, alive);
-					lnet_net_unlock(LNET_LOCK_EX);
-					lnet_net_lock(0);
-				}
 			}
 		}
 	}
Signature · 6 lines
1.8.3.1

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
#19 lore raw

PATCH 19/29 lustre: mdt: mkdir should return -EEXIST if exists

In reply to James Simmons

From: Lai Siyao <[email protected]>

lfs setdirstripe' will try restripe if target exists, however it's confusing to get -ENOTSUPP or -EALREADY for 'lfs mkdir', while the latter invokes the same function as 'lfs setdirstripe'.

Pack MDS_OPEN_CREAT flag in request for 'lfs mkdir', and MDT won't try restripe if it's set.

WC-bug-id: https://jira.whamcloud.com/browse/LU-14366
Lustre-commit: 65e3e4050ec5bb371 ("LU-14366 mdt: lfs mkdir should return -EEXIST if exists")

Reviewed-on: https://review.whamcloud.com/41329

---
 fs/lustre/llite/dir.c                  | 11 +++++++++--
 fs/lustre/mdc/mdc_lib.c                |  5 +++++
 include/uapi/linux/lustre/lustre_idl.h |  2 ++
 3 files changed, 16 insertions(+), 2 deletions(-)
fs/lustre/llite/dir.c +9 -2
index 76294ff5..21b40d1 100644
@@ -373,7 +373,8 @@ static int ll_readdir(struct file *filp, struct dir_context *ctx)
  *		<0 if the creation is failed.
  */
 static int ll_dir_setdirstripe(struct dentry *dparent, struct lmv_user_md *lump,
-			       size_t len, const char *dirname, umode_t mode)
+			       size_t len, const char *dirname, umode_t mode,
+			       bool createonly)
 {
 	struct inode *parent = dparent->d_inode;
 	struct ptlrpc_request *request = NULL;
@@ -482,6 +483,9 @@ static int ll_dir_setdirstripe(struct dentry *dparent, struct lmv_user_md *lump,
 	}
 
 	op_data->op_cli_flags |= CLI_SET_MEA;
+	if (createonly)
+		op_data->op_bias |= MDS_SETSTRIPE_CREATE;
+
 	err = md_create(sbi->ll_md_exp, op_data, lump, len, mode,
 			from_kuid(&init_user_ns, current_fsuid()),
 			from_kgid(&init_user_ns, current_fsgid()),
@@ -1378,6 +1382,7 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 		int namelen = 0;
 		int lumlen = 0;
 		umode_t mode;
+		bool createonly = false;
 		int len;
 		int rc;
 
@@ -1427,7 +1432,9 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 		}
 
 		mode = data->ioc_type;
-		rc = ll_dir_setdirstripe(dentry, lum, lumlen, filename, mode);
+		createonly = data->ioc_obdo1.o_flags & OBD_FL_OBDMDEXISTS;
+		rc = ll_dir_setdirstripe(dentry, lum, lumlen, filename, mode,
+					 createonly);
 lmv_out_free:
 		kvfree(data);
 		return rc;
fs/lustre/mdc/mdc_lib.c +5 -0
index 9251aec..69261b2 100644
@@ -212,6 +212,11 @@ void mdc_create_pack(struct ptlrpc_request *req, struct md_op_data *op_data,
 	flags = 0;
 	if (op_data->op_bias & MDS_CREATE_VOLATILE)
 		flags |= MDS_OPEN_VOLATILE;
+	if (op_data->op_bias & MDS_SETSTRIPE_CREATE)
+		/* borrow MDS_OPEN_CREATE flag to indicate current setstripe
+		 * create only, and don't restripe if object exists.
+		 */
+		flags |= MDS_OPEN_CREAT;
 	set_mrc_cr_flags(rec, flags);
 	rec->cr_bias = op_data->op_bias;
 	rec->cr_umask = current_umask();
include/uapi/linux/lustre/lustre_idl.h +2 -0
index d71fe47..c79010b 100644
@@ -1736,6 +1736,8 @@ enum mds_op_bias {
 	MDS_TRUNC_KEEP_LEASE	= 1 << 18,
 	MDS_PCC_ATTACH		= 1 << 19,
 	MDS_CLOSE_UPDATE_TIMES	= 1 << 20,
+	/* setstripe create only, don't restripe if target exists */
+	 MDS_SETSTRIPE_CREATE	= 1 << 21,
 };
 
 #define MDS_CLOSE_INTENT (MDS_HSM_RELEASE | MDS_CLOSE_LAYOUT_SWAP |         \
Signature · 6 lines
1.8.3.1

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
#20 lore raw

PATCH 20/29 lnet: o2iblnd: don't resend if there's no listener

In reply to James Simmons

From: Li Dongyang <[email protected]>

If there's no listener at remote peer, we will get IB_CM_REJ_INVALID_SERVICE_ID, currently we will try to resend which makes the discovery longer than necessary when connecting to a node which is not up.
Use -EHOSTUNREACH instead of -ECONNREFUSED, so we don't end up queued for resend.

WC-bug-id: https://jira.whamcloud.com/browse/LU-14536
Lustre-commit: 67ba3ce23d32266e ("LU-14536 o2iblnd: don't resend if there's no listener")

Reviewed-on: https://review.whamcloud.com/42109

---
 net/lnet/klnds/o2iblnd/o2iblnd_cb.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
net/lnet/klnds/o2iblnd/o2iblnd_cb.c +4 -1
index 6445f0a..e5e5e02 100644
@@ -2745,6 +2745,7 @@ static int kiblnd_map_tx(struct lnet_ni *ni, struct kib_tx *tx,
 kiblnd_rejected(struct kib_conn *conn, int reason, void *priv, int priv_nob)
 {
 	struct kib_peer_ni *peer_ni = conn->ibc_peer;
+	int status = -ECONNREFUSED;
 
 	LASSERT(!in_interrupt());
 	LASSERT(conn->ibc_state == IBLND_CONN_ACTIVE_CONNECT);
@@ -2756,6 +2757,8 @@ static int kiblnd_map_tx(struct lnet_ni *ni, struct kib_tx *tx,
 		break;
 
 	case IB_CM_REJ_INVALID_SERVICE_ID:
+		status = -EHOSTUNREACH;
+		peer_ni->ibp_retries++;
 		kiblnd_check_reconnect(conn, IBLND_MSG_VERSION, 0,
 				       IBLND_REJECT_INVALID_SRV_ID, NULL);
 		CNETERR("%s rejected: no listener at %d\n",
@@ -2870,7 +2873,7 @@ static int kiblnd_map_tx(struct lnet_ni *ni, struct kib_tx *tx,
 		break;
 	}
 
-	kiblnd_connreq_done(conn, -ECONNREFUSED);
+	kiblnd_connreq_done(conn, status);
 }
 
 static void
Signature · 6 lines
1.8.3.1

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
#21 lore raw

PATCH 21/29 lnet: obi2lnd: don't try to reconnect if there's no listener

In reply to James Simmons

From: Li Dongyang <[email protected]>

For each discovery we try to reconnect up to retry_count times, default to 5. during MDT mount process conf log, there will be multiple discovery made for each OST.
If the OSTs are not up, the mount will have a long time out.

WC-bug-id: https://jira.whamcloud.com/browse/LU-14536
Lustre-commit: 67ba3ce23d32266e ("LU-14536 obi2lnd: don't try to reconnect if there's no listener")

Reviewed-on: https://review.whamcloud.com/42111

---
 net/lnet/klnds/o2iblnd/o2iblnd.h    |  2 --
 net/lnet/klnds/o2iblnd/o2iblnd_cb.c | 16 ----------------
 2 files changed, 18 deletions(-)
net/lnet/klnds/o2iblnd/o2iblnd.h +0 -2
index a5a66ee..c578673 100644
@@ -510,8 +510,6 @@ struct kib_peer_ni {
 	unsigned char		ibp_races;
 	/* # consecutive reconnection attempts to this peer_ni */
 	unsigned int		ibp_reconnected;
-	/* number of total active retries */
-	unsigned int		ibp_retries;
 	/* errno on closing this peer_ni */
 	int			ibp_error;
 	/* max map_on_demand */
net/lnet/klnds/o2iblnd/o2iblnd_cb.c +0 -16
index e5e5e02..de3b42e 100644
@@ -2201,9 +2201,6 @@ static int kiblnd_map_tx(struct lnet_ni *ni, struct kib_tx *tx,
 	/* connection established */
 	write_lock_irqsave(&kiblnd_data.kib_global_lock, flags);
 
-	/* reset retry count */
-	peer_ni->ibp_retries = 0;
-
 	conn->ibc_last_send = ktime_get();
 	kiblnd_set_conn_state(conn, IBLND_CONN_ESTABLISHED);
 	kiblnd_peer_alive(peer_ni);
@@ -2654,11 +2651,6 @@ static int kiblnd_map_tx(struct lnet_ni *ni, struct kib_tx *tx,
 		goto out;
 	}
 
-	if (peer_ni->ibp_retries > *kiblnd_tunables.kib_retry_count) {
-		reason = "retry count exceeded due to no listener";
-		goto out;
-	}
-
 	switch (why) {
 	default:
 		reason = "Unknown";
@@ -2714,11 +2706,6 @@ static int kiblnd_map_tx(struct lnet_ni *ni, struct kib_tx *tx,
 	case IBLND_REJECT_CONN_UNCOMPAT:
 		reason = "version negotiation";
 		break;
-
-	case IBLND_REJECT_INVALID_SRV_ID:
-		peer_ni->ibp_retries++;
-		reason = "invalid service id";
-		break;
 	}
 
 	conn->ibc_reconnect = 1;
@@ -2758,9 +2745,6 @@ static int kiblnd_map_tx(struct lnet_ni *ni, struct kib_tx *tx,
 
 	case IB_CM_REJ_INVALID_SERVICE_ID:
 		status = -EHOSTUNREACH;
-		peer_ni->ibp_retries++;
-		kiblnd_check_reconnect(conn, IBLND_MSG_VERSION, 0,
-				       IBLND_REJECT_INVALID_SRV_ID, NULL);
 		CNETERR("%s rejected: no listener at %d\n",
 			libcfs_nid2str(peer_ni->ibp_nid),
 			*kiblnd_tunables.kib_service);
Signature · 6 lines
1.8.3.1

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
#22 lore raw

PATCH 22/29 lustre: osc: fall back to vmalloc for large RPCs

In reply to James Simmons

From: Andreas Dilger <[email protected]>

For large RPC sizes (16MB+) the page array (4096 brw_page) can become very large (128KB+ with fscrypt) and should fall back to vmalloc() if kmalloc() fails due to memory fragmentation.

The mdc/mdt allocations are currently limited to 1MB for readdir RPCs, but it doesn't hurt to prepare them for larger RPCs from clients in the future if this limit is increased.

Fixes 5965de814e91 ("staging: lustre: rpc: increase bulk size")

WC-bug-id: https://jira.whamcloud.com/browse/LU-13212
Lustre-commit: 037a9e2cf6d5b8d6f ("LU-13212 osc: fall back to vmalloc for large RPCs")

Reviewed-on: https://review.whamcloud.com/43281

---
 fs/lustre/mdc/mdc_request.c     | 5 +++--
 fs/lustre/mgc/mgc_request.c     | 5 +++--
 fs/lustre/obdecho/echo_client.c | 5 +++--
 fs/lustre/osc/osc_request.c     | 5 +++--
 4 files changed, 12 insertions(+), 8 deletions(-)
fs/lustre/mdc/mdc_request.c +3 -2
index 6ac3a39..fb9971f 100644
@@ -1312,7 +1312,8 @@ static int mdc_read_page_remote(void *data, struct page *page0)
 	fid = &op_data->op_fid1;
 	LASSERT(inode);
 
-	page_pool = kcalloc(max_pages, sizeof(page), GFP_NOFS);
+	page_pool = kvmalloc_array(max_pages, sizeof(page),
+				   GFP_KERNEL | __GFP_ZERO);
 	if (page_pool) {
 		page_pool[0] = page0;
 	} else {
@@ -1381,7 +1382,7 @@ static int mdc_read_page_remote(void *data, struct page *page0)
 	}
 
 	if (page_pool != &page0)
-		kfree(page_pool);
+		kvfree(page_pool);
 
 	return rc;
 }
fs/lustre/mgc/mgc_request.c +3 -2
index f115479..4b60056a 100644
@@ -1350,7 +1350,8 @@ static int mgc_process_recover_log(struct obd_device *obd,
 	if (cfg->cfg_last_idx == 0) /* the first time */
 		nrpages = CONFIG_READ_NRPAGES_INIT;
 
-	pages = kcalloc(nrpages, sizeof(*pages), GFP_KERNEL);
+	pages = kvmalloc_array(nrpages, sizeof(*pages),
+			       GFP_KERNEL | __GFP_ZERO);
 	if (!pages) {
 		rc = -ENOMEM;
 		goto out;
@@ -1474,7 +1475,7 @@ static int mgc_process_recover_log(struct obd_device *obd,
 				break;
 			__free_page(pages[i]);
 		}
-		kfree(pages);
+		kvfree(pages);
 	}
 	return rc;
 }
fs/lustre/obdecho/echo_client.c +3 -2
index 3bee0c2..270226b 100644
@@ -1302,7 +1302,8 @@ static int echo_client_kbrw(struct echo_device *ed, int rw, struct obdo *oa,
 	if (!pga)
 		return -ENOMEM;
 
-	pages = kcalloc(npages, sizeof(*pages), GFP_NOFS);
+	pages = kvmalloc_array(npages, sizeof(*pages),
+			       GFP_KERNEL | __GFP_ZERO);
 	if (!pages) {
 		kfree(pga);
 		return -ENOMEM;
@@ -1355,7 +1356,7 @@ static int echo_client_kbrw(struct echo_device *ed, int rw, struct obdo *oa,
 		__free_page(pgp->pg);
 	}
 	kfree(pga);
-	kfree(pages);
+	kvfree(pages);
 	return rc;
 }
 
fs/lustre/osc/osc_request.c +3 -2
index 1bd0d2c..973c504 100644
@@ -2323,7 +2323,7 @@ static void sort_brw_pages(struct brw_page **array, int num)
 static void osc_release_ppga(struct brw_page **ppga, u32 count)
 {
 	LASSERT(ppga);
-	kfree(ppga);
+	kvfree(ppga);
 }
 
 static int brw_interpret(const struct lu_env *env,
@@ -2523,7 +2523,8 @@ int osc_build_rpc(const struct lu_env *env, struct client_obd *cli,
 	if (mem_tight)
 		mpflag = memalloc_noreclaim_save();
 
-	pga = kcalloc(page_count, sizeof(*pga), GFP_NOFS);
+	pga = kvmalloc_array(page_count, sizeof(*pga),
+			     GFP_KERNEL | __GFP_ZERO);
 	if (!pga) {
 		rc = -ENOMEM;
 		goto out;
Signature · 6 lines
1.8.3.1

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
#23 lore raw

PATCH 23/29 lustre: ldlm: discard l_lock from struct ldlm_lock.

In reply to James Simmons

From: Mr NeilBrown <[email protected]>

This spinlock (l_lock) is only used to stablise the l_resource pointer while taking a spinlock on the resource.

This is not necessary - it is sufficient to take the resource spinlock, and then check if l_resource has changed or not. If it hasn't then it cannot change until the resource spinlock is dropped.

We must ensure this is safe even if the resource is freed before lock_res_and_lock() managed to get the lock. To do this we mark the slab as SLAB_TYPESAFE_BY_RCU and initialise the lock in an init_once() function, but not on every allocate (and specifically don't zero the whole struct on each allocation). This means that if we find a resource after taking the RCU read lock, then it is always safe to take and then drop the spinlock. After taking the spinlock, we can check if it is more generally safe to use.

Discarding l_lock shrinks 'struct ldlm_lock' which helps save memory.

WC-bug-id: https://jira.whamcloud.com/browse/LU-4801
Lustre-commit: bb6edb7b8eeec65f4 ("LU-4801 ldlm: discard l_lock from struct ldlm_lock.")

Reviewed-on: https://review.whamcloud.com/39811

---
 fs/lustre/include/lustre_dlm.h | 17 +++++++++--------
 fs/lustre/ldlm/l_lock.c        | 27 +++++++++++++++------------
 fs/lustre/ldlm/ldlm_lock.c     | 28 ++++++++++++++--------------
 fs/lustre/ldlm/ldlm_lockd.c    | 22 +++++++++++++++++++++-
 fs/lustre/ldlm/ldlm_resource.c | 12 +++++-------
 5 files changed, 64 insertions(+), 42 deletions(-)
fs/lustre/include/lustre_dlm.h +9 -8
index f1828df..1fc199b 100644
@@ -649,13 +649,10 @@ struct ldlm_lock {
 	 */
 	struct portals_handle		l_handle;
 	/**
-	 * Internal spinlock protects l_resource.  We should hold this lock
-	 * first before taking res_lock.
-	 */
-	spinlock_t			l_lock;
-	/**
 	 * Pointer to actual resource this lock is in.
-	 * ldlm_lock_change_resource() can change this.
+	 * ldlm_lock_change_resource() can change this on the client.
+	 * When this is possible, rcu must be used to stablise
+	 * the resource while we lock and check it hasn't been changed.
 	 */
 	struct ldlm_resource		*l_resource;
 	/**
@@ -889,9 +886,13 @@ struct ldlm_resource {
 
 	/**
 	 * List item for list in namespace hash.
-	 * protected by ns_lock
+	 * protected by ns_lock.
+	 * Shared with linkage for RCU-delayed free.
 	 */
-	struct hlist_node		lr_hash;
+	union {
+		struct hlist_node		lr_hash;
+		struct rcu_head			lr_rcu;
+	};
 
 	/** Reference count for this resource */
 	atomic_t			lr_refcount;
fs/lustre/ldlm/l_lock.c +15 -12
index 296259a..3531420 100644
@@ -41,19 +41,25 @@
  *
  * LDLM locking uses resource to serialize access to locks
  * but there is a case when we change resource of lock upon
- * enqueue reply. We rely on lock->l_resource = new_res
+ * enqueue reply. We rely on rcu_assign_pointer(lock->l_resource, new_res)
  * being an atomic operation.
  */
 struct ldlm_resource *lock_res_and_lock(struct ldlm_lock *lock)
-				__acquires(&lock->l_lock)
-				__acquires(&lock->l_resource->lr_lock)
+__acquires(&lock->l_resource->lr_lock)
 {
-	spin_lock(&lock->l_lock);
+	struct ldlm_resource *res;
 
-	lock_res(lock->l_resource);
-
-	ldlm_set_res_locked(lock);
-	return lock->l_resource;
+	rcu_read_lock();
+	while (1) {
+		res = rcu_dereference(lock->l_resource);
+		lock_res(res);
+		if (res == lock->l_resource) {
+			ldlm_set_res_locked(lock);
+			rcu_read_unlock();
+			return res;
+		}
+		unlock_res(res);
+	}
 }
 EXPORT_SYMBOL(lock_res_and_lock);
 
@@ -61,13 +67,10 @@ struct ldlm_resource *lock_res_and_lock(struct ldlm_lock *lock)
  * Unlock a lock and its resource previously locked with lock_res_and_lock
  */
 void unlock_res_and_lock(struct ldlm_lock *lock)
-		__releases(&lock->l_resource->lr_lock)
-		__releases(&lock->l_lock)
+__releases(&lock->l_resource->lr_lock)
 {
-	/* on server-side resource of lock doesn't change */
 	ldlm_clear_res_locked(lock);
 
 	unlock_res(lock->l_resource);
-	spin_unlock(&lock->l_lock);
 }
 EXPORT_SYMBOL(unlock_res_and_lock);
fs/lustre/ldlm/ldlm_lock.c +14 -14
index b7ce0bb..c872455 100644
@@ -385,8 +385,7 @@ static struct ldlm_lock *ldlm_lock_new(struct ldlm_resource *resource)
 	if (!lock)
 		return NULL;
 
-	spin_lock_init(&lock->l_lock);
-	lock->l_resource = resource;
+	RCU_INIT_POINTER(lock->l_resource, resource);
 	lu_ref_add(&resource->lr_reference, "lock", lock);
 
 	refcount_set(&lock->l_handle.h_ref, 2);
@@ -455,12 +454,13 @@ int ldlm_lock_change_resource(struct ldlm_namespace *ns, struct ldlm_lock *lock,
 
 	lu_ref_add(&newres->lr_reference, "lock", lock);
 	/*
-	 * To flip the lock from the old to the new resource, lock, oldres and
-	 * newres have to be locked. Resource spin-locks are nested within
-	 * lock->l_lock, and are taken in the memory address order to avoid
-	 * dead-locks.
+	 * To flip the lock from the old to the new resource, oldres
+	 * and newres have to be locked. Resource spin-locks are taken
+	 * in the memory address order to avoid dead-locks.
+	 * As this is the only circumstance where ->l_resource
+	 * can change, and this cannot race with itself, it is safe
+	 * to access lock->l_resource without being careful about locking.
 	 */
-	spin_lock(&lock->l_lock);
 	oldres = lock->l_resource;
 	if (oldres < newres) {
 		lock_res(oldres);
@@ -471,9 +471,9 @@ int ldlm_lock_change_resource(struct ldlm_namespace *ns, struct ldlm_lock *lock,
 	}
 	LASSERT(memcmp(new_resid, &oldres->lr_name,
 		       sizeof(oldres->lr_name)) != 0);
-	lock->l_resource = newres;
+	rcu_assign_pointer(lock->l_resource, newres);
 	unlock_res(oldres);
-	unlock_res_and_lock(lock);
+	unlock_res(newres);
 
 	/* ...and the flowers are still standing! */
 	lu_ref_del(&oldres->lr_reference, "lock", lock);
@@ -1875,11 +1875,11 @@ void _ldlm_lock_debug(struct ldlm_lock *lock,
 	va_list args;
 	struct va_format vaf;
 
-	if (spin_trylock(&lock->l_lock)) {
-		if (lock->l_resource)
-			resource = ldlm_resource_getref(lock->l_resource);
-		spin_unlock(&lock->l_lock);
-	}
+	rcu_read_lock();
+	resource = rcu_dereference(lock->l_resource);
+	if (resource && !atomic_inc_not_zero(&resource->lr_refcount))
+		resource = NULL;
+	rcu_read_unlock();
 
 	va_start(args, fmt);
 	vaf.fmt = fmt;
fs/lustre/ldlm/ldlm_lockd.c +21 -1
index 6f498cc..7d8bae2 100644
@@ -1208,6 +1208,23 @@ static int ldlm_cleanup(void)
 	return 0;
 }
 
+void ldlm_resource_init_once(void *p)
+{
+	/*
+	 * It is import to initialise the spinlock only once,
+	 * as ldlm_lock_change_resource() could try to lock
+	 * the resource *after* it has been freed and possibly
+	 * reused. SLAB_TYPESAFE_BY_RCU ensures the memory won't
+	 * be freed while the lock is being taken, but we need to
+	 * ensure that it doesn't get reinitialized either.
+	 */
+	struct ldlm_resource *res = p;
+
+	memset(res, 0, sizeof(*res));
+	mutex_init(&res->lr_lvb_mutex);
+	spin_lock_init(&res->lr_lock);
+}
+
 int ldlm_init(void)
 {
 	mutex_init(&ldlm_ref_mutex);
@@ -1215,7 +1232,9 @@ int ldlm_init(void)
 	mutex_init(ldlm_namespace_lock(LDLM_NAMESPACE_CLIENT));
 	ldlm_resource_slab = kmem_cache_create("ldlm_resources",
 					       sizeof(struct ldlm_resource), 0,
-					       SLAB_HWCACHE_ALIGN, NULL);
+					       SLAB_TYPESAFE_BY_RCU |
+					       SLAB_HWCACHE_ALIGN,
+					       ldlm_resource_init_once);
 	if (!ldlm_resource_slab)
 		return -ENOMEM;
 
@@ -1248,6 +1267,7 @@ void ldlm_exit(void)
 {
 	if (ldlm_refcount)
 		CERROR("ldlm_refcount is %d in %s!\n", ldlm_refcount, __func__);
+	synchronize_rcu();
 	kmem_cache_destroy(ldlm_resource_slab);
 	/*
 	 * ldlm_lock_put() use RCU to call ldlm_lock_free, so need call
fs/lustre/ldlm/ldlm_resource.c +5 -7
index 481f14e..6e3feb2 100644
@@ -1064,12 +1064,14 @@ static struct ldlm_resource *ldlm_resource_new(enum ldlm_type ldlm_type)
 {
 	struct ldlm_resource *res;
 
-	res = kmem_cache_zalloc(ldlm_resource_slab, GFP_NOFS);
+	res = kmem_cache_alloc(ldlm_resource_slab, GFP_NOFS);
 	if (!res)
 		return NULL;
 
 	INIT_LIST_HEAD(&res->lr_granted);
 	INIT_LIST_HEAD(&res->lr_waiting);
+	res->lr_lvb_inode = NULL;
+	res->lr_lvb_len = 0;
 
 	if (ldlm_type == LDLM_EXTENT) {
 		int idx;
@@ -1087,17 +1089,13 @@ static struct ldlm_resource *ldlm_resource_new(enum ldlm_type ldlm_type)
 			res->lr_itree[idx].lit_mode = BIT(idx);
 			res->lr_itree[idx].lit_root = RB_ROOT_CACHED;
 		}
+	} else {
+		res->lr_itree = NULL;
 	}
 
 	atomic_set(&res->lr_refcount, 1);
-	spin_lock_init(&res->lr_lock);
 	lu_ref_init(&res->lr_reference);
 
-	/* Since LVB init can be delayed now, there is no longer need to
-	 * immediately acquire mutex here.
-	 */
-	mutex_init(&res->lr_lvb_mutex);
-
 	return res;
 }
 
Signature · 6 lines
1.8.3.1

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
#24 lore raw

PATCH 24/29 lustre: llite: do fallocate() size checks under lock

In reply to James Simmons

From: Mikhail Pershin <[email protected]>

Check about fallocate() range vs file size in vvp_io_setattr_start() instead of ll_fallocate() so inode size cannot be changed by pending write or truncate. This implies that IO is initialized already and requires changes in LOV to update sub-IOs with proper inode size and valid size attribute values

Fix also vvp_io_setattr_lock() to don't include fallocate_end in lock range

WC-bug-id: https://jira.whamcloud.com/browse/LU-14433
Luste-commit: f23ac22c4c79750fe ("LU-14433 llite: do fallocate() size checks under lock")

Reviewed-on: https://review.whamcloud.com/41668

---
 fs/lustre/llite/file.c   |  5 -----
 fs/lustre/llite/vvp_io.c | 22 +++++++++++++++++++---
 fs/lustre/lov/lov_io.c   | 28 ++++++++++++++++++++++++++--
 3 files changed, 45 insertions(+), 10 deletions(-)
fs/lustre/llite/file.c +0 -5
index 1ca4589..c049433 100644
@@ -5028,11 +5028,6 @@ int cl_falloc(struct inode *inode, int mode, loff_t offset, loff_t len)
 			rc = -EFBIG;
 			goto out;
 		}
-		io->u.ci_setattr.sa_attr.lvb_size = sa_falloc_end;
-		if (!(mode & FALLOC_FL_KEEP_SIZE))
-			io->u.ci_setattr.sa_avalid |= ATTR_SIZE;
-	} else {
-		io->u.ci_setattr.sa_attr.lvb_size = size;
 	}
 
 again:
fs/lustre/llite/vvp_io.c +19 -3
index cb59e94..38a9430 100644
@@ -41,6 +41,8 @@
 #include <obd.h>
 #include <linux/pagevec.h>
 #include <linux/memcontrol.h>
+#include <linux/falloc.h>
+
 #include "llite_internal.h"
 #include "vvp_internal.h"
 
@@ -647,7 +649,7 @@ static int vvp_io_setattr_lock(const struct lu_env *env,
 			enqflags = CEF_DISCARD_DATA;
 	} else if (cl_io_is_fallocate(io)) {
 		lock_start = io->u.ci_setattr.sa_falloc_offset;
-		lock_end = io->u.ci_setattr.sa_falloc_end;
+		lock_end = io->u.ci_setattr.sa_falloc_end - 1;
 	} else {
 		unsigned int valid = io->u.ci_setattr.sa_avalid;
 
@@ -715,14 +717,27 @@ static int vvp_io_setattr_start(const struct lu_env *env,
 	struct cl_io *io = ios->cis_io;
 	struct inode *inode = vvp_object_inode(io->ci_obj);
 	struct ll_inode_info *lli = ll_i2info(inode);
+	int mode = io->u.ci_setattr.sa_falloc_mode;
 
 	if (cl_io_is_trunc(io)) {
 		trunc_sem_down_write(&lli->lli_trunc_sem);
 		mutex_lock(&lli->lli_setattr_mutex);
 		inode_dio_wait(inode);
 	} else if (cl_io_is_fallocate(io)) {
-		inode_lock(inode);
+		loff_t size;
+
+		trunc_sem_down_write(&lli->lli_trunc_sem);
+		mutex_lock(&lli->lli_setattr_mutex);
 		inode_dio_wait(inode);
+
+		ll_merge_attr(env, inode);
+		size = i_size_read(inode);
+		if (io->u.ci_setattr.sa_falloc_end > size &&
+		    !(mode & FALLOC_FL_KEEP_SIZE)) {
+			size = io->u.ci_setattr.sa_falloc_end;
+			io->u.ci_setattr.sa_avalid |= ATTR_SIZE;
+		}
+		io->u.ci_setattr.sa_attr.lvb_size = size;
 	} else {
 		mutex_lock(&lli->lli_setattr_mutex);
 	}
@@ -748,7 +763,8 @@ static void vvp_io_setattr_end(const struct lu_env *env,
 		mutex_unlock(&lli->lli_setattr_mutex);
 		trunc_sem_up_write(&lli->lli_trunc_sem);
 	} else if (cl_io_is_fallocate(io)) {
-		inode_unlock(inode);
+		mutex_unlock(&lli->lli_setattr_mutex);
+		trunc_sem_up_write(&lli->lli_trunc_sem);
 	} else {
 		mutex_unlock(&lli->lli_setattr_mutex);
 	}
fs/lustre/lov/lov_io.c +26 -2
index ae9d547..7da0047 100644
@@ -681,7 +681,7 @@ static void lov_io_sub_inherit(struct lov_io_sub *sub, struct lov_io *lio,
 			io->u.ci_setattr.sa_falloc_offset = start;
 			io->u.ci_setattr.sa_falloc_end = end;
 		}
-		if (cl_io_is_trunc(io) || cl_io_is_fallocate(io)) {
+		if (cl_io_is_trunc(io)) {
 			loff_t new_size = parent->u.ci_setattr.sa_attr.lvb_size;
 
 			new_size = lov_size_to_stripe(lsm, index, new_size,
@@ -1441,6 +1441,30 @@ static int lov_io_fault_start(const struct lu_env *env,
 	return lov_io_start(env, ios);
 }
 
+static int lov_io_setattr_start(const struct lu_env *env,
+				const struct cl_io_slice *ios)
+{
+	struct lov_io *lio = cl2lov_io(env, ios);
+	struct cl_io *parent = ios->cis_io;
+	struct lov_io_sub *sub;
+	struct lov_stripe_md *lsm = lio->lis_object->lo_lsm;
+
+	if (cl_io_is_fallocate(parent)) {
+		list_for_each_entry(sub, &lio->lis_active, sub_linkage) {
+			loff_t size = parent->u.ci_setattr.sa_attr.lvb_size;
+			int index = lov_comp_entry(sub->sub_subio_index);
+			int stripe = lov_comp_stripe(sub->sub_subio_index);
+
+			size = lov_size_to_stripe(lsm, index, size, stripe);
+			sub->sub_io.u.ci_setattr.sa_attr.lvb_size = size;
+			sub->sub_io.u.ci_setattr.sa_avalid =
+						parent->u.ci_setattr.sa_avalid;
+		}
+	}
+
+	return lov_io_start(env, ios);
+}
+
 static void lov_io_fsync_end(const struct lu_env *env,
 			     const struct cl_io_slice *ios)
 {
@@ -1577,7 +1601,7 @@ static void lov_io_lseek_end(const struct lu_env *env,
 			.cio_iter_fini	= lov_io_iter_fini,
 			.cio_lock	= lov_io_lock,
 			.cio_unlock	= lov_io_unlock,
-			.cio_start	= lov_io_start,
+			.cio_start	= lov_io_setattr_start,
 			.cio_end	= lov_io_end
 		},
 		[CIT_DATA_VERSION] = {
Signature · 6 lines
1.8.3.1

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
#25 lore raw

PATCH 25/29 lustre: misc: limit CDEBUG console message frequency

In reply to James Simmons

From: Andreas Dilger <[email protected]>

Some CDEBUG() messages have variable message levels, but if printed to the console it is not rate limited like CWARN() and CERROR():

server_bulk_callback()) event type 5, status -110
server_bulk_callback()) event type 5, status -110
server_bulk_callback()) event type 5, status -110
:

Instead, use CDEBUG_LIMIT() for those messages to limit them.

WC-bug-id: https://jira.whamcloud.com/browse/LU-930
Lustre-commit: 7462e8cad730897f4 ("LU-930 misc: limit CDEBUG console message frequency")

Reviewed-on: https://review.whamcloud.com/40571

---
 fs/lustre/llite/file.c    |  6 +++---
 fs/lustre/lov/lov_obd.c   | 10 +++++-----
 fs/lustre/ptlrpc/client.c |  8 ++++----
 fs/lustre/ptlrpc/events.c | 16 +++++++---------
 4 files changed, 19 insertions(+), 21 deletions(-)
fs/lustre/llite/file.c +3 -3
index c049433..15072bb1 100644
@@ -329,9 +329,9 @@ static int ll_md_close(struct inode *inode, struct file *file)
 		 * application crashed, we need to release here.
 		 */
 		rc = ll_lease_close(fd->fd_lease_och, inode, &lease_broken);
-		CDEBUG(rc ? D_ERROR : D_INODE,
-		       "Clean up lease " DFID " %d/%d\n",
-		       PFID(&lli->lli_fid), rc, lease_broken);
+		CDEBUG_LIMIT(rc ? D_ERROR : D_INODE,
+			     "Clean up lease " DFID " %d/%d\n",
+			     PFID(&lli->lli_fid), rc, lease_broken);
 
 		fd->fd_lease_och = NULL;
 	}
fs/lustre/lov/lov_obd.c +5 -5
index 29b0645..20e0be0 100644
@@ -1081,11 +1081,11 @@ static int lov_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
 					    len, karg, uarg);
 			if (err) {
 				if (lov->lov_tgts[i]->ltd_active) {
-					CDEBUG(err == -ENOTTY ?
-					       D_IOCTL : D_WARNING,
-					       "iocontrol OSC %s on OST idx %d cmd %x: err = %d\n",
-					       lov_uuid2str(lov, i),
-					       i, cmd, err);
+					CDEBUG_LIMIT(err == -ENOTTY ?
+						     D_IOCTL : D_WARNING,
+						     "iocontrol OSC %s on OST idx %d cmd %x: err = %d\n",
+						     lov_uuid2str(lov, i),
+						     i, cmd, err);
 					if (!rc)
 						rc = err;
 				}
fs/lustre/ptlrpc/client.c +4 -4
index 3c57b69..a818b01 100644
@@ -378,10 +378,10 @@ void ptlrpc_at_adj_net_latency(struct ptlrpc_request *req,
 		 * resent time, but server sent back service time of original
 		 * RPC.
 		 */
-		CDEBUG((lustre_msg_get_flags(req->rq_reqmsg) & MSG_RESENT) ?
-		       D_ADAPTTO : D_WARNING,
-		       "Reported service time %u > total measured time %lld\n",
-		       service_timeout, now - req->rq_sent);
+		CDEBUG_LIMIT((lustre_msg_get_flags(req->rq_reqmsg) &
+			      MSG_RESENT) ?  D_ADAPTTO : D_WARNING,
+			     "Reported service time %u > total measured time %lld\n",
+			     service_timeout, now - req->rq_sent);
 		return;
 	}
 
fs/lustre/ptlrpc/events.c +7 -9
index fe33600..e348e4a 100644
@@ -203,9 +203,9 @@ void client_bulk_callback(struct lnet_event *ev)
 				 CFS_FAIL_ONCE))
 		ev->status = -EIO;
 
-	CDEBUG((ev->status == 0) ? D_NET : D_ERROR,
-	       "event type %d, status %d, desc %p\n",
-	       ev->type, ev->status, desc);
+	CDEBUG_LIMIT((ev->status == 0) ? D_NET : D_ERROR,
+		     "event type %d, status %d, desc %p\n",
+		     ev->type, ev->status, desc);
 
 	spin_lock(&desc->bd_lock);
 	req = desc->bd_req;
@@ -311,9 +311,9 @@ void request_in_callback(struct lnet_event *ev)
 	LASSERT((char *)ev->md_start + ev->offset + ev->mlength <=
 		rqbd->rqbd_buffer + service->srv_buf_size);
 
-	CDEBUG((ev->status == 0) ? D_NET : D_ERROR,
-	       "event type %d, status %d, service %s\n",
-	       ev->type, ev->status, service->srv_name);
+	CDEBUG_LIMIT((ev->status == 0) ? D_NET : D_ERROR,
+		     "event type %d, status %d, service %s\n",
+		     ev->type, ev->status, service->srv_name);
 
 	if (ev->unlinked) {
 		/* If this is the last request message to fit in the
@@ -326,10 +326,8 @@ void request_in_callback(struct lnet_event *ev)
 		memset(req, 0, sizeof(*req));
 	} else {
 		LASSERT(ev->type == LNET_EVENT_PUT);
-		if (ev->status != 0) {
-			/* We moaned above already... */
+		if (ev->status != 0) /* We moaned above already... */
 			return;
-		}
 		req = ptlrpc_request_cache_alloc(GFP_ATOMIC);
 		if (!req) {
 			CERROR("Can't allocate incoming request descriptor: Dropping %s RPC from %s\n",
Signature · 6 lines
1.8.3.1

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
#26 lore raw

PATCH 26/29 lustre: fallocate: Add punch mode to fallocate

In reply to James Simmons

From: Arshad Hussain <[email protected]>

This patch adds fallocate(2) punch operation (FALLOCATE_FL_PUNCH_HOLE) mode support for ldiskfs backend OSD and for OSC/OST

WC-bug-id: https://jira.whamcloud.com/browse/LU-14160
Lustre-commit: cb037f305c64cd512 ("LU-14160 fallocate: Add punch mode to fallocate")

Reviewed-on: https://review.whamcloud.com/40877

---
 fs/lustre/include/cl_object.h |  1 -
 fs/lustre/llite/file.c        | 43 ++++++++++++++-------------
 fs/lustre/mdc/mdc_dev.c       |  3 ++
 fs/lustre/osc/osc_io.c        | 68 +++++++++++++++++++++++++------------------
 fs/lustre/osc/osc_request.c   |  7 -----
 5 files changed, 65 insertions(+), 57 deletions(-)
fs/lustre/include/cl_object.h +0 -1
index 3926aac..b69c04a 100644
@@ -1876,7 +1876,6 @@ struct cl_io {
 			/* The following are used for fallocate(2) */
 			int			sa_falloc_mode;
 			loff_t			sa_falloc_offset;
-			loff_t			sa_falloc_len;
 			loff_t			sa_falloc_end;
 		} ci_setattr;
 		struct cl_data_version_io {
fs/lustre/llite/file.c +22 -21

79 lines not on this page · raw message

fs/lustre/mdc/mdc_dev.c +3 -0
index 7807f9e..70f8987 100644
@@ -1046,6 +1046,9 @@ static int mdc_io_setattr_start(const struct lu_env *env,
 			return rc;
 	}
 
+	if (cl_io_is_fallocate(io))
+		return -EOPNOTSUPP;
+
 	if (oio->oi_lockless == 0) {
 		cl_object_attr_lock(obj);
 		rc = cl_object_attr_get(env, obj, attr);
fs/lustre/osc/osc_io.c +40 -28

117 lines not on this page · raw message

fs/lustre/osc/osc_request.c +0 -7
index 973c504..376afb9 100644
@@ -454,14 +454,7 @@ int osc_fallocate_base(struct obd_export *exp, struct obdo *oa,
 	struct obd_import *imp = class_exp2cliimp(exp);
 	int rc;
 
-	/*
-	 * Only mode == 0 (which is standard prealloc) is supported now.
-	 * Punch is not supported yet.
-	 */
-	if (mode & ~FALLOC_FL_KEEP_SIZE)
-		return -EOPNOTSUPP;
 	oa->o_falloc_mode = mode;
-
 	req = ptlrpc_request_alloc(class_exp2cliimp(exp),
 				   &RQF_OST_FALLOCATE);
 	if (!req)
Signature · 6 lines
1.8.3.1

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
#27 lore raw

PATCH 27/29 lustre: various: only use wake_up_all() on exclusive waitqs

In reply to James Simmons

From: Mr NeilBrown <[email protected]>

wake_up_all() is not necessary of wait_queues which are not the subject of an exclusive waiter. When all waiters are non-exclusive, wake_up() will wake them all up.

Use of wake_up_all() suggests to the reader that the queue is subject to exclusive waits. When that is not the case, the usage can cause confusion.

So change all wake_up_all() on non-exclusive waitqueues to wake_up().

The only wait_queues on which exclusive waits are requested are:
ws_waitq ibs_waitq kss_waitq ksnd_connd_waitq
blp_waitq imp_replay_waitq cl_mod_rpcs_waitq cl_cache_waiters
cl_destroy_waitq scp_waitq

All others now only use wake_up().

WC-bug-id: https://jira.whamcloud.com/browse/LU-14352
Lustre-commit: 1f4e9f0f4f483dc9 ("LU-14352 various: only use wake_up_all() on exclusive waitqs")

Reviewed-on: https://review.whamcloud.com/41289

---
 fs/lustre/ldlm/ldlm_lock.c       | 6 +++---
 fs/lustre/llite/pcc.c            | 2 +-
 fs/lustre/lov/lov_io.c           | 4 ++--
 fs/lustre/mdc/mdc_changelog.c    | 8 ++++----
 fs/lustre/obdclass/cl_io.c       | 2 +-
 fs/lustre/obdclass/lu_object.c   | 2 +-
 fs/lustre/osc/osc_io.c           | 2 +-
 fs/lustre/osc/osc_page.c         | 6 +++---
 fs/lustre/ptlrpc/sec_bulk.c      | 2 +-
 fs/lustre/ptlrpc/service.c       | 2 +-
 net/lnet/klnds/o2iblnd/o2iblnd.c | 4 ++--
 net/lnet/klnds/socklnd/socklnd.c | 4 ++--
 net/lnet/lnet/peer.c             | 2 +-
 13 files changed, 23 insertions(+), 23 deletions(-)
fs/lustre/ldlm/ldlm_lock.c +3 -3
index c872455..8201e28 100644
@@ -1217,7 +1217,7 @@ void ldlm_lock_fail_match_locked(struct ldlm_lock *lock)
 {
 	if ((lock->l_flags & LDLM_FL_FAIL_NOTIFIED) == 0) {
 		lock->l_flags |= LDLM_FL_FAIL_NOTIFIED;
-		wake_up_all(&lock->l_waitq);
+		wake_up(&lock->l_waitq);
 	}
 }
 
@@ -1231,7 +1231,7 @@ void ldlm_lock_fail_match_locked(struct ldlm_lock *lock)
 void ldlm_lock_allow_match_locked(struct ldlm_lock *lock)
 {
 	ldlm_set_lvb_ready(lock);
-	wake_up_all(&lock->l_waitq);
+	wake_up(&lock->l_waitq);
 }
 EXPORT_SYMBOL(ldlm_lock_allow_match_locked);
 
@@ -1752,7 +1752,7 @@ void ldlm_cancel_callback(struct ldlm_lock *lock)
 		}
 		/* only canceller can set bl_done bit */
 		ldlm_set_bl_done(lock);
-		wake_up_all(&lock->l_waitq);
+		wake_up(&lock->l_waitq);
 	} else if (!ldlm_is_bl_done(lock)) {
 		/*
 		 * The lock is guaranteed to have been canceled once
fs/lustre/llite/pcc.c +1 -1
index 297189c9..b259fa5 100644
@@ -1566,7 +1566,7 @@ static void pcc_io_fini(struct inode *inode)
 
 	LASSERT(pcci && atomic_read(&pcci->pcci_active_ios) > 0);
 	if (atomic_dec_and_test(&pcci->pcci_active_ios))
-		wake_up_all(&pcci->pcci_waitq);
+		wake_up(&pcci->pcci_waitq);
 }
 
 ssize_t pcc_file_read_iter(struct kiocb *iocb,
fs/lustre/lov/lov_io.c +2 -2
index 7da0047..1d5ea41 100644
@@ -651,7 +651,7 @@ static void lov_io_fini(const struct lu_env *env, const struct cl_io_slice *ios)
 
 	LASSERT(atomic_read(&lov->lo_active_ios) > 0);
 	if (atomic_dec_and_test(&lov->lo_active_ios))
-		wake_up_all(&lov->lo_waitq);
+		wake_up(&lov->lo_waitq);
 }
 
 static void lov_io_sub_inherit(struct lov_io_sub *sub, struct lov_io *lio,
@@ -1674,7 +1674,7 @@ static void lov_empty_io_fini(const struct lu_env *env,
 	struct lov_object *lov = cl2lov(ios->cis_obj);
 
 	if (atomic_dec_and_test(&lov->lo_active_ios))
-		wake_up_all(&lov->lo_waitq);
+		wake_up(&lov->lo_waitq);
 }
 
 static int lov_empty_io_submit(const struct lu_env *env,
fs/lustre/mdc/mdc_changelog.c +4 -4
index f671f465..ef6d4f9 100644
@@ -256,7 +256,7 @@ static int chlg_read_cat_process_cb(const struct lu_env *env,
 	crs->crs_rec_count++;
 	mutex_unlock(&crs->crs_lock);
 
-	wake_up_all(&crs->crs_waitq_cons);
+	wake_up(&crs->crs_waitq_cons);
 
 	return 0;
 }
@@ -347,7 +347,7 @@ static int chlg_load(void *args)
 	if (rc < 0)
 		crs->crs_err = rc;
 
-	wake_up_all(&crs->crs_waitq_cons);
+	wake_up(&crs->crs_waitq_cons);
 
 	if (llh)
 		llog_cat_close(NULL, llh);
@@ -420,7 +420,7 @@ static ssize_t chlg_read(struct file *file, char __user *buff, size_t count,
 
 	if (written_total > 0) {
 		rc = written_total;
-		wake_up_all(&crs->crs_waitq_prod);
+		wake_up(&crs->crs_waitq_prod);
 	} else if (rc == 0) {
 		rc = crs->crs_err;
 	}
@@ -464,7 +464,7 @@ static int chlg_set_start_offset(struct chlg_reader_state *crs, u64 offset)
 	}
 
 	mutex_unlock(&crs->crs_lock);
-	wake_up_all(&crs->crs_waitq_prod);
+	wake_up(&crs->crs_waitq_prod);
 	return 0;
 }
 
fs/lustre/obdclass/cl_io.c +1 -1
index 27804d3..ca4d387 100644
@@ -1187,7 +1187,7 @@ void cl_sync_io_note(const struct lu_env *env, struct cl_sync_io *anchor,
 		 * the wakeup ensures cl_sync_io_wait() doesn't complete
 		 * before the wakeup completes.
 		 */
-		wake_up_all_locked(&anchor->csi_waitq);
+		wake_up_locked(&anchor->csi_waitq);
 		if (end_io)
 			end_io(env, anchor);
 		if (anchor->csi_aio)
fs/lustre/obdclass/lu_object.c +1 -1
index fcf0739..419cb74 100644
@@ -398,7 +398,7 @@ static void lu_object_free(const struct lu_env *env, struct lu_object *o)
 	}
 
 	if (waitqueue_active(wq))
-		wake_up_all(wq);
+		wake_up(wq);
 }
 
 /**
fs/lustre/osc/osc_io.c +1 -1
index 3be3cfe..ce64cf8 100644
@@ -437,7 +437,7 @@ void osc_io_iter_fini(const struct lu_env *env,
 		oio->oi_is_active = 0;
 		LASSERT(atomic_read(&osc->oo_nr_ios) > 0);
 		if (atomic_dec_and_test(&osc->oo_nr_ios))
-			wake_up_all(&osc->oo_io_waitq);
+			wake_up(&osc->oo_io_waitq);
 	}
 }
 EXPORT_SYMBOL(osc_io_iter_fini);
fs/lustre/osc/osc_page.c +3 -3
index c59a5ac..8b25329a 100644
@@ -679,7 +679,7 @@ long osc_lru_shrink(const struct lu_env *env, struct client_obd *cli,
 	atomic_dec(&cli->cl_lru_shrinkers);
 	if (count > 0) {
 		atomic_long_add(count, cli->cl_lru_left);
-		wake_up_all(&osc_lru_waitq);
+		wake_up(&osc_lru_waitq);
 	}
 	return count > 0 ? count : rc;
 }
@@ -890,7 +890,7 @@ unsigned long osc_lru_reserve(struct client_obd *cli, unsigned long npages)
 void osc_lru_unreserve(struct client_obd *cli, unsigned long npages)
 {
 	atomic_long_add(npages, cli->cl_lru_left);
-	wake_up_all(&osc_lru_waitq);
+	wake_up(&osc_lru_waitq);
 }
 
 /**
@@ -987,7 +987,7 @@ void osc_dec_unstable_pages(struct ptlrpc_request *req)
 						&cli->cl_cache->ccc_unstable_nr);
 	LASSERT(unstable_count >= 0);
 	if (!unstable_count)
-		wake_up_all(&cli->cl_cache->ccc_unstable_waitq);
+		wake_up(&cli->cl_cache->ccc_unstable_waitq);
 
 	if (waitqueue_active(&osc_lru_waitq))
 		(void)ptlrpcd_queue_work(cli->cl_lru_work);
fs/lustre/ptlrpc/sec_bulk.c +1 -1
index 9548721..ef127b8 100644
@@ -304,7 +304,7 @@ static inline void enc_pools_wakeup(void)
 
 	if (unlikely(page_pools.epp_waitqlen)) {
 		LASSERT(waitqueue_active(&page_pools.epp_waitq));
-		wake_up_all(&page_pools.epp_waitq);
+		wake_up(&page_pools.epp_waitq);
 	}
 }
 
fs/lustre/ptlrpc/service.c +1 -1
index 070eecc..1057892 100644
@@ -2465,7 +2465,7 @@ static void ptlrpc_stop_hr_threads(void)
 		if (!hrp->hrp_thrs)
 			continue; /* uninitialized */
 		for (j = 0; j < hrp->hrp_nthrs; j++)
-			wake_up_all(&hrp->hrp_thrs[j].hrt_waitq);
+			wake_up(&hrp->hrp_thrs[j].hrt_waitq);
 	}
 
 	cfs_percpt_for_each(hrp, i, ptlrpc_hr.hr_partitions) {
net/lnet/klnds/o2iblnd/o2iblnd.c +2 -2
index 782e29b..0c43969 100644
@@ -2520,8 +2520,8 @@ static void kiblnd_base_shutdown(void)
 		cfs_percpt_for_each(sched, i, kiblnd_data.kib_scheds)
 			wake_up_all(&sched->ibs_waitq);
 
-		wake_up_all(&kiblnd_data.kib_connd_waitq);
-		wake_up_all(&kiblnd_data.kib_failover_waitq);
+		wake_up(&kiblnd_data.kib_connd_waitq);
+		wake_up(&kiblnd_data.kib_failover_waitq);
 
 		wait_var_event_warning(&kiblnd_data.kib_nthreads,
 				       !atomic_read(&kiblnd_data.kib_nthreads),
net/lnet/klnds/socklnd/socklnd.c +2 -2
index 141da88..54c5e2c 100644
@@ -1799,12 +1799,12 @@ static int ksocknal_push(struct lnet_ni *ni, struct lnet_process_id id)
 		/* flag threads to terminate; wake and wait for them to die */
 		ksocknal_data.ksnd_shuttingdown = 1;
 		wake_up_all(&ksocknal_data.ksnd_connd_waitq);
-		wake_up_all(&ksocknal_data.ksnd_reaper_waitq);
+		wake_up(&ksocknal_data.ksnd_reaper_waitq);
 
 		if (ksocknal_data.ksnd_schedulers) {
 			cfs_percpt_for_each(sched, i,
 					    ksocknal_data.ksnd_schedulers)
-					wake_up_all(&sched->kss_waitq);
+					    wake_up_all(&sched->kss_waitq);
 		}
 
 		wait_var_event_warning(&ksocknal_data.ksnd_nthreads,
net/lnet/lnet/peer.c +1 -1
index c833e34..36e52df 100644
@@ -2131,7 +2131,7 @@ static void lnet_peer_discovery_complete(struct lnet_peer *lp)
 	spin_lock(&lp->lp_lock);
 	list_splice_init(&lp->lp_dc_pendq, &pending_msgs);
 	spin_unlock(&lp->lp_lock);
-	wake_up_all(&lp->lp_dc_waitq);
+	wake_up(&lp->lp_dc_waitq);
 
 	if (lp->lp_rtr_refcount > 0)
 		lnet_router_discovery_complete(lp);
Signature · 6 lines
1.8.3.1

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
#28 lore raw

PATCH 28/29 lnet: remove references to Sun Trademark.

In reply to James Simmons

From: Mr NeilBrown <[email protected]>

"lustre" is no longer a Trademark of Sun Microsystems. There is no need to acknowledge the trademark in every file, so just remove all these claims.

WC-bug-id: https://jira.whamcloud.com/browse/LU-14487
Lustre-commit: b77281bfd01367d2 ("LU-14487 lnet: remove references to Sun Trademark.")

Reviewed-on: https://review.whamcloud.com/42138

---
 include/uapi/linux/lnet/libcfs_debug.h     | 1 -
 include/uapi/linux/lnet/libcfs_ioctl.h     | 1 -
 include/uapi/linux/lnet/lnet-idl.h         | 1 -
 include/uapi/linux/lnet/socklnd.h          | 1 -
 net/lnet/klnds/o2iblnd/o2iblnd-idl.h       | 1 -
 net/lnet/klnds/o2iblnd/o2iblnd.c           | 1 -
 net/lnet/klnds/o2iblnd/o2iblnd.h           | 1 -
 net/lnet/klnds/o2iblnd/o2iblnd_cb.c        | 1 -
 net/lnet/klnds/o2iblnd/o2iblnd_modparams.c | 1 -
 net/lnet/klnds/socklnd/socklnd.c           | 1 -
 net/lnet/klnds/socklnd/socklnd_lib.c       | 1 -
 net/lnet/lnet/acceptor.c                   | 1 -
 net/lnet/lnet/api-ni.c                     | 1 -
 net/lnet/lnet/config.c                     | 1 -
 net/lnet/lnet/lib-md.c                     | 1 -
 net/lnet/lnet/lib-me.c                     | 1 -
 net/lnet/lnet/lib-move.c                   | 1 -
 net/lnet/lnet/lib-msg.c                    | 1 -
 net/lnet/lnet/lib-ptl.c                    | 1 -
 net/lnet/lnet/lo.c                         | 1 -
 net/lnet/lnet/module.c                     | 1 -
 net/lnet/lnet/nidstrings.c                 | 1 -
 net/lnet/lnet/peer.c                       | 1 -
 net/lnet/selftest/brw_test.c               | 1 -
 net/lnet/selftest/conctl.c                 | 1 -
 net/lnet/selftest/conrpc.c                 | 1 -
 net/lnet/selftest/conrpc.h                 | 1 -
 net/lnet/selftest/console.c                | 1 -
 net/lnet/selftest/console.h                | 1 -
 net/lnet/selftest/framework.c              | 1 -
 net/lnet/selftest/module.c                 | 1 -
 net/lnet/selftest/ping_test.c              | 1 -
 net/lnet/selftest/rpc.c                    | 1 -
 net/lnet/selftest/rpc.h                    | 1 -
 net/lnet/selftest/selftest.h               | 1 -
 net/lnet/selftest/timer.c                  | 1 -
 net/lnet/selftest/timer.h                  | 1 -
 37 files changed, 37 deletions(-)
include/uapi/linux/lnet/libcfs_debug.h +0 -1
index b720e06..6b64f0e 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * libcfs/include/libcfs/libcfs_debug.h
  *
include/uapi/linux/lnet/libcfs_ioctl.h +0 -1
index 5a46a48..2c900ef 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * libcfs/include/libcfs/libcfs_ioctl.h
  *
include/uapi/linux/lnet/lnet-idl.h +0 -1
index a5b1414..1e27f3b 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #ifndef __UAPI_LNET_IDL_H__
include/uapi/linux/lnet/socklnd.h +0 -1
index 50f2a13..b5b7493 100644
@@ -26,7 +26,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * #defines shared between socknal implementation and utilities
  */
net/lnet/klnds/o2iblnd/o2iblnd-idl.h +0 -1
index 660440c..f8972d1 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lnet/klnds/o2iblnd/o2iblnd-idl.h
  *
net/lnet/klnds/o2iblnd/o2iblnd.c +0 -1
index 0c43969..d670180 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lnet/klnds/o2iblnd/o2iblnd.c
  *
net/lnet/klnds/o2iblnd/o2iblnd.h +0 -1
index c578673..824b204 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lnet/klnds/o2iblnd/o2iblnd.h
  *
net/lnet/klnds/o2iblnd/o2iblnd_cb.c +0 -1
index de3b42e..ec0d05a 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lnet/klnds/o2iblnd/o2iblnd_cb.c
  *
net/lnet/klnds/o2iblnd/o2iblnd_modparams.c +0 -1
index 029c9fb..81cde1b 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lnet/klnds/o2iblnd/o2iblnd_modparams.c
  *
net/lnet/klnds/socklnd/socklnd.c +0 -1
index 54c5e2c..4c79d1a 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lnet/klnds/socklnd/socklnd.c
  *
net/lnet/klnds/socklnd/socklnd_lib.c +0 -1
index 6ce5ca4..78e58f6 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #include <linux/highmem.h>
net/lnet/lnet/acceptor.c +0 -1
index d326e39..b301ffa 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #define DEBUG_SUBSYSTEM S_LNET
net/lnet/lnet/api-ni.c +0 -1
index 27640c7..cc40040 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #define DEBUG_SUBSYSTEM S_LNET
net/lnet/lnet/config.c +0 -1
index ee68c63..5f4b90b 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #define DEBUG_SUBSYSTEM S_LNET
net/lnet/lnet/lib-md.c +0 -1
index b3f758c..fbee4e0 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lnet/lnet/lib-md.c
  *
net/lnet/lnet/lib-me.c +0 -1
index f75f3cb1..66a79e2 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lnet/lnet/lib-me.c
  *
net/lnet/lnet/lib-move.c +0 -1
index a9399cc..896ab12 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lnet/lnet/lib-move.c
  *
net/lnet/lnet/lib-msg.c +0 -1
index 0a4a317..3f6cd1d 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lnet/lnet/lib-msg.c
  *
net/lnet/lnet/lib-ptl.c +0 -1
index 45d1be2..095b190 100644
@@ -21,7 +21,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lnet/lnet/lib-ptl.c
  *
net/lnet/lnet/lo.c +0 -1
index 58b0ee9..4ddf1cd 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #define DEBUG_SUBSYSTEM S_LNET
net/lnet/lnet/module.c +0 -1
index 939c255..aba9589 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #define DEBUG_SUBSYSTEM S_LNET
net/lnet/lnet/nidstrings.c +0 -1
index cce2ae4..209da0f 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lnet/lnet/nidstrings.c
  *
net/lnet/lnet/peer.c +0 -1
index 36e52df..0ec1460 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lnet/lnet/peer.c
  */
net/lnet/selftest/brw_test.c +0 -1
index 560bcc7..87ad765 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lnet/selftest/brw_test.c
  *
net/lnet/selftest/conctl.c +0 -1
index 7e82304..b6dc4ee 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lnet/selftest/conctl.c
  *
net/lnet/selftest/conrpc.c +0 -1
index 6a55b23..0170219 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lnet/selftest/conctl.c
  *
net/lnet/selftest/conrpc.h +0 -1
index 180fa02..203576f 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * /lnet/selftest/conrpc.h
  *
net/lnet/selftest/console.c +0 -1
index cc2c61d..38b169f 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lnet/selftest/conctl.c
  *
net/lnet/selftest/console.h +0 -1
index cd132e1..93aa515 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lnet/selftest/console.h
  *
net/lnet/selftest/framework.c +0 -1
index 00e7363..e84904e 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lnet/selftest/framework.c
  *
net/lnet/selftest/module.c +0 -1
index 2de2b59..f6a3ec2 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #define DEBUG_SUBSYSTEM S_LNET
net/lnet/selftest/ping_test.c +0 -1
index f54bd63..a0563a3 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lnet/selftest/conctl.c
  *
net/lnet/selftest/rpc.c +0 -1
index d012930..7141da4 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lnet/selftest/rpc.c
  *
net/lnet/selftest/rpc.h +0 -1
index 6d07452..2a5e317 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #ifndef __SELFTEST_RPC_H__
net/lnet/selftest/selftest.h +0 -1
index 0fe8c4f..26202c1 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lnet/selftest/selftest.h
  *
net/lnet/selftest/timer.c +0 -1
index 51ff979..ee82f87 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lnet/selftest/timer.c
  *
net/lnet/selftest/timer.h +0 -1
index 7f0ef9b..3abedb9 100644
@@ -26,7 +26,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lnet/selftest/timer.h
  *
Signature · 6 lines
1.8.3.1

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
#29 lore raw

PATCH 29/29 lustre: remove references to Sun Trademark.

In reply to James Simmons

From: Mr NeilBrown <[email protected]>

"lustre" is no longer a Trademark of Sun Microsystems. There is no need to acknowledge the trademark in every file, so just remove all these claims.

WC-bug-id: https://jira.whamcloud.com/browse/LU-14487
Lustre-commit: 83ddd179225821e5 ("LU-14487 modules: remove references to Sun Trademark.")

Reviewed-on: https://review.whamcloud.com/42139

---
 fs/lustre/fid/fid_internal.h          | 1 -
 fs/lustre/fid/fid_lib.c               | 1 -
 fs/lustre/fid/fid_request.c           | 1 -
 fs/lustre/fid/lproc_fid.c             | 1 -
 fs/lustre/fld/fld_cache.c             | 1 -
 fs/lustre/fld/fld_internal.h          | 1 -
 fs/lustre/fld/fld_request.c           | 1 -
 fs/lustre/fld/lproc_fld.c             | 1 -
 fs/lustre/ldlm/l_lock.c               | 1 -
 fs/lustre/ldlm/ldlm_extent.c          | 1 -
 fs/lustre/ldlm/ldlm_flock.c           | 1 -
 fs/lustre/ldlm/ldlm_inodebits.c       | 1 -
 fs/lustre/ldlm/ldlm_internal.h        | 1 -
 fs/lustre/ldlm/ldlm_lib.c             | 1 -
 fs/lustre/ldlm/ldlm_lock.c            | 1 -
 fs/lustre/ldlm/ldlm_lockd.c           | 1 -
 fs/lustre/ldlm/ldlm_plain.c           | 1 -
 fs/lustre/ldlm/ldlm_pool.c            | 1 -
 fs/lustre/ldlm/ldlm_request.c         | 1 -
 fs/lustre/ldlm/ldlm_resource.c        | 1 -
 fs/lustre/llite/acl.c                 | 1 -
 fs/lustre/llite/dcache.c              | 1 -
 fs/lustre/llite/dir.c                 | 1 -
 fs/lustre/llite/file.c                | 1 -
 fs/lustre/llite/glimpse.c             | 1 -
 fs/lustre/llite/lcommon_cl.c          | 1 -
 fs/lustre/llite/lcommon_misc.c        | 1 -
 fs/lustre/llite/llite_internal.h      | 1 -
 fs/lustre/llite/llite_lib.c           | 1 -
 fs/lustre/llite/llite_mmap.c          | 1 -
 fs/lustre/llite/llite_nfs.c           | 1 -
 fs/lustre/llite/lproc_llite.c         | 1 -
 fs/lustre/llite/namei.c               | 1 -
 fs/lustre/llite/rw.c                  | 1 -
 fs/lustre/llite/rw26.c                | 1 -
 fs/lustre/llite/statahead.c           | 1 -
 fs/lustre/llite/super25.c             | 1 -
 fs/lustre/llite/symlink.c             | 1 -
 fs/lustre/llite/vvp_dev.c             | 1 -
 fs/lustre/llite/vvp_internal.h        | 1 -
 fs/lustre/llite/vvp_io.c              | 1 -
 fs/lustre/llite/vvp_object.c          | 1 -
 fs/lustre/llite/vvp_page.c            | 1 -
 fs/lustre/llite/xattr.c               | 1 -
 fs/lustre/lmv/lmv_fld.c               | 1 -
 fs/lustre/lmv/lmv_intent.c            | 1 -
 fs/lustre/lmv/lmv_internal.h          | 1 -
 fs/lustre/lmv/lmv_obd.c               | 1 -
 fs/lustre/lmv/lproc_lmv.c             | 1 -
 fs/lustre/lov/lov_cl_internal.h       | 2 --
 fs/lustre/lov/lov_dev.c               | 1 -
 fs/lustre/lov/lov_ea.c                | 1 -
 fs/lustre/lov/lov_internal.h          | 1 -
 fs/lustre/lov/lov_io.c                | 1 -
 fs/lustre/lov/lov_lock.c              | 1 -
 fs/lustre/lov/lov_merge.c             | 1 -
 fs/lustre/lov/lov_obd.c               | 1 -
 fs/lustre/lov/lov_object.c            | 1 -
 fs/lustre/lov/lov_offset.c            | 1 -
 fs/lustre/lov/lov_pack.c              | 1 -
 fs/lustre/lov/lov_page.c              | 1 -
 fs/lustre/lov/lov_pool.c              | 1 -
 fs/lustre/lov/lov_request.c           | 1 -
 fs/lustre/lov/lovsub_dev.c            | 1 -
 fs/lustre/lov/lovsub_object.c         | 1 -
 fs/lustre/lov/lproc_lov.c             | 1 -
 fs/lustre/mdc/lproc_mdc.c             | 1 -
 fs/lustre/mdc/mdc_internal.h          | 1 -
 fs/lustre/mdc/mdc_lib.c               | 1 -
 fs/lustre/mdc/mdc_locks.c             | 1 -
 fs/lustre/mdc/mdc_reint.c             | 1 -
 fs/lustre/mdc/mdc_request.c           | 1 -
 fs/lustre/mgc/lproc_mgc.c             | 1 -
 fs/lustre/mgc/mgc_internal.h          | 1 -
 fs/lustre/mgc/mgc_request.c           | 1 -
 fs/lustre/obdclass/cl_internal.h      | 1 -
 fs/lustre/obdclass/cl_io.c            | 1 -
 fs/lustre/obdclass/cl_lock.c          | 1 -
 fs/lustre/obdclass/cl_object.c        | 1 -
 fs/lustre/obdclass/cl_page.c          | 1 -
 fs/lustre/obdclass/class_obd.c        | 1 -
 fs/lustre/obdclass/genops.c           | 1 -
 fs/lustre/obdclass/kernelcomm.c       | 1 -
 fs/lustre/obdclass/llog.c             | 1 -
 fs/lustre/obdclass/llog_cat.c         | 1 -
 fs/lustre/obdclass/llog_internal.h    | 1 -
 fs/lustre/obdclass/llog_obd.c         | 1 -
 fs/lustre/obdclass/llog_swab.c        | 1 -
 fs/lustre/obdclass/lprocfs_counters.c | 1 -
 fs/lustre/obdclass/lprocfs_status.c   | 1 -
 fs/lustre/obdclass/lu_object.c        | 1 -
 fs/lustre/obdclass/lu_ref.c           | 1 -
 fs/lustre/obdclass/lu_tgt_pool.c      | 2 --
 fs/lustre/obdclass/lustre_handles.c   | 1 -
 fs/lustre/obdclass/lustre_peer.c      | 1 -
 fs/lustre/obdclass/obd_config.c       | 1 -
 fs/lustre/obdclass/obd_mount.c        | 1 -
 fs/lustre/obdclass/obd_sysfs.c        | 1 -
 fs/lustre/obdclass/obdo.c             | 1 -
 fs/lustre/obdclass/statfs_pack.c      | 1 -
 fs/lustre/obdecho/debug.c             | 1 -
 fs/lustre/obdecho/echo_client.c       | 1 -
 fs/lustre/obdecho/echo_internal.h     | 1 -
 fs/lustre/osc/lproc_osc.c             | 1 -
 fs/lustre/osc/osc_cache.c             | 1 -
 fs/lustre/osc/osc_dev.c               | 1 -
 fs/lustre/osc/osc_internal.h          | 1 -
 fs/lustre/osc/osc_io.c                | 1 -
 fs/lustre/osc/osc_lock.c              | 1 -
 fs/lustre/osc/osc_object.c            | 1 -
 fs/lustre/osc/osc_page.c              | 1 -
 fs/lustre/osc/osc_request.c           | 1 -
 fs/lustre/ptlrpc/client.c             | 1 -
 fs/lustre/ptlrpc/connection.c         | 1 -
 fs/lustre/ptlrpc/events.c             | 1 -
 fs/lustre/ptlrpc/import.c             | 1 -
 fs/lustre/ptlrpc/layout.c             | 1 -
 fs/lustre/ptlrpc/llog_client.c        | 1 -
 fs/lustre/ptlrpc/llog_net.c           | 1 -
 fs/lustre/ptlrpc/lproc_ptlrpc.c       | 1 -
 fs/lustre/ptlrpc/niobuf.c             | 1 -
 fs/lustre/ptlrpc/pack_generic.c       | 1 -
 fs/lustre/ptlrpc/pers.c               | 1 -
 fs/lustre/ptlrpc/pinger.c             | 1 -
 fs/lustre/ptlrpc/ptlrpc_internal.h    | 1 -
 fs/lustre/ptlrpc/ptlrpc_module.c      | 1 -
 fs/lustre/ptlrpc/ptlrpcd.c            | 1 -
 fs/lustre/ptlrpc/recover.c            | 1 -
 fs/lustre/ptlrpc/sec.c                | 1 -
 fs/lustre/ptlrpc/sec_bulk.c           | 1 -
 fs/lustre/ptlrpc/sec_config.c         | 1 -
 fs/lustre/ptlrpc/sec_gc.c             | 1 -
 fs/lustre/ptlrpc/sec_lproc.c          | 1 -
 fs/lustre/ptlrpc/sec_null.c           | 1 -
 fs/lustre/ptlrpc/sec_plain.c          | 1 -
 fs/lustre/ptlrpc/service.c            | 1 -
 fs/lustre/ptlrpc/wiretest.c           | 1 -
 137 files changed, 139 deletions(-)
fs/lustre/fid/fid_internal.h +0 -1
index cbf0987..5256e87 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/fid/fid_internal.h
  *
fs/lustre/fid/fid_lib.c +0 -1
index 6b06847..dc1537d 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/fid/fid_lib.c
  *
fs/lustre/fid/fid_request.c +0 -1
index a7013d1..c41932f 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/fid/fid_request.c
  *
fs/lustre/fid/lproc_fid.c +0 -1
index be9846b..8f6a4a8 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/fid/lproc_fid.c
  *
fs/lustre/fld/fld_cache.c +0 -1
index f288907..f64ae65 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/fld/fld_cache.c
  *
fs/lustre/fld/fld_internal.h +0 -1
index d32360c..83c3a3e 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/fld/fld_internal.h
  *
fs/lustre/fld/fld_request.c +0 -1
index 2e8d0b8..7260a14 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/fld/fld_request.c
  *
fs/lustre/fld/lproc_fld.c +0 -1
index 9e1be53..e53cc08 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/fld/lproc_fld.c
  *
fs/lustre/ldlm/l_lock.c +0 -1
index 3531420..639a72a 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #define DEBUG_SUBSYSTEM S_LDLM
fs/lustre/ldlm/ldlm_extent.c +0 -1
index 7474c85..4533bdb 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/ldlm/ldlm_extent.c
  *
fs/lustre/ldlm/ldlm_flock.c +0 -1
index b4916cb15..4ca69f8 100644
@@ -32,7 +32,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 /**
fs/lustre/ldlm/ldlm_inodebits.c +0 -1
index 32de9b9..892a0dd 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/ldlm/ldlm_inodebits.c
  *
fs/lustre/ldlm/ldlm_internal.h +0 -1
index 9dc0561..ed4fb2a 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 extern int ldlm_srv_namespace_nr;
fs/lustre/ldlm/ldlm_lib.c +0 -1
index 9499995..c5ee2c3 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 /**
fs/lustre/ldlm/ldlm_lock.c +0 -1
index 8201e28..4225c0b 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/ldlm/ldlm_lock.c
  *
fs/lustre/ldlm/ldlm_lockd.c +0 -1
index 7d8bae2..04fe92e 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/ldlm/ldlm_lockd.c
  *
fs/lustre/ldlm/ldlm_plain.c +0 -1
index e7357ee..e70597c 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/ldlm/ldlm_plain.c
  *
fs/lustre/ldlm/ldlm_pool.c +0 -1
index b93ad4d..155b585 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/ldlm/ldlm_pool.c
  *
fs/lustre/ldlm/ldlm_request.c +0 -1
index 3527678..7718e07 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 /**
  * This file contains Asynchronous System Trap (AST) handlers and related
fs/lustre/ldlm/ldlm_resource.c +0 -1
index 6e3feb2..d4b6e41 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/ldlm/ldlm_resource.c
  *
fs/lustre/llite/acl.c +0 -1
index 2ee9ff9..f4cc149 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/llite/acl.c
  */
fs/lustre/llite/dcache.c +0 -1
index 0a6d773..cf6619f 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #include <linux/fs.h>
fs/lustre/llite/dir.c +0 -1
index 21b40d1..bf2d9fe 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/llite/dir.c
  *
fs/lustre/llite/file.c +0 -1
index c8f250c..1561af1 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/llite/file.c
  *
fs/lustre/llite/glimpse.c +0 -1
index 3d23612..c55d079 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * glimpse code used by vvp (and other Lustre clients in the future).
  *
fs/lustre/llite/lcommon_cl.c +0 -1
index c945351..f0d8f78 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  *   Author: Nikita Danilov <[email protected]>
  */
fs/lustre/llite/lcommon_misc.c +0 -1
index d833a16..3b0c0f4 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * cl code used by vvp (and other Lustre clients in the future).
  *
fs/lustre/llite/llite_internal.h +0 -1
index dc9ea03..669500b 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #ifndef LLITE_INTERNAL_H
fs/lustre/llite/llite_lib.c +0 -1
index 6af95fd..f520b34 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/llite/llite_lib.c
  *
fs/lustre/llite/llite_mmap.c +0 -1
index 0963757..a234a83 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #include <linux/kernel.h>
fs/lustre/llite/llite_nfs.c +0 -1
index a57ab51..bf15023 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/lustre/llite/llite_nfs.c
  *
fs/lustre/llite/lproc_llite.c +0 -1
index 4ce6fab..3ca553d 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 #define DEBUG_SUBSYSTEM S_LLITE
 
fs/lustre/llite/namei.c +0 -1
index 654d065..7f1fd5c 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #include <linux/fs.h>
fs/lustre/llite/rw.c +0 -1
index c64696d..08ab25d 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/llite/rw.c
  *
fs/lustre/llite/rw26.c +0 -1
index 91a05ac..74f3b0b 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/lustre/llite/rw26.c
  *
fs/lustre/llite/statahead.c +0 -1
index a7d3a43..995a9e1 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #include <linux/fs.h>
fs/lustre/llite/super25.c +0 -1
index 1b074a6..decfa2f 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #define DEBUG_SUBSYSTEM S_LLITE
fs/lustre/llite/symlink.c +0 -1
index aae449c..f78db86 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #include <linux/fs.h>
fs/lustre/llite/vvp_dev.c +0 -1
index aa8b2c5..fdcd314 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * cl_device and cl_device_type implementation for VVP layer.
  *
fs/lustre/llite/vvp_internal.h +0 -1
index 6956d6b..f2599be 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * Internal definitions for VVP layer.
  *
fs/lustre/llite/vvp_io.c +0 -1
index 38a9430..e98792b 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * Implementation of cl_io for VVP layer.
  *
fs/lustre/llite/vvp_object.c +0 -1
index 0c40814..e999caa 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * cl_object implementation for VVP layer.
  *
fs/lustre/llite/vvp_page.c +0 -1
index b0a119e..86353df 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * Implementation of cl_page for VVP layer.
  *
fs/lustre/llite/xattr.c +0 -1
index 7004893..cd973eb 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #include <linux/fs.h>
fs/lustre/lmv/lmv_fld.c +0 -1
index ea1ef72..8acad7a 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #define DEBUG_SUBSYSTEM S_LMV
fs/lustre/lmv/lmv_intent.c +0 -1
index 2a15ec2..398bd17 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #define DEBUG_SUBSYSTEM S_LMV
fs/lustre/lmv/lmv_internal.h +0 -1
index e42b141..9e89f88 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #ifndef _LMV_INTERNAL_H_
fs/lustre/lmv/lmv_obd.c +0 -1
index 6555c6e..4fa441e 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #define DEBUG_SUBSYSTEM S_LMV
fs/lustre/lmv/lproc_lmv.c +0 -1
index 85963d2..767b40e 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #define DEBUG_SUBSYSTEM S_CLASS
fs/lustre/lov/lov_cl_internal.h +0 -2
index f231be9..7fcc327 100644
@@ -28,11 +28,9 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * Internal interfaces of LOV layer.
  *
fs/lustre/lov/lov_dev.c +0 -1
index a4e6b91..e001e68 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * Implementation of cl_device and cl_device_type for LOV layer.
  *
fs/lustre/lov/lov_ea.c +0 -1
index f6b3df0..d2171a3 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/lov/lov_ea.c
  *
fs/lustre/lov/lov_internal.h +0 -1
index e58235a..8c0b6fa 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #ifndef LOV_INTERNAL_H
fs/lustre/lov/lov_io.c +0 -1
index 1d5ea41..86e3fbd 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * Implementation of cl_io for LOV layer.
  *
fs/lustre/lov/lov_lock.c +0 -1
index c79f728..efaca37 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * Implementation of cl_lock for LOV layer.
  *
fs/lustre/lov/lov_merge.c +0 -1
index 7728630..8800c5f 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #define DEBUG_SUBSYSTEM S_LOV
fs/lustre/lov/lov_obd.c +0 -1
index 20e0be0..42a137d 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/lov/lov_obd.c
  *
fs/lustre/lov/lov_object.c +0 -1
index db4070f..ee61983 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * Implementation of cl_object for LOV layer.
  *
fs/lustre/lov/lov_offset.c +0 -1
index 2493331..73c3f1b 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #define DEBUG_SUBSYSTEM S_LOV
fs/lustre/lov/lov_pack.c +0 -1
index c97093e..9b5fb9c 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/lov/lov_pack.c
  *
fs/lustre/lov/lov_page.c +0 -1
index da036f2..fdc415b 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * Implementation of cl_page for LOV layer.
  *
fs/lustre/lov/lov_pool.c +0 -1
index 8fbc6ee..d01c475 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/lov/lov_pool.c
  *
fs/lustre/lov/lov_request.c +0 -1
index d263cec..0ae53a7 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #define DEBUG_SUBSYSTEM S_LOV
fs/lustre/lov/lovsub_dev.c +0 -1
index 0555737..a0eeb06 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * Implementation of cl_device and cl_device_type for LOVSUB layer.
  *
fs/lustre/lov/lovsub_object.c +0 -1
index eef1713..672ea3b 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * Implementation of cl_object for LOVSUB layer.
  *
fs/lustre/lov/lproc_lov.c +0 -1
index e95a907..95fb4ef 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 #define DEBUG_SUBSYSTEM S_CLASS
 
fs/lustre/mdc/lproc_mdc.c +0 -1
index af2b725..02636ef 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 #define DEBUG_SUBSYSTEM S_CLASS
 
fs/lustre/mdc/mdc_internal.h +0 -1
index 91e8240..06b0637 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #ifndef _MDC_INTERNAL_H
fs/lustre/mdc/mdc_lib.c +0 -1
index 69261b2..37fcb38 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #define DEBUG_SUBSYSTEM S_MDC
fs/lustre/mdc/mdc_locks.c +0 -1
index dbf402a..5373ec9 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #define DEBUG_SUBSYSTEM S_MDC
fs/lustre/mdc/mdc_reint.c +0 -1
index 9e566e7..786b23d 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #define DEBUG_SUBSYSTEM S_MDC
fs/lustre/mdc/mdc_request.c +0 -1
index fb9971f..e6c0df5 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #define DEBUG_SUBSYSTEM S_MDC
fs/lustre/mgc/lproc_mgc.c +0 -1
index dd7ed0f..6a945c5 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 #define DEBUG_SUBSYSTEM S_CLASS
 
fs/lustre/mgc/mgc_internal.h +0 -1
index 7a6e77b..e323f90 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #ifndef _MGC_INTERNAL_H
fs/lustre/mgc/mgc_request.c +0 -1
index 4b60056a..c2ad5d3 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/mgc/mgc_request.c
  *
fs/lustre/obdclass/cl_internal.h +0 -1
index 64a5ab2..db9dd98 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * Internal cl interfaces.
  *
fs/lustre/obdclass/cl_io.c +0 -1
index ca4d387..6c22137 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * Client IO.
  *
fs/lustre/obdclass/cl_lock.c +0 -1
index 0c02546..9617764 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * Client Extent Lock.
  *
fs/lustre/obdclass/cl_object.c +0 -1
index aa3d928..c5deb5c 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * Client Lustre Object.
  *
fs/lustre/obdclass/cl_page.c +0 -1
index 2cf8d30..4b6386c 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * Client Lustre Page.
  *
fs/lustre/obdclass/class_obd.c +0 -1
index 38b8967..b30d941 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #define DEBUG_SUBSYSTEM S_CLASS
fs/lustre/obdclass/genops.c +0 -1
index 7bc4dab..bbb63b2 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/obdclass/genops.c
  *
fs/lustre/obdclass/kernelcomm.c +0 -1
index bc9b0f2..e59b6aa 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * Author: Nathan Rutman <[email protected]>
  *
fs/lustre/obdclass/llog.c +0 -1
index b431087..c342734 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/obdclass/llog.c
  *
fs/lustre/obdclass/llog_cat.c +0 -1
index b67e7a2b..7f55895 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/obdclass/llog_cat.c
  *
fs/lustre/obdclass/llog_internal.h +0 -1
index 41ac4f0..7a10389 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #ifndef __LLOG_INTERNAL_H__
fs/lustre/obdclass/llog_obd.c +0 -1
index 82f96ed..4743dc9 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #define DEBUG_SUBSYSTEM S_LOG
fs/lustre/obdclass/llog_swab.c +0 -1
index c18ca95..0b83dc3 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/obdclass/llog_swab.c
  *
fs/lustre/obdclass/lprocfs_counters.c +0 -1
index c7bf1ee..55cb12c 100644
@@ -29,7 +29,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/obdclass/lprocfs_counters.c
  *
fs/lustre/obdclass/lprocfs_status.c +0 -1
index 0ed1bd5..cd5a2fa 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/obdclass/lprocfs_status.c
  *
fs/lustre/obdclass/lu_object.c +0 -1
index 419cb74..b49e0cd 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/obdclass/lu_object.c
  *
fs/lustre/obdclass/lu_ref.c +0 -1
index 9b32c3c..fd7ac39 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/obdclass/lu_ref.c
  *
fs/lustre/obdclass/lu_tgt_pool.c +0 -2
index fc5e298..5d8e362 100644
@@ -21,14 +21,12 @@
  * GPL HEADER END
  */
 /*
- * Copyright  2008 Sun Microsystems, Inc. All rights reserved
  * Use is subject to license terms.
  *
  * Copyright (c) 2012, 2017, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 /*
  * lustre/target/tgt_pool.c
fs/lustre/obdclass/lustre_handles.c +0 -1
index 7ecd15ad3..16099a4 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/obdclass/lustre_handles.c
  *
fs/lustre/obdclass/lustre_peer.c +0 -1
index 2675594..c0a0bfb 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #define DEBUG_SUBSYSTEM S_RPC
fs/lustre/obdclass/obd_config.c +0 -1
index 8f062bb..3a0dbd5 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/obdclass/obd_config.c
  *
fs/lustre/obdclass/obd_mount.c +0 -1
index ea5b469..fbad459 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/obdclass/obd_mount.c
  *
fs/lustre/obdclass/obd_sysfs.c +0 -1
index e6fb1b9..43bbbe9 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/obdclass/linux/linux-module.c
  *
fs/lustre/obdclass/obdo.c +0 -1
index 8fd2922..7df4ff3 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/obdclass/obdo.c
  *
fs/lustre/obdclass/statfs_pack.c +0 -1
index 355e888..e1d1f56 100644
@@ -26,7 +26,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/obdclass/statfs_pack.c
  *
fs/lustre/obdecho/debug.c +0 -1
index 130d3bf..df30035 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/obdclass/debug.c
  *
fs/lustre/obdecho/echo_client.c +0 -1
index 270226b..0452942 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #define DEBUG_SUBSYSTEM S_ECHO
fs/lustre/obdecho/echo_internal.h +0 -1
index 95b0149..5736b17 100644
@@ -24,7 +24,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/obdecho/echo_internal.h
  */
fs/lustre/osc/lproc_osc.c +0 -1
index df48c76..3991b2c 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 #define DEBUG_SUBSYSTEM S_CLASS
 
fs/lustre/osc/osc_cache.c +0 -1
index e85f320..fc8079a 100644
@@ -29,7 +29,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * osc cache management.
  *
fs/lustre/osc/osc_dev.c +0 -1
index 6469973..621beb6 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * Implementation of cl_device, for OSC layer.
  *
fs/lustre/osc/osc_internal.h +0 -1
index fc3ca8a..3b65f2d 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #ifndef OSC_INTERNAL_H
fs/lustre/osc/osc_io.c +0 -1
index ce64cf8..b792c22 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * Implementation of cl_io for OSC layer.
  *
fs/lustre/osc/osc_lock.c +0 -1
index 6ff3fb6..de96fc0 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * Implementation of cl_lock for OSC layer.
  *
fs/lustre/osc/osc_object.c +0 -1
index 00f2800..8f36789 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * Implementation of cl_object for OSC layer.
  *
fs/lustre/osc/osc_page.c +0 -1
index 8b25329a..94db9d2 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * Implementation of cl_page for OSC layer.
  *
fs/lustre/osc/osc_request.c +0 -1
index 376afb9..e49d73f 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #define DEBUG_SUBSYSTEM S_OSC
fs/lustre/ptlrpc/client.c +0 -1
index a818b01..97f1251 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 /** Implementation of client-side PortalRPC interfaces */
fs/lustre/ptlrpc/connection.c +0 -1
index 1551a9a..0415357 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #define DEBUG_SUBSYSTEM S_RPC
fs/lustre/ptlrpc/events.c +0 -1
index e348e4a..c81181d 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #define DEBUG_SUBSYSTEM S_RPC
fs/lustre/ptlrpc/import.c +0 -1
index 5e33ebc..317f28c 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/ptlrpc/import.c
  *
fs/lustre/ptlrpc/layout.c +0 -1
index 11c0d50..8bbe68b 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/ptlrpc/layout.c
  *
fs/lustre/ptlrpc/llog_client.c +0 -1
index 8bbff60..aa4a808 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/ptlrpc/llog_client.c
  *
fs/lustre/ptlrpc/llog_net.c +0 -1
index 1d86fb3..0090d00 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/ptlrpc/llog_net.c
  *
fs/lustre/ptlrpc/lproc_ptlrpc.c +0 -1
index 26ca55e..b291374 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 #define DEBUG_SUBSYSTEM S_CLASS
 
fs/lustre/ptlrpc/niobuf.c +0 -1
index 5ae7dd1..cf9940b 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #define DEBUG_SUBSYSTEM S_RPC
fs/lustre/ptlrpc/pack_generic.c +0 -1
index fbed952..5dbab3d 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/ptlrpc/pack_generic.c
  *
fs/lustre/ptlrpc/pers.c +0 -1
index 78b8ce2..e24c8e3 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #define DEBUG_SUBSYSTEM S_RPC
fs/lustre/ptlrpc/pinger.c +0 -1
index 99d077b..f565982 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/ptlrpc/pinger.c
  *
fs/lustre/ptlrpc/ptlrpc_internal.h +0 -1
index 248f9cb..62c3c97 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 /* Intramodule declarations for ptlrpc. */
fs/lustre/ptlrpc/ptlrpc_module.c +0 -1
index 85fb0fa..8379bc4 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #define DEBUG_SUBSYSTEM S_RPC
fs/lustre/ptlrpc/ptlrpcd.c +0 -1
index ef24b0e..ed3f0e1 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/ptlrpc/ptlrpcd.c
  */
fs/lustre/ptlrpc/recover.c +0 -1
index 104af56..6ba31c1 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/ptlrpc/recover.c
  *
fs/lustre/ptlrpc/sec.c +0 -1
index ea1dafe..c65cf89 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/ptlrpc/sec.c
  *
fs/lustre/ptlrpc/sec_bulk.c +0 -1
index ef127b8..b6ae77b 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/ptlrpc/sec_bulk.c
  *
fs/lustre/ptlrpc/sec_config.c +0 -1
index d9e3520..d44af0f 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #define DEBUG_SUBSYSTEM S_SEC
fs/lustre/ptlrpc/sec_gc.c +0 -1
index 36ac319..bc76323 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/ptlrpc/sec_gc.c
  *
fs/lustre/ptlrpc/sec_lproc.c +0 -1
index 94f77350..8dfbb77 100644
@@ -26,7 +26,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/ptlrpc/sec_lproc.c
  *
fs/lustre/ptlrpc/sec_null.c +0 -1
index 3892d6e..cf8f24b 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/ptlrpc/sec_null.c
  *
fs/lustre/ptlrpc/sec_plain.c +0 -1
index 80831af..7920ab0 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/ptlrpc/sec_plain.c
  *
fs/lustre/ptlrpc/service.c +0 -1
index 1057892..3d9192d 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #define DEBUG_SUBSYSTEM S_RPC
fs/lustre/ptlrpc/wiretest.c +0 -1
index a500a87..71f9e32 100644
@@ -28,7 +28,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #define DEBUG_SUBSYSTEM S_RPC
Signature · 6 lines
1.8.3.1

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org