All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Durgin <josh.durgin@inktank.com>
To: Alex Elder <elder@inktank.com>
Cc: "ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>
Subject: Re: [PATCH 1/2] libceph: add a compatibility check interface
Date: Wed, 30 Jan 2013 16:29:46 -0800	[thread overview]
Message-ID: <5109BAFA.40006@inktank.com> (raw)
In-Reply-To: <51098740.2000200@inktank.com>

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>

On 01/30/2013 12:49 PM, Alex Elder wrote:
> An upcoming change implements semantic change that could lead to
> a crash if an old version of the libceph kernel module is used with
> a new version of the rbd kernel module.
>
> In order to preclude that possibility, this adds a compatibilty
> check interface.  If this interface doesn't exist, the modules are
> obviously not compatible.  But if it does exist, this provides a way
> of letting the caller know whether it will operate properly with
> this libceph module.
>
> Perhaps confusingly, it returns false right now.  The semantic
> change mentioned above will make it return true.
>
> This resolves:
>      http://tracker.ceph.com/issues/3800
>
> Signed-off-by: Alex Elder <elder@inktank.com>
> ---
>   include/linux/ceph/libceph.h |    2 ++
>   net/ceph/ceph_common.c       |   16 ++++++++++++++++
>   2 files changed, 18 insertions(+)
>
> diff --git a/include/linux/ceph/libceph.h b/include/linux/ceph/libceph.h
> index 084d3c6..c44275a 100644
> --- a/include/linux/ceph/libceph.h
> +++ b/include/linux/ceph/libceph.h
> @@ -193,6 +193,8 @@ static inline int calc_pages_for(u64 off, u64 len)
>   }
>
>   /* ceph_common.c */
> +extern bool libceph_compatible(void *data);
> +
>   extern const char *ceph_msg_type_name(int type);
>   extern int ceph_check_fsid(struct ceph_client *client, struct ceph_fsid
> *fsid);
>   extern struct kmem_cache *ceph_inode_cachep;
> diff --git a/net/ceph/ceph_common.c b/net/ceph/ceph_common.c
> index ee71ea2..a98c03f 100644
> --- a/net/ceph/ceph_common.c
> +++ b/net/ceph/ceph_common.c
> @@ -26,6 +26,22 @@
>   #include "crypto.h"
>
>
> +/*
> + * Module compatibility interface.  For now it doesn't do anything,
> + * but its existence signals a certain level of functionality.
> + *
> + * The data buffer is used to pass information both to and from
> + * libceph.  The return value indicates whether libceph determines
> + * it is compatible with the caller (from another kernel module),
> + * given the provided data.
> + *
> + * The data pointer can be null.
> + */
> +bool libceph_compatible(void *data)
> +{
> +	return false;
> +}
> +EXPORT_SYMBOL(libceph_compatible);
>
>   /*
>    * find filename portion of a path (/foo/bar/baz -> baz)
>


  reply	other threads:[~2013-01-31  0:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-30 20:47 [PATCH 0/2] libceph: osd_client should not take bio reference Alex Elder
2013-01-30 20:49 ` [PATCH 1/2] libceph: add a compatibility check interface Alex Elder
2013-01-31  0:29   ` Josh Durgin [this message]
2013-01-30 20:49 ` [PATCH 2/2] rbd: don't take extra bio reference for osd client Alex Elder
2013-01-31  0:33   ` Josh Durgin
2013-01-31 12:33     ` Alex Elder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5109BAFA.40006@inktank.com \
    --to=josh.durgin@inktank.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=elder@inktank.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.