linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 02/11 linux-next] exofs: use magic.h
@ 2017-05-21 15:40 Fabian Frederick
  2017-05-23  8:06 ` Boaz Harrosh
  0 siblings, 1 reply; 2+ messages in thread
From: Fabian Frederick @ 2017-05-21 15:40 UTC (permalink / raw)
  To: Alexander Viro; +Cc: Boaz Harrosh, linux-fsdevel, linux-kernel, fabf

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

Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 fs/exofs/common.h          | 6 +-----
 include/uapi/linux/magic.h | 1 +
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/fs/exofs/common.h b/fs/exofs/common.h
index 7d88ef5..fb988f9 100644
--- a/fs/exofs/common.h
+++ b/fs/exofs/common.h
@@ -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.
diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h
index e3bb43b..1265355 100644
--- a/include/uapi/linux/magic.h
+++ b/include/uapi/linux/magic.h
@@ -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
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 02/11 linux-next] exofs: use magic.h
  2017-05-21 15:40 [PATCH 02/11 linux-next] exofs: use magic.h Fabian Frederick
@ 2017-05-23  8:06 ` Boaz Harrosh
  0 siblings, 0 replies; 2+ messages in thread
From: Boaz Harrosh @ 2017-05-23  8:06 UTC (permalink / raw)
  To: Fabian Frederick, Alexander Viro; +Cc: linux-fsdevel, linux-kernel

On 05/21/2017 06:40 PM, Fabian Frederick wrote:
> Filesystems generally use SUPER_MAGIC values from magic.h
> instead of a local definition.
> 

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

> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
>  fs/exofs/common.h          | 6 +-----
>  include/uapi/linux/magic.h | 1 +
>  2 files changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/fs/exofs/common.h b/fs/exofs/common.h
> index 7d88ef5..fb988f9 100644
> --- a/fs/exofs/common.h
> +++ b/fs/exofs/common.h
> @@ -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
> - ****************************************************************************/

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

> -#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.
> diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h
> index e3bb43b..1265355 100644
> --- a/include/uapi/linux/magic.h
> +++ b/include/uapi/linux/magic.h
> @@ -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
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-23  8:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-21 15:40 [PATCH 02/11 linux-next] exofs: use magic.h Fabian Frederick
2017-05-23  8:06 ` Boaz Harrosh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).