AC_CANONICAL_TARGET
# Automake
-AM_INIT_AUTOMAKE(ceph, 0.1)
+AM_INIT_AUTOMAKE(ceph, 0.2)
AM_PROG_CC_C_O
# Platform
crush/CrushWrapper.h\
crush/CrushWrapper.i\
crush/crush.h\
+ crush/grammar.h\
+ crush/sample.txt\
ebofs/Table.h\
ebofs/csum.h\
ebofs/BlockDevice.h\
include/page.h\
include/xlist.h\
include/types.h\
+ kernel/crush/crush.c\
kernel/crush/crush.h\
- kernel/crush/hash.h\
+ kernel/crush/mapper.c\
kernel/crush/mapper.h\
- kernel/osdmap.h\
- kernel/mdsmap.h\
- kernel/super.h\
- kernel/mon_client.h\
- kernel/messenger.h\
+ kernel/crush/hash.h\
+ kernel/Makefile\
+ kernel/addr.c\
+ kernel/client.c\
+ kernel/decode.h\
+ kernel/dir.c\
+ kernel/export.c\
+ kernel/file.c\
+ kernel/inode.c\
+ kernel/ktcp.c\
kernel/ktcp.h\
+ kernel/mds_client.c\
kernel/mds_client.h\
+ kernel/mdsmap.c\
+ kernel/mdsmap.h\
+ kernel/messenger.c\
+ kernel/messenger.h\
+ kernel/mon_client.c\
+ kernel/mon_client.h\
+ kernel/osd_client.c\
kernel/osd_client.h\
+ kernel/osdmap.c\
+ kernel/osdmap.h\
+ kernel/proc.c\
+ kernel/super.c\
+ kernel/super.h\
mds/Anchor.h\
mds/AnchorClient.h\
mds/AnchorTable.h\
messages/MMDSBoot.h\
messages/MClientMount.h\
messages/MClientFileCaps.h\
+ messages/MClientLease.h\
messages/MOSDMap.h\
messages/MOSDOp.h\
messages/MOSDOut.h\
messages/MClientSession.h\
messages/MMonPaxos.h\
messages/MOSDBoot.h\
+ messages/MOSDPGCreate.h\
messages/MStatfsReply.h\
messages/MAnchor.h\
messages/MCacheExpire.h\
#Otherwise we were called directly from the command
# line; invoke the kernel build system.
- KERNELDIR ?= /lib/modules/$(shell uname -r)/build
- PWD := $(shell pwd)
+KERNELDIR ?= /lib/modules/$(shell uname -r)/build
+PWD := $(shell pwd)
-default:
- $(MAKE) -C $(KERNELDIR) M=$(PWD) modules
+default: all
+
+all: ceph_fs.h
+ $(MAKE) -C $(KERNELDIR) M=$(PWD) CONFIG_CEPH_FS=m modules
+
+modules_install:
+ $(MAKE) -C $(KERNELDIR) M=$(PWD) CONFIG_CEPH_FS=m modules_install
+
+clean:
+ $(MAKE) -C $(KERNELDIR) M=$(PWD) clean
+
+ceph_fs.h:
+ ln -s ../include/ceph_fs.h ceph_fs.h
endif
Quick and dirty instructions on building this into the kernel
+-- as a separate module
+
+$ make
+or
+$ make KERNELDIR=/path/to/kernel
+
+
+-- built in
+
1) Patch kernel (to add to fs/Kconfig, fs/Makefile):
$ cd linux
2) Symlink (adjust path to ceph source accordingly)
$ ln -s ~/ceph/src/kernel fs/ceph
-$ ln -s ~/ceph/src/include/ceph_fs.h include/linux
+$ ln -s ~/ceph/src/include/ceph_fs.h fs/ceph
3) Enable CONFIG_CEPH_FS in .config. Ceph should now be the first item under File Systems -> Network File Systems.
-#include <linux/ceph_fs.h>
#include <linux/wait.h>
#include <linux/sched.h>
#include <linux/random.h>
#include <linux/fs.h>
#include <linux/mount.h>
+#include "ceph_fs.h"
+
int ceph_debug_client = -1;
#define DOUT_VAR ceph_debug_client
#define DOUT_PREFIX "client: "
-#include <linux/ceph_fs.h>
#include <linux/exportfs.h>
+#include "ceph_fs.h"
+
int ceph_debug_export = -1;
#define DOUT_VAR ceph_debug_export
#define DOUT_PREFIX "export: "
#include <linux/string.h>
#include <linux/uaccess.h>
#include <linux/kernel.h>
-#include <linux/ceph_fs.h>
#include <linux/namei.h>
#include <linux/writeback.h>
+#include "ceph_fs.h"
+
int ceph_debug_inode = -1;
#define DOUT_VAR ceph_debug_inode
#define DOUT_PREFIX "inode: "
-#include <linux/ceph_fs.h>
#include <linux/wait.h>
#include <linux/sched.h>
#include "mds_client.h"
#include "mon_client.h"
+#include "ceph_fs.h"
+
int ceph_debug_mdsc = -1;
#define DOUT_VAR ceph_debug_mdsc
#define DOUT_PREFIX "mds: "
#ifndef _FS_CEPH_MDSMAP_H
#define _FS_CEPH_MDSMAP_H
-#include <linux/ceph_fs.h>
+#include "ceph_fs.h"
/*
* mds map
#include <linux/net.h>
#include <linux/string.h>
#include <linux/highmem.h>
-#include <linux/ceph_fs.h>
#include <net/tcp.h>
+
+#include "ceph_fs.h"
#include "messenger.h"
#include "ktcp.h"
#include <linux/net.h>
#include <linux/radix-tree.h>
#include <linux/workqueue.h>
-#include <linux/ceph_fs.h>
#include <linux/version.h>
+#include "ceph_fs.h"
+
struct ceph_msg;
typedef void (*ceph_msgr_dispatch_t) (void *p, struct ceph_msg *m);
/* this will be equivalent to osdc/Objecter.h */
-#include <linux/ceph_fs.h>
#include <linux/radix-tree.h>
#include <linux/completion.h>
+#include "ceph_fs.h"
#include "osdmap.h"
struct ceph_msg;
#ifndef _FS_CEPH_OSDMAP_H
#define _FS_CEPH_OSDMAP_H
-#include <linux/ceph_fs.h>
-
+#include "ceph_fs.h"
#include "crush/crush.h"
struct ceph_osdmap {
-#include <linux/ceph_fs.h>
#include <linux/module.h>
#include <linux/proc_fs.h>
#include <asm/uaccess.h>
+#include "ceph_fs.h"
#include "super.h"
static int ceph_debug_level_read(char *page, char **start, off_t off,
#ifndef _FS_CEPH_SUPER_H
#define _FS_CEPH_SUPER_H
-#include <linux/ceph_fs.h>
#include <linux/fs.h>
#include <linux/wait.h>
#include <linux/completion.h>
#include <linux/pagemap.h>
#include <linux/exportfs.h>
+#include "ceph_fs.h"
#include "messenger.h"
#include "mon_client.h"
#include "mds_client.h"