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

Commit 9f321603 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (28 commits)
  ceph: update discussion list address in MAINTAINERS
  ceph: some documentations fixes
  ceph: fix use after free on mds __unregister_request
  ceph: avoid loaded term 'OSD' in documention
  ceph: fix possible double-free of mds request reference
  ceph: fix session check on mds reply
  ceph: handle kmalloc() failure
  ceph: propagate mds session allocation failures to caller
  ceph: make write_begin wait propagate ERESTARTSYS
  ceph: fix snap rebuild condition
  ceph: avoid reopening osd connections when address hasn't changed
  ceph: rename r_sent_stamp r_stamp
  ceph: fix connection fault con_work reentrancy problem
  ceph: prevent dup stale messages to console for restarting mds
  ceph: fix pg pool decoding from incremental osdmap update
  ceph: fix mds sync() race with completing requests
  ceph: only release unused caps with mds requests
  ceph: clean up handle_cap_grant, handle_caps wrt session mutex
  ceph: fix session locking in handle_caps, ceph_check_caps
  ceph: drop unnecessary WARN_ON in caps migration
  ...
parents 9d54e2c0 82593f87
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -16,6 +16,8 @@ befs.txt
	- information about the BeOS filesystem for Linux.
	- information about the BeOS filesystem for Linux.
bfs.txt
bfs.txt
	- info for the SCO UnixWare Boot Filesystem (BFS).
	- info for the SCO UnixWare Boot Filesystem (BFS).
ceph.txt
	- info for the Ceph Distributed File System
cifs.txt
cifs.txt
	- description of the CIFS filesystem.
	- description of the CIFS filesystem.
coda.txt
coda.txt
+6 −5
Original line number Original line Diff line number Diff line
@@ -8,7 +8,7 @@ Basic features include:


 * POSIX semantics
 * POSIX semantics
 * Seamless scaling from 1 to many thousands of nodes
 * Seamless scaling from 1 to many thousands of nodes
 * High availability and reliability.  No single points of failure.
 * High availability and reliability.  No single point of failure.
 * N-way replication of data across storage nodes
 * N-way replication of data across storage nodes
 * Fast recovery from node failures
 * Fast recovery from node failures
 * Automatic rebalancing of data on node addition/removal
 * Automatic rebalancing of data on node addition/removal
@@ -94,7 +94,7 @@ Mount Options


  wsize=X
  wsize=X
	Specify the maximum write size in bytes.  By default there is no
	Specify the maximum write size in bytes.  By default there is no
	maximu.  Ceph will normally size writes based on the file stripe
	maximum.  Ceph will normally size writes based on the file stripe
	size.
	size.


  rsize=X
  rsize=X
@@ -115,7 +115,7 @@ Mount Options
	number of entries in that directory.
	number of entries in that directory.


  nocrc
  nocrc
	Disable CRC32C calculation for data writes.  If set, the OSD
	Disable CRC32C calculation for data writes.  If set, the storage node
	must rely on TCP's error correction to detect data corruption
	must rely on TCP's error correction to detect data corruption
	in the data payload.
	in the data payload.


@@ -133,7 +133,8 @@ For more information on Ceph, see the home page at
	http://ceph.newdream.net/
	http://ceph.newdream.net/


The Linux kernel client source tree is available at
The Linux kernel client source tree is available at
	git://ceph.newdream.net/linux-ceph-client.git
	git://ceph.newdream.net/git/ceph-client.git
	git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client.git


and the source for the full system is at
and the source for the full system is at
	git://ceph.newdream.net/ceph.git
	git://ceph.newdream.net/git/ceph.git
+1 −1
Original line number Original line Diff line number Diff line
@@ -1443,7 +1443,7 @@ F: arch/powerpc/platforms/cell/


