Skip to content

Commit

Permalink
[GFS2] Given device ID rather than s_id in "id" sysfs file
Browse files Browse the repository at this point in the history
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: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
  • Loading branch information
Bob Peterson authored and Steven Whitehouse committed Jan 25, 2008
1 parent e589665 commit c7227e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/gfs2/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c7227e4

Please sign in to comment.