Skip to contentSkip to conversation

exofs: use magic.h

PATCH In review Fabian Frederick 2 participants 2 messages May 21, 2017 – May 23, 2017 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 2/11 exofs: use magic.h

Filesystems generally use SUPER_MAGIC values from magic.h instead of a local definition.

---
 fs/exofs/common.h          | 6 +-----
 include/uapi/linux/magic.h | 1 +
 2 files changed, 2 insertions(+), 5 deletions(-)
fs/exofs/common.h +1 -5
index 7d88ef5..fb988f9 100644
@@ -37,6 +37,7 @@
 #define __EXOFS_COM_H__
 
 #include <linux/types.h>
+#include <linux/magic.h>
 
 #include <scsi/osd_attributes.h>
 #include <scsi/osd_initiator.h>
@@ -79,11 +80,6 @@ enum {
 #define EXOFS_BLKSHIFT	12
 #define EXOFS_BLKSIZE	(1UL << EXOFS_BLKSHIFT)
 
-/****************************************************************************
- * superblock-related things
- ****************************************************************************/
-#define EXOFS_SUPER_MAGIC	0x5DF5
-
 /*
  * The file system control block - stored in object EXOFS_SUPER_ID's data.
  * This is where the in-memory superblock is stored on disk.
include/uapi/linux/magic.h +1 -0
index e3bb43b..1265355 100644
@@ -26,6 +26,7 @@
 #define EXT2_SUPER_MAGIC	0xEF53
 #define EXT3_SUPER_MAGIC	0xEF53
 #define EXT4_SUPER_MAGIC	0xEF53
+#define EXOFS_SUPER_MAGIC	0x5DF5
 #define F2FS_SUPER_MAGIC	0xF2F52010
 #define FUTEXFS_SUPER_MAGIC	0xBAD1DEA
 #define HOSTFS_SUPER_MAGIC	0x00c0ffee
Signature · 1 line
2.9.3
#1 lore raw
Quoted 3 lines · Fabian Frederick

Filesystems generally use SUPER_MAGIC values from magic.h instead of a local definition.

Is fine by me to move to magic.h but ...

Quoted 19 lines
---
 fs/exofs/common.h          | 6 +-----
 include/uapi/linux/magic.h | 1 +
 2 files changed, 2 insertions(+), 5 deletions(-)
fs/exofs/common.h +1 -0
index 7d88ef5..fb988f9 100644
@@ -37,6 +37,7 @@
 #define __EXOFS_COM_H__
 
 #include <linux/types.h>
+#include <linux/magic.h>
 
 #include <scsi/osd_attributes.h>
 #include <scsi/osd_initiator.h>

fs/exofs/common.h enum { · line 84

Quoted 6 lines
fs/exofs/common.h +0 -3
@@ -79,11 +80,6 @@ enum {
 #define EXOFS_BLKSHIFT	12
 #define EXOFS_BLKSIZE	(1UL << EXOFS_BLKSHIFT)
 
-/****************************************************************************
- * superblock-related things
- ****************************************************************************/

Please do not remove this comment, it acts as a separator and is related to everything up to the comment that says:
* inode-related things

And not only to this definition

Thanks
Boaz

Quoted 18 lines
fs/exofs/common.h +0 -2
-#define EXOFS_SUPER_MAGIC	0x5DF5
-
 /*
  * The file system control block - stored in object EXOFS_SUPER_ID's data.
  * This is where the in-memory superblock is stored on disk.
include/uapi/linux/magic.h +1 -0
index e3bb43b..1265355 100644
@@ -26,6 +26,7 @@
 #define EXT2_SUPER_MAGIC	0xEF53
 #define EXT3_SUPER_MAGIC	0xEF53
 #define EXT4_SUPER_MAGIC	0xEF53
+#define EXOFS_SUPER_MAGIC	0x5DF5
 #define F2FS_SUPER_MAGIC	0xF2F52010
 #define FUTEXFS_SUPER_MAGIC	0xBAD1DEA
 #define HOSTFS_SUPER_MAGIC	0x00c0ffee