Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1493768

[PATCH v4 02/12] ext4: tell DAX the size of allocation holes

From Ross Zwisler <ross.zwisler@linux.intel.com>
Newsgroups linux.kernel
Subject [PATCH v4 02/12] ext4: tell DAX the size of allocation holes
Date 2016-09-30 01:00 +0200
Message-ID <smSt3-1Wd-13@gated-at.bofh.it> (permalink)
References <smSjo-1SH-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


When DAX calls _ext4_get_block() and the file offset points to a hole we
currently don't set bh->b_size.  This is current worked around via
buffer_size_valid() in fs/dax.c.

_ext4_get_block() has the hole size information from ext4_map_blocks(), so
populate bh->b_size so we can remove buffer_size_valid() in a later patch.

Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Reviewed-by: Jan Kara <jack@suse.cz>
---
 fs/ext4/inode.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 0900cb4..9075fac 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -759,6 +759,9 @@ static int _ext4_get_block(struct inode *inode, sector_t iblock,
 		ext4_update_bh_state(bh, map.m_flags);
 		bh->b_size = inode->i_sb->s_blocksize * map.m_len;
 		ret = 0;
+	} else if (ret == 0) {
+		/* hole case, need to fill in bh->b_size */
+		bh->b_size = inode->i_sb->s_blocksize * map.m_len;
 	}
 	return ret;
 }
-- 
2.7.4

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4 00/12] re-enable DAX PMD support Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-09-30 00:50 +0200
  [PATCH v4 06/12] dax: consistent variable naming for DAX entries Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-09-30 01:00 +0200
    Re: [PATCH v4 06/12] dax: consistent variable naming for DAX entries Jan Kara <jack@suse.cz> - 2016-10-03 11:40 +0200
  [PATCH v4 02/12] ext4: tell DAX the size of allocation holes Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-09-30 01:00 +0200
  [PATCH v4 05/12] dax: make 'wait_table' global variable static Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-09-30 01:00 +0200
    Re: [PATCH v4 05/12] dax: make 'wait_table' global variable static Jan Kara <jack@suse.cz> - 2016-10-03 11:40 +0200
  [PATCH v4 12/12] dax: remove "depends on BROKEN" from FS_DAX_PMD Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-09-30 01:00 +0200
  [PATCH v4 09/12] dax: correct dax iomap code namespace Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-09-30 01:00 +0200
    Re: [PATCH v4 09/12] dax: correct dax iomap code namespace Christoph Hellwig <hch@lst.de> - 2016-09-30 11:00 +0200
    Re: [PATCH v4 09/12] dax: correct dax iomap code namespace Jan Kara <jack@suse.cz> - 2016-10-03 12:00 +0200
  [PATCH v4 07/12] dax: coordinate locking for offsets in PMD range Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-09-30 01:00 +0200
    Re: [PATCH v4 07/12] dax: coordinate locking for offsets in PMD range Christoph Hellwig <hch@infradead.org> - 2016-09-30 11:50 +0200
    Re: [PATCH v4 07/12] dax: coordinate locking for offsets in PMD range Jan Kara <jack@suse.cz> - 2016-10-03 12:00 +0200
      Re: [PATCH v4 07/12] dax: coordinate locking for offsets in PMD range Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-10-03 20:50 +0200
  [PATCH v4 01/12] ext4: allow DAX writeback for hole punch Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-09-30 01:00 +0200
  [PATCH v4 04/12] ext2: remove support for DAX PMD faults Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-09-30 01:00 +0200
    Re: [PATCH v4 04/12] ext2: remove support for DAX PMD faults Jan Kara <jack@suse.cz> - 2016-10-03 11:40 +0200
  [PATCH v4 03/12] dax: remove buffer_size_valid() Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-09-30 01:00 +0200
    Re: [PATCH v4 03/12] dax: remove buffer_size_valid() Christoph Hellwig <hch@lst.de> - 2016-09-30 10:50 +0200
  [PATCH v4 11/12] xfs: use struct iomap based DAX PMD fault path Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-09-30 01:00 +0200
  [PATCH v4 10/12] dax: add struct iomap based DAX PMD support Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-09-30 01:00 +0200
    Re: [PATCH v4 10/12] dax: add struct iomap based DAX PMD support Christoph Hellwig <hch@infradead.org> - 2016-09-30 12:00 +0200
      Re: [PATCH v4 10/12] dax: add struct iomap based DAX PMD support Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-10-03 23:20 +0200
    Re: [PATCH v4 10/12] dax: add struct iomap based DAX PMD support Jan Kara <jack@suse.cz> - 2016-10-03 13:10 +0200
      Re: [PATCH v4 10/12] dax: add struct iomap based DAX PMD support Christoph Hellwig <hch@lst.de> - 2016-10-03 18:40 +0200
      Re: [PATCH v4 10/12] dax: add struct iomap based DAX PMD support Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-10-03 23:10 +0200
        Re: [PATCH v4 10/12] dax: add struct iomap based DAX PMD support Jan Kara <jack@suse.cz> - 2016-10-04 08:00 +0200
          Re: [PATCH v4 10/12] dax: add struct iomap based DAX PMD support Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-10-04 17:40 +0200
            Re: [PATCH v4 10/12] dax: add struct iomap based DAX PMD support Jan Kara <jack@suse.cz> - 2016-10-05 08:00 +0200
        Re: [PATCH v4 10/12] dax: add struct iomap based DAX PMD support Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-10-06 23:40 +0200
          Re: [PATCH v4 10/12] dax: add struct iomap based DAX PMD support Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-10-07 05:00 +0200
            Re: [PATCH v4 10/12] dax: add struct iomap based DAX PMD support Jan Kara <jack@suse.cz> - 2016-10-07 09:50 +0200
  [PATCH v4 08/12] dax: remove dax_pmd_fault() Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-09-30 01:00 +0200
    Re: [PATCH v4 08/12] dax: remove dax_pmd_fault() Jan Kara <jack@suse.cz> - 2016-10-03 12:00 +0200
  Re: [PATCH v4 00/12] re-enable DAX PMD support Dave Chinner <david@fromorbit.com> - 2016-09-30 01:50 +0200
    Re: [PATCH v4 00/12] re-enable DAX PMD support Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-09-30 05:10 +0200
      Re: [PATCH v4 00/12] re-enable DAX PMD support "Darrick J. Wong" <darrick.wong@oracle.com> - 2016-09-30 06:10 +0200
        Re: [PATCH v4 00/12] re-enable DAX PMD support Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-10-03 21:00 +0200
      Re: [PATCH v4 00/12] re-enable DAX PMD support Dave Chinner <david@fromorbit.com> - 2016-09-30 08:50 +0200
        Re: [PATCH v4 00/12] re-enable DAX PMD support Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-10-03 23:20 +0200
    Re: [PATCH v4 00/12] re-enable DAX PMD support Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-10-04 01:10 +0200
  Re: [PATCH v4 00/12] re-enable DAX PMD support Christoph Hellwig <hch@infradead.org> - 2016-09-30 13:50 +0200

csiph-web