Commit 0dfb36b2 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'ceph-for-6.19-rc1' of https://github.com/ceph/ceph-client

Pull ceph updates from Ilya Dryomov:
 "We have a patch that adds an initial set of tracepoints to the MDS
  client from Max, a fix that hardens osdmap parsing code from myself
  (marked for stable) and a few assorted fixups"

* tag 'ceph-for-6.19-rc1' of https://github.com/ceph/ceph-client:
  rbd: stop selecting CRC32, CRYPTO, and CRYPTO_AES
  ceph: stop selecting CRC32, CRYPTO, and CRYPTO_AES
  libceph: make decode_pool() more resilient against corrupted osdmaps
  libceph: Amend checking to fix `make W=1` build breakage
  ceph: Amend checking to fix `make W=1` build breakage
  ceph: add trace points to the MDS client
  libceph: fix log output race condition in OSD client
parents 4cfc2149 21c1466e
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -316,9 +316,6 @@ config BLK_DEV_RBD
	tristate "Rados block device (RBD)"
	depends on INET && BLOCK
	select CEPH_LIB
	select CRC32
	select CRYPTO_AES
	select CRYPTO
	help
	  Say Y here if you want include the Rados block device, which stripes
	  a block device over objects stored in the Ceph distributed object
+0 −3
Original line number Diff line number Diff line
@@ -3,9 +3,6 @@ config CEPH_FS
	tristate "Ceph distributed file system"
	depends on INET
	select CEPH_LIB
	select CRC32
	select CRYPTO_AES
	select CRYPTO
	select NETFS_SUPPORT
	select FS_ENCRYPTION_ALGS if FS_ENCRYPTION
	default n
+4 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
#include "crypto.h"
#include <linux/ceph/decode.h>
#include <linux/ceph/messenger.h>
#include <trace/events/ceph.h>

/*
 * Capability management
@@ -4452,6 +4453,9 @@ void ceph_handle_caps(struct ceph_mds_session *session,
	      session->s_mds, ceph_cap_op_name(op), vino.ino, vino.snap, inode,
	      seq, issue_seq, mseq);

	trace_ceph_handle_caps(mdsc, session, op, &vino, ceph_inode(inode),
			       seq, issue_seq, mseq);

	mutex_lock(&session->s_mutex);

	if (!inode) {
+18 −2
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
#include <linux/ceph/pagelist.h>
#include <linux/ceph/auth.h>
#include <linux/ceph/debugfs.h>
#include <trace/events/ceph.h>

#define RECONNECT_MAX_SIZE (INT_MAX - PAGE_SIZE)

@@ -3288,6 +3289,8 @@ static void complete_request(struct ceph_mds_client *mdsc,
{
	req->r_end_latency = ktime_get();

	trace_ceph_mdsc_complete_request(mdsc, req);

	if (req->r_callback)
		req->r_callback(mdsc, req);
	complete_all(&req->r_completion);
@@ -3419,6 +3422,8 @@ static int __send_request(struct ceph_mds_session *session,
{
	int err;

	trace_ceph_mdsc_send_request(session, req);

	err = __prepare_send_request(session, req, drop_cap_releases);
	if (!err) {
		ceph_msg_get(req->r_request);
@@ -3470,6 +3475,8 @@ static void __do_request(struct ceph_mds_client *mdsc,
		}
		if (mdsc->mdsmap->m_epoch == 0) {
			doutc(cl, "no mdsmap, waiting for map\n");
			trace_ceph_mdsc_suspend_request(mdsc, session, req,
							ceph_mdsc_suspend_reason_no_mdsmap);
			list_add(&req->r_wait, &mdsc->waiting_for_map);
			return;
		}
@@ -3491,6 +3498,8 @@ static void __do_request(struct ceph_mds_client *mdsc,
			goto finish;
		}
		doutc(cl, "no mds or not active, waiting for map\n");
		trace_ceph_mdsc_suspend_request(mdsc, session, req,
						ceph_mdsc_suspend_reason_no_active_mds);
		list_add(&req->r_wait, &mdsc->waiting_for_map);
		return;
	}
@@ -3536,9 +3545,11 @@ static void __do_request(struct ceph_mds_client *mdsc,
		 * it to the mdsc queue.
		 */
		if (session->s_state == CEPH_MDS_SESSION_REJECTED) {
			if (ceph_test_mount_opt(mdsc->fsc, CLEANRECOVER))
			if (ceph_test_mount_opt(mdsc->fsc, CLEANRECOVER)) {
				trace_ceph_mdsc_suspend_request(mdsc, session, req,
								ceph_mdsc_suspend_reason_rejected);
				list_add(&req->r_wait, &mdsc->waiting_for_map);
			else
			} else
				err = -EACCES;
			goto out_session;
		}
@@ -3552,6 +3563,8 @@ static void __do_request(struct ceph_mds_client *mdsc,
			if (random)
				req->r_resend_mds = mds;
		}
		trace_ceph_mdsc_suspend_request(mdsc, session, req,
						ceph_mdsc_suspend_reason_session);
		list_add(&req->r_wait, &session->s_waiting);
		goto out_session;
	}
@@ -3652,6 +3665,7 @@ static void __wake_requests(struct ceph_mds_client *mdsc,
		list_del_init(&req->r_wait);
		doutc(cl, " wake request %p tid %llu\n", req,
		      req->r_tid);
		trace_ceph_mdsc_resume_request(mdsc, req);
		__do_request(mdsc, req);
	}
}
@@ -3678,6 +3692,7 @@ static void kick_requests(struct ceph_mds_client *mdsc, int mds)
		    req->r_session->s_mds == mds) {
			doutc(cl, " kicking tid %llu\n", req->r_tid);
			list_del_init(&req->r_wait);
			trace_ceph_mdsc_resume_request(mdsc, req);
			__do_request(mdsc, req);
		}
	}
@@ -3724,6 +3739,7 @@ int ceph_mdsc_submit_request(struct ceph_mds_client *mdsc, struct inode *dir,
	doutc(cl, "submit_request on %p for inode %p\n", req, dir);
	mutex_lock(&mdsc->mutex);
	__register_request(mdsc, req, dir);
	trace_ceph_mdsc_submit_request(mdsc, req);
	__do_request(mdsc, req);
	err = req->r_err;
	mutex_unlock(&mdsc->mutex);
+1 −1
Original line number Diff line number Diff line
@@ -374,7 +374,7 @@ static int build_snap_context(struct ceph_mds_client *mdsc,

	/* alloc new snap context */
	err = -ENOMEM;
	if (num > (SIZE_MAX - sizeof(*snapc)) / sizeof(u64))
	if ((size_t)num > (SIZE_MAX - sizeof(*snapc)) / sizeof(u64))
		goto fail;
	snapc = ceph_create_snap_context(num, GFP_NOFS);
	if (!snapc)
Loading