Whamcloud - gitweb
LU-1221 ldiskfs: Replace sysname with nodename in MMP
authorNiu Yawei <niu@whamcloud.com>
Fri, 16 Mar 2012 03:22:59 +0000 (20:22 -0700)
committerJohann Lombardi <johann@whamcloud.com>
Wed, 21 Mar 2012 07:58:02 +0000 (03:58 -0400)
sysname holds "Linux" by default, i.e. what appears when
doing a "uname -s"; nodename should be used to print the
machine's hostname, i.e. what is returned when doing a
"uname -n" or "hostname", and what
gethostname(2)/sethostname(2) manipulate, in order to
notify the administrator of the node which is contending
to mount the filesystem.

Andreas says this was introduced when porting the MMP
patches from RHEL5 to RHEL6, and then also pushed upstream
to ext4; a patch for upstream ext4 has already been
submitted.

MRP-222
Signed-off-by: Nikitas Angelinas <nikitas_angelinas@xyratex.com>
Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ie5c8e99ae536c2239134140589d678d3a4f92639
Reviewed-on: http://review.whamcloud.com/2337
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
ldiskfs/kernel_patches/patches/ext4-mmp-rhel5.patch
ldiskfs/kernel_patches/patches/ext4-mmp-sles11.patch

index 352549f..37f8458 100644 (file)
@@ -269,7 +269,7 @@ Index: linux-stage/fs/ext4/mmp.c
 +       mmp->mmp_check_interval = cpu_to_le16(mmp_check_interval);
 +       bdevname(bh->b_bdev, mmp->mmp_bdevname);
 +
-+       memcpy(mmp->mmp_nodename, init_utsname()->sysname,
++       memcpy(mmp->mmp_nodename, init_utsname()->nodename,
 +              sizeof(mmp->mmp_nodename));
 +
 +       while (!kthread_should_stop()) {
index ff4f6df..f551e24 100644 (file)
@@ -269,7 +269,7 @@ Index: linux-stage/fs/ext4/mmp.c
 +       mmp->mmp_check_interval = cpu_to_le16(mmp_check_interval);
 +       bdevname(bh->b_bdev, mmp->mmp_bdevname);
 +
-+       memcpy(mmp->mmp_nodename, init_utsname()->sysname,
++       memcpy(mmp->mmp_nodename, init_utsname()->nodename,
 +              sizeof(mmp->mmp_nodename));
 +
 +       while (!kthread_should_stop()) {