* [Ocfs2-devel] [PATCH]2.6 fixes in oin.c
@ 2004-02-19 17:58 Rusty Lynch
2004-02-19 18:12 ` Rusty Lynch
0 siblings, 1 reply; 4+ messages in thread
From: Rusty Lynch @ 2004-02-19 17:58 UTC (permalink / raw)
To: ocfs2-devel
The following is a small 2.6 port patch to oin.c that replaces
the LINUX_2_5 conditionals with the normal LINUX_VERSION_CODE,
and changes an assignment of NODEV to OCFS_NODEV along with a fix
in ocfs.h that makes the OCFS_NODEV correct for 2.6 kernels.
--rusty
Index: src/oin.c
===================================================================
--- src/oin.c (revision 32)
+++ src/oin.c (working copy)
@@ -154,7 +154,7 @@
case OCFS_ATTRIB_FIFO:
case OCFS_ATTRIB_SOCKET:
{
-#ifdef LINUX_2_5
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
dev_t dev;
#else
kdev_t kdev;
@@ -168,14 +168,14 @@
else if (fe->attribs == OCFS_ATTRIB_SOCKET)
inode->i_mode |= S_IFSOCK;
- inode->i_rdev = NODEV;
-#ifdef LINUX_2_5
+ inode->i_rdev = OCFS_NODEV;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
dev = MKDEV (fe->dev_major, fe->dev_minor);
#else
kdev = MKDEV (fe->dev_major, fe->dev_minor);
#endif
-#ifdef LINUX_2_5
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
init_special_inode (inode, inode->i_mode,
dev);
#else
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Ocfs2-devel] [PATCH]2.6 fixes in oin.c
2004-02-19 17:58 [Ocfs2-devel] [PATCH]2.6 fixes in oin.c Rusty Lynch
@ 2004-02-19 18:12 ` Rusty Lynch
2004-02-19 18:15 ` Wim Coekaerts
2004-02-23 17:49 ` Mark Fasheh
0 siblings, 2 replies; 4+ messages in thread
From: Rusty Lynch @ 2004-02-19 18:12 UTC (permalink / raw)
To: ocfs2-devel
On Thu, Feb 19, 2004 at 03:58:04PM -0800, Rusty Lynch wrote:
> The following is a small 2.6 port patch to oin.c that replaces
> the LINUX_2_5 conditionals with the normal LINUX_VERSION_CODE,
> and changes an assignment of NODEV to OCFS_NODEV along with a fix
> in ocfs.h that makes the OCFS_NODEV correct for 2.6 kernels.
>
> --rusty
#@#$#!!! here is a version that also includes changes to ocfs.h
Index: src/oin.c
===================================================================
--- src/oin.c (revision 32)
+++ src/oin.c (working copy)
@@ -154,7 +154,7 @@
case OCFS_ATTRIB_FIFO:
case OCFS_ATTRIB_SOCKET:
{
-#ifdef LINUX_2_5
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
dev_t dev;
#else
kdev_t kdev;
@@ -168,14 +168,14 @@
else if (fe->attribs == OCFS_ATTRIB_SOCKET)
inode->i_mode |= S_IFSOCK;
- inode->i_rdev = NODEV;
-#ifdef LINUX_2_5
+ inode->i_rdev = OCFS_NODEV;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
dev = MKDEV (fe->dev_major, fe->dev_minor);
#else
kdev = MKDEV (fe->dev_major, fe->dev_minor);
#endif
-#ifdef LINUX_2_5
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
init_special_inode (inode, inode->i_mode,
dev);
#else
Index: src/inc/ocfs.h
===================================================================
--- src/inc/ocfs.h (revision 32)
+++ src/inc/ocfs.h (working copy)
@@ -1136,7 +1136,7 @@
#define OCFS_SET_INODE_DEV(sb, inode) (inode->i_rdev = sb->sdev)
typedef struct block_device * ocfs_blockdev;
typedef dev_t ocfs_dev;
-#define OCFS_NODEV NODEV.value
+#define OCFS_NODEV 0
#define OCFS_GET_BLOCKDEV(sb) ((sb)->s_bdev)
#else /* 2.4 kernel */
#define OCFS_SET_INODE_DEV(sb, inode) (inode->i_dev = sb->s_dev)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Ocfs2-devel] [PATCH]2.6 fixes in oin.c
2004-02-19 18:12 ` Rusty Lynch
@ 2004-02-19 18:15 ` Wim Coekaerts
2004-02-23 17:49 ` Mark Fasheh
1 sibling, 0 replies; 4+ messages in thread
From: Wim Coekaerts @ 2004-02-19 18:15 UTC (permalink / raw)
To: ocfs2-devel
:)
> #@#$#!!! here is a version that also includes changes to ocfs.h
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Ocfs2-devel] [PATCH]2.6 fixes in oin.c
2004-02-19 18:12 ` Rusty Lynch
2004-02-19 18:15 ` Wim Coekaerts
@ 2004-02-23 17:49 ` Mark Fasheh
1 sibling, 0 replies; 4+ messages in thread
From: Mark Fasheh @ 2004-02-23 17:49 UTC (permalink / raw)
To: ocfs2-devel
Alright, commited this one.
--Mark
On Thu, Feb 19, 2004 at 04:11:49PM -0800, Rusty Lynch wrote:
> On Thu, Feb 19, 2004 at 03:58:04PM -0800, Rusty Lynch wrote:
> > The following is a small 2.6 port patch to oin.c that replaces
> > the LINUX_2_5 conditionals with the normal LINUX_VERSION_CODE,
> > and changes an assignment of NODEV to OCFS_NODEV along with a fix
> > in ocfs.h that makes the OCFS_NODEV correct for 2.6 kernels.
> >
> > --rusty
>
> #@#$#!!! here is a version that also includes changes to ocfs.h
>
> Index: src/oin.c
> ===================================================================
> --- src/oin.c (revision 32)
> +++ src/oin.c (working copy)
> @@ -154,7 +154,7 @@
> case OCFS_ATTRIB_FIFO:
> case OCFS_ATTRIB_SOCKET:
> {
> -#ifdef LINUX_2_5
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
> dev_t dev;
> #else
> kdev_t kdev;
> @@ -168,14 +168,14 @@
> else if (fe->attribs == OCFS_ATTRIB_SOCKET)
> inode->i_mode |= S_IFSOCK;
>
> - inode->i_rdev = NODEV;
> -#ifdef LINUX_2_5
> + inode->i_rdev = OCFS_NODEV;
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
> dev = MKDEV (fe->dev_major, fe->dev_minor);
> #else
> kdev = MKDEV (fe->dev_major, fe->dev_minor);
> #endif
>
> -#ifdef LINUX_2_5
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
> init_special_inode (inode, inode->i_mode,
> dev);
> #else
> Index: src/inc/ocfs.h
> ===================================================================
> --- src/inc/ocfs.h (revision 32)
> +++ src/inc/ocfs.h (working copy)
> @@ -1136,7 +1136,7 @@
> #define OCFS_SET_INODE_DEV(sb, inode) (inode->i_rdev = sb->sdev)
> typedef struct block_device * ocfs_blockdev;
> typedef dev_t ocfs_dev;
> -#define OCFS_NODEV NODEV.value
> +#define OCFS_NODEV 0
> #define OCFS_GET_BLOCKDEV(sb) ((sb)->s_bdev)
> #else /* 2.4 kernel */
> #define OCFS_SET_INODE_DEV(sb, inode) (inode->i_dev = sb->s_dev)
--
Mark Fasheh
Software Developer, Oracle Corp
mark.fasheh@oracle.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-02-23 17:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-19 17:58 [Ocfs2-devel] [PATCH]2.6 fixes in oin.c Rusty Lynch
2004-02-19 18:12 ` Rusty Lynch
2004-02-19 18:15 ` Wim Coekaerts
2004-02-23 17:49 ` Mark Fasheh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.