All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sage Weil <sage@newdream.net>
To: Thomas Mueller <thomas@chaschperli.ch>
Cc: ceph-devel@vger.kernel.org
Subject: Re: PATCH: link ceph-client version to kernel version
Date: Wed, 7 Jul 2010 08:03:33 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.1007070757310.23002@cobra.newdream.net> (raw)
In-Reply-To: <i11fb7$mk1$1@dough.gmane.org>

On Wed, 7 Jul 2010, Thomas Mueller wrote:
> hi
> 
> reading the version in ceph_fs.h made me think, that now that ceph is in 
> vanilla kernel, it would be nice to have the version linked to the kernel 
> version. this is how the kvm guys work for their backported module.

Hmm, how does that work?  This would divorce the kclient version from the 
server side (which is basically already is, teh CEPH_VERSION* defines are 
ignored by the kclient currently) and match it up with the kernel version.  
For most people, that is just whatever upstream kernel they downloaded.

Is the goal just to make the standalone/backported code tell you which 
version the client code corresponds to?  If that's the case, I wonder the 
defines should be generated exclusively in the backport branches of the 
-standalone.git repo.

(Currently the only reason those defines are there at all is because the
ceph_fs.h header (along with a few others) is periodically synced up with 
the server code.  Probably they should be moved into a non-synced header 
to avoid that confusion.)

sage

> I've also patched super.c to expose the version to modinfo.
> 
> - Thomas
> 
> 
> diff --git a/ceph_fs.h b/ceph_fs.h
> index 63ff461..cfc995b 100644
> --- a/ceph_fs.h
> +++ b/ceph_fs.h
> @@ -18,16 +18,17 @@
>  /*
>   * Ceph release version
>   */
> -#define CEPH_VERSION_MAJOR 0
> -#define CEPH_VERSION_MINOR 20
> -#define CEPH_VERSION_PATCH 0
> +#define CEPH_VERSION_MAJOR 2
> +#define CEPH_VERSION_MINOR 6
> +#define CEPH_VERSION_PATCH 35
> +#define CEPH_VERSION_FIX 0
>  
>  #define _CEPH_STRINGIFY(x) #x
>  #define CEPH_STRINGIFY(x) _CEPH_STRINGIFY(x)
> -#define CEPH_MAKE_VERSION(x, y, z) CEPH_STRINGIFY(x) "." CEPH_STRINGIFY(y) \
> -       "." CEPH_STRINGIFY(z)
> +#define CEPH_MAKE_VERSION(w, x, y, z) CEPH_STRINGIFY(w) "." CEPH_STRINGIFY(x) \
> +       "." CEPH_STRINGIFY(y) "." CEPH_STRINGIFY(z)
>  #define CEPH_VERSION CEPH_MAKE_VERSION(CEPH_VERSION_MAJOR, \
> -                                      CEPH_VERSION_MINOR, CEPH_VERSION_PATCH)
> +                                      CEPH_VERSION_MINOR, CEPH_VERSION_PATCH, CEPH_VERSION_FIX)
>  
>  /*
>   * subprotocol versions.  when specific messages types or high-level
> diff --git a/super.c b/super.c
> index 27447a2..93d9c59 100644
> --- a/super.c
> +++ b/super.c
> @@ -1149,3 +1149,4 @@ MODULE_AUTHOR("Yehuda Sadeh <yehuda@hq.newdream.net>");
>  MODULE_AUTHOR("Patience Warnick <patience@newdream.net>");
>  MODULE_DESCRIPTION("Ceph filesystem for Linux");
>  MODULE_LICENSE("GPL");
> +MODULE_INFO(version, CEPH_VERSION);
> 
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

  reply	other threads:[~2010-07-07 15:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-07  8:54 PATCH: link ceph-client version to kernel version Thomas Mueller
2010-07-07 15:03 ` Sage Weil [this message]
2010-07-07 15:11   ` Thomas Mueller
2010-07-07 17:34 ` Brian Jackson
2010-07-07 18:04   ` Brian Jackson

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=Pine.LNX.4.64.1007070757310.23002@cobra.newdream.net \
    --to=sage@newdream.net \
    --cc=ceph-devel@vger.kernel.org \
    --cc=thomas@chaschperli.ch \
    /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.