Skip to content

Commit fc7f99c

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (205 commits) ceph: update for write_inode API change ceph: reset osd after relevant messages timed out ceph: fix flush_dirty_caps race with caps migration ceph: include migrating caps in issued set ceph: fix osdmap decoding when pools include (removed) snaps ceph: return EBADF if waiting for caps on closed file ceph: set osd request message front length correctly ceph: reset front len on return to msgpool; BUG on mismatched front iov ceph: fix snaptrace decoding on cap migration between mds ceph: use single osd op reply msg ceph: reset bits on connection close ceph: remove bogus mds forward warning ceph: remove fragile __map_osds optimization ceph: fix connection fault STANDBY check ceph: invalidate_authorizer without con->mutex held ceph: don't clobber write return value when using O_SYNC ceph: fix client_request_forward decoding ceph: drop messages on unregistered mds sessions; cleanup ceph: fix comments, locking in destroy_inode ceph: move dereference after NULL test ... Fix trivial conflicts in Documentation/ioctl/ioctl-number.txt
2 parents 0a492fd + f1a3d57 commit fc7f99c

67 files changed

Lines changed: 28066 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/filesystems/ceph.txt‎

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
Ceph Distributed File System
2+
============================
3+
4+
Ceph is a distributed network file system designed to provide good
5+
performance, reliability, and scalability.
6+
7+
Basic features include:
8+
9+
* POSIX semantics
10+
* Seamless scaling from 1 to many thousands of nodes
11+
* High availability and reliability. No single points of failure.
12+
* N-way replication of data across storage nodes
13+
* Fast recovery from node failures
14+
* Automatic rebalancing of data on node addition/removal
15+
* Easy deployment: most FS components are userspace daemons
16+
17+
Also,
18+
* Flexible snapshots (on any directory)
19+
* Recursive accounting (nested files, directories, bytes)
20+
21+
In contrast to cluster filesystems like GFS, OCFS2, and GPFS that rely
22+
on symmetric access by all clients to shared block devices, Ceph
23+
separates data and metadata management into independent server
24+
clusters, similar to Lustre. Unlike Lustre, however, metadata and
25+
storage nodes run entirely as user space daemons. Storage nodes
26+
utilize btrfs to store data objects, leveraging its advanced features
27+
(checksumming, metadata replication, etc.). File data is striped
28+
across storage nodes in large chunks to distribute workload and
29+
facilitate high throughputs. When storage nodes fail, data is
30+
re-replicated in a distributed fashion by the storage nodes themselves
31+
(with some minimal coordination from a cluster monitor), making the
32+
system extremely efficient and scalable.
33+
34+
Metadata servers effectively form a large, consistent, distributed
35+
in-memory cache above the file namespace that is extremely scalable,
36+
dynamically redistributes metadata in response to workload changes,
37+
and can tolerate arbitrary (well, non-Byzantine) node failures. The
38+
metadata server takes a somewhat unconventional approach to metadata
39+
storage to significantly improve performance for common workloads. In
40+
particular, inodes with only a single link are embedded in
41+
directories, allowing entire directories of dentries and inodes to be
42+
loaded into its cache with a single I/O operation. The contents of
43+
extremely large directories can be fragmented and managed by
44+
independent metadata servers, allowing scalable concurrent access.
45+
46+
The system offers automatic data rebalancing/migration when scaling
47+
from a small cluster of just a few nodes to many hundreds, without
48+
requiring an administrator carve the data set into static volumes or
49+
go through the tedious process of migrating data between servers.
50+
When the file system approaches full, new nodes can be easily added
51+
and things will "just work."
52+
53+
Ceph includes flexible snapshot mechanism that allows a user to create
54+
a snapshot on any subdirectory (and its nested contents) in the
55+
system. Snapshot creation and deletion are as simple as 'mkdir
56+
.snap/foo' and 'rmdir .snap/foo'.
57+
58+
Ceph also provides some recursive accounting on directories for nested
59+
files and bytes. That is, a 'getfattr -d foo' on any directory in the
60+
system will reveal the total number of nested regular files and
61+
subdirectories, and a summation of all nested file sizes. This makes
62+
the identification of large disk space consumers relatively quick, as
63+
no 'du' or similar recursive scan of the file system is required.
64+
65+
66+
Mount Syntax
67+
============
68+
69+
The basic mount syntax is:
70+
71+
# mount -t ceph monip[:port][,monip2[:port]...]:/[subdir] mnt
72+
73+
You only need to specify a single monitor, as the client will get the
74+
full list when it connects. (However, if the monitor you specify
75+
happens to be down, the mount won't succeed.) The port can be left
76+
off if the monitor is using the default. So if the monitor is at
77+
1.2.3.4,
78+
79+
# mount -t ceph 1.2.3.4:/ /mnt/ceph
80+
81+
is sufficient. If /sbin/mount.ceph is installed, a hostname can be
82+
used instead of an IP address.
83+
84+
85+
86+
Mount Options
87+
=============
88+
89+
ip=A.B.C.D[:N]
90+
Specify the IP and/or port the client should bind to locally.
91+
There is normally not much reason to do this. If the IP is not
92+
specified, the client's IP address is determined by looking at the
93+
address it's connection to the monitor originates from.
94+
95+
wsize=X
96+
Specify the maximum write size in bytes. By default there is no
97+
maximu. Ceph will normally size writes based on the file stripe
98+
size.
99+
100+
rsize=X
101+
Specify the maximum readahead.
102+
103+
mount_timeout=X
104+
Specify the timeout value for mount (in seconds), in the case
105+
of a non-responsive Ceph file system. The default is 30
106+
seconds.
107+
108+
rbytes
109+
When stat() is called on a directory, set st_size to 'rbytes',
110+
the summation of file sizes over all files nested beneath that
111+
directory. This is the default.
112+
113+
norbytes
114+
When stat() is called on a directory, set st_size to the
115+
number of entries in that directory.
116+
117+
nocrc
118+
Disable CRC32C calculation for data writes. If set, the OSD
119+
must rely on TCP's error correction to detect data corruption
120+
in the data payload.
121+
122+
noasyncreaddir
123+
Disable client's use its local cache to satisfy readdir
124+
requests. (This does not change correctness; the client uses
125+
cached metadata only when a lease or capability ensures it is
126+
valid.)
127+
128+
129+
More Information
130+
================
131+
132+
For more information on Ceph, see the home page at
133+
http://ceph.newdream.net/
134+
135+
The Linux kernel client source tree is available at
136+
git://ceph.newdream.net/linux-ceph-client.git
137+
138+
and the source for the full system is at
139+
git://ceph.newdream.net/ceph.git

‎Documentation/ioctl/ioctl-number.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ Code Seq#(hex) Include File Comments
291291
0x92 00-0F drivers/usb/mon/mon_bin.c
292292
0x93 60-7F linux/auto_fs.h
293293
0x94 all fs/btrfs/ioctl.h
294+
0x97 00-7F fs/ceph/ioctl.h Ceph file system
294295
0x99 00-0F 537-Addinboard driver
295296
<mailto:buk@buks.ipn.de>
296297
0xA0 all linux/sdp/sdp.h Industrial Device Project

‎MAINTAINERS‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1441,6 +1441,15 @@ F: arch/powerpc/include/asm/spu*.h
14411441
F: arch/powerpc/oprofile/*cell*
14421442
F: arch/powerpc/platforms/cell/
14431443

1444+
CEPH DISTRIBUTED FILE SYSTEM CLIENT
1445+
M: Sage Weil <sage@newdream.net>
1446+
L: ceph-devel@lists.sourceforge.net
1447+
W: http://ceph.newdream.net/
1448+
T: git git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client.git
1449+
S: Supported
1450+
F: Documentation/filesystems/ceph.txt
1451+
F: fs/ceph
1452+
14441453
CERTIFIED WIRELESS USB (WUSB) SUBSYSTEM:
14451454
M: David Vrabel <david.vrabel@csr.com>
14461455
L: linux-usb@vger.kernel.org

‎fs/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ config NFS_COMMON
235235

236236
source "net/sunrpc/Kconfig"
237237
source "fs/smbfs/Kconfig"
238+
source "fs/ceph/Kconfig"
238239
source "fs/cifs/Kconfig"
239240
source "fs/ncpfs/Kconfig"
240241
source "fs/coda/Kconfig"

‎fs/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,4 @@ obj-$(CONFIG_OCFS2_FS) += ocfs2/
125125
obj-$(CONFIG_BTRFS_FS) += btrfs/
126126
obj-$(CONFIG_GFS2_FS) += gfs2/
127127
obj-$(CONFIG_EXOFS_FS) += exofs/
128+
obj-$(CONFIG_CEPH_FS) += ceph/

‎fs/ceph/Kconfig‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
config CEPH_FS
2+
tristate "Ceph distributed file system (EXPERIMENTAL)"
3+
depends on INET && EXPERIMENTAL
4+
select LIBCRC32C
5+
select CONFIG_CRYPTO_AES
6+
help
7+
Choose Y or M here to include support for mounting the
8+
experimental Ceph distributed file system. Ceph is an extremely
9+
scalable file system designed to provide high performance,
10+
reliable access to petabytes of storage.
11+
12+
More information at http://ceph.newdream.net/.
13+
14+
If unsure, say N.
15+
16+
config CEPH_FS_PRETTYDEBUG
17+
bool "Include file:line in ceph debug output"
18+
depends on CEPH_FS
19+
default n
20+
help
21+
If you say Y here, debug output will include a filename and
22+
line to aid debugging. This icnreases kernel size and slows
23+
execution slightly when debug call sites are enabled (e.g.,
24+
via CONFIG_DYNAMIC_DEBUG).
25+
26+
If unsure, say N.
27+

‎fs/ceph/Makefile‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#
2+
# Makefile for CEPH filesystem.
3+
#
4+
5+
ifneq ($(KERNELRELEASE),)
6+
7+
obj-$(CONFIG_CEPH_FS) += ceph.o
8+
9+
ceph-objs := super.o inode.o dir.o file.o addr.o ioctl.o \
10+
export.o caps.o snap.o xattr.o \
11+
messenger.o msgpool.o buffer.o pagelist.o \
12+
mds_client.o mdsmap.o \
13+
mon_client.o \
14+
osd_client.o osdmap.o crush/crush.o crush/mapper.o crush/hash.o \
15+
debugfs.o \
16+
auth.o auth_none.o \
17+
crypto.o armor.o \
18+
auth_x.o \
19+
ceph_fs.o ceph_strings.o ceph_hash.o ceph_frag.o
20+
21+
else
22+
#Otherwise we were called directly from the command
23+
# line; invoke the kernel build system.
24+
25+
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
26+
PWD := $(shell pwd)
27+
28+
default: all
29+
30+
all:
31+
$(MAKE) -C $(KERNELDIR) M=$(PWD) CONFIG_CEPH_FS=m modules
32+
33+
modules_install:
34+
$(MAKE) -C $(KERNELDIR) M=$(PWD) CONFIG_CEPH_FS=m modules_install
35+
36+
clean:
37+
$(MAKE) -C $(KERNELDIR) M=$(PWD) clean
38+
39+
endif

‎fs/ceph/README‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#
2+
# The following files are shared by (and manually synchronized
3+
# between) the Ceph userland and kernel client.
4+
#
5+
# userland kernel
6+
src/include/ceph_fs.h fs/ceph/ceph_fs.h
7+
src/include/ceph_fs.cc fs/ceph/ceph_fs.c
8+
src/include/msgr.h fs/ceph/msgr.h
9+
src/include/rados.h fs/ceph/rados.h
10+
src/include/ceph_strings.cc fs/ceph/ceph_strings.c
11+
src/include/ceph_frag.h fs/ceph/ceph_frag.h
12+
src/include/ceph_frag.cc fs/ceph/ceph_frag.c
13+
src/include/ceph_hash.h fs/ceph/ceph_hash.h
14+
src/include/ceph_hash.cc fs/ceph/ceph_hash.c
15+
src/crush/crush.c fs/ceph/crush/crush.c
16+
src/crush/crush.h fs/ceph/crush/crush.h
17+
src/crush/mapper.c fs/ceph/crush/mapper.c
18+
src/crush/mapper.h fs/ceph/crush/mapper.h
19+
src/crush/hash.h fs/ceph/crush/hash.h
20+
src/crush/hash.c fs/ceph/crush/hash.c

0 commit comments

Comments
 (0)