CEPH-Devel archive mirror
 help / color / mirror / Atom feed
From: Milind Changire <mchangir@redhat.com>
To: xiubli@redhat.com
Cc: idryomov@gmail.com, ceph-devel@vger.kernel.org,
	jlayton@kernel.org, vshankar@redhat.com, stable@vger.kernel.org
Subject: Re: [PATCH v2] ceph: remove the incorrect caps check in _file_size()
Date: Mon, 9 Oct 2023 13:38:55 +0530	[thread overview]
Message-ID: <CAED=hWCKc-pnMQUKmjwgyG5489c5OjUHt-ri2gL+Ps1hGdewrw@mail.gmail.com> (raw)
In-Reply-To: <20230907002211.633935-1-xiubli@redhat.com>

Looks good to me

Reviewed-by: Milind Changire <mchangir@redhat.com>

On Thu, Sep 7, 2023 at 5:54 AM <xiubli@redhat.com> wrote:
>
> From: Xiubo Li <xiubli@redhat.com>
>
> When truncating the inode the MDS will acquire the xlock for the
> ifile Locker, which will revoke the 'Frwsxl' caps from the clients.
> But when the client just releases and flushes the 'Fw' caps to MDS,
> for exmaple, and once the MDS receives the caps flushing msg it
> just thought the revocation has finished. Then the MDS will continue
> truncating the inode and then issued the truncate notification to
> all the clients. While just before the clients receives the cap
> flushing ack they receive the truncation notification, the clients
> will detecte that the 'issued | dirty' is still holding the 'Fw'
> caps.
>
> Fixes: b0d7c2231015 ("ceph: introduce i_truncate_mutex")
> Cc: stable@vger.kernel.org
> URL: https://tracker.ceph.com/issues/56693
> Signed-off-by: Xiubo Li <xiubli@redhat.com>
> ---
>
> V2:
> - Added the info about which commit it's fixing
>
>
>  fs/ceph/inode.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
> index ea6f966dacd5..8017b9e5864f 100644
> --- a/fs/ceph/inode.c
> +++ b/fs/ceph/inode.c
> @@ -769,9 +769,7 @@ int ceph_fill_file_size(struct inode *inode, int issued,
>                         ci->i_truncate_seq = truncate_seq;
>
>                         /* the MDS should have revoked these caps */
> -                       WARN_ON_ONCE(issued & (CEPH_CAP_FILE_EXCL |
> -                                              CEPH_CAP_FILE_RD |
> -                                              CEPH_CAP_FILE_WR |
> +                       WARN_ON_ONCE(issued & (CEPH_CAP_FILE_RD |
>                                                CEPH_CAP_FILE_LAZYIO));
>                         /*
>                          * If we hold relevant caps, or in the case where we're
> --
> 2.41.0
>


-- 
Milind


      reply	other threads:[~2023-10-09  8:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-07  0:22 [PATCH v2] ceph: remove the incorrect caps check in _file_size() xiubli
2023-10-09  8:08 ` Milind Changire [this message]

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='CAED=hWCKc-pnMQUKmjwgyG5489c5OjUHt-ri2gL+Ps1hGdewrw@mail.gmail.com' \
    --to=mchangir@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=jlayton@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=vshankar@redhat.com \
    --cc=xiubli@redhat.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).