hpfs: support FIEMAP
authorMikulas Patocka <mikulas@twibright.com>
Mon, 3 Oct 2016 21:00:19 +0000 (23:00 +0200)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 5 Oct 2016 22:31:58 +0000 (18:31 -0400)
Support the FIEMAP ioctl that reports extents allocated by a file.

Signed-off-by: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/hpfs/file.c

index d3bcdd97570057149a9779d00dceaed8a16ed08a..b3be1b5a62e213f0d8def5b5f4dd51d399567199 100644 (file)
@@ -189,6 +189,11 @@ static sector_t _hpfs_bmap(struct address_space *mapping, sector_t block)
        return generic_block_bmap(mapping, block, hpfs_get_block);
 }
 
+static int hpfs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, u64 start, u64 len)
+{
+       return generic_block_fiemap(inode, fieinfo, start, len, hpfs_get_block);
+}
+
 const struct address_space_operations hpfs_aops = {
        .readpage = hpfs_readpage,
        .writepage = hpfs_writepage,
@@ -214,4 +219,5 @@ const struct file_operations hpfs_file_ops =
 const struct inode_operations hpfs_file_iops =
 {
        .setattr        = hpfs_setattr,
+       .fiemap         = hpfs_fiemap,
 };