]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
*** empty log message ***
authorsage <sage@29311d96-e01e-0410-9327-a35deaab8ce9>
Sat, 16 Sep 2006 16:57:34 +0000 (16:57 +0000)
committersage <sage@29311d96-e01e-0410-9327-a35deaab8ce9>
Sat, 16 Sep 2006 16:57:34 +0000 (16:57 +0000)
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@864 29311d96-e01e-0410-9327-a35deaab8ce9

ceph/client/Client.cc

index 00f5a45216b29dc62954892cbed420ef83faa375..72629ef8e036285d6f2cbd8bc17a5d4694474aa0 100644 (file)
@@ -1997,3 +1997,50 @@ int Client::statfs(const char *path, struct statfs *stbuf)
   assert(0);  // implement me
   return 0;
 }
+
+
+
+int Client;:lazyio_propogate(int fd, off_t offset, size_t count)
+{
+  client_lock.Lock();
+  dout(3) << "op: client->lazyio_propogate(" << fd
+                 << ", " << offset << ", " << count << ")" << endl;
+  
+  assert(fh_map.count(fh));
+  Fh *f = fh_map[fh];
+  Inode *in = f->inode;
+  
+  if (g_conf.client_oc) {
+       Cond cond;
+       bool done = false;
+       in->fc.flush_dirty(new C_SafeCond(&client_lock, &cond, &done));
+       
+       while (!done)
+         cond.Wait(client_lock);
+       
+  } else {
+       // mm, nothin to do.
+  }
+  
+  client_lock.Unlock();
+}
+
+int Client::lazyio_synchronize(int fs, off_t offset, size_t count)
+{
+  client_lock.Lock();
+  dout(3) << "op: client->lazyio_synchronize(" << fd
+                 << ", " << offset << ", " << count << ")" << endl;
+  
+  assert(fh_map.count(fh));
+  Fh *f = fh_map[fh];
+  Inode *in = f->inode;
+  
+  if (g_conf.client_oc) {
+       in->fc.flush_dirty(0);       // flush to invalidate.
+       in->fc.release_clean();
+  } else {
+       // mm, nothin to do.
+  }
+  
+  client_lock.Unlock();
+}