Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5d4450c4 authored by Peng Tao's avatar Peng Tao Committed by Greg Kroah-Hartman
Browse files

staging/lustre: fix build error on non-x86 platforms



dump_trace() is only available on X86. Without it, Lustre's own
watchdog is broken. We can only dump current task's stack.

The client-side this code is much less likely to hit deadlocks and
it's probably OK to drop this altogether, since we hardly have any
ptlrpc threads on clients, most notable ones are ldlm cb threads
that should not really be blocking on the client anyway.

Remove libcfs watchdog for now, until the upstream kernel watchdog
can detect distributed deadlocks and dump other kernel threads.

Cc: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarPeng Tao <tao.peng@emc.com>
Signed-off-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4b1a25f0
Loading
Loading
Loading
Loading
+0 −25
Original line number Diff line number Diff line
@@ -117,31 +117,6 @@ int libcfs_sock_write(socket_t *sock, void *buffer, int nob, int timeout);
int libcfs_sock_read(socket_t *sock, void *buffer, int nob, int timeout);
void libcfs_sock_release(socket_t *sock);

/* libcfs watchdogs */
struct lc_watchdog;

/* Add a watchdog which fires after "time" milliseconds of delay.  You have to
 * touch it once to enable it. */
struct lc_watchdog *lc_watchdog_add(int time,
				    void (*cb)(pid_t pid, void *),
				    void *data);

/* Enables a watchdog and resets its timer. */
void lc_watchdog_touch(struct lc_watchdog *lcw, int timeout);
#define CFS_GET_TIMEOUT(svc) (max_t(int, obd_timeout,		   \
			  AT_OFF ? 0 : at_get(&svc->srv_at_estimate)) * \
			  svc->srv_watchdog_factor)

/* Disable a watchdog; touch it to restart it. */
void lc_watchdog_disable(struct lc_watchdog *lcw);

/* Clean up the watchdog */
void lc_watchdog_delete(struct lc_watchdog *lcw);

/* Dump a debug log */
void lc_watchdog_dumplog(pid_t pid, void *data);


/* need both kernel and user-land acceptor */
#define LNET_ACCEPTOR_MIN_RESERVED_PORT    512
#define LNET_ACCEPTOR_MAX_RESERVED_PORT    1023
+0 −1
Original line number Diff line number Diff line
@@ -210,7 +210,6 @@ do { \
#define ntohs(x) ___ntohs(x)
#endif

void libcfs_debug_dumpstack(task_t *tsk);
void libcfs_run_upcall(char **argv);
void libcfs_run_lbug_upcall(struct libcfs_debug_msg_data *);
void libcfs_debug_dumplog(void);
+1 −4
Original line number Diff line number Diff line
@@ -93,11 +93,8 @@ static inline void __client_obd_list_lock(client_obd_lock_t *lock,
				      lock, task->comm, task->pid,
				      lock->func, lock->line,
				      (jiffies - lock->time) / HZ);
			LCONSOLE_WARN("====== for process holding the "
				      "lock =====\n");
			libcfs_debug_dumpstack(task);
			LCONSOLE_WARN("====== for current process =====\n");
			libcfs_debug_dumpstack(NULL);
			dump_stack();
			LCONSOLE_WARN("====== end =======\n");
			cfs_pause(1000 * HZ);
		}
+6 −1
Original line number Diff line number Diff line
@@ -2322,8 +2322,13 @@ struct ptlrpc_thread {
	pid_t t_pid;
	/**
	 * put watchdog in the structure per thread b=14840
	 *
	 * Lustre watchdog is removed for client in the hope
	 * of a generic watchdog can be merged in kernel.
	 * When that happens, we should add below back.
	 *
	 * struct lc_watchdog *t_watchdog;
	 */
	struct lc_watchdog *t_watchdog;
	/**
	 * the svc this thread belonged to b=18582
	 */
+1 −1
Original line number Diff line number Diff line
@@ -1548,7 +1548,7 @@ int ldlm_fill_lvb(struct ldlm_lock *lock, struct req_capsule *pill,
		break;
	default:
		LDLM_ERROR(lock, "Unknown LVB type: %d\n", lock->l_lvb_type);
		libcfs_debug_dumpstack(NULL);
		dump_stack();
		RETURN(-EINVAL);
	}

Loading