commit 7bd59060f7a62bb5f6db6a89a4f1e3714f1cf4ea
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 1d4816b..70bd9c3 100644
--- a/fs/unionfs/odf.c
+++ b/fs/unionfs/odf.c
@@ -1647,7 +1647,7 @@ int odf_write_sb_data(struct odf_sb_info* osi, struct
unionfs_data *data, struct
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_info *odf_sb, int
**bid)
}
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 bef6865..6c20820 100644
--- a/fs/unionfs/odf.h
+++ b/fs/unionfs/odf.h
@@ -2,8 +2,7 @@
#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