From e74b541fb675a77bbc7000ff5353f29bee2ff722 Mon Sep 17 00:00:00 2001 From: bwzhou Date: Thu, 20 Sep 2007 06:33:50 +0000 Subject: [PATCH] Branch b1_6 b=12234 i=adilger i=johann correct the cast of 'index' in obd_device_list_seq_show() --- lustre/ChangeLog | 9 +++++++++ lustre/obdclass/linux/linux-module.c | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index b5a06df..e352456 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -63,6 +63,15 @@ Description: 1.4.11 Can't handle directories with stripe set and extended acls Details : Impossible (EPROTO is returned) to access a directory that has a non-default striping and ACLs. +Severity : normal +Frequency : only on ppc +Bugzilla : 12234 +Description: /proc/fs/lustre/devices broken on ppc +Details : The patch as applied to 1.6.2 doesn't look correct for all arches. + We should make sure the type of 'index' is loff_t and then cast + explicitly as needed below. Do not assign an explicitly cast + loff_t to an int. + -------------------------------------------------------------------------------- 2007-09-27 Cluster File Systems, Inc. diff --git a/lustre/obdclass/linux/linux-module.c b/lustre/obdclass/linux/linux-module.c index c651261..1412589 100644 --- a/lustre/obdclass/linux/linux-module.c +++ b/lustre/obdclass/linux/linux-module.c @@ -323,8 +323,8 @@ static void *obd_device_list_seq_next(struct seq_file *p, void *v, loff_t *pos) static int obd_device_list_seq_show(struct seq_file *p, void *v) { - int index = *(loff_t *)v; - struct obd_device *obd = class_num2obd(index); + loff_t index = *(loff_t *)v; + struct obd_device *obd = class_num2obd((int)index); char *status; if (obd == NULL) -- 1.8.3.1