diff mbox series

[v2,1/3] ext4, dax: add ext4_bmap to ext4_dax_aops

Message ID 20180914145114.11122-2-toshi.kani@hpe.com (mailing list archive)
State Accepted
Commit 94dbb63117e82253c9592816aa4465f0a9c94850
Headers show
Series fix sync to flush processor cache for ext2/4 DAX files | expand

Commit Message

Kani, Toshi Sept. 14, 2018, 2:51 p.m. UTC
Ext4 mount path calls .bmap to the journal inode. This currently
works for the DAX mount case because ext4_iget() always set
'ext4_da_aops' to any regular files.

In preparation to fix ext4_iget() to set 'ext4_dax_aops' for ext4
DAX files, add ext4_bmap() to 'ext4_dax_aops'. .bmap works for
DAX inodes. [1]

[1]: https://lkml.org/lkml/2018/9/12/803
Fixes: 5f0663bb4a64 ("ext4, dax: introduce ext4_dax_aops")
Signed-off-by: Toshi Kani <toshi.kani@hpe.com>
Suggested-by: Jan Kara <jack@suse.cz>
Cc: Jan Kara <jack@suse.cz>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Cc: <stable@vger.kernel.org>
---
 fs/ext4/inode.c |    1 +
 1 file changed, 1 insertion(+)

Comments

Theodore Ts'o Sept. 16, 2018, 1:32 a.m. UTC | #1
On Fri, Sep 14, 2018 at 08:51:12AM -0600, Toshi Kani wrote:
> Ext4 mount path calls .bmap to the journal inode. This currently
> works for the DAX mount case because ext4_iget() always set
> 'ext4_da_aops' to any regular files.
> 
> In preparation to fix ext4_iget() to set 'ext4_dax_aops' for ext4
> DAX files, add ext4_bmap() to 'ext4_dax_aops'. .bmap works for
> DAX inodes. [1]
> 
> [1]: https://lkml.org/lkml/2018/9/12/803
> Fixes: 5f0663bb4a64 ("ext4, dax: introduce ext4_dax_aops")
> Signed-off-by: Toshi Kani <toshi.kani@hpe.com>
> Suggested-by: Jan Kara <jack@suse.cz>
> Cc: Jan Kara <jack@suse.cz>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: "Theodore Ts'o" <tytso@mit.edu>
> Cc: Andreas Dilger <adilger.kernel@dilger.ca>
> Cc: <stable@vger.kernel.org>

Thanks, applied.

						- Ted
diff mbox series

Patch

diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index d0dd585add6a..e4acaa980467 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -3948,6 +3948,7 @@  static const struct address_space_operations ext4_dax_aops = {
 	.writepages		= ext4_dax_writepages,
 	.direct_IO		= noop_direct_IO,
 	.set_page_dirty		= noop_set_page_dirty,
+	.bmap			= ext4_bmap,
 	.invalidatepage		= noop_invalidatepage,
 };