linux/net/ceph
Yan, Zheng 61c5d6bf70 libceph: call r_unsafe_callback when unsafe reply is received
We can't use !req->r_sent to check if OSD request is sent for the
first time, this is because __cancel_request() zeros req->r_sent
when OSD map changes. Rather than adding a new variable to struct
ceph_osd_request to indicate if it's sent for the first time, We
can call the unsafe callback only when unsafe OSD reply is received.
If OSD's first reply is safe, just skip calling the unsafe callback.

The purpose of unsafe callback is adding unsafe request to a list,
so that fsync(2) can wait for the safe reply. fsync(2) doesn't need
to wait for a write(2) that hasn't returned yet. So it's OK to add
request to the unsafe list when the first OSD reply is received.
(ceph_sync_write() returns after receiving the first OSD reply)

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-03 15:32:58 -07:00
..
crush
armor.c
auth_none.c libceph: Fix NULL pointer dereference in auth client code 2013-07-03 15:32:55 -07:00
auth_none.h
auth_x_protocol.h
auth_x.c libceph: wrap auth ops in wrapper functions 2013-05-01 21:17:14 -07:00
auth_x.h libceph: add update_authorizer auth method 2013-05-01 21:17:13 -07:00
auth.c libceph: wrap auth methods in a mutex 2013-05-01 21:17:15 -07:00
buffer.c
ceph_common.c libceph: use slab cache for osd client requests 2013-05-02 11:58:41 -05:00
ceph_fs.c
ceph_hash.c
ceph_strings.c
crypto.c
crypto.h
debugfs.c libceph: keep source rather than message osd op array 2013-05-01 21:18:12 -07:00
Kconfig
Makefile libceph: create source file "net/ceph/snapshot.c" 2013-05-01 21:20:08 -07:00
messenger.c libceph: allocate ceph message data with a slab allocator 2013-05-02 11:58:36 -05:00
mon_client.c libceph: wrap auth ops in wrapper functions 2013-05-01 21:17:14 -07:00
msgpool.c
osd_client.c libceph: call r_unsafe_callback when unsafe reply is received 2013-07-03 15:32:58 -07:00
osdmap.c libceph: define ceph_decode_pgid() only once 2013-05-01 21:17:52 -07:00
pagelist.c
pagevec.c
snapshot.c libceph: create source file "net/ceph/snapshot.c" 2013-05-01 21:20:08 -07:00