]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: file.c cleanup
authorSage Weil <sage@newdream.net>
Thu, 16 Jul 2009 22:40:57 +0000 (15:40 -0700)
committerSage Weil <sage@newdream.net>
Fri, 17 Jul 2009 20:53:38 +0000 (13:53 -0700)
src/kernel/file.c

index 71f8017c499fba87ac146c511b92bbc04864aebb..1af59c0f655e7b166ae8b71eabd99097c5603b83 100644 (file)
@@ -8,6 +8,27 @@
 #include "super.h"
 #include "mds_client.h"
 
+/*
+ * Ceph file operations
+ *
+ * Implement basic open/close functionality, and implement
+ * read/write.
+ *
+ * We implement three modes of file I/O:
+ *  - buffered uses the generic_file_aio_{read,write} helpers
+ *
+ *  - synchronous is used when there is multi-client read/write
+ *    sharing, avoids the page cache, and synchronously waits for an
+ *    ack from the OSD.
+ *
+ *  - direct io takes the variant of the sync path that references
+ *    user pages directly.
+ *
+ * fsync() flushes and waits on dirty pages, but just queues metadata
+ * for writeback: since the MDS can recover size and mtime there is no
+ * need to wait for MDS acknowledgement.
+ */
+
 
 /*
  * Prepare an open request.  Preallocate ceph_cap to avoid an
@@ -288,6 +309,9 @@ void ceph_release_page_vector(struct page **pages, int num_pages)
        kfree(pages);
 }
 
+/*
+ * allocate a vector new pages
+ */
 static struct page **alloc_page_vector(int num_pages)
 {
        struct page **pages;