Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit afebe4a5 authored by Fan Yong's avatar Fan Yong Committed by Greg Kroah-Hartman
Browse files

staging: lustre: reorder LOV_MAGIC_* definition



Since all the LOV_MAGIC_* definitions have the same
postfix values break that value out into its own
definition. With this we can check whether the magic's
postfix match the LOV_MAGIC_MAGIC or not: if yes,
then it is quite possible that the clients has
encountered an newer LOV magic. This extra information
can let us handle those cases more gracefully.

Signed-off-by: default avatarFan Yong <fan.yong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4941
Reviewed-on: http://review.whamcloud.com/10045


Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1d5d5ec1
Loading
Loading
Loading
Loading
+15 −5
Original line number Original line Diff line number Diff line
@@ -1478,11 +1478,21 @@ enum obdo_flags {
	OBD_FL_LOCAL_MASK   = 0xF0000000,
	OBD_FL_LOCAL_MASK   = 0xF0000000,
};
};


#define LOV_MAGIC_V1      0x0BD10BD0
/*
 * All LOV EA magics should have the same postfix, if some new version
 * Lustre instroduces new LOV EA magic, then when down-grade to an old
 * Lustre, even though the old version system does not recognizes such
 * new magic, it still can distinguish the corrupted cases by checking
 * the magic's postfix.
 */
#define LOV_MAGIC_MAGIC 0x0BD0
#define LOV_MAGIC_MASK  0xFFFF

#define LOV_MAGIC_V1		(0x0BD10000 | LOV_MAGIC_MAGIC)
#define LOV_MAGIC_JOIN_V1	(0x0BD20000 | LOV_MAGIC_MAGIC)
#define LOV_MAGIC_V3		(0x0BD30000 | LOV_MAGIC_MAGIC)
#define LOV_MAGIC_MIGRATE	(0x0BD40000 | LOV_MAGIC_MAGIC)
#define LOV_MAGIC		LOV_MAGIC_V1
#define LOV_MAGIC		LOV_MAGIC_V1
#define LOV_MAGIC_JOIN_V1 0x0BD20BD0
#define LOV_MAGIC_V3      0x0BD30BD0
#define LOV_MAGIC_MIGRATE 0x0BD40BD0


/*
/*
 * magic for fully defined striping
 * magic for fully defined striping