- 02 3月, 2010 4 次提交
-
-
由 Sage Weil 提交于
The flush_dirty_caps() used to loop over the first entry of the cap_dirty dirty list on the assumption that after calling ceph_check_caps() it would be removed from the list. This isn't true for caps that are being migrated between MDSs, where we've received the EXPORT but not the IMPORT. Instead, do a safe list iteration, and pin the next inode on the list via the CEPH_I_NOFLUSH flag. Signed-off-by: NSage Weil <sage@newdream.net>
-
由 Sage Weil 提交于
We should include caps that are mid-migration (we've received the EXPORT, but not the IMPORT) in the issued caps set. Signed-off-by: NSage Weil <sage@newdream.net>
-
由 Sage Weil 提交于
Verify the file is actually open for the given caps when we are waiting for caps. This ensures we will wake up and return EBADF if another thread closes the file out from under us. Note that EBADF is also the correct return code from write(2) when called on a file handle opened for reading (although the vfs should catch that). Signed-off-by: NSage Weil <sage@newdream.net>
-
由 Sage Weil 提交于
This was simply broken. Apparently at some point we thought about putting the snaptrace in the middle section, but didn't. Signed-off-by: NSage Weil <sage@newdream.net>
-
- 24 2月, 2010 2 次提交
-
-
由 Sage Weil 提交于
Verify the mds session is currently registered before handling incoming messages. Clean up message handlers to pull mds out of session->s_mds instead of less trustworthy src field. Clean up con_{get,put} debug output. Signed-off-by: NSage Weil <sage@newdream.net>
-
由 Sage Weil 提交于
The destroy_inode path needs no inode locks since there are no inode references. Update __ceph_remove_cap comment to reflect that it is called without cap->session->s_mutex in this case. Signed-off-by: NSage Weil <sage@newdream.net>
-
- 20 2月, 2010 2 次提交
-
-
由 Yehuda Sadeh 提交于
There is no state in local vars that requires us to loop after temporarily dropping i_lock. Signed-off-by: NYehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by: NSage Weil <sage@newdream.net>
-
由 Sage Weil 提交于
We need to know whether there was any page left behind, and not the return value (the total number of pages invalidated). Look at the mapping to see if we were successful or not. Move it all into a helper to simplify the two callers. Signed-off-by: NYehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by: NSage Weil <sage@newdream.net>
-
- 18 2月, 2010 2 次提交
-
-
由 Sage Weil 提交于
We need to be able to iterate over all caps on a session with a possibly slow callback on each cap. To allow this, we used to prevent cap reordering while we were iterating. However, we were not safe from races with removal: removing the 'next' cap would make the next pointer from list_for_each_entry_safe be invalid, and cause a lock up or similar badness. Instead, we keep an iterator pointer in the session pointing to the current cap. As before, we avoid reordering. For removal, if the cap isn't the current cap we are iterating over, we are fine. If it is, we clear cap->ci (to mark the cap as pending removal) but leave it in the session list. In iterate_caps, we can safely finish removal and get the next cap pointer. While we're at it, clean up put_cap to not take a cap reservation context, as it was never used. Signed-off-by: NSage Weil <sage@newdream.net>
-
由 Sage Weil 提交于
Use a global counter for the minimum number of allocated caps instead of hard coding a check against readdir_max. This takes into account multiple client instances, and avoids examining the superblock mount options when a cap is dropped. Signed-off-by: NSage Weil <sage@newdream.net>
-
- 12 2月, 2010 5 次提交
-
-
由 Sage Weil 提交于
We were invalidating mapping pages when dropping FILE_CACHE in __send_cap(). But ceph_check_caps attempts to invalidate already, and also checks for success, so we should never get to this point. Signed-off-by: NSage Weil <sage@newdream.net>
-
由 Sage Weil 提交于
There is no reason not to invalidate pages when a truncate is pending. Both throw out page cache pages. Signed-off-by: NSage Weil <sage@newdream.net>
-
由 Sage Weil 提交于
Grab inode ref in helper. Make work functions static, with consistent naming. Signed-off-by: NSage Weil <sage@newdream.net>
-
由 Sage Weil 提交于
Never retain caps in __send_cap() that are being revoked. Signed-off-by: NSage Weil <sage@newdream.net>
-
由 Sage Weil 提交于
Try to invalidate pages in ceph_check_caps() if FILE_CACHE is being revoked. If we fail, queue an immediate async invalidate if FILE_CACHE is being revoked. (If it's not being revoked, we just queue the caps for later evaluation later, as per the old behavior.) Signed-off-by: NSage Weil <sage@newdream.net>
-
- 24 12月, 2009 2 次提交
-
-
由 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: NSage Weil <sage@newdream.net>
-
由 Sage 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: NSage Weil <sage@newdream.net>
-
- 22 12月, 2009 1 次提交
-
-
由 Sage Weil 提交于
Also, print fsid using standard format, NOT hex dump. Signed-off-by: NSage Weil <sage@newdream.net>
-
- 04 12月, 2009 1 次提交
-
-
由 Sage Weil 提交于
Signed-off-by: NSage Weil <sage@newdream.net>
-
- 13 11月, 2009 1 次提交
-
-
由 Sage Weil 提交于
We occasionally want to make a best-effort attempt to invalidate cache pages without fear of blocking. If this fails, we fall back to an async invalidate in another thread. Use invalidate_mapping_pages instead of invalidate_inode_page2, as that will skip locked pages, and not deadlock. Signed-off-by: NSage Weil <sage@newdream.net>
-
- 11 11月, 2009 1 次提交
-
-
由 Sage Weil 提交于
We don't get an explicit affirmative confirmation that our caps reconnect, nor do we necessarily want to pay that cost. So, take all this code out for now. Signed-off-by: NSage Weil <sage@newdream.net>
-
- 10 11月, 2009 1 次提交
-
-
由 Sage Weil 提交于
We were using the cap_gen to track both stale caps (caps that timed out due to temporarily losing touch with the mds) and dead caps that did not reconnect after an MDS failure. Introduce a recon_gen counter to track reconnections to restarted MDSs and kill dead caps based on that instead. Rename gen to cap_gen while we're at it to make it more clear which is which. Signed-off-by: NSage Weil <sage@newdream.net>
-
- 28 10月, 2009 1 次提交
-
-
由 Sage Weil 提交于
This simplifies much of the error handling during mount. It also means that we have the mount args before client creation, and we can initialize based on those options. Signed-off-by: NSage Weil <sage@newdream.net>
-
- 16 10月, 2009 2 次提交
-
-
由 Sage Weil 提交于
Cleanup only. Signed-off-by: NSage Weil <sage@newdream.net>
-
由 Sage Weil 提交于
Previously we were flushing dirty caps by passing an extra flag when traversing the delayed caps list. Besides being a bit ugly, that can also miss caps that are dirty but didn't result in a cap requeue: notably, mark_caps_dirty(). Separate the flushing into a separate helper, and traverse the cap_dirty list. This also brings i_dirty_item in line with i_dirty_caps: we are on the list IFF caps != 0. We carry an inode ref IFF dirty_caps|flushing_caps != 0. Lose the unused return value from __ceph_mark_caps_dirty(). Signed-off-by: NSage Weil <sage@newdream.net>
-
- 15 10月, 2009 1 次提交
-
-
由 Sage Weil 提交于
Both callers of __mark_caps_flushing() do the same work; move it into the helper. Signed-off-by: NSage Weil <sage@newdream.net>
-
- 07 10月, 2009 1 次提交
-
-
由 Sage Weil 提交于
The Ceph metadata servers control client access to inode metadata and file data by issuing capabilities, granting clients permission to read and/or write both inode field and file data to OSDs (storage nodes). Each capability consists of a set of bits indicating which operations are allowed. If the client holds a *_SHARED cap, the client has a coherent value that can be safely read from the cached inode. In the case of a *_EXCL (exclusive) or FILE_WR capabilities, the client is allowed to change inode attributes (e.g., file size, mtime), note its dirty state in the ceph_cap, and asynchronously flush that metadata change to the MDS. In the event of a conflicting operation (perhaps by another client), the MDS will revoke the conflicting client capabilities. In order for a client to cache an inode, it must hold a capability with at least one MDS server. When inodes are released, release notifications are batched and periodically sent en masse to the MDS cluster to release server state. Signed-off-by: NSage Weil <sage@newdream.net>
-