Commit c7227e46 authored by Bob Peterson's avatar Bob Peterson Committed by Steven Whitehouse

[GFS2] Given device ID rather than s_id in "id" sysfs file

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.
Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
parent e589665e
...@@ -32,7 +32,8 @@ spinlock_t gfs2_sys_margs_lock; ...@@ -32,7 +32,8 @@ spinlock_t gfs2_sys_margs_lock;
static ssize_t id_show(struct gfs2_sbd *sdp, char *buf) 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) static ssize_t fsname_show(struct gfs2_sbd *sdp, char *buf)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment