commit d6344a293229ebe1040c7c56b804301db7af83b7
Author: Yiannis Pericleous <[EMAIL PROTECTED]>
Date: Thu May 24 23:10:31 2007 -0400
use only one version number for odf.
set version number to 2, since format has changed
since last release
diff --git a/fs/unionfs/odf.c b/fs/unionfs/odf.c
index
1d4816bc04da0de754f080d1c9ab7fd6bb35d984..70bd9c3e820b1ad4c0047283b39f5171bad88e59
100644
--- a/fs/unionfs/odf.c
+++ b/fs/unionfs/odf.c
@@ -1647,7 +1647,7 @@ int odf_write_sb_data(struct odf_sb_info
set_fs(KERNEL_DS);
/* version */
- le32 = (ODF_VERSION_MAJOR<<16) | (ODF_VERSION_MINOR);
+ le32 = ODF_VERSION;
le32 = cpu_to_le32(le32);
err = file->f_op->write(file, (char*)&le32, sizeof(__le32),
&file->f_pos);
if (err != sizeof(__le32)) {
@@ -1785,11 +1785,13 @@ char *odf_read_sb_data(struct odf_sb_inf
}
version = le32_to_cpu(le32);
- /* check version - dont allow greater than current */
- if (((version >> 16) > ODF_VERSION_MAJOR) ||
- (((version >> 16) == ODF_VERSION_MAJOR) &&
- (version & 0x0000FFFF) > ODF_VERSION_MINOR)) {
- printk(KERN_WARNING "unionfs: unsupported odf version\n");
+ /* check version - dont allow different than current */
+ if (version != ODF_VERSION) {
+ printk(KERN_ERR
+ "unionfs: incompatible odf version "
+ "(detected version %d, needed version %d)\n",
+ version, ODF_VERSION);
+ err = -EINVAL;
goto out_close;
}
diff --git a/fs/unionfs/odf.h b/fs/unionfs/odf.h
index
bef686595b4f6234720ee78b8c8cd8115bf36606..6c20820873b6c91048e6cdbcbadc35d23b3ed10e
100644
--- a/fs/unionfs/odf.h
+++ b/fs/unionfs/odf.h
@@ -2,8 +2,7 @@ #ifndef _ODF_H_
#define _ODF_H_
#define UUID_LEN 16
-#define ODF_VERSION_MINOR 0
-#define ODF_VERSION_MAJOR 1
+#define ODF_VERSION 2
#define ODF_SB "sb"
#define ODF_IC "ic"
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs