From: Sage Weil Date: Tue, 8 Apr 2008 02:48:19 +0000 (-0700) Subject: mds: only increase file_max if filelock is wrlockable X-Git-Tag: v0.3~239^2~77 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b00100ce6483ed95724b5601faa72cb4d83dba0d;p=ceph.git mds: only increase file_max if filelock is wrlockable --- diff --git a/src/TODO b/src/TODO index 622524cd4fa..bf182614314 100644 --- a/src/TODO +++ b/src/TODO @@ -16,6 +16,8 @@ userspace client - reference count lease validations on path lookup? kernel client +- file_data_version stuff! +- deal with CAP_RDCACHE properly: invalidate cache pages? - trim expired leases so we don't indefinitely hold dcache/icache refs... - apply_truncate needs to truncate page cache, or something? - procfs/debugfs @@ -27,11 +29,7 @@ kernel client - vfs - can we use dentry_path(), if it gets merged into mainline? - io / osd client - - carry wrbuffer/rdcache caps until data is flushed - - this should make the utimes bit kick in - - invalidate cache pages? - kick requests when new map arrives - - capability changes (flush.. need way to initiate/block on writeback initiated by mds) - osd ack vs commit handling. hmm! - mon client - work out message resend logic..? diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc index 868ace123a0..d5001ff31ab 100644 --- a/src/mds/Locker.cc +++ b/src/mds/Locker.cc @@ -904,7 +904,8 @@ void Locker::handle_client_file_caps(MClientFileCaps *m) bool increase_max = false; int64_t inc = in->get_layout_size_increment(); if ((wanted & (CEPH_CAP_WR|CEPH_CAP_WRBUFFER|CEPH_CAP_WREXTEND)) && - size + inc > latest->max_size) { + size + inc > latest->max_size && + in->filelock.can_wrlock()) { dout(10) << "hey, wr caps wanted, and size " << size << " > max " << latest->max_size << " *2, increasing" << dendl; increase_max = true;