From b00100ce6483ed95724b5601faa72cb4d83dba0d Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 7 Apr 2008 19:48:19 -0700 Subject: [PATCH] mds: only increase file_max if filelock is wrlockable --- src/TODO | 6 ++---- src/mds/Locker.cc | 3 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/TODO b/src/TODO index 622524cd4fa09..bf18261431429 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 868ace123a02d..d5001ff31abe1 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; -- 2.39.5