lkml.org 
[lkml]   [2008]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 17/58] [GFS2] Given device ID rather than s_id in "id" sysfs file
    Date
    From: Bob Peterson <rpeterso@redhat.com>

    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>

    diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c
    index 1359198..65dd065 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)
    --
    1.5.1.2


    \
     
     \ /
      Last update: 2008-01-21 11:11    [W:0.022 / U:34.856 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site