CEPH DISTRIBUTED FILE SYSTEM CLIENT
CEPH DISTRIBUTED FILE SYSTEM CLIENT
M:	Sage Weil <sage@newdream.net>
M:	Sage Weil <sage@newdream.net>
L:	ceph-devel@lists.sourceforge.net
L:	ceph-devel@vger.kernel.org
W:	http://ceph.newdream.net/
W:	http://ceph.newdream.net/
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client.git
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client.git
S:	Supported
S:	Supported
+8 −2
Original line number Original line Diff line number Diff line
@@ -919,6 +919,10 @@ static int context_is_writeable_or_written(struct inode *inode,
/*
/*
 * We are only allowed to write into/dirty the page if the page is
 * We are only allowed to write into/dirty the page if the page is
 * clean, or already dirty within the same snap context.
 * clean, or already dirty within the same snap context.
 *
 * called with page locked.
 * return success with page locked,
 * or any failure (incl -EAGAIN) with page unlocked.
 */
 */
static int ceph_update_writeable_page(struct file *file,
static int ceph_update_writeable_page(struct file *file,
			    loff_t pos, unsigned len,
			    loff_t pos, unsigned len,
@@ -961,9 +965,11 @@ retry_locked:
			snapc = ceph_get_snap_context((void *)page->private);
			snapc = ceph_get_snap_context((void *)page->private);
			unlock_page(page);
			unlock_page(page);
			ceph_queue_writeback(inode);
			ceph_queue_writeback(inode);
			wait_event_interruptible(ci->i_cap_wq,
			r = wait_event_interruptible(ci->i_cap_wq,
			       context_is_writeable_or_written(inode, snapc));
			       context_is_writeable_or_written(inode, snapc));
			ceph_put_snap_context(snapc);
			ceph_put_snap_context(snapc);
			if (r == -ERESTARTSYS)
				return r;
			return -EAGAIN;
			return -EAGAIN;
		}
		}


+38 −15
Original line number Original line Diff line number Diff line
@@ -28,6 +28,12 @@ static int ceph_x_is_authenticated(struct ceph_auth_client *ac)
	return (ac->want_keys & xi->have_keys) == ac->want_keys;
	return (ac->want_keys & xi->have_keys) == ac->want_keys;
}
}


static int ceph_x_encrypt_buflen(int ilen)
{
	return sizeof(struct ceph_x_encrypt_header) + ilen + 16 +
		sizeof(u32);
}

