]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: flush mdlog on max_size increase
authorSage Weil <sage@newdream.net>
Tue, 3 Mar 2009 00:29:55 +0000 (16:29 -0800)
committerSage Weil <sage@newdream.net>
Tue, 3 Mar 2009 00:38:15 +0000 (16:38 -0800)
Presumably a writer is waiting for it.

src/mds/Locker.cc

index 7f1fbe4c75b0b9bdcad8f2f0d9ed56253f318a5e..aa589a316d8c3e3b39ae8c473e8ae36dd7edd289 100644 (file)
@@ -1324,6 +1324,11 @@ bool Locker::check_inode_max_size(CInode *in, bool force_wrlock, bool update_siz
   mds->mdlog->submit_entry(le, new C_Locker_FileUpdate_finish(this, in, mut, true));
   wrlock_force(&in->filelock, mut);  // wrlock for duration of journal
   mut->auth_pin(in);
+
+  // make max_size increase timely
+  if (new_max)
+    mds->mdlog->flush();
+
   return true;
 }