Re: [PATCH] ceph: force updating the msg pointer in non-split case

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 17, 2023 at 7:24 AM <xiubli@xxxxxxxxxx> wrote:
>
> From: Xiubo Li <xiubli@xxxxxxxxxx>
>
> When the MClientSnap reqeust's op is not CEPH_SNAP_OP_SPLIT the
> request may still contain a list of 'split_realms', and we need
> to skip it anyway. Or it will be parsed as a corrupt snaptrace.
>
> Cc: stable@xxxxxxxxxxxxxxx
> Cc: Frank Schilder <frans@xxxxxx>
> Reported-by: Frank Schilder <frans@xxxxxx>
> URL: https://tracker.ceph.com/issues/61200
> Signed-off-by: Xiubo Li <xiubli@xxxxxxxxxx>
> ---
>  fs/ceph/snap.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/fs/ceph/snap.c b/fs/ceph/snap.c
> index 0e59e95a96d9..d95dfe16b624 100644
> --- a/fs/ceph/snap.c
> +++ b/fs/ceph/snap.c
> @@ -1114,6 +1114,9 @@ void ceph_handle_snap(struct ceph_mds_client *mdsc,
>                                 continue;
>                         adjust_snap_realm_parent(mdsc, child, realm->ino);
>                 }
> +       } else {
> +               p += sizeof(u64) * num_split_inos;
> +               p += sizeof(u64) * num_split_realms;
>         }
>
>         /*
> --
> 2.40.1
>

Hi Xiubo,

This code appears to be very old -- it goes back to the initial commit
963b61eb041e ("ceph: snapshot management") in 2009.  Do you have an
explanation for why this popped up only now?

Has MDS always been including split_inos and split_realms arrays in
!CEPH_SNAP_OP_SPLIT case or is this a recent change?  If it's a recent
change, I'd argue that this needs to be addressed on the MDS side.

Thanks,

                Ilya




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Ceph Dev]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux