On Sat, Oct 27, 2018 at 10:54:09AM -0600, Jens Axboe wrote: > On 10/26/18 10:12 PM, Ernesto A. Fernández wrote: > > On Fri, Oct 26, 2018 at 08:29:00AM -0600, Jens Axboe wrote: > >> On 10/26/18 3:30 AM, Jan Kara wrote: > >>> On Mon 08-10-18 20:58:23, Ernesto A. Fernández wrote: > >>>> On a DIO_SKIP_HOLES filesystem, the ->get_block() method is currently > >>>> not allowed to create blocks for an empty inode. This confusion comes > >>>> from trying to bit shift a negative number, so check the size of the > >>>> inode first. > >>>> > >>>> The problem is most visible for hfsplus, because the fallback to > >>>> buffered I/O doesn't happen and the write fails with EIO. This is in > >>>> part the fault of the module, because it gives a wrong return value on > >>>> ->get_block(); that will be fixed in a separate patch. > >>>> > >>>> Signed-off-by: Ernesto A. Fernández <ernesto.mnd.fernandez@xxxxxxxxx> > >>> > >>> Good catch. The patch looks good. You can add: > >>> > >>> Reviewed-by: Jan Kara <jack@xxxxxxx> > >>> > >>> Also Jens often picks up patches for direct IO code so added him to CC. > >>> Jens? > >> > >> Looks good to me. Ernesto, did you run this through xfstests as well? > > > > I only ran the quick tests for ext2. Also for hfsplus, but those are not > > very meaningful because too many are failing. > > OK, that's useful. I'll run it through the whole thing just in case, > but I don't expect to find anything. So what happened with this patch? Any issues? > > -- > Jens Axboe >