On Mon, Apr 27, 2020 at 01:15:22PM +0300, Amir Goldstein wrote: > On Mon, Apr 27, 2020 at 9:28 AM Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote: > > > > On Sat, Apr 25, 2020 at 01:49:43PM +0300, Amir Goldstein wrote: > > > I would use as generic helper name generic_fiemap_checks() > > > akin to generic_write_checks() and generic_remap_file_range_prep() => > > > generic_remap_checks(). > > > > None of the other fiemap helpers use the redundant generic_ prefix. > > Fine. I still don't like the name _validate() so much because it implies > yes or no, not length truncating. > > What's more, if we decide that FIEMAP_FLAG_SYNC handling should > be done inside this generic helper, we would definitely need to rename it > again. So how about going for something a bit more abstract like > fiemap_prep() or whatever. Ok, I'll rename it to fiemap_prep. > > What is your take about FIEMAP_FLAG_SYNC handling btw? Oh, I hadn't really noticed that mess. Taking it into fiemap_prep might make most sense, so that it nominally is under fs control for e.g. locking purposes.