From ff09d64647d3b819330f7a1306bdb95d3a9e1076 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 9 Jan 2009 14:37:45 -0800 Subject: [PATCH 1/2] Pull all source in to be built, it will be ifdef'ed out as need by higher level topic branches --- lib/libzpool/Makefile.am | 3 +-- module/zfs/Makefile.in | 16 ++++++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/lib/libzpool/Makefile.am b/lib/libzpool/Makefile.am index 867174f85b..217a5ec94a 100644 --- a/lib/libzpool/Makefile.am +++ b/lib/libzpool/Makefile.am @@ -85,5 +85,4 @@ libzpool_la_SOURCES = \ ${top_srcdir}/module/zfs/zio.c \ ${top_srcdir}/module/zfs/zio_checksum.c \ ${top_srcdir}/module/zfs/zio_compress.c \ - ${top_srcdir}/module/zfs/zio_inject.c \ - ${top_srcdir}/module/zfs/zvol.c + ${top_srcdir}/module/zfs/zio_inject.c diff --git a/module/zfs/Makefile.in b/module/zfs/Makefile.in index 44d0560eca..08733a2ad8 100644 --- a/module/zfs/Makefile.in +++ b/module/zfs/Makefile.in @@ -35,7 +35,7 @@ ${MODULE}-objs += gzip.o ${MODULE}-objs += lzjb.o ${MODULE}-objs += metaslab.o ${MODULE}-objs += refcount.o -# ${MODULE}-objs += rrwlock.o +${MODULE}-objs += rrwlock.o ${MODULE}-objs += sha256.o ${MODULE}-objs += spa.o ${MODULE}-objs += spa_boot.o @@ -61,16 +61,16 @@ ${MODULE}-objs += zap_leaf.o ${MODULE}-objs += zap_micro.o ${MODULE}-objs += zfs_acl.o ${MODULE}-objs += zfs_byteswap.o -# ${MODULE}-objs += zfs_ctldir.o -# ${MODULE}-objs += zfs_dir.o +${MODULE}-objs += zfs_ctldir.o +${MODULE}-objs += zfs_dir.o ${MODULE}-objs += zfs_fm.o -# ${MODULE}-objs += zfs_fuid.o +${MODULE}-objs += zfs_fuid.o ${MODULE}-objs += zfs_ioctl.o -# ${MODULE}-objs += zfs_log.o -# ${MODULE}-objs += zfs_replay.o -# ${MODULE}-objs += zfs_rlock.o +${MODULE}-objs += zfs_log.o +${MODULE}-objs += zfs_replay.o +${MODULE}-objs += zfs_rlock.o ${MODULE}-objs += zfs_vfsops.o -# ${MODULE}-objs += zfs_vnops.o +${MODULE}-objs += zfs_vnops.o ${MODULE}-objs += zfs_znode.o ${MODULE}-objs += zil.o ${MODULE}-objs += zio.o From fba5a806a8f5efe536f710a35aacb0324416b58a Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 9 Jan 2009 14:43:22 -0800 Subject: [PATCH 2/2] ifdef HAVE_ZPL out source files with only ZPL bits --- module/zfs/zfs_ctldir.c | 3 +++ module/zfs/zfs_dir.c | 3 +++ module/zfs/zfs_log.c | 4 ++++ module/zfs/zfs_replay.c | 3 +++ module/zfs/zfs_rlock.c | 3 +++ module/zfs/zfs_vnops.c | 3 +++ 6 files changed, 19 insertions(+) diff --git a/module/zfs/zfs_ctldir.c b/module/zfs/zfs_ctldir.c index 208fc36295..c12eaf3896 100644 --- a/module/zfs/zfs_ctldir.c +++ b/module/zfs/zfs_ctldir.c @@ -66,6 +66,8 @@ * so that it cannot be freed until all snapshots have been unmounted. */ +#ifdef HAVE_ZPL + #include #include #include @@ -1157,3 +1159,4 @@ zfsctl_umount_snapshots(vfs_t *vfsp, int fflags, cred_t *cr) return (error); } +#endif /* HAVE_ZPL */ diff --git a/module/zfs/zfs_dir.c b/module/zfs/zfs_dir.c index 1ec4932646..804ac96277 100644 --- a/module/zfs/zfs_dir.c +++ b/module/zfs/zfs_dir.c @@ -23,6 +23,8 @@ * Use is subject to license terms. */ +#ifdef HAVE_ZPL + #include #include #include @@ -975,3 +977,4 @@ zfs_sticky_remove_access(znode_t *zdp, znode_t *zp, cred_t *cr) else return (secpolicy_vnode_remove(cr)); } +#endif /* HAVE_ZPL */ diff --git a/module/zfs/zfs_log.c b/module/zfs/zfs_log.c index 11cd4c264b..f79a8e8fdb 100644 --- a/module/zfs/zfs_log.c +++ b/module/zfs/zfs_log.c @@ -23,6 +23,8 @@ * Use is subject to license terms. */ +#ifdef HAVE_ZPL + #include #include #include @@ -692,3 +694,5 @@ zfs_log_acl(zilog_t *zilog, dmu_tx_t *tx, znode_t *zp, seq = zil_itx_assign(zilog, itx, tx); zp->z_last_itx = seq; } + +#endif /* HAVE_ZPL */ diff --git a/module/zfs/zfs_replay.c b/module/zfs/zfs_replay.c index 85b79703a7..181847121e 100644 --- a/module/zfs/zfs_replay.c +++ b/module/zfs/zfs_replay.c @@ -23,6 +23,8 @@ * Use is subject to license terms. */ +#ifdef HAVE_ZPL + #pragma ident "%Z%%M% %I% %E% SMI" #include @@ -876,3 +878,4 @@ zil_replay_func_t *zfs_replay_vector[TX_MAX_TYPE] = { zfs_replay_create, /* TX_MKDIR_ATTR */ zfs_replay_create_acl, /* TX_MKDIR_ACL_ATTR */ }; +#endif /* HAVE_ZPL */ diff --git a/module/zfs/zfs_rlock.c b/module/zfs/zfs_rlock.c index f0a75b5fa0..63ebc19bdd 100644 --- a/module/zfs/zfs_rlock.c +++ b/module/zfs/zfs_rlock.c @@ -94,6 +94,8 @@ * range to just the range to be written using zfs_reduce_range. */ +#ifdef HAVE_ZPL + #include /* @@ -600,3 +602,4 @@ zfs_range_compare(const void *arg1, const void *arg2) return (-1); return (0); } +#endif /* HAVE_ZPL */ diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c index 8e0037e37d..a64e1cf451 100644 --- a/module/zfs/zfs_vnops.c +++ b/module/zfs/zfs_vnops.c @@ -25,6 +25,8 @@ /* Portions Copyright 2007 Jeremy Teo */ +#ifdef HAVE_ZPL + #include #include #include @@ -4559,3 +4561,4 @@ const fs_operation_def_t zfs_evnodeops_template[] = { VOPNAME_PATHCONF, { .vop_pathconf = zfs_pathconf }, NULL, NULL }; +#endif /* HAVE_ZPL */