aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/filesystems
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-09-09 12:13:22 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-09 12:13:22 -0400
commit6cccc7d3012344371a897ecdd1a1398286a6ee8a (patch)
tree64d7c301739abb303e15f108df4c00e8da227caf /Documentation/filesystems
parent255ae3fbd298f312ce47ff0c7ee9bb6ad002e0f0 (diff)
parenta8d436f015b627a55ec3b1d15f13d6ab92dd892b (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
Pull ceph updates from Sage Weil: "This includes both the first pile of Ceph patches (which I sent to torvalds@vger, sigh) and a few new patches that add support for fscache for Ceph. That includes a few fscache core fixes that David Howells asked go through the Ceph tree. (Thanks go to Milosz Tanski for putting this feature together) This first batch of patches (included here) had (has) several important RBD bug fixes, hole punch support, several different cleanups in the page cache interactions, improvements in the truncate code (new truncate mutex to avoid shenanigans with i_mutex), and a series of fixes in the synchronous striping read/write code. On top of that is a random collection of small fixes all across the tree (error code checks and error path cleanup, obsolete wq flags, etc)" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (43 commits) ceph: use d_invalidate() to invalidate aliases ceph: remove ceph_lookup_inode() ceph: trivial buildbot warnings fix ceph: Do not do invalidate if the filesystem is mounted nofsc ceph: page still marked private_2 ceph: ceph_readpage_to_fscache didn't check if marked ceph: clean PgPrivate2 on returning from readpages ceph: use fscache as a local presisent cache fscache: Netfs function for cleanup post readpages FS-Cache: Fix heading in documentation CacheFiles: Implement interface to check cache consistency FS-Cache: Add interface to check consistency of a cached object rbd: fix null dereference in dout rbd: fix buffer size for writes to images with snapshots libceph: use pg_num_mask instead of pgp_num_mask for pg.seed calc rbd: fix I/O error propagation for reads ceph: use vfs __set_page_dirty_nobuffers interface instead of doing it inside filesystem ceph: allow sync_read/write return partial successed size of read/write. ceph: fix bugs about handling short-read for sync read mode. ceph: remove useless variable revoked_rdcache ...
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r--Documentation/filesystems/caching/backend-api.txt9
-rw-r--r--Documentation/filesystems/caching/netfs-api.txt37
2 files changed, 40 insertions, 6 deletions
diff --git a/Documentation/filesystems/caching/backend-api.txt b/Documentation/filesystems/caching/backend-api.txt
index d78bab9622c6..277d1e810670 100644
--- a/Documentation/filesystems/caching/backend-api.txt
+++ b/Documentation/filesystems/caching/backend-api.txt
@@ -299,6 +299,15 @@ performed on the denizens of the cache. These are held in a structure of type:
299 enough space in the cache to permit this. 299 enough space in the cache to permit this.
300 300
301 301
302 (*) Check coherency state of an object [mandatory]:
303
304 int (*check_consistency)(struct fscache_object *object)
305
306 This method is called to have the cache check the saved auxiliary data of
307 the object against the netfs's idea of the state. 0 should be returned
308 if they're consistent and -ESTALE otherwise. -ENOMEM and -ERESTARTSYS
309 may also be returned.
310
302 (*) Update object [mandatory]: 311 (*) Update object [mandatory]:
303 312
304 int (*update_object)(struct fscache_object *object) 313 int (*update_object)(struct fscache_object *object)
diff --git a/Documentation/filesystems/caching/netfs-api.txt b/Documentation/filesystems/caching/netfs-api.txt
index 97e6c0ecc5ef..11a0a40ce445 100644
--- a/Documentation/filesystems/caching/netfs-api.txt
+++ b/Documentation/filesystems/caching/netfs-api.txt
@@ -32,7 +32,7 @@ This document contains the following sections:
32 (9) Setting the data file size 32 (9) Setting the data file size
33 (10) Page alloc/read/write 33 (10) Page alloc/read/write
34 (11) Page uncaching 34 (11) Page uncaching
35 (12) Index and data file update 35 (12) Index and data file consistency
36 (13) Miscellaneous cookie operations 36 (13) Miscellaneous cookie operations
37 (14) Cookie unregistration 37 (14) Cookie unregistration
38 (15) Index invalidation 38 (15) Index invalidation
@@ -433,7 +433,7 @@ to the caller. The attribute adjustment excludes read and write operations.
433 433
434 434
435===================== 435=====================
436PAGE READ/ALLOC/WRITE 436PAGE ALLOC/READ/WRITE
437===================== 437=====================
438 438
439And the sixth step is to store and retrieve pages in the cache. There are 439And the sixth step is to store and retrieve pages in the cache. There are
@@ -499,7 +499,7 @@ Else if there's a copy of the page resident in the cache:
499 (*) An argument that's 0 on success or negative for an error code. 499 (*) An argument that's 0 on success or negative for an error code.
500 500
501 If an error occurs, it should be assumed that the page contains no usable 501 If an error occurs, it should be assumed that the page contains no usable
502 data. 502 data. fscache_readpages_cancel() may need to be called.
503 503
504 end_io_func() will be called in process context if the read is results in 504 end_io_func() will be called in process context if the read is results in
505 an error, but it might be called in interrupt context if the read is 505 an error, but it might be called in interrupt context if the read is
@@ -623,6 +623,22 @@ some of the pages being read and some being allocated. Those pages will have
623been marked appropriately and will need uncaching. 623been marked appropriately and will need uncaching.
624 624
625 625
626CANCELLATION OF UNREAD PAGES
627----------------------------
628
629If one or more pages are passed to fscache_read_or_alloc_pages() but not then
630read from the cache and also not read from the underlying filesystem then
631those pages will need to have any marks and reservations removed. This can be
632done by calling:
633
634 void fscache_readpages_cancel(struct fscache_cookie *cookie,
635 struct list_head *pages);
636
637prior to returning to the caller. The cookie argument should be as passed to
638fscache_read_or_alloc_pages(). Every page in the pages list will be examined
639and any that have PG_fscache set will be uncached.
640
641
626============== 642==============
627PAGE UNCACHING 643PAGE UNCACHING
628============== 644==============
@@ -690,9 +706,18 @@ written to the cache and for the cache to finish with the page generally. No
690error is returned. 706error is returned.
691 707
692 708
693========================== 709===============================
694INDEX AND DATA FILE UPDATE 710INDEX AND DATA FILE CONSISTENCY
695========================== 711===============================
712
713To find out whether auxiliary data for an object is up to data within the
714cache, the following function can be called:
715
716 int fscache_check_consistency(struct fscache_cookie *cookie)
717
718This will call back to the netfs to check whether the auxiliary data associated
719with a cookie is correct. It returns 0 if it is and -ESTALE if it isn't; it
720may also return -ENOMEM and -ERESTARTSYS.
696 721
697To request an update of the index data for an index or other object, the 722To request an update of the index data for an index or other object, the
698following function should be called: 723following function should be called: