From: "Yan, Zheng" <zyan@redhat.com>
To: ceph-devel@vger.kernel.org
Cc: jlayton@kernel.org, "Yan, Zheng" <zyan@redhat.com>
Subject: [PATCH v5 5/7] ceph: update i_requested_max_size only when sending cap msg to auth mds
Date: Thu, 5 Mar 2020 20:21:03 +0800 [thread overview]
Message-ID: <20200305122105.69184-6-zyan@redhat.com> (raw)
In-Reply-To: <20200305122105.69184-1-zyan@redhat.com>
Non-auth mds can't do anything to 'update max' cap message.
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/ceph/caps.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index a94d2807f1f3..418e6329da73 100644
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -1355,7 +1355,8 @@ static int __send_cap(struct ceph_mds_client *mdsc, struct ceph_cap *cap,
arg.size = inode->i_size;
ci->i_reported_size = arg.size;
arg.max_size = ci->i_wanted_max_size;
- ci->i_requested_max_size = arg.max_size;
+ if (cap == ci->i_auth_cap)
+ ci->i_requested_max_size = arg.max_size;
if (flushing & CEPH_CAP_XATTR_EXCL) {
old_blob = __ceph_build_xattrs_blob(ci);
--
2.21.1
next prev parent reply other threads:[~2020-03-05 12:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-05 12:20 [PATCH v5 0/7] ceph: don't request caps for idle open files Yan, Zheng
2020-03-05 12:20 ` [PATCH v5 1/7] ceph: always renew caps if mds_wanted is insufficient Yan, Zheng
2020-03-05 12:21 ` [PATCH v5 2/7] ceph: consider inode's last read/write when calculating wanted caps Yan, Zheng
2020-03-05 12:21 ` [PATCH v5 3/7] ceph: remove delay check logic from ceph_check_caps() Yan, Zheng
2020-03-05 12:21 ` [PATCH v5 4/7] ceph: simplify calling of ceph_get_fmode() Yan, Zheng
2020-03-05 12:21 ` Yan, Zheng [this message]
2020-03-05 12:21 ` [PATCH v5 6/7] ceph: check all mds' caps after page writeback Yan, Zheng
2020-03-05 12:21 ` [PATCH v5 7/7] ceph: calculate dir's wanted caps according to recent dirops Yan, Zheng
2020-03-05 15:32 ` [PATCH v5 0/7] ceph: don't request caps for idle open files Jeff Layton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200305122105.69184-6-zyan@redhat.com \
--to=zyan@redhat.com \
--cc=ceph-devel@vger.kernel.org \
--cc=jlayton@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox