On Tue, Jul 12, 2022 at 11:43 AM Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote: > > I'm going to leave discussing the permissions aspect to the experts in > that realm, but from a practical point of view, why do we allow the dedupe > ioctl to investigate arbitrary byte ranges? If you're going to dedupe, > it has to be block aligned (both start and length). I agree, although I think that's a separate issue. I suspect it should just check for inode->i_blkbits alignment. I think that's what DIO does, and it seems like a sane minimum. Linus