summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2010-02-02ceph: release all pages after successful osd write responseSage Weil
We release all the pages, even if the osd response was different than the number of pages written. This could only happen due to truncation that arrives the osd in different order, for which we want the pages released anyway. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
2010-02-02ceph: always send truncation info with read and write osd opsYehuda Sadeh
This fixes a bug where the read/write ops arrive the osd after a following truncation request. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
2010-01-29ceph: remove unreachable codeYehuda Sadeh
We never truncate to a smaller size without contacting the MDS. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
2010-01-29ceph: include type in ceph_entity_addr, filepathSage Weil
Include a type/version in ceph_entity_addr and filepath. Include extra byte in filepath encoding as necessary. Signed-off-by: Sage Weil <sage@newdream.net>
2010-01-25ceph: precede encoded ceph_pg_pool struct with versionSage Weil
Signed-off-by: Sage Weil <sage@newdream.net>
2010-01-25ceph: keep reserved replies on the request structureYehuda Sadeh
This includes treating all the data preallocation and revokation at the same place, not having to have a special case for the reserved pages. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2010-01-25ceph: alloc message data pages and check if tid existsYehuda Sadeh
Now doing it in the same callback that is also responsible for allocating the 'front' part of the message. If we get a message that we haven't got a corresponding tid for, mark it for skipping. Moving the mutex unlock/lock from the osd alloc_msg callback to the calling function in the messenger. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2010-01-25ceph: refactor messages data section allocationYehuda Sadeh
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2010-01-25ceph: allocate middle of message before stating to readYehuda Sadeh
Both front and middle parts of the message are now being allocated at the ceph_alloc_msg(). Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2010-01-25ceph: properly handle aborted mds requestsSage Weil
Previously, if the MDS request was interrupted, we would unregister the request and ignore any reply. This could cause the caps or other cache state to become out of sync. (For instance, aborting dbench and doing rm -r on clients would complain about a non-empty directory because the client didn't realize it's aborted file create request completed.) Even we don't unregister, we still can't process the reply normally because we are no longer holding the caller's locks (like the dir i_mutex). So, mark aborted operations with r_aborted, and in the reply handler, be sure to process all the caps. Do not process the namespace changes, though, since we no longer will hold the dir i_mutex. The dentry lease state can also be ignored as it's more forgiving. Signed-off-by: Sage Weil <sage@newdream.net>
2010-01-25ceph: mark MDS CREATE as a write opSage Weil
CEPH_MDS_OP_CREATE was not correctly marked as a write operation. Signed-off-by: Sage Weil <sage@newdream.net>
2010-01-25ceph: remove duplicate variable initializationJulia Lawall
The variable client is initialized twice to the same (side effect-free) expression. Drop one initialization. A simplified version of the semantic match that finds this problem is: (http://coccinelle.lip6.fr/) // <smpl> @forall@ idexpression *x; identifier f!=ERR_PTR; @@ x = f(...) ... when != x ( x = f(...,<+...x...+>,...) | * x = f(...) ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Sage Weil <sage@newdream.net>
2010-01-14ceph: display pgid in debugfs osd request dumpSage Weil
Signed-off-by: Sage Weil <sage@newdream.net>
2010-01-14ceph: remove unused erank fieldSage Weil
The ceph_entity_addr erank field is obsolete; remove it. Get rid of trivial addr comparison helpers while we're at it. Signed-off-by: Sage Weil <sage@newdream.net>
2010-01-14ceph: change dentry offset and position after splice_dentryYehuda Sadeh
This fixes a bug, where we had the parent list have dentries with offsets that are not monotonically increasing, which caused the ceph dcache_readdir to skip entries. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
2010-01-06ceph: fix copy_user_to_page_vector()Yehuda Sadeh
The function was broken in the case where there was more than one page involved, broke the ceph sync_write case. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-23ceph: use ceph_pagelist for mds reconnect message; change encoding (protocol ↵Sage Weil
change) Use the ceph_pagelist to encode the MDS reconnect message. We change the message encoding (protocol change!) at the same time to make our life easier (we don't know how many snaprealms we have when we start encoding). An empty message implies the session is closed/does not exist. Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-23ceph: support ceph_pagelist for message payloadSage Weil
The ceph_pagelist is a simple list of whole pages, strung together via their lru list_head. It facilitates encoding to a "buffer" of unknown size. Allow its use in place of the ceph_msg page vector. This will be used to fix the huge buffer preallocation woes of MDS reconnection. Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-23ceph: add feature bits to connection handshake (protocol change)Sage Weil
Define supported and required feature set. Fail connection if the server requires features we do not support (TAG_FEATURES), or if the server does not support features we require. Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-23ceph: include transaction id in ceph_msg_header (protocol change)Sage Weil
Many (most?) message types include a transaction id. By including it in the fixed size header, we always have it available even when we are unable to allocate memory for the (larger, variable sized) message body. This will allow us to error out the appropriate request instead of (silently) dropping the reply. Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-23ceph: more informative msgpool errorsSage Weil
Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-23ceph: control access to page vector for incoming dataSage Weil
When we issue an OSD read, we specify a vector of pages that the data is to be read into. The request may be sent multiple times, to multiple OSDs, if the osdmap changes, which means we can get more than one reply. Only read data into the page vector if the reply is coming from the OSD we last sent the request to. Keep track of which connection is using the vector by taking a reference. If another connection was already using the vector before and a new reply comes in on the right connection, revoke the pages from the other connection. Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-23ceph: use connection mutex to protect read and write stagesSage Weil
Use a single mutex (previously out_mutex) to protect both read and write activity from concurrent ceph_con_* calls. Drop the mutex when doing callbacks to avoid nested locking (the callback may need to call something like ceph_con_close). Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-23ceph: unregister canceled/timed out osd requestsSage Weil
Canceled or timed out osd requests were getting left in the request list and never deallocated (until umount). Unregister if they are canceled (control-c) or time out. Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-23ceph: only unregister registered bdiSage Weil
Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-23ceph: do not touch_caps while iterating over caps listSage Weil
Avoid confusing iterate_session_caps(), flag the session while we are iterating so that __touch_cap does not rearrange items on the list. All other modifiers of session->s_caps do so under the protection of s_mutex. Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-21ceph: fix incremental osdmap pg_temp decoding bugSage Weil
An incremental pg_temp wasn't being decoded properly (wrong bound on for loop). Also remove unused local variable, while we're at it. Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-21ceph: fix error paths for corrupt osdmap messagesSage Weil
Both osdmap_decode() and osdmap_apply_incremental() should never return NULL. Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-21ceph: do not drop lease during revalidateSage Weil
We need to hold session s_mutex for __ceph_mdsc_drop_dentry_lease(), which we don't, so skip it. It was purely an optimization. Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-21ceph: ensure rename target dentry fails revalidationSage Weil
This works around a bug in vfs_rename_dir() that rehashes the target dentry. Ensure such dentries always fail revalidation by timing out the dentry lease and kicking it out of the current directory lease gen. This can be reverted when the vfs bug is fixed. Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-21ceph: writeback congestion controlYehuda Sadeh
Set bdi congestion bit when amount of write data in flight exceeds adjustable threshold. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-21ceph: writepage grabs and releases inodeYehuda Sadeh
Fixes a deadlock that is triggered due to kswapd, while the page was locked and the iput couldn't tear down the address space. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2009-12-21ceph: remove unaccessible codeYehuda Sadeh
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2009-12-21ceph: include link to bdi in debugfsSage Weil
Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-21ceph: make mds ops interruptibleSage Weil
Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-21ceph: plug leak of incoming message during connection fault/closeSage Weil
If we explicitly close a connection, or there is a socket error, we need to drop any partially received message. Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-21ceph: hex dump corrupt server data to KERN_DEBUGSage Weil
Also, print fsid using standard format, NOT hex dump. Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-21ceph: fix msgpool reservation leakYehuda Sadeh
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2009-12-21ceph: don't save sent messages on lossy connectionsSage Weil
For lossy connections we drop all state on socket errors, so there is no reason to keep sent ceph_msg's around. Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-21ceph: detect lossy state of connectionSage Weil
The server indicates whether a connection is lossy; set our LOSSYTX bit appropriately. Do not set lossy bit on outgoing connections. Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-21ceph: plug msg leak in con_faultSage Weil
Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-21ceph: carry explicit msg reference for currently sending messageSage Weil
Carry a ceph_msg reference for connection->out_msg. This will allow us to make out_sent optional. Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-11ceph: fix leak of monc mutexSage Weil
Fix leak of monc mutex on ENOMEM or bad fsid when receiving new mon map. Audited all other users. Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-09ceph: do not feed bad device ids to crushSage Weil
Do not feed bad (large) device ids to CRUSH. Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-07ceph: use kref for ceph_msgSage Weil
Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-07ceph: use kref for ceph_osd_requestSage Weil
Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-07ceph: use kref for struct ceph_mds_requestSage Weil
Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-07ceph: simplify ceph_buffer interfaceSage Weil
We never allocate the ceph_buffer and buffer separtely, so use a single constructor. Disallow put on NULL buffer; make the caller check. Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-07ceph: use kref for ceph_bufferSage Weil
Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-04ceph: mark v0.18 releaseSage Weil
Signed-off-by: Sage Weil <sage@newdream.net>