Re: [PATCH 4/4] ceph: cap delegated inode count in ceph_parse_deleg_inos()

From: Viacheslav Dubeyko

Date: Fri Jun 05 2026 - 15:13:55 EST


On Thu, 2026-06-04 at 17:41 -0400, Michael Bommarito wrote:
> On Thu, Jun 4, 2026 at 5:06 PM Viacheslav Dubeyko <slava@xxxxxxxxxxx>
> wrote:
> > Technically speaking, I am not completely convinced by this limit.
> > Also, this limit is for one single interval. But if attacker tries
> > multiple times, then we can still have memory pressure or run out
> > of
> > memory. I think we need to consider more robust solution. Could we
> > improve the fix?
>
> I looked at a per session limit but the lock management gets to be a
> bit more complicated.  If you think that's the right direction, I can
> implement v2 based on that.
>
> About the count, if we move to per session, then do you agree that
> the
> right number is based on some factor of mds_client_prealloc_inos?

I believe that it is right direction. Anyway, it's better than to
operate by assumption or hardcode the constant into the code.

Thanks,
Slava.