static int ceph_x_encrypt(struct ceph_crypto_key *secret,
static int ceph_x_encrypt(struct ceph_crypto_key *secret,
			  void *ibuf, int ilen, void *obuf, size_t olen)
			  void *ibuf, int ilen, void *obuf, size_t olen)
{
{
@@ -150,6 +156,11 @@ static int ceph_x_proc_ticket_reply(struct ceph_auth_client *ac,
		struct timespec validity;
		struct timespec validity;
		struct ceph_crypto_key old_key;
		struct ceph_crypto_key old_key;
		void *tp, *tpend;
		void *tp, *tpend;
		struct ceph_timespec new_validity;
		struct ceph_crypto_key new_session_key;
		struct ceph_buffer *new_ticket_blob;
		unsigned long new_expires, new_renew_after;
		u64 new_secret_id;


		ceph_decode_need(&p, end, sizeof(u32) + 1, bad);
		ceph_decode_need(&p, end, sizeof(u32) + 1, bad);


@@ -182,16 +193,16 @@ static int ceph_x_proc_ticket_reply(struct ceph_auth_client *ac,
			goto bad;
			goto bad;


		memcpy(&old_key, &th->session_key, sizeof(old_key));
		memcpy(&old_key, &th->session_key, sizeof(old_key));
		ret = ceph_crypto_key_decode(&th->session_key, &dp, dend);
		ret = ceph_crypto_key_decode(&new_session_key, &dp, dend);
		if (ret)
		if (ret)
			goto out;
			goto out;


		ceph_decode_copy(&dp, &th->validity, sizeof(th->validity));
		ceph_decode_copy(&dp, &new_validity, sizeof(new_validity));
		ceph_decode_timespec(&validity, &th->validity);
		ceph_decode_timespec(&validity, &new_validity);
		th->expires = get_seconds() + validity.tv_sec;
		new_expires = get_seconds() + validity.tv_sec;
		th->renew_after = th->expires - (validity.tv_sec / 4);
		new_renew_after = new_expires - (validity.tv_sec / 4);
		dout(" expires=%lu renew_after=%lu\n", th->expires,
		dout(" expires=%lu renew_after=%lu\n", new_expires,
		     th->renew_after);
		     new_renew_after);


		/* ticket blob for service */
		/* ticket blob for service */
		ceph_decode_8_safe(&p, end, is_enc, bad);
		ceph_decode_8_safe(&p, end, is_enc, bad);
@@ -216,10 +227,21 @@ static int ceph_x_proc_ticket_reply(struct ceph_auth_client *ac,
		dout(" ticket blob is %d bytes\n", dlen);
		dout(" ticket blob is %d bytes\n", dlen);
		ceph_decode_need(&tp, tpend, 1 + sizeof(u64), bad);
		ceph_decode_need(&tp, tpend, 1 + sizeof(u64), bad);
		struct_v = ceph_decode_8(&tp);
		struct_v = ceph_decode_8(&tp);
		th->secret_id = ceph_decode_64(&tp);
		new_secret_id = ceph_decode_64(&tp);
		ret = ceph_decode_buffer(&th->ticket_blob, &tp, tpend);
		ret = ceph_decode_buffer(&new_ticket_blob, &tp, tpend);
		if (ret)
		if (ret)
			goto out;
			goto out;

		/* all is well, update our ticket */
		ceph_crypto_key_destroy(&th->session_key);
		if (th->ticket_blob)
			ceph_buffer_put(th->ticket_blob);
		th->session_key = new_session_key;
		th->ticket_blob = new_ticket_blob;
		th->validity = new_validity;
		th->secret_id = new_secret_id;
		th->expires = new_expires;
		th->renew_after = new_renew_after;
		dout(" got ticket service %d (%s) secret_id %lld len %d\n",
		dout(" got ticket service %d (%s) secret_id %lld len %d\n",
		     type, ceph_entity_type_name(type), th->secret_id,
		     type, ceph_entity_type_name(type), th->secret_id,
		     (int)th->ticket_blob->vec.iov_len);
		     (int)th->ticket_blob->vec.iov_len);
@@ -242,7 +264,7 @@ static int ceph_x_build_authorizer(struct ceph_auth_client *ac,
				   struct ceph_x_ticket_handler *th,
				   struct ceph_x_ticket_handler *th,
				   struct ceph_x_authorizer *au)
				   struct ceph_x_authorizer *au)
{
{
	int len;
	int maxlen;
	struct ceph_x_authorize_a *msg_a;
	struct ceph_x_authorize_a *msg_a;
	struct ceph_x_authorize_b msg_b;
	struct ceph_x_authorize_b msg_b;
	void *p, *end;
	void *p, *end;
@@ -253,15 +275,15 @@ static int ceph_x_build_authorizer(struct ceph_auth_client *ac,
	dout("build_authorizer for %s %p\n",
	dout("build_authorizer for %s %p\n",
	     ceph_entity_type_name(th->service), au);
	     ceph_entity_type_name(th->service), au);


	len = sizeof(*msg_a) + sizeof(msg_b) + sizeof(u32) +
	maxlen = sizeof(*msg_a) + sizeof(msg_b) +
		ticket_blob_len + 16;
		ceph_x_encrypt_buflen(ticket_blob_len);
	dout("  need len %d\n", len);
	dout("  need len %d\n", maxlen);
	if (au->buf && au->buf->alloc_len < len) {
	if (au->buf && au->buf->alloc_len < maxlen) {
		ceph_buffer_put(au->buf);
		ceph_buffer_put(au->buf);
		au->buf = NULL;
		au->buf = NULL;
	}
	}
	if (!au->buf) {
	if (!au->buf) {
		au->buf = ceph_buffer_new(len, GFP_NOFS);
		au->buf = ceph_buffer_new(maxlen, GFP_NOFS);
		if (!au->buf)
		if (!au->buf)
			return -ENOMEM;
			return -ENOMEM;
	}
	}
@@ -296,6 +318,7 @@ static int ceph_x_build_authorizer(struct ceph_auth_client *ac,
	au->buf->vec.iov_len = p - au->buf->vec.iov_base;
	au->buf->vec.iov_len = p - au->buf->vec.iov_base;
	dout(" built authorizer nonce %llx len %d\n", au->nonce,
	dout(" built authorizer nonce %llx len %d\n", au->nonce,
	     (int)au->buf->vec.iov_len);
	     (int)au->buf->vec.iov_len);
	BUG_ON(au->buf->vec.iov_len > maxlen);
	return 0;
	return 0;


out_buf:
out_buf:
Loading