linux-kernel-test/fs/ceph
Sage Weil c99eb1c726 ceph: remove fragile __map_osds optimization
We used to try to avoid freeing and then reallocating the osd
struct.  This is a bit fragile due to potential interactions with
other references (beyond o_requests), and may be the cause of
this crash:

[120633.442358] BUG: unable to handle kernel NULL pointer dereference at (null)
[120633.443292] IP: [<ffffffff812549b6>] rb_erase+0x11d/0x277
[120633.443292] PGD f7ff3067 PUD f7f53067 PMD 0
[120633.443292] Oops: 0000 [#1] PREEMPT SMP
[120633.443292] last sysfs file: /sys/kernel/uevent_seqnum
[120633.443292] CPU 1
[120633.443292] Modules linked in: ceph fan ac battery psmouse ehci_hcd ide_pci_generic ohci_hcd thermal processor button
[120633.443292] Pid: 3023, comm: ceph-msgr/1 Not tainted 2.6.32-rc2 #12 H8SSL
[120633.443292] RIP: 0010:[<ffffffff812549b6>]  [<ffffffff812549b6>] rb_erase+0x11d/0x277
[120633.443292] RSP: 0018:ffff8800f7b13a50  EFLAGS: 00010246
[120633.443292] RAX: ffff880022907819 RBX: ffff880022907818 RCX: 0000000000000000
[120633.443292] RDX: ffff8800f7b13a80 RSI: ffff8800f587eb48 RDI: 0000000000000000
[120633.443292] RBP: ffff8800f7b13a60 R08: 0000000000000000 R09: 0000000000000004
[120633.443292] R10: 0000000000000000 R11: ffff8800c4441000 R12: ffff8800f587eb48
[120633.443292] R13: ffff8800f58eaa00 R14: ffff8800f413c000 R15: 0000000000000001
[120633.443292] FS:  00007fbef6e226e0(0000) GS:ffff880009200000(0000) knlGS:0000000000000000
[120633.443292] CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
[120633.443292] CR2: 0000000000000000 CR3: 00000000f7c53000 CR4: 00000000000006e0
[120633.443292] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[120633.443292] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[120633.443292] Process ceph-msgr/1 (pid: 3023, threadinfo ffff8800f7b12000, task ffff8800f5858b40)
[120633.443292] Stack:
[120633.443292]  ffff8800f413c000 ffff8800f587e9c0 ffff8800f7b13a80 ffffffffa0098a86
[120633.443292] <0> 00000000000006f1 0000000000000000 ffff8800f7b13af0 ffffffffa009959b
[120633.443292] <0> ffff8800f413c000 ffff880022a68400 ffff880022a68400 ffff8800f587e9c0
[120633.443292] Call Trace:
[120633.443292]  [<ffffffffa0098a86>] __remove_osd+0x4d/0xbc [ceph]
[120633.443292]  [<ffffffffa009959b>] __map_osds+0x199/0x4fa [ceph]
[120633.443292]  [<ffffffffa00999f4>] ? __send_request+0xf8/0x186 [ceph]
[120633.443292]  [<ffffffffa0099beb>] kick_requests+0x169/0x3cb [ceph]
[120633.443292]  [<ffffffffa009a8c1>] ceph_osdc_handle_map+0x370/0x522 [ceph]

Since we're probably screwed anyway if a small kmalloc is
failing, don't bother with trying to be clever here.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-02-26 09:37:33 -08:00
..
crush ceph: whitespace cleanup 2009-12-03 14:59:44 -08:00
addr.c ceph: move dereference after NULL test 2010-02-23 14:26:34 -08:00
armor.c ceph: aes crypto and base64 encode/decode helpers 2010-02-10 15:04:46 -08:00
auth_none.c ceph: add struct version to auth encoding 2010-02-10 15:04:48 -08:00
auth_none.h ceph: negotiate authentication protocol; implement AUTH_NONE protocol 2009-11-18 16:19:57 -08:00
auth_x_protocol.h ceph: add support for auth_x authentication protocol 2010-02-11 11:48:45 -08:00
auth_x.c ceph: add support for auth_x authentication protocol 2010-02-11 11:48:45 -08:00
auth_x.h ceph: add support for auth_x authentication protocol 2010-02-11 11:48:45 -08:00
auth.c ceph: add support for auth_x authentication protocol 2010-02-11 11:48:45 -08:00
auth.h ceph: allow renewal of auth credentials 2010-02-10 15:04:47 -08:00
buffer.c ceph: buffer decoding helpers 2010-02-10 15:04:39 -08:00
buffer.h ceph: buffer decoding helpers 2010-02-10 15:04:39 -08:00
caps.c ceph: drop messages on unregistered mds sessions; cleanup 2010-02-23 14:26:35 -08:00
ceph_debug.h ceph: client types 2009-10-06 11:31:07 -07:00
ceph_frag.c ceph: client types 2009-10-06 11:31:07 -07:00
ceph_frag.h ceph: client types 2009-10-06 11:31:07 -07:00
ceph_fs.c ceph: make object hash a pg_pool property 2009-11-06 21:55:25 -08:00
ceph_fs.h ceph: v0.19 release 2010-02-17 13:56:07 -08:00
ceph_hash.c ceph: whitespace cleanup 2009-12-03 14:59:44 -08:00
ceph_hash.h ceph: make object hash a pg_pool property 2009-11-06 21:55:25 -08:00
ceph_strings.c ceph: negotiate authentication protocol; implement AUTH_NONE protocol 2009-11-18 16:19:57 -08:00
crypto.c ceph: aes crypto and base64 encode/decode helpers 2010-02-10 15:04:46 -08:00
crypto.h ceph: aes crypto and base64 encode/decode helpers 2010-02-10 15:04:46 -08:00
debugfs.c ceph: use rbtree for pg pools; decode new osdmap format 2010-02-17 10:02:49 -08:00
decode.h ceph: buffer decoding helpers 2010-02-10 15:04:39 -08:00
dir.c ceph: add feature bits to connection handshake (protocol change) 2009-12-23 09:30:21 -08:00
export.c ceph: nfs re-export support 2009-10-06 11:31:13 -07:00
file.c ceph: don't clobber write return value when using O_SYNC 2010-02-23 14:26:36 -08:00
inode.c ceph: don't truncate dirty pages in invalidate work thread 2010-02-19 14:40:51 -08:00
ioctl.c ceph: allow preferred osd to be get/set via layout ioctl 2009-12-03 14:59:48 -08:00
ioctl.h ceph: allow preferred osd to be get/set via layout ioctl 2009-12-03 14:59:48 -08:00
Kconfig ceph: aes crypto and base64 encode/decode helpers 2010-02-10 15:04:46 -08:00
Makefile ceph: add support for auth_x authentication protocol 2010-02-11 11:48:45 -08:00
mds_client.c ceph: fix client_request_forward decoding 2010-02-23 14:26:36 -08:00
mds_client.h ceph: fix iterate_caps removal race 2010-02-17 10:02:47 -08:00
mdsmap.c ceph: hex dump corrupt server data to KERN_DEBUG 2009-12-21 16:39:52 -08:00
mdsmap.h ceph: decode updated mdsmap format 2009-11-20 14:24:33 -08:00
messenger.c ceph: fix connection fault STANDBY check 2010-02-25 12:40:45 -08:00
messenger.h ceph: allow renewal of auth credentials 2010-02-10 15:04:47 -08:00
mon_client.c ceph: fix up unexpected message handling 2010-02-23 14:26:29 -08:00
mon_client.h ceph: use rbtree for mon statfs requests 2010-02-16 22:01:10 -08:00
msgpool.c ceph: more informative msgpool errors 2009-12-23 08:17:21 -08:00
msgpool.h ceph: warn on allocation from msgpool with larger front_len 2009-10-15 18:14:43 -07:00
msgr.h ceph: include type in ceph_entity_addr, filepath 2010-01-29 12:41:09 -08:00
osd_client.c ceph: remove fragile __map_osds optimization 2010-02-26 09:37:33 -08:00
osd_client.h ceph: put unused osd connections on lru 2010-02-11 11:48:48 -08:00
osdmap.c ceph: use rbtree for pg pools; decode new osdmap format 2010-02-17 10:02:49 -08:00
osdmap.h ceph: use rbtree for pg pools; decode new osdmap format 2010-02-17 10:02:49 -08:00
pagelist.c ceph: support ceph_pagelist for message payload 2009-12-23 12:12:31 -08:00
pagelist.h ceph: support ceph_pagelist for message payload 2009-12-23 12:12:31 -08:00
rados.h ceph: use rbtree for pg pools; decode new osdmap format 2010-02-17 10:02:49 -08:00
README ceph: make object hash a pg_pool property 2009-11-06 21:55:25 -08:00
snap.c ceph: drop messages on unregistered mds sessions; cleanup 2010-02-23 14:26:35 -08:00
super.c ceph: clean up readdir caps reservation 2010-02-17 10:02:43 -08:00
super.h ceph: drop messages on unregistered mds sessions; cleanup 2010-02-23 14:26:35 -08:00
types.h ceph: make object hash a pg_pool property 2009-11-06 21:55:25 -08:00
xattr.c ceph: simplify ceph_buffer interface 2009-12-07 12:17:17 -08:00

#
# The following files are shared by (and manually synchronized
# between) the Ceph userland and kernel client.
#
# userland                  kernel
src/include/ceph_fs.h	    fs/ceph/ceph_fs.h
src/include/ceph_fs.cc	    fs/ceph/ceph_fs.c
src/include/msgr.h	    fs/ceph/msgr.h
src/include/rados.h	    fs/ceph/rados.h
src/include/ceph_strings.cc fs/ceph/ceph_strings.c
src/include/ceph_frag.h	    fs/ceph/ceph_frag.h
src/include/ceph_frag.cc    fs/ceph/ceph_frag.c
src/include/ceph_hash.h	    fs/ceph/ceph_hash.h
src/include/ceph_hash.cc    fs/ceph/ceph_hash.c
src/crush/crush.c	    fs/ceph/crush/crush.c
src/crush/crush.h	    fs/ceph/crush/crush.h
src/crush/mapper.c	    fs/ceph/crush/mapper.c
src/crush/mapper.h	    fs/ceph/crush/mapper.h
src/crush/hash.h	    fs/ceph/crush/hash.h
src/crush/hash.c	    fs/ceph/crush/hash.c