"Yan, Zheng" <ukernel@xxxxxxxxx> writes: > On Mon, Aug 27, 2018 at 6:46 AM Luis Henriques <lhenriques@xxxxxxxx> wrote: <...> >> + if (src_off + len > size) { >> + ret = -EOPNOTSUPP; >> + goto out; >> + } > > we should check src inode's size after getting its caps. Doh! Sure, that make sense. I'll move that code. What about the approach to grab both caps? Does it make sense to you, to use the (modified) ceph_try_get_caps function and retry if it fails? Cheers, -- Luis