Hi r0ller, A couple of weeks ago I also run to the issue when I found lack of fallocate or POSIX_FALLOCATE(2) (to be precise) a little bit sad. From the very first view typical usage of POSIX_FALLOCATE(2) seems straight forward, comparing to the Linux fallocate(2) where different modes have to be supported. However, things can go a little bit more complicated if you are dealing with an existing file with a more complex structure. Because of that, I found difficult to provide good quality implementation without a proper way to test it. Before EuroBSD 2019 as a part of work about fuzzing the FFS, I decided to bring some well known FS test (namely speaking "XFS tests') suit to make sure that bugs that we fix did not introduce a regression. The same thing applies to the new features of FS, is relatively easy to port implementation from other OS/FS, but without a proper way to test them, I would be very careful to introduce such things too quickly to the end-users.
One thing that I was missing for XFS tests, and going to publish part of it soon, is a way to view the internal structure of inodes and other metadata of Filesystem. My primary use case was to debug mount issues, in the example the issue that I showed during my presentation about the fuzzing. But also same apply to the code that manipulates inode blocks. Hopefully, we can elaborate on that, and as I pointed earlier I would be careful with merging new FS features especially such wide used as POSIX_FALLOCATE(2) without a proper FS test suit or extensive enough testing that would require proper too like i.e. FSDB. Thanks Maciej ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Sunday, November 3, 2019 6:06 PM, r0ller <r0l...@freemail.hu> wrote: > Hi Jaromir, > > Indeed. That's bad news but thanks for your answer! I've even found this: > https://wiki.netbsd.org/projects/project/ffs-fallocate/ > Are there any details for this project besides that page? I don't know > anything about NetBSD internals though if it's not meant for gurus, I'd have > a look at it and give it a try. > > Best regards, > r0ller > > -------- Eredeti levél -------- > Feladó: Jaromír Doleček < jaromir.dole...@gmail.com (Link -> > mailto:jaromir.dole...@gmail.com) > > Dátum: 2019 november 3 15:16:34 > Tárgy: Re: adding linux syscall fallocate > Címzett: r0ller < r0l...@freemail.hu (Link -> mailto:r0l...@freemail.hu) > > Le dim. 3 nov. 2019 à 08:57, r0ller <r0l...@freemail.hu> a écrit : > >> As you can see on the attached screenshot, "line 4741" gets printed out. So >> I went on to check what happens in VOP_FALLOCATE but it gets really internal >> there. >> >> Does anyone have any hint? > > fallocate VOP is not implemented for FFS: > >> grep fallocate * > ffs_vnops.c: { &vop_fallocate_desc, genfs_eopnotsupp }, /* fallocate */ > ffs_vnops.c: { &vop_fallocate_desc, spec_fallocate }, /* fallocate */ > ffs_vnops.c: { &vop_fallocate_desc, vn_fifo_bypass }, /* fallocate */ > > Jaromir