Whamcloud - gitweb
LU-717 ldiskfs: MRP-222 Replace sysname with nodename in MMP
authorNikitas Angelinas <nikitas_angelinas@xyratex.com>
Mon, 5 Dec 2011 22:31:12 +0000 (22:31 +0000)
committerOleg Drokin <green@whamcloud.com>
Fri, 9 Dec 2011 03:27:36 +0000 (22:27 -0500)
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.

Signed-off-by: Nikitas Angelinas <nikitas_angelinas@xyratex.com>
Change-Id: I207bf145d114a9981b5a6add4bbf92ca76f71840
Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Reviewed-on: http://review.whamcloud.com/1419
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
ldiskfs/kernel_patches/patches/ext4-mmp-rhel6.patch
ldiskfs/kernel_patches/patches/ext4-mmp-sles11.patch

index e2942a9..9d37b39 100644 (file)
@@ -268,7 +268,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 756263d..d7d5694 100644 (file)
@@ -139,7 +139,7 @@ Index: linux-stage/fs/ext4/super.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()) {