On Tue, Apr 18, 2023 at 11:00:12AM +0100, David Howells wrote: > Hi Christoph, > > It seems that my use of i_size_read(file_inode(in)) in filemap_splice_read() > to get the size of the file to be spliced from doesn't work in the case of > blockdevs and it always returns 0. > > What would be the best way to get the blockdev size? Look at > file->f_mapping->i_size maybe? Yes. Everything using an inode in generic read/write helpers always needs to use file->f_mapping->host to get at the inode. Not just for the size.