All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Teigland <teigland@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH][GFS2] Given device ID rather than s_id in "id" sysfs file
Date: Fri, 2 Nov 2007 09:55:43 -0500	[thread overview]
Message-ID: <20071102145543.GA6480@redhat.com> (raw)
In-Reply-To: <1194014236.21497.20.camel@technetium.msp.redhat.com>

On Fri, Nov 02, 2007 at 09:37:15AM -0500, Bob Peterson wrote:
> Hi,
> 
> This patch changes the /sys/fs/gfs2/<s_id>/id file to give the device
> id "major:minor" rather than the s_id.  That enables gfs2_tool to
> match devices properly (by id, not name) when locating the tuning files.

We have to be extremely cautious when changing the kernel abi like this;
have you verified that it doesn't break any existing programs?

> 
> Regards,
> 
> Bob Peterson
> --
> Signed-off-by: Bob Peterson <rpeterso@redhat.com>
> --
>  fs/gfs2/sys.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c
> index 06e0b77..10807b7 100644
> --- a/fs/gfs2/sys.c
> +++ b/fs/gfs2/sys.c
> @@ -32,7 +32,8 @@ spinlock_t gfs2_sys_margs_lock;
>  
>  static ssize_t id_show(struct gfs2_sbd *sdp, char *buf)
>  {
> -	return snprintf(buf, PAGE_SIZE, "%s\n", sdp->sd_vfs->s_id);
> +	return snprintf(buf, PAGE_SIZE, "%u:%u\n",
> +			MAJOR(sdp->sd_vfs->s_dev), MINOR(sdp->sd_vfs->s_dev));
>  }
>  
>  static ssize_t fsname_show(struct gfs2_sbd *sdp, char *buf)
> 



  parent reply	other threads:[~2007-11-02 14:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-02 14:37 [Cluster-devel] [PATCH][GFS2] Given device ID rather than s_id in "id" sysfs file Bob Peterson
2007-11-02 14:39 ` [Cluster-devel] " Steven Whitehouse
2007-11-02 14:55 ` David Teigland [this message]
2007-11-02 17:01   ` [Cluster-devel] " Bob Peterson

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=20071102145543.GA6480@redhat.com \
    --to=teigland@redhat.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.