zfs-linux / zfs

Native ZFS for Linux
http://wiki.github.com/behlendorf/zfs/
Other
56 stars 2 forks source link

Compile errors against 2.6.38 #125

Open devsk opened 13 years ago

devsk commented 13 years ago

1.

zfs/module/zfs/../../module/zfs/vdev_disk.c:126:2: error: implicit declaration of function 'open_bdev_excl' zfs/module/zfs/../../module/zfs/vdev_disk.c:161:3: error: implicit declaration of function 'close_bdev_excl'

The following trivial patch fixes it:

--- a/include/sys/vdev_disk.h.orig      2011-02-21 00:28:13.913279487 -0800
+++ a/include/sys/vdev_disk.h   2011-02-21 00:29:57.883276290 -0800
@@ -63,8 +63,8 @@
 # define vdev_bdev_open(path, md, hld) open_bdev_exclusive(path, md, hld)
 # define vdev_bdev_close(bdev, md)     close_bdev_exclusive(bdev, md)
 #else
-# define vdev_bdev_open(path, md, hld) open_bdev_excl(path, md, hld)
-# define vdev_bdev_close(bdev, md)     close_bdev_excl(bdev)
+# define vdev_bdev_open(path, md, hld) blkdev_get_by_path(path, (md)|FMODE_EXCL, hld)
+# define vdev_bdev_close(bdev, md)     blkdev_put(bdev, (md)|FMODE_EXCL)
 #endif /* HAVE_OPEN_BDEV_EXCLUSIVE */

 /* 2.6.22 API change */

2.

zfs/module/zfs/../../module/zfs/zvol.c:247:2: error: too few arguments to function 'blkdev_get'

Its because SPL never tests for blkdev_get:

../spl/spl_config.h:/* #undef HAVE_3ARGS_BLKDEV_GET */

Don't know how to handle the following:

3.

lzfs/module/lzfs_vnops.c:1275:2: error: initialization from incompatible pointer type lzfs/module/lzfs_vnops.c:1309:2: error: initialization from incompatible pointer type

4.

module/lzfs_snap.c:199:2: error: implicit declaration of function 'do_add_mount' lzfs/module/lzfs_snap.c:220:4: error: too few arguments to function 'follow_down'

tushk2 commented 13 years ago

Hi devsk,

We are yet to support for 2.6.38 kernel. We would fix these problem as soon as possible.

On Sun, Mar 20, 2011 at 10:25 AM, devsk < reply@reply.github.com>wrote:

1.

zfs/module/zfs/../../module/zfs/vdev_disk.c:126:2: error: implicit declaration of function 'open_bdev_excl' zfs/module/zfs/../../module/zfs/vdev_disk.c:161:3: error: implicit declaration of function 'close_bdev_excl'

The following trivial patch fixes it:

--- a/include/sys/vdev_disk.h.orig      2011-02-21 00:28:13.913279487 -0800
+++ a/include/sys/vdev_disk.h   2011-02-21 00:29:57.883276290 -0800
@@ -63,8 +63,8 @@
 # define vdev_bdev_open(path, md, hld) open_bdev_exclusive(path, md, hld)
 # define vdev_bdev_close(bdev, md)     close_bdev_exclusive(bdev, md)
 #else
-# define vdev_bdev_open(path, md, hld) open_bdev_excl(path, md, hld)
-# define vdev_bdev_close(bdev, md)     close_bdev_excl(bdev)
+# define vdev_bdev_open(path, md, hld) blkdev_get_by_path(path,
(md)|FMODE_EXCL, hld)
+# define vdev_bdev_close(bdev, md)     blkdev_put(bdev, (md)|FMODE_EXCL)
 #endif /* HAVE_OPEN_BDEV_EXCLUSIVE */

 /* 2.6.22 API change */

2.

zfs/module/zfs/../../module/zfs/zvol.c:247:2: error: too few arguments to function 'blkdev_get'

Its because SPL never tests for blkdev_get:

../spl/spl_config.h:/* #undef HAVE_3ARGS_BLKDEV_GET */

Don't know how to handle the following:

Before compilation you should run the spl/autogen.sh file for configure file creation.

3.

lzfs/module/lzfs_vnops.c:1275:2: error: initialization from incompatible pointer type lzfs/module/lzfs_vnops.c:1309:2: error: initialization from incompatible pointer type

4.

module/lzfs_snap.c:199:2: error: implicit declaration of function 'do_add_mount' lzfs/module/lzfs_snap.c:220:4: error: too few arguments to function 'follow_down'

The prototype of follow_down 2.6.31 upto 2.6.37 kernel is extern int follow_down(struct path *);

But changes in 2.6.38 kernel that is extern int follow_down(struct path *, bool);

Reply to this email directly or view it on GitHub: https://github.com/zfs-linux/zfs/issues/125

Thanks and Regards,

Tushar