summaryrefslogtreecommitdiffstats
path: root/fs/ceph/addr.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ceph: make write_begin wait propagate ERESTARTSYSSage Weil2010-03-231-2/+8
| | | | | | | | Currently, if the wait_event_interruptible is interrupted, we return EAGAIN unconditionally and loop, such that we aren't, in fact, interruptible. So, propagate ERESTARTSYS if we get it. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: move dereference after NULL testAlexander Beregalov2010-02-231-1/+3
| | | | | Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: remove page upon writeback completion if lost cache capYehuda Sadeh2010-02-191-0/+11
| | | | | | | | | This page should have been removed earlier when the cache cap was revoked, but a writeback was in flight, so it was skipped. We truncate it here just as the writeback finishes, while it's still locked. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: cleanup async writeback, truncation, invalidate helpersSage Weil2010-02-111-2/+1
| | | | | | | Grab inode ref in helper. Make work functions static, with consistent naming. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: refactor ceph_write_begin, fix ceph_page_mkwriteYehuda Sadeh2010-02-111-29/+51
| | | | | | | | | | Originally ceph_page_mkwrite called ceph_write_begin, hoping that the returned locked page would be the page that it was requested to mkwrite. Factored out relevant part of ceph_page_mkwrite and we lock the right page anyway. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: remove unused variableYehuda Sadeh2010-02-111-1/+0
| | | | | Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: release all pages after successful osd write responseSage Weil2010-02-031-3/+7
| | | | | | | | | | 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>
* ceph: remove duplicate variable initializationJulia Lawall2010-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ceph: writeback congestion controlYehuda Sadeh2009-12-221-2/+33
| | | | | | | | 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>
* ceph: writepage grabs and releases inodeYehuda Sadeh2009-12-221-1/+6
| | | | | | | | 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>
* ceph: allocate and parse mount args before client instanceSage Weil2009-10-271-2/+2
| | | | | | | | 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: Sage Weil <sage@newdream.net>
* ceph: address space operationsSage Weil2009-10-061-0/+1115
The ceph address space methods are concerned primarily with managing the dirty page accounting in the inode, which (among other things) must keep track of which snapshot context each page was dirtied in, and ensure that dirty data is written out to the OSDs in snapshort order. A writepage() on a page that is not currently writeable due to snapshot writeback ordering constraints is ignored (it was presumably called from kswapd). Signed-off-by: Sage Weil <sage@newdream.